calculate_stability: Calculate the stability index of the obtained clusters when...

Description Usage Arguments Details Value

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

1

Arguments

consensus

consensus item of the sc3min slot of an object of 'SingleCellExperiment' class

k

number of clusters k

Details

Imagine a given cluster is split into N clusters when k is changed (all possible values of k are provided via ks argument in the main sc3min function). In each of the new clusters there are given_cells of the given cluster and also some extra_cells from other clusters. Then we define stability as follows:

\frac{1}{ks*N^2}∑_{ks}∑_{N}\frac{given\_cells}{given\_cells + extra\_cells}

Where one N corrects for the number of clusters and the other N is a penalty for splitting the cluster. ks corrects for the range of k.

Value

a numeric vector containing a stability index of each cluster


brickyyyy/SC3min documentation built on May 8, 2019, 8:07 a.m.