Description Usage Arguments Value Author(s) References Examples
A function that compares a set of clustering schemes by PAM or EM and computes the gap statistics from a given range of k.
1 | compareGap(distM, k.max, clusterings = NULL, B = 100L, method = "PAM")
|
distM |
A distance matrix of tree leaves. |
k.max |
An integer that is at least 2, indicating the max number of clusters desired for the tree. |
clusterings |
A list of k.max - 1 positive integer vectors. Each positive integer vector is usually the clustering output of clustPAM or clustEM, in which each leaf node is associated with an integer representing the cluster it is assigned. Each positive integer vector must be the same length as the number of leaves in the tree. Clustering vectors must indicate the clustering scheme of the tree from 2 clusters (k = 2) to k.max clusters (k = k.max). Clustering vectors must be ordered in the list by increasing number of clusters. Default value of clusterings is NULL, in which case EM or PAM clustering will be performed on distM over 2 <= k <= k.max depending on the method argument. |
B |
An integer indicating the number of bootstrap samples. Default value is 100. |
method |
A character string that is either "PAM" or "EM", indicating the clustering method in case clustering is not given. This argument is ignored if clustering is given. Default value is "PAM". |
An S3 object of "clusGap" with gap statistics.
Yuzi Li, rainal.li@mail.utoronto.ca
Maechler M, Rousseeuw P, Struyf A, Hubert M, Hornik K (2021). cluster: Cluster Analysis Basics and Extensions. R package version 2.1.2
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.