stabilityRange: Stability index for a range of k clusters.

View source: R/stabilityIndex.R

stabilityRangeR Documentation

Stability index for a range of k clusters.

Description

This analysis permits to estimate whether the clustering is meaningfully affected by small variations in the sample. For a range of k values (k.range), a clustering using the k-means algorithm is carried out. 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].

Usage

stabilityRange(
  data,
  k.range = c(2, 15),
  bs = 100,
  cbi = "kmeans",
  getImages = FALSE,
  all_metrics = FALSE,
  seed = NULL,
  gold_standard = NULL,
  ...
)

Arguments

data

A SummarizedExperiment. The SummarizedExperiment must contain an assay with the following structure: A valid header with names. The first column of the header is the ID or name of the instance of the dataset (e.g., ontology, pathway, etc.) on which the metrics are measured. The other columns of the header contains the names of the metrics. The rows contains the measurements of the metrics for each instance in the dataset.

k.range

Concatenation of two positive integers. The first value k.range[1] is considered as the lower bound of the range, whilst the second one, k.range[2], as the higher. Both values must be contained in [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 pam. The method used in 'hclust' CBI is "ward.D2".

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.

Value

A ExperimentList containing the stability and cluster measurements for 2 to k clusters.

References

\insertRef

milligan1996measuringevaluomeR

\insertRef

jaccard1901distributionevaluomeR

Examples

# Using example data from our package
data("ontMetrics")
result <- stabilityRange(ontMetrics, k.range=c(2,3))


neobernad/evaluomeR documentation built on Nov. 12, 2024, 11:29 p.m.