plotcluster: Plot Clustering Results

View source: R/tools.R

plotclusterR Documentation

Plot Clustering Results

Description

Plots clustering results from a cluster analysis with ‘ppclust’.

Usage

plotcluster(objx, mt, cm, tv, cp=1, pt=19, trans=FALSE)

Arguments

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.

tv

a number specifying the threshold membership degree when the value of cm is selected as threshold. The value of tv should be between 0 and 1. The default is max for using maximum degree of memberships for each data obejct. The alternative option is threshold for the 0.5.

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.

Author(s)

Zeynel Cebeci

Examples

# 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)

ppclust documentation built on May 29, 2024, 7:20 a.m.