get_membership-ConsensusPartition-method: Get membership matrix

Description Usage Arguments Details Value Author(s) Examples

Description

Get membership matrix

Usage

1
2
## S4 method for signature 'ConsensusPartition'
get_membership(object, k, each = FALSE)

Arguments

object

a ConsensusPartition-class object.

k

number of partitions.

each

whether return the percentage membership matrix which is summarized from all repetitive partitionings or the individual membership in every random partitioning.

Details

If each == TRUE, the value in the membership matrix is the probability to be in one subgroup, while if each == FALSE, the membership matrix contains the class labels for the partitions in all repetitive partitionings with randomly sampling subset of rows in the matrix.

The percent membership matrix is calculated by cl_consensus.

Value

A membership matrix where rows correspond to the samples in the original matrix.

Author(s)

Zuguang Gu <[email protected]>

Examples

1
2
3
4
data(cola_rl)
obj = cola_rl["sd", "kmeans"]
get_membership(obj, k = 2)
get_membership(obj, k = 2, each = TRUE)

jokergoo/cola documentation built on Nov. 19, 2018, 9:18 p.m.