plotcluster | R Documentation |
Plots clustering results from a cluster analysis with ‘ppclust’.
plotcluster(objx, mt, cm, tv, cp=1, pt=19, trans=FALSE)
objx |
an object of ‘ppclust’ class. |
mt |
a character to specify the membership type. The default is u for fuzzy membership degrees. The alternative option is t for typicality degrees. The default is t for the algorithms which produce both types of membership matrices. |
cm |
a character to specify the crisping method. The default is max for using maximum degree of memberships for each data obejct. The alternative option is threshold for the membership degrees exceeding a user-specified threshold value with |
tv |
a number specifying the threshold membership degree when the value of |
cp |
an integer for the index of available color palettes. The default is 1. The options are 2, 3, 4 and 5 for different color themes. |
pt |
an integer specifying the ASCII code of a point character to be used in plotting. The default is 19 for solid circles. Use # for displaying the cluster with their cluster labels. |
trans |
a logical value for the type of plots. The default is FALSE for solid point colors. The alternative option is TRUE for transparent point colors. |
Zeynel Cebeci
# Run FCM for 3 clusters on the data set Iris
res.fcm <- fcm(x=iris[,-5], centers=3)
par(ask=TRUE)
# Plot the clustering results with solid colors
plotcluster(res.fcm, cp=1)
# Plot the same clustering results with transparent colors
plotcluster(res.fcm, cp=1, trans=TRUE)
# Plot the same clustering results for the memberships > 0.75
plotcluster(res.fcm, cp=1, cm="threshold", tv=0.75, trans=TRUE)
par(ask=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.