Get statistics

# S4 method for ConsensusPartition
get_stats(object, k = object@k, all_stats = FALSE)

Arguments

object

A ConsensusPartition-class object.

k

Number of subgroups. The value can be a vector.

all_stats

Whether to show all statistics that were calculated. Used internally.

Details

The statistics are:

1-PAC

1 - proportion of ambiguous clustering, calculated by PAC.

mean_silhouette

The mean silhouette score. See https://en.wikipedia.org/wiki/Silhouette_(clustering) .

concordance

The mean probability that each partition fits the consensus partition, calculated by concordance.

area_increased

The increased area under eCDF (the empirical cumulative distribution function) curve to the previous k.

Rand

This is the percent of pairs of samples that are both in a same cluster or both are not in a same cluster in the partition of k and k-1. See https://en.wikipedia.org/wiki/Rand_index .

Jaccard

The ratio of pairs of samples are both in a same cluster in the partition of k and k-1 and the pairs of samples are both in a same cluster in the partition k or k-1.

Value

A matrix of partition statistics.

Author

Zuguang Gu <z.gu@dkfz.de>

Examples

data(golub_cola)
obj = golub_cola["ATC", "skmeans"]
get_stats(obj)
#>   k     1-PAC mean_silhouette concordance area_increased      Rand   Jaccard
#> 2 2 1.0000000       0.9953240   0.9977778     0.50705126 0.4933490 0.4933490
#> 3 3 1.0000000       0.9788419   0.9900000     0.26217651 0.8595462 0.7182104
#> 4 4 0.8024583       0.8560353   0.9047222     0.11098757 0.9104069 0.7553419
#> 5 5 0.7633889       0.6659601   0.8386111     0.05163403 0.9624413 0.8714859
#> 6 6 0.7295874       0.5711678   0.8069444     0.03855567 0.9139280 0.7002725
get_stats(obj, k = 2)
#>   k 1-PAC mean_silhouette concordance area_increased     Rand  Jaccard
#> 2 2     1        0.995324   0.9977778      0.5070513 0.493349 0.493349