get_membership-ConsensusPartition-method {cola} | R Documentation

## Get membership matrix

### Description

Get membership matrix

### Usage

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

### Arguments

`object` | A `ConsensusPartition-class` object.
`k` | Number of subgroups.
`each` | Whether to return the percentage membership matrix which is summarized from all partitions or the individual membership in every single partition run.

### Details

If `each == FALSE`, the value in the membership matrix is the probability to be in one subgroup, while if `each == TRUE`, the membership matrix contains the subgroup labels for every single partitions which are from randomly sampling from the original matrix.

The percent membership matrix is calculated by `cl_consensus`.

### Value

- If `each == FALSE`, it returns a membership matrix where rows correspond to the columns from the subgroups.

- If `each == TRUE`, it returns a membership matrix where rows correspond to the columns from the original matrix.

### Author(s)

Zuguang Gu <z.gu@dkfz.de>

### See Also

`get_membership,ConsensusPartitionList-method` summarizes membership from partitions from all combinations of top-value methods and partitioning methods.

### Examples

    data(golub_cola)
    obj = golub_cola["ATC", "skmeans"]
    get_membership(obj, k = 2)
    get_membership(obj, k = 2, each = TRUE)

[Package cola version 1.8.1 Index]