View source: R/stabilityIndex.R
stability | R Documentation |
This analysis permits to estimate whether the clustering is meaningfully
affected by small variations in the sample. First, a clustering using the
k-means algorithm is carried out. The value of k
can be provided by the user.
Then, the stability index is the mean of the Jaccard coefficient
values of a number of bs
bootstrap replicates. The values are in the range [0,1],
having the following meaning:
Unstable: [0, 0.60[.
Doubtful: [0.60, 0.75].
Stable: ]0.75, 0.85].
Highly Stable: ]0.85, 1].
stability(
data,
k = 5,
bs = 100,
cbi = "kmeans",
getImages = FALSE,
all_metrics = FALSE,
seed = NULL,
gold_standard = NULL,
...
)
data |
A |
k |
Positive integer. Number of clusters between [2,15] range. |
bs |
Positive integer. Bootstrap value to perform the resampling. |
cbi |
Clusterboot interface name (default: "kmeans"):
"kmeans", "clara", "clara_pam", "hclust", "pamk", "pamk_pam", "pamk".
Any CBI appended with '_pam' makes use of |
getImages |
Boolean. If true, a plot is displayed. |
all_metrics |
Boolean. If true, clustering is performed upon all the dataset. |
seed |
Positive integer. A seed for internal bootstrap. |
gold_standard: |
Numeric vector. A vector of clusters from a gold standard classification, e.g. c(1,2,1,1,2). Only applicable if parameter 'all_metrics' is set to TRUE. |
A ExperimentList
containing the stability and cluster measurements
for k clusters.
milligan1996measuringevaluomeR
\insertRefjaccard1901distributionevaluomeR
# Using example data from our package
data("ontMetrics")
result <- stability(ontMetrics, k=6, getImages=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.