Learn R Programming

SC3 (version 1.1.4)

StabilityIndex: Calculate the stability index of the obtained clusters when changing k

Description

Stability index shows how stable each cluster is accross the selected range of k. The stability index varies between 0 and 1, where 1 means that the same cluster appears in every solution for different k.

Usage

StabilityIndex(stab.res, k)

Arguments

stab.res
internal matrix of precomputed clustering results
k
current value of the number of clusters k

Value

a numeric vector containing a stability index of each cluster

Details

Formula (imagine a given cluster with is split into N clusters when k is changed, and in each of the new clusters there are given_cells of the given cluster and also some extra_cells from other clusters): SI = sum_over_ks(sum_over_clusters_N(given_cells/(given_cells + extra_cells)))/N(corrects for stability of each cluster)/N(corrects for the number of clusters)/length(ks)