Get membership matrix

# S4 method for ConsensusPartitionList
get_membership(object, k)

Arguments

object

A ConsensusPartitionList-class object.

k

Number of subgroups.

Details

The membership matrix (the probability of each sample to be in one subgroup, if assuming columns represent samples) is inferred from the consensus partition of every combination of methods, weighted by the mean silhouette score of the partition for each method. So methods which give unstable partitions have lower weights when summarizing membership matrix from all methods.

Value

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

See also

get_membership,ConsensusPartition-method returns membership matrix for a single top-value method and partitioning method.

Author

Zuguang Gu <z.gu@dkfz.de>

Examples

data(golub_cola)
get_membership(golub_cola, k = 2)
#>                    p1          p2
#> sample_39 0.731038559 0.268961441
#> sample_40 0.720377492 0.279622508
#> sample_42 0.924915704 0.075084296
#> sample_47 0.990820170 0.009179830
#> sample_48 1.000000000 0.000000000
#> sample_49 0.712632133 0.287367867
#> sample_41 1.000000000 0.000000000
#> sample_43 0.938337415 0.061662585
#> sample_44 1.000000000 0.000000000
#> sample_45 0.994467882 0.005532118
#> sample_46 0.979889832 0.020110168
#> sample_70 0.937015181 0.062984819
#> sample_71 0.907139875 0.092860125
#> sample_72 0.922809286 0.077190714
#> sample_68 1.000000000 0.000000000
#> sample_69 0.996355241 0.003644759
#> sample_67 0.297292992 0.702707008
#> sample_55 0.679628130 0.320371870
#> sample_56 0.732612835 0.267387165
#> sample_59 0.909796158 0.090203842
#> sample_52 0.010626116 0.989373884
#> sample_53 0.002873866 0.997126134
#> sample_51 0.002242777 0.997757223
#> sample_50 0.002242777 0.997757223
#> sample_54 0.215532053 0.784467947
#> sample_57 0.011523030 0.988476970
#> sample_58 0.006938530 0.993061470
#> sample_60 0.186683128 0.813316872
#> sample_61 0.008831796 0.991168204
#> sample_65 0.008200707 0.991799293
#> sample_66 0.595770383 0.404229617
#> sample_63 0.010626116 0.989373884
#> sample_64 0.057016551 0.942983449
#> sample_62 0.010626116 0.989373884
#> sample_1  0.780777899 0.219222101
#> sample_2  0.367300026 0.632699974
#> sample_3  0.701338101 0.298661899
#> sample_4  0.788586268 0.211413732
#> sample_5  1.000000000 0.000000000
#> sample_6  0.688266393 0.311733607
#> sample_7  0.706836652 0.293163348
#> sample_8  0.732268739 0.267731261
#> sample_9  0.930549814 0.069450186
#> sample_10 0.780575669 0.219424331
#> sample_11 0.928565479 0.071434521
#> sample_12 0.113240456 0.886759544
#> sample_13 1.000000000 0.000000000
#> sample_14 0.941796189 0.058203811
#> sample_15 1.000000000 0.000000000
#> sample_16 0.945051963 0.054948037
#> sample_17 0.760200332 0.239799668
#> sample_18 0.864477292 0.135522708
#> sample_19 0.945051963 0.054948037
#> sample_20 1.000000000 0.000000000
#> sample_21 1.000000000 0.000000000
#> sample_22 0.727753156 0.272246844
#> sample_23 0.732490353 0.267509647
#> sample_24 0.998247523 0.001752477
#> sample_25 0.752478838 0.247521162
#> sample_26 0.912900898 0.087099102
#> sample_27 0.701652076 0.298347924
#> sample_34 0.016541219 0.983458781
#> sample_35 0.040529974 0.959470026
#> sample_36 0.003868249 0.996131751
#> sample_37 0.002242777 0.997757223
#> sample_38 0.018103680 0.981896320
#> sample_28 0.019023239 0.980976761
#> sample_29 0.215375512 0.784624488
#> sample_30 0.005857015 0.994142985
#> sample_31 0.017101421 0.982898579
#> sample_32 0.017018720 0.982981280
#> sample_33 0.002242777 0.997757223