pamk {fpc} | R Documentation |
This calls the function pam
to perform a
partitioning around medoids clustering with the number of clusters
estimated by optimum average silhouette width.
pamk(data,krange=2:10,scaling=FALSE, diss=inherits(data, "dist"),...)
data |
a data matrix or data frame, or dissimilarity matrix or
object. See pam for more information. |
krange |
integer vector. Numbers of clusters which are to be
compared by the average silhouette width criterion. Note: This can't
estimate number of clusters nc=1 , and therefore 1 should not be in
krange . |
scaling |
either a logical value or a numeric vector of length
equal to the number of variables. If scaling is a numeric
vector with length equal to the number of variables, then each
variable is divided by the corresponding value from scaling .
If scaling is TRUE then scaling is done by dividing
the (centered) variables by their root-mean-square, and if
scaling is FALSE , no scaling is done. |
diss |
logical flag: if TRUE (default for dist or
dissimilarity -objects), then data will be considered
as a dissimilarity matrix. If FALSE , then data will
be considered as a matrix of observations by variables. |
... |
further arguments to be transferred to
pam . |
A list with components
pamobject |
The output of the optimal run of the
pam -function. |
nc |
the optimal number of clusters. |
Christian Hennig chrish@stats.ucl.ac.uk http://www.homepages.ucl.ac.uk/~ucakche/
Kaufman, L. and Rousseeuw, P.J. (1990). "Finding Groups in Data: An Introduction to Cluster Analysis". Wiley, New York.
set.seed(20000) face <- rFace(50,dMoNo=2,dNoEy=0,p=2) pk <- pamk(face)