multi_pam_gen: Multiple PAM (K-medoids) generation
Description
Multiple PAM (K-medoids) generation
Usage
multi_pam_gen(
X,
rep = 10,
range.k = c(2, 5),
is.distance = FALSE,
method = "random"
)
Value
matrix of clusterings Nsample x Nrepeat
Arguments
- X
input data Nsample x Nfeatures or distance matrix.
- rep
number of repeats
- range.k
vector of minimum and maximum values for k c(min, max)
- is.distance
binary balue indicating if the input X is distance
- method
method for the choice of k at each repeat c("random", "silhouette")
Details
At each repeat, k is selected randomly or based on the best silhouette width from a discrete uniform distribution between range.k[1] and range.k[2].
Then PAM clustering is applied and result is returned.
Examples
Run this codeX = gaussian_clusters()$X
Clusters = multi_pam_gen(X)
Run the code above in your browser using DataLab