Learn R Programming

cluster (version 1.3-2)

clusplot.partition: Bivariate clusplot of a partitioning object

Description

Creates the clusplot of a partition object.

Usage

clusplot.partition(x, ...)

Arguments

x
an object of class "partition", e.g. created by the functions pam, clara, or fanny.

All optional arguments available to the function clusplot.default (except for the diss option) may also

Distances
When option lines is 1 or 2 we optain a k by k matrix (k is the number of clusters). The element at row j and column s is the distance between ellipse j and ellipse s. If lines=0, then the value of this component is NA.
Shading
A vector of length k (where k is the number of clusters), containing the amount of shading per cluster. Let y be a vector where element i is the ratio between the number of objects in cluster i and the area of ellipse i. When the cluster i is a line se

Side Effects

a visual display of the clustering is plotted on the current graphics device.

Details

clusplot uses the functions princomp and cmdscale. These functions are data reduction techniques. They will represent the data in a bivariate plot. Ellipses are then drawn to indicate the clusters. The further layout of the plot is determined by the optional arguments.

If the clustering algorithms pam, fanny and clara are applied to a data matrix of observations-by-variables then a clusplot of the resulting clustering can always be drawn. When the data matrix contains missing values and the clustering is performed with pam or fanny, the dissimilarity matrix will be given as input to clusplot. When the clustering algorithm clara was applied to a data matrix with NAs then clusplot will replace the missing values as described in clusplot.default, because a dissimilarity matrix is not available.

References

Kaufman, L. and Rousseeuw, P.J. (1990). Finding Groups in Data: An Introduction to Cluster Analysis. Wiley, New York.

Pison, G., Struyf, A. and Rousseeuw, P.J. (1997). Displaying a Clustering with CLUSPLOT, Technical Report, University of Antwerp, submitted.

Struyf, A., Hubert, M. and Rousseeuw, P.J. (1997). Integrating Robust Clustering Techniques in S-PLUS, Computational Statistics and Data Analysis, 26, 17-37.

See Also

partition.object, pam, pam.object, clara, clara.object, fanny, fanny.object, par, clusplot.default.

Examples

Run this code
## generate 25 objects, divided into 2 clusters.
x <- rbind(cbind(rnorm(10,0,0.5), rnorm(10,0,0.5)),
           cbind(rnorm(15,5,0.5), rnorm(15,5,0.5)))
clusplot(pam(x, 2))

Run the code above in your browser using DataLab