cola Report for GDS4274

Date: 2019-12-25 21:24:38 CET, cola version: 1.3.2

Document is loading...


Summary

All available functions which can be applied to this res_list object:

res_list
#> A 'ConsensusPartitionList' object with 24 methods.
#>   On a matrix with 51941 rows and 130 columns.
#>   Top rows are extracted by 'SD, CV, MAD, ATC' methods.
#>   Subgroups are detected by 'hclust, kmeans, skmeans, pam, mclust, NMF' method.
#>   Number of partitions are tried for k = 2, 3, 4, 5, 6.
#>   Performed in total 30000 partitions by row resampling.
#> 
#> Following methods can be applied to this 'ConsensusPartitionList' object:
#>  [1] "cola_report"           "collect_classes"       "collect_plots"         "collect_stats"        
#>  [5] "colnames"              "functional_enrichment" "get_anno_col"          "get_anno"             
#>  [9] "get_classes"           "get_matrix"            "get_membership"        "get_stats"            
#> [13] "is_best_k"             "is_stable_k"           "ncol"                  "nrow"                 
#> [17] "rownames"              "show"                  "suggest_best_k"        "test_to_known_factors"
#> [21] "top_rows_heatmap"      "top_rows_overlap"     
#> 
#> You can get result for a single method by, e.g. object["SD", "hclust"] or object["SD:hclust"]
#> or a subset of methods by object[c("SD", "CV")], c("hclust", "kmeans")]

The call of run_all_consensus_partition_methods() was:

#> run_all_consensus_partition_methods(data = mat, mc.cores = 4, anno = anno)

Dimension of the input matrix:

mat = get_matrix(res_list)
dim(mat)
#> [1] 51941   130

Density distribution

The density distribution for each sample is visualized as in one column in the following heatmap. The clustering is based on the distance which is the Kolmogorov-Smirnov statistic between two distributions.

library(ComplexHeatmap)
densityHeatmap(mat, top_annotation = HeatmapAnnotation(df = get_anno(res_list), 
    col = get_anno_col(res_list)), ylab = "value", cluster_columns = TRUE, show_column_names = FALSE,
    mc.cores = 4)

plot of chunk density-heatmap

Suggest the best k

Folowing table shows the best k (number of partitions) for each combination of top-value methods and partition methods. Clicking on the method name in the table goes to the section for a single combination of methods.

The cola vignette explains the definition of the metrics used for determining the best number of partitions.

suggest_best_k(res_list)
The best k 1-PAC Mean silhouette Concordance Optional k
ATC:hclust 2 1.000 0.996 0.997 **
ATC:kmeans 3 1.000 0.969 0.989 ** 2
ATC:mclust 3 1.000 0.991 0.982 ** 2
ATC:NMF 2 1.000 0.965 0.986 **
ATC:pam 6 0.957 0.927 0.960 ** 2,5
ATC:skmeans 6 0.925 0.878 0.946 * 2,3,4,5
SD:NMF 3 0.903 0.918 0.965 *
CV:NMF 3 0.846 0.893 0.955
MAD:NMF 3 0.841 0.871 0.947
CV:skmeans 4 0.840 0.799 0.909
MAD:mclust 2 0.806 0.881 0.930
MAD:pam 2 0.802 0.918 0.959
SD:kmeans 3 0.730 0.849 0.915
SD:skmeans 3 0.705 0.826 0.907
MAD:skmeans 2 0.639 0.825 0.929
MAD:kmeans 2 0.635 0.812 0.920
CV:kmeans 3 0.634 0.777 0.898
CV:hclust 4 0.599 0.804 0.900
CV:mclust 2 0.573 0.884 0.928
MAD:hclust 2 0.533 0.776 0.886
CV:pam 3 0.527 0.820 0.902
SD:pam 3 0.499 0.798 0.863
SD:mclust 2 0.472 0.825 0.874
SD:hclust 2 0.417 0.723 0.859

**: 1-PAC > 0.95, *: 1-PAC > 0.9

CDF of consensus matrices

Cumulative distribution function curves of consensus matrix for all methods.

collect_plots(res_list, fun = plot_ecdf)

plot of chunk collect-plots

Consensus heatmap

Consensus heatmaps for all methods. (What is a consensus heatmap?)

collect_plots(res_list, k = 2, fun = consensus_heatmap, mc.cores = 4)

plot of chunk tab-collect-consensus-heatmap-1

collect_plots(res_list, k = 3, fun = consensus_heatmap, mc.cores = 4)

plot of chunk tab-collect-consensus-heatmap-2

collect_plots(res_list, k = 4, fun = consensus_heatmap, mc.cores = 4)

plot of chunk tab-collect-consensus-heatmap-3

collect_plots(res_list, k = 5, fun = consensus_heatmap, mc.cores = 4)

plot of chunk tab-collect-consensus-heatmap-4

collect_plots(res_list, k = 6, fun = consensus_heatmap, mc.cores = 4)

plot of chunk tab-collect-consensus-heatmap-5

Membership heatmap

Membership heatmaps for all methods. (What is a membership heatmap?)

collect_plots(res_list, k = 2, fun = membership_heatmap, mc.cores = 4)

plot of chunk tab-collect-membership-heatmap-1

collect_plots(res_list, k = 3, fun = membership_heatmap, mc.cores = 4)

plot of chunk tab-collect-membership-heatmap-2

collect_plots(res_list, k = 4, fun = membership_heatmap, mc.cores = 4)

plot of chunk tab-collect-membership-heatmap-3

collect_plots(res_list, k = 5, fun = membership_heatmap, mc.cores = 4)

plot of chunk tab-collect-membership-heatmap-4

collect_plots(res_list, k = 6, fun = membership_heatmap, mc.cores = 4)

plot of chunk tab-collect-membership-heatmap-5

Signature heatmap

Signature heatmaps for all methods. (What is a signature heatmap?)

Note in following heatmaps, rows are scaled.

collect_plots(res_list, k = 2, fun = get_signatures, mc.cores = 4)

plot of chunk tab-collect-get-signatures-1

collect_plots(res_list, k = 3, fun = get_signatures, mc.cores = 4)

plot of chunk tab-collect-get-signatures-2

collect_plots(res_list, k = 4, fun = get_signatures, mc.cores = 4)

plot of chunk tab-collect-get-signatures-3

collect_plots(res_list, k = 5, fun = get_signatures, mc.cores = 4)

plot of chunk tab-collect-get-signatures-4

collect_plots(res_list, k = 6, fun = get_signatures, mc.cores = 4)

plot of chunk tab-collect-get-signatures-5

Statistics table

The statistics used for measuring the stability of consensus partitioning. (How are they defined?)

get_stats(res_list, k = 2)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      2 0.387           0.525       0.821          0.467 0.565   0.565
#> CV:NMF      2 0.703           0.885       0.947          0.439 0.571   0.571
#> MAD:NMF     2 0.516           0.881       0.893          0.485 0.508   0.508
#> ATC:NMF     2 1.000           0.965       0.986          0.413 0.590   0.590
#> SD:skmeans  2 0.521           0.791       0.892          0.496 0.504   0.504
#> CV:skmeans  2 0.511           0.852       0.903          0.502 0.498   0.498
#> MAD:skmeans 2 0.639           0.825       0.929          0.494 0.502   0.502
#> ATC:skmeans 2 1.000           0.959       0.984          0.483 0.516   0.516
#> SD:mclust   2 0.472           0.825       0.874          0.490 0.500   0.500
#> CV:mclust   2 0.573           0.884       0.928          0.489 0.497   0.497
#> MAD:mclust  2 0.806           0.881       0.930          0.494 0.497   0.497
#> ATC:mclust  2 1.000           1.000       1.000          0.466 0.535   0.535
#> SD:kmeans   2 0.479           0.730       0.849          0.447 0.544   0.544
#> CV:kmeans   2 0.297           0.583       0.786          0.433 0.565   0.565
#> MAD:kmeans  2 0.635           0.812       0.920          0.468 0.527   0.527
#> ATC:kmeans  2 1.000           0.994       0.998          0.440 0.559   0.559
#> SD:pam      2 0.378           0.587       0.841          0.432 0.577   0.577
#> CV:pam      2 0.588           0.897       0.939          0.276 0.771   0.771
#> MAD:pam     2 0.802           0.918       0.959          0.444 0.554   0.554
#> ATC:pam     2 1.000           0.969       0.988          0.453 0.549   0.549
#> SD:hclust   2 0.417           0.723       0.859          0.384 0.603   0.603
#> CV:hclust   2 0.409           0.660       0.826          0.334 0.706   0.706
#> MAD:hclust  2 0.533           0.776       0.886          0.389 0.706   0.706
#> ATC:hclust  2 1.000           0.996       0.997          0.434 0.565   0.565
get_stats(res_list, k = 3)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      3 0.903           0.918       0.965          0.314 0.654   0.468
#> CV:NMF      3 0.846           0.893       0.955          0.443 0.693   0.508
#> MAD:NMF     3 0.841           0.871       0.947          0.266 0.611   0.396
#> ATC:NMF     3 0.776           0.860       0.930          0.584 0.723   0.537
#> SD:skmeans  3 0.705           0.826       0.907          0.312 0.720   0.502
#> CV:skmeans  3 0.674           0.799       0.901          0.323 0.696   0.463
#> MAD:skmeans 3 0.657           0.769       0.889          0.320 0.717   0.494
#> ATC:skmeans 3 0.979           0.953       0.980          0.263 0.851   0.717
#> SD:mclust   3 0.398           0.183       0.618          0.280 0.713   0.511
#> CV:mclust   3 0.454           0.489       0.755          0.254 0.814   0.653
#> MAD:mclust  3 0.637           0.785       0.889          0.264 0.814   0.644
#> ATC:mclust  3 1.000           0.991       0.982          0.407 0.805   0.636
#> SD:kmeans   3 0.730           0.849       0.915          0.338 0.749   0.576
#> CV:kmeans   3 0.634           0.777       0.898          0.388 0.598   0.412
#> MAD:kmeans  3 0.620           0.785       0.859          0.324 0.792   0.629
#> ATC:kmeans  3 1.000           0.969       0.989          0.526 0.759   0.574
#> SD:pam      3 0.499           0.798       0.863          0.283 0.797   0.676
#> CV:pam      3 0.527           0.820       0.902          0.996 0.685   0.592
#> MAD:pam     3 0.517           0.716       0.816          0.345 0.805   0.669
#> ATC:pam     3 0.787           0.933       0.949          0.400 0.790   0.626
#> SD:hclust   3 0.566           0.702       0.865          0.383 0.845   0.745
#> CV:hclust   3 0.480           0.739       0.838          0.433 0.695   0.584
#> MAD:hclust  3 0.625           0.749       0.872          0.383 0.766   0.673
#> ATC:hclust  3 0.819           0.920       0.945          0.506 0.764   0.582
get_stats(res_list, k = 4)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      4 0.810           0.812       0.914         0.1129 0.881   0.709
#> CV:NMF      4 0.859           0.869       0.932         0.1180 0.874   0.682
#> MAD:NMF     4 0.589           0.482       0.703         0.1355 0.809   0.554
#> ATC:NMF     4 0.697           0.742       0.861         0.1008 0.883   0.678
#> SD:skmeans  4 0.571           0.625       0.690         0.1310 0.871   0.662
#> CV:skmeans  4 0.840           0.799       0.909         0.1126 0.866   0.631
#> MAD:skmeans 4 0.673           0.738       0.822         0.1310 0.802   0.498
#> ATC:skmeans 4 0.977           0.944       0.949         0.1452 0.898   0.742
#> SD:mclust   4 0.591           0.562       0.759         0.1123 0.737   0.485
#> CV:mclust   4 0.481           0.443       0.703         0.1230 0.749   0.483
#> MAD:mclust  4 0.681           0.816       0.884         0.1358 0.710   0.382
#> ATC:mclust  4 0.893           0.860       0.940         0.0964 0.953   0.861
#> SD:kmeans   4 0.572           0.660       0.791         0.1489 0.862   0.680
#> CV:kmeans   4 0.623           0.731       0.829         0.1340 0.853   0.674
#> MAD:kmeans  4 0.590           0.627       0.766         0.1512 0.808   0.554
#> ATC:kmeans  4 0.711           0.631       0.743         0.0922 0.959   0.880
#> SD:pam      4 0.591           0.570       0.785         0.2448 0.812   0.609
#> CV:pam      4 0.578           0.700       0.833         0.3139 0.737   0.470
#> MAD:pam     4 0.657           0.814       0.883         0.2146 0.795   0.542
#> ATC:pam     4 0.782           0.784       0.837         0.1035 0.940   0.838
#> SD:hclust   4 0.595           0.722       0.847         0.1128 0.936   0.863
#> CV:hclust   4 0.599           0.804       0.900         0.2271 0.938   0.866
#> MAD:hclust  4 0.522           0.685       0.778         0.2249 0.855   0.710
#> ATC:hclust  4 0.782           0.844       0.888         0.0927 0.940   0.819
get_stats(res_list, k = 5)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      5 0.864           0.859       0.937         0.0741 0.889   0.676
#> CV:NMF      5 0.798           0.841       0.913         0.0794 0.908   0.703
#> MAD:NMF     5 0.627           0.630       0.806         0.0608 0.798   0.445
#> ATC:NMF     5 0.622           0.616       0.794         0.0661 0.842   0.528
#> SD:skmeans  5 0.674           0.537       0.757         0.0764 0.858   0.554
#> CV:skmeans  5 0.759           0.595       0.798         0.0758 0.874   0.569
#> MAD:skmeans 5 0.847           0.808       0.905         0.0712 0.822   0.453
#> ATC:skmeans 5 0.933           0.833       0.915         0.0391 0.972   0.908
#> SD:mclust   5 0.604           0.639       0.791         0.0583 0.788   0.480
#> CV:mclust   5 0.647           0.715       0.799         0.1119 0.767   0.409
#> MAD:mclust  5 0.756           0.867       0.915         0.0587 0.904   0.694
#> ATC:mclust  5 0.790           0.704       0.830         0.0813 0.887   0.628
#> SD:kmeans   5 0.641           0.669       0.802         0.0891 0.862   0.612
#> CV:kmeans   5 0.658           0.730       0.833         0.0943 0.856   0.612
#> MAD:kmeans  5 0.672           0.767       0.826         0.0816 0.816   0.458
#> ATC:kmeans  5 0.673           0.564       0.697         0.0621 0.828   0.498
#> SD:pam      5 0.598           0.565       0.764         0.1219 0.827   0.503
#> CV:pam      5 0.618           0.680       0.829         0.0569 0.898   0.662
#> MAD:pam     5 0.630           0.578       0.789         0.0803 0.807   0.420
#> ATC:pam     5 0.946           0.918       0.965         0.1054 0.834   0.534
#> SD:hclust   5 0.597           0.684       0.823         0.0973 0.993   0.984
#> CV:hclust   5 0.653           0.792       0.891         0.0421 0.979   0.948
#> MAD:hclust  5 0.514           0.578       0.730         0.0912 0.943   0.845
#> ATC:hclust  5 0.764           0.826       0.839         0.0591 0.953   0.831
get_stats(res_list, k = 6)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      6 0.676           0.646       0.817         0.0713 0.901   0.656
#> CV:NMF      6 0.740           0.630       0.806         0.0465 0.927   0.719
#> MAD:NMF     6 0.622           0.646       0.798         0.0633 0.904   0.668
#> ATC:NMF     6 0.713           0.629       0.811         0.0336 0.875   0.573
#> SD:skmeans  6 0.753           0.728       0.819         0.0471 0.903   0.579
#> CV:skmeans  6 0.833           0.765       0.875         0.0472 0.914   0.615
#> MAD:skmeans 6 0.755           0.730       0.821         0.0450 0.930   0.692
#> ATC:skmeans 6 0.925           0.878       0.946         0.0339 0.939   0.793
#> SD:mclust   6 0.622           0.579       0.681         0.0557 0.950   0.804
#> CV:mclust   6 0.677           0.676       0.771         0.0423 0.958   0.825
#> MAD:mclust  6 0.710           0.572       0.785         0.0635 0.956   0.827
#> ATC:mclust  6 0.771           0.682       0.813         0.0285 0.931   0.714
#> SD:kmeans   6 0.628           0.614       0.757         0.0565 0.957   0.831
#> CV:kmeans   6 0.698           0.650       0.808         0.0545 0.942   0.777
#> MAD:kmeans  6 0.701           0.678       0.804         0.0475 0.995   0.979
#> ATC:kmeans  6 0.700           0.628       0.746         0.0470 0.912   0.613
#> SD:pam      6 0.618           0.521       0.733         0.0462 0.883   0.550
#> CV:pam      6 0.626           0.654       0.805         0.0464 0.836   0.434
#> MAD:pam     6 0.787           0.728       0.866         0.0576 0.892   0.554
#> ATC:pam     6 0.957           0.927       0.960         0.0306 0.951   0.794
#> SD:hclust   6 0.611           0.626       0.793         0.0530 0.981   0.953
#> CV:hclust   6 0.691           0.780       0.883         0.0331 0.997   0.992
#> MAD:hclust  6 0.551           0.505       0.705         0.0404 0.937   0.806
#> ATC:hclust  6 0.785           0.804       0.888         0.0435 0.973   0.883

Following heatmap plots the partition for each combination of methods and the lightness correspond to the silhouette scores for samples in each method. On top the consensus subgroup is inferred from all methods by taking the mean silhouette scores as weight.

collect_stats(res_list, k = 2)

plot of chunk tab-collect-stats-from-consensus-partition-list-1

collect_stats(res_list, k = 3)

plot of chunk tab-collect-stats-from-consensus-partition-list-2

collect_stats(res_list, k = 4)

plot of chunk tab-collect-stats-from-consensus-partition-list-3

collect_stats(res_list, k = 5)

plot of chunk tab-collect-stats-from-consensus-partition-list-4

collect_stats(res_list, k = 6)

plot of chunk tab-collect-stats-from-consensus-partition-list-5

Partition from all methods

Collect partitions from all methods:

collect_classes(res_list, k = 2)

plot of chunk tab-collect-classes-from-consensus-partition-list-1

collect_classes(res_list, k = 3)

plot of chunk tab-collect-classes-from-consensus-partition-list-2

collect_classes(res_list, k = 4)

plot of chunk tab-collect-classes-from-consensus-partition-list-3

collect_classes(res_list, k = 5)

plot of chunk tab-collect-classes-from-consensus-partition-list-4

collect_classes(res_list, k = 6)

plot of chunk tab-collect-classes-from-consensus-partition-list-5

Top rows overlap

Overlap of top rows from different top-row methods:

top_rows_overlap(res_list, top_n = 1000, method = "euler")

plot of chunk tab-top-rows-overlap-by-euler-1

top_rows_overlap(res_list, top_n = 2000, method = "euler")

plot of chunk tab-top-rows-overlap-by-euler-2

top_rows_overlap(res_list, top_n = 3000, method = "euler")

plot of chunk tab-top-rows-overlap-by-euler-3

top_rows_overlap(res_list, top_n = 4000, method = "euler")

plot of chunk tab-top-rows-overlap-by-euler-4

top_rows_overlap(res_list, top_n = 5000, method = "euler")

plot of chunk tab-top-rows-overlap-by-euler-5

Also visualize the correspondance of rankings between different top-row methods:

top_rows_overlap(res_list, top_n = 1000, method = "correspondance")

plot of chunk tab-top-rows-overlap-by-correspondance-1

top_rows_overlap(res_list, top_n = 2000, method = "correspondance")

plot of chunk tab-top-rows-overlap-by-correspondance-2

top_rows_overlap(res_list, top_n = 3000, method = "correspondance")

plot of chunk tab-top-rows-overlap-by-correspondance-3

top_rows_overlap(res_list, top_n = 4000, method = "correspondance")

plot of chunk tab-top-rows-overlap-by-correspondance-4

top_rows_overlap(res_list, top_n = 5000, method = "correspondance")

plot of chunk tab-top-rows-overlap-by-correspondance-5

Heatmaps of the top rows:

top_rows_heatmap(res_list, top_n = 1000)

plot of chunk tab-top-rows-heatmap-1

top_rows_heatmap(res_list, top_n = 2000)

plot of chunk tab-top-rows-heatmap-2

top_rows_heatmap(res_list, top_n = 3000)

plot of chunk tab-top-rows-heatmap-3

top_rows_heatmap(res_list, top_n = 4000)

plot of chunk tab-top-rows-heatmap-4

top_rows_heatmap(res_list, top_n = 5000)

plot of chunk tab-top-rows-heatmap-5

Test to known annotations

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res_list, k = 2)
#>               n disease.state(p) development.stage(p) other(p) k
#> SD:NMF       79         3.48e-10             0.279731 1.42e-12 2
#> CV:NMF      126         2.72e-06             0.064229 1.43e-13 2
#> MAD:NMF     129         3.41e-01             0.000926 8.61e-11 2
#> ATC:NMF     128         1.43e-01             0.154258 7.09e-06 2
#> SD:skmeans  127         3.41e-13             0.065334 2.99e-15 2
#> CV:skmeans  129         1.00e+00             0.069684 3.89e-08 2
#> MAD:skmeans 115         4.21e-11             0.016017 3.61e-16 2
#> ATC:skmeans 127         4.26e-01             0.751408 4.09e-05 2
#> SD:mclust   126         5.12e-09             0.010269 2.99e-13 2
#> CV:mclust   127         1.18e-09             0.026084 4.35e-13 2
#> MAD:mclust  125         1.49e-10             0.005323 3.46e-14 2
#> ATC:mclust  130         4.13e-01             0.669155 5.46e-04 2
#> SD:kmeans   121         6.34e-20             0.057005 1.56e-19 2
#> CV:kmeans   100         1.14e-02             0.049720 2.51e-10 2
#> MAD:kmeans  117         1.04e-12             0.038842 2.23e-15 2
#> ATC:kmeans  130         3.47e-01             0.253184 3.72e-05 2
#> SD:pam       89         1.74e-06             0.006283 8.03e-12 2
#> CV:pam      128         3.39e-11             0.564705 1.70e-10 2
#> MAD:pam     129         1.26e-08             0.082266 1.18e-11 2
#> ATC:pam     128         4.49e-01             0.231163 8.41e-06 2
#> SD:hclust   121         1.66e-03             0.000155 2.89e-09 2
#> CV:hclust   109         5.94e-24             0.612640 1.80e-23 2
#> MAD:hclust  115         2.78e-08             0.012649 5.48e-09 2
#> ATC:hclust  130         2.91e-01             0.306307 2.96e-05 2
test_to_known_factors(res_list, k = 3)
#>               n disease.state(p) development.stage(p) other(p) k
#> SD:NMF      125         1.86e-11             0.132176 1.14e-17 3
#> CV:NMF      126         1.35e-10             0.055205 1.29e-18 3
#> MAD:NMF     122         1.69e-09             0.019900 5.07e-19 3
#> ATC:NMF     123         1.97e-01             0.010693 9.97e-12 3
#> SD:skmeans  121         5.26e-08             0.001015 1.66e-20 3
#> CV:skmeans  120         1.60e-06             0.001539 2.48e-25 3
#> MAD:skmeans 117         7.71e-08             0.001568 3.99e-21 3
#> ATC:skmeans 128         7.08e-02             0.567559 5.22e-07 3
#> SD:mclust    37         2.00e-03             0.226969 3.72e-05 3
#> CV:mclust    75         1.18e-13             0.353051 1.88e-13 3
#> MAD:mclust  119         1.26e-09             0.000849 5.58e-21 3
#> ATC:mclust  130         7.01e-02             0.478838 4.39e-04 3
#> SD:kmeans   128         1.29e-11             0.020698 3.03e-17 3
#> CV:kmeans   116         9.45e-15             0.006292 1.05e-21 3
#> MAD:kmeans  124         7.50e-11             0.005313 9.50e-19 3
#> ATC:kmeans  127         2.91e-01             0.096114 2.51e-09 3
#> SD:pam      125         1.45e-17             0.040989 3.43e-20 3
#> CV:pam      125         2.06e-12             0.070806 2.22e-17 3
#> MAD:pam     120         4.28e-14             0.018014 1.66e-16 3
#> ATC:pam     130         9.46e-02             0.200180 8.30e-09 3
#> SD:hclust   104         1.93e-17             0.259845 2.13e-18 3
#> CV:hclust   116         7.81e-18             0.136327 3.96e-23 3
#> MAD:hclust  113         6.82e-18             0.009458 4.92e-17 3
#> ATC:hclust  127         3.84e-01             0.163242 1.43e-07 3
test_to_known_factors(res_list, k = 4)
#>               n disease.state(p) development.stage(p) other(p) k
#> SD:NMF      120         5.28e-15              0.04755 4.25e-24 4
#> CV:NMF      124         1.37e-12              0.09094 1.93e-24 4
#> MAD:NMF      83         6.36e-06              0.03222 7.97e-15 4
#> ATC:NMF     116         1.03e-01              0.15361 9.33e-08 4
#> SD:skmeans  111         5.32e-16              0.01194 1.90e-27 4
#> CV:skmeans  115         1.02e-12              0.00788 1.88e-31 4
#> MAD:skmeans 121         1.36e-10              0.00278 8.27e-19 4
#> ATC:skmeans 127         3.47e-01              0.56568 4.42e-07 4
#> SD:mclust    94         1.30e-10              0.03012 8.18e-13 4
#> CV:mclust    59         1.54e-13              0.31969 5.75e-14 4
#> MAD:mclust  122         5.31e-18              0.02498 7.80e-22 4
#> ATC:mclust  119         1.04e-01              0.58945 4.51e-04 4
#> SD:kmeans   107         4.67e-22              0.01640 2.32e-27 4
#> CV:kmeans   117         3.71e-24              0.05082 1.36e-30 4
#> MAD:kmeans  108         2.59e-12              0.01221 1.63e-22 4
#> ATC:kmeans  108         5.02e-01              0.10440 4.87e-08 4
#> SD:pam       94         1.04e-12              0.06078 4.85e-20 4
#> CV:pam      120         1.78e-11              0.26070 4.32e-18 4
#> MAD:pam     123         7.26e-15              0.03136 3.28e-19 4
#> ATC:pam     125         3.75e-07              0.22077 1.46e-14 4
#> SD:hclust   105         1.37e-20              0.00279 7.97e-28 4
#> CV:hclust   122         9.49e-18              0.01365 7.46e-23 4
#> MAD:hclust  109         1.66e-15              0.00333 2.11e-24 4
#> ATC:hclust  124         5.33e-05              0.17637 8.86e-11 4
test_to_known_factors(res_list, k = 5)
#>               n disease.state(p) development.stage(p) other(p) k
#> SD:NMF      125         2.14e-15             0.075929 7.19e-30 5
#> CV:NMF      126         9.99e-14             0.023929 2.80e-31 5
#> MAD:NMF     101         6.56e-16             0.090942 3.61e-24 5
#> ATC:NMF      97         8.90e-03             0.001634 3.21e-08 5
#> SD:skmeans   73         6.25e-11             0.182692 5.50e-20 5
#> CV:skmeans   76         2.96e-09             0.251659 2.39e-21 5
#> MAD:skmeans 116         4.91e-16             0.015261 6.22e-38 5
#> ATC:skmeans 119         2.50e-01             0.346888 7.31e-08 5
#> SD:mclust   107         3.06e-18             0.188425 3.37e-25 5
#> CV:mclust   116         4.41e-23             0.158030 1.08e-35 5
#> MAD:mclust  127         7.18e-17             0.006301 5.49e-24 5
#> ATC:mclust  108         1.25e-02             0.746610 7.32e-07 5
#> SD:kmeans   110         7.28e-23             0.030458 1.50e-47 5
#> CV:kmeans   115         6.24e-24             0.020245 7.94e-50 5
#> MAD:kmeans  124         8.25e-20             0.000705 1.28e-44 5
#> ATC:kmeans   93         1.27e-04             0.053099 8.65e-10 5
#> SD:pam       90         1.08e-17             0.083973 3.95e-24 5
#> CV:pam      115         8.31e-23             0.154265 6.90e-28 5
#> MAD:pam      84         3.69e-12             0.027925 6.25e-31 5
#> ATC:pam     123         5.31e-07             0.317248 1.49e-10 5
#> SD:hclust   104         1.10e-16             0.025770 7.66e-21 5
#> CV:hclust   118         1.58e-16             0.003419 2.26e-21 5
#> MAD:hclust   97         3.10e-13             0.008175 5.49e-26 5
#> ATC:hclust  123         6.29e-06             0.236282 5.12e-11 5
test_to_known_factors(res_list, k = 6)
#>               n disease.state(p) development.stage(p) other(p) k
#> SD:NMF       98         2.48e-17             0.075278 1.70e-30 6
#> CV:NMF       96         7.27e-17             0.008806 3.95e-32 6
#> MAD:NMF     106         6.33e-14             0.032664 9.08e-27 6
#> ATC:NMF      97         1.40e-01             0.021478 1.45e-06 6
#> SD:skmeans  121         4.54e-19             0.044259 4.89e-38 6
#> CV:skmeans  119         5.06e-18             0.008536 2.26e-36 6
#> MAD:skmeans 115         1.37e-15             0.006448 1.26e-34 6
#> ATC:skmeans 124         4.14e-01             0.093402 4.48e-07 6
#> SD:mclust    95         1.14e-19             0.129743 1.34e-26 6
#> CV:mclust   108         5.71e-19             0.232906 3.44e-32 6
#> MAD:mclust   89         3.31e-13             0.002433 6.29e-22 6
#> ATC:mclust  103         1.55e-04             0.365739 1.23e-05 6
#> SD:kmeans   104         1.38e-21             0.012045 3.86e-48 6
#> CV:kmeans    99         1.61e-20             0.221613 1.80e-40 6
#> MAD:kmeans  116         4.39e-18             0.000986 1.03e-40 6
#> ATC:kmeans  107         1.22e-04             0.278954 8.77e-10 6
#> SD:pam       76         3.96e-14             0.314121 2.13e-20 6
#> CV:pam      114         9.55e-21             0.112786 5.82e-37 6
#> MAD:pam     110         7.05e-16             0.002839 1.28e-35 6
#> ATC:pam     128         6.67e-07             0.236237 2.25e-12 6
#> SD:hclust    98         3.23e-19             0.000678 4.96e-26 6
#> CV:hclust   111         4.77e-18             0.000109 1.58e-22 6
#> MAD:hclust   86         1.44e-12             0.029089 1.46e-28 6
#> ATC:hclust  123         1.85e-05             0.222804 5.80e-11 6

Results for each method


SD:hclust

The object with results only for a single top-value method and a single partition method can be extracted as:

res = res_list["SD", "hclust"]
# you can also extract it by
# res = res_list["SD:hclust"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 130 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#>   Subgroups are detected by 'hclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk SD-hclust-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk SD-hclust-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.417           0.723       0.859         0.3841 0.603   0.603
#> 3 3 0.566           0.702       0.865         0.3833 0.845   0.745
#> 4 4 0.595           0.722       0.847         0.1128 0.936   0.863
#> 5 5 0.597           0.684       0.823         0.0973 0.993   0.984
#> 6 6 0.611           0.626       0.793         0.0530 0.981   0.953

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 2

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM648605     2  0.9970     0.5447 0.468 0.532
#> GSM648618     1  0.9460     0.0936 0.636 0.364
#> GSM648620     2  0.9970     0.5447 0.468 0.532
#> GSM648646     2  0.8443     0.7131 0.272 0.728
#> GSM648649     1  0.2236     0.8462 0.964 0.036
#> GSM648675     1  0.9460     0.0936 0.636 0.364
#> GSM648682     2  0.9909     0.5776 0.444 0.556
#> GSM648698     2  0.9970     0.5447 0.468 0.532
#> GSM648708     2  0.9970     0.5447 0.468 0.532
#> GSM648628     1  0.3584     0.8304 0.932 0.068
#> GSM648595     1  0.1843     0.8504 0.972 0.028
#> GSM648635     1  0.2236     0.8462 0.964 0.036
#> GSM648645     1  0.1843     0.8512 0.972 0.028
#> GSM648647     2  0.9970     0.5447 0.468 0.532
#> GSM648667     1  0.9522     0.0372 0.628 0.372
#> GSM648695     2  0.9983     0.5258 0.476 0.524
#> GSM648704     2  0.5178     0.7618 0.116 0.884
#> GSM648706     2  0.6973     0.7516 0.188 0.812
#> GSM648593     1  0.3114     0.8300 0.944 0.056
#> GSM648594     1  0.2603     0.8419 0.956 0.044
#> GSM648600     1  0.1843     0.8504 0.972 0.028
#> GSM648621     1  0.0672     0.8586 0.992 0.008
#> GSM648622     1  0.0376     0.8583 0.996 0.004
#> GSM648623     1  0.0376     0.8583 0.996 0.004
#> GSM648636     1  0.2778     0.8373 0.952 0.048
#> GSM648655     1  0.3114     0.8300 0.944 0.056
#> GSM648661     1  0.0672     0.8579 0.992 0.008
#> GSM648664     1  0.0672     0.8579 0.992 0.008
#> GSM648683     1  0.0672     0.8589 0.992 0.008
#> GSM648685     1  0.0672     0.8579 0.992 0.008
#> GSM648702     1  0.2778     0.8373 0.952 0.048
#> GSM648597     1  0.2603     0.8419 0.956 0.044
#> GSM648603     1  0.0376     0.8583 0.996 0.004
#> GSM648606     1  0.3584     0.8304 0.932 0.068
#> GSM648613     1  0.3584     0.8304 0.932 0.068
#> GSM648619     1  0.3584     0.8304 0.932 0.068
#> GSM648654     1  0.0672     0.8579 0.992 0.008
#> GSM648663     1  0.3584     0.8304 0.932 0.068
#> GSM648670     1  0.9522     0.0579 0.628 0.372
#> GSM648707     2  0.9775     0.4456 0.412 0.588
#> GSM648615     2  0.9963     0.5511 0.464 0.536
#> GSM648643     2  0.9866     0.5926 0.432 0.568
#> GSM648650     1  0.2603     0.8417 0.956 0.044
#> GSM648656     2  0.9491     0.6483 0.368 0.632
#> GSM648715     1  0.9522     0.0372 0.628 0.372
#> GSM648598     1  0.0376     0.8583 0.996 0.004
#> GSM648601     1  0.0376     0.8583 0.996 0.004
#> GSM648602     1  0.0376     0.8583 0.996 0.004
#> GSM648604     1  0.0672     0.8579 0.992 0.008
#> GSM648614     1  0.3584     0.8304 0.932 0.068
#> GSM648624     1  0.0376     0.8583 0.996 0.004
#> GSM648625     1  0.3584     0.8208 0.932 0.068
#> GSM648629     1  0.0672     0.8579 0.992 0.008
#> GSM648634     1  0.0672     0.8578 0.992 0.008
#> GSM648648     1  0.2236     0.8462 0.964 0.036
#> GSM648651     1  0.0376     0.8583 0.996 0.004
#> GSM648657     1  0.1843     0.8512 0.972 0.028
#> GSM648660     1  0.0376     0.8583 0.996 0.004
#> GSM648697     1  0.0938     0.8570 0.988 0.012
#> GSM648710     1  0.0672     0.8579 0.992 0.008
#> GSM648591     1  0.9522     0.0719 0.628 0.372
#> GSM648592     1  0.2603     0.8419 0.956 0.044
#> GSM648607     1  0.3584     0.8304 0.932 0.068
#> GSM648611     1  0.3584     0.8304 0.932 0.068
#> GSM648612     1  0.3584     0.8304 0.932 0.068
#> GSM648616     2  0.9491     0.5452 0.368 0.632
#> GSM648617     1  0.1843     0.8504 0.972 0.028
#> GSM648626     1  0.0376     0.8583 0.996 0.004
#> GSM648711     1  0.3584     0.8304 0.932 0.068
#> GSM648712     1  0.3584     0.8304 0.932 0.068
#> GSM648713     1  0.3584     0.8304 0.932 0.068
#> GSM648714     1  0.3584     0.8304 0.932 0.068
#> GSM648716     1  0.3584     0.8304 0.932 0.068
#> GSM648717     1  0.3584     0.8304 0.932 0.068
#> GSM648590     1  0.3431     0.8220 0.936 0.064
#> GSM648596     1  0.9522     0.0372 0.628 0.372
#> GSM648642     2  0.9970     0.5447 0.468 0.532
#> GSM648696     1  0.1843     0.8504 0.972 0.028
#> GSM648705     1  0.2236     0.8462 0.964 0.036
#> GSM648718     2  0.9963     0.5511 0.464 0.536
#> GSM648599     1  0.0672     0.8586 0.992 0.008
#> GSM648608     1  0.0672     0.8579 0.992 0.008
#> GSM648609     1  0.0672     0.8579 0.992 0.008
#> GSM648610     1  0.0672     0.8586 0.992 0.008
#> GSM648633     1  0.1843     0.8504 0.972 0.028
#> GSM648644     2  0.5178     0.7618 0.116 0.884
#> GSM648652     1  0.2236     0.8462 0.964 0.036
#> GSM648653     1  0.0376     0.8583 0.996 0.004
#> GSM648658     1  0.3114     0.8300 0.944 0.056
#> GSM648659     1  0.5737     0.7348 0.864 0.136
#> GSM648662     1  0.0672     0.8579 0.992 0.008
#> GSM648665     1  0.0672     0.8579 0.992 0.008
#> GSM648666     1  0.0938     0.8570 0.988 0.012
#> GSM648680     1  0.2236     0.8462 0.964 0.036
#> GSM648684     1  0.0672     0.8589 0.992 0.008
#> GSM648709     2  0.9983     0.5258 0.476 0.524
#> GSM648719     1  0.0376     0.8583 0.996 0.004
#> GSM648627     1  0.3584     0.8304 0.932 0.068
#> GSM648637     2  0.7219     0.7291 0.200 0.800
#> GSM648638     2  0.7219     0.7291 0.200 0.800
#> GSM648641     1  0.7602     0.6889 0.780 0.220
#> GSM648672     2  0.3584     0.7488 0.068 0.932
#> GSM648674     2  0.7056     0.7383 0.192 0.808
#> GSM648703     2  0.4298     0.7598 0.088 0.912
#> GSM648631     1  0.8608     0.6061 0.716 0.284
#> GSM648669     2  0.3879     0.7516 0.076 0.924
#> GSM648671     2  0.3879     0.7516 0.076 0.924
#> GSM648678     2  0.3584     0.7488 0.068 0.932
#> GSM648679     2  0.4815     0.7551 0.104 0.896
#> GSM648681     1  0.8763     0.3711 0.704 0.296
#> GSM648686     1  0.8608     0.6061 0.716 0.284
#> GSM648689     1  0.7883     0.6684 0.764 0.236
#> GSM648690     1  0.8608     0.6061 0.716 0.284
#> GSM648691     1  0.8608     0.6061 0.716 0.284
#> GSM648693     1  0.8608     0.6061 0.716 0.284
#> GSM648700     2  0.4298     0.7598 0.088 0.912
#> GSM648630     1  0.8608     0.6061 0.716 0.284
#> GSM648632     1  0.8608     0.6061 0.716 0.284
#> GSM648639     1  0.8909     0.5696 0.692 0.308
#> GSM648640     1  0.8909     0.5696 0.692 0.308
#> GSM648668     2  0.3584     0.7488 0.068 0.932
#> GSM648676     2  0.4298     0.7598 0.088 0.912
#> GSM648692     1  0.8608     0.6061 0.716 0.284
#> GSM648694     1  0.8608     0.6061 0.716 0.284
#> GSM648699     2  0.4298     0.7598 0.088 0.912
#> GSM648701     2  0.4298     0.7598 0.088 0.912
#> GSM648673     2  0.3879     0.7516 0.076 0.924
#> GSM648677     2  0.3733     0.7514 0.072 0.928
#> GSM648687     1  0.8608     0.6061 0.716 0.284
#> GSM648688     1  0.8608     0.6061 0.716 0.284

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM648605     2  0.6180     0.4975 0.416 0.584 0.000
#> GSM648618     1  0.7582     0.0797 0.572 0.380 0.048
#> GSM648620     2  0.6180     0.4975 0.416 0.584 0.000
#> GSM648646     2  0.4796     0.6462 0.220 0.780 0.000
#> GSM648649     1  0.1289     0.8681 0.968 0.032 0.000
#> GSM648675     1  0.7582     0.0797 0.572 0.380 0.048
#> GSM648682     2  0.6095     0.5327 0.392 0.608 0.000
#> GSM648698     2  0.6180     0.4975 0.416 0.584 0.000
#> GSM648708     2  0.6180     0.4975 0.416 0.584 0.000
#> GSM648628     1  0.4291     0.7509 0.820 0.000 0.180
#> GSM648595     1  0.1031     0.8706 0.976 0.024 0.000
#> GSM648635     1  0.1289     0.8681 0.968 0.032 0.000
#> GSM648645     1  0.1170     0.8725 0.976 0.016 0.008
#> GSM648647     2  0.6180     0.4975 0.416 0.584 0.000
#> GSM648667     1  0.6111     0.1633 0.604 0.396 0.000
#> GSM648695     2  0.6204     0.4776 0.424 0.576 0.000
#> GSM648704     2  0.2165     0.6546 0.064 0.936 0.000
#> GSM648706     2  0.3619     0.6548 0.136 0.864 0.000
#> GSM648593     1  0.1860     0.8567 0.948 0.052 0.000
#> GSM648594     1  0.1711     0.8662 0.960 0.032 0.008
#> GSM648600     1  0.1031     0.8706 0.976 0.024 0.000
#> GSM648621     1  0.0237     0.8762 0.996 0.000 0.004
#> GSM648622     1  0.0000     0.8758 1.000 0.000 0.000
#> GSM648623     1  0.0000     0.8758 1.000 0.000 0.000
#> GSM648636     1  0.1643     0.8620 0.956 0.044 0.000
#> GSM648655     1  0.1860     0.8567 0.948 0.052 0.000
#> GSM648661     1  0.0592     0.8739 0.988 0.000 0.012
#> GSM648664     1  0.0592     0.8739 0.988 0.000 0.012
#> GSM648683     1  0.0661     0.8760 0.988 0.004 0.008
#> GSM648685     1  0.0592     0.8739 0.988 0.000 0.012
#> GSM648702     1  0.1643     0.8620 0.956 0.044 0.000
#> GSM648597     1  0.1711     0.8662 0.960 0.032 0.008
#> GSM648603     1  0.0237     0.8760 0.996 0.000 0.004
#> GSM648606     1  0.6062     0.4535 0.616 0.000 0.384
#> GSM648613     1  0.6062     0.4535 0.616 0.000 0.384
#> GSM648619     1  0.2878     0.8261 0.904 0.000 0.096
#> GSM648654     1  0.0592     0.8739 0.988 0.000 0.012
#> GSM648663     1  0.5882     0.5239 0.652 0.000 0.348
#> GSM648670     1  0.7546     0.0166 0.560 0.396 0.044
#> GSM648707     3  0.8437     0.0658 0.092 0.388 0.520
#> GSM648615     2  0.6168     0.5044 0.412 0.588 0.000
#> GSM648643     2  0.6045     0.5472 0.380 0.620 0.000
#> GSM648650     1  0.1529     0.8655 0.960 0.040 0.000
#> GSM648656     2  0.5678     0.6136 0.316 0.684 0.000
#> GSM648715     1  0.6111     0.1633 0.604 0.396 0.000
#> GSM648598     1  0.0000     0.8758 1.000 0.000 0.000
#> GSM648601     1  0.0000     0.8758 1.000 0.000 0.000
#> GSM648602     1  0.0000     0.8758 1.000 0.000 0.000
#> GSM648604     1  0.0592     0.8739 0.988 0.000 0.012
#> GSM648614     1  0.6062     0.4535 0.616 0.000 0.384
#> GSM648624     1  0.0000     0.8758 1.000 0.000 0.000
#> GSM648625     1  0.2448     0.8379 0.924 0.076 0.000
#> GSM648629     1  0.0592     0.8739 0.988 0.000 0.012
#> GSM648634     1  0.0237     0.8757 0.996 0.004 0.000
#> GSM648648     1  0.1289     0.8681 0.968 0.032 0.000
#> GSM648651     1  0.0000     0.8758 1.000 0.000 0.000
#> GSM648657     1  0.1170     0.8725 0.976 0.016 0.008
#> GSM648660     1  0.0000     0.8758 1.000 0.000 0.000
#> GSM648697     1  0.0424     0.8757 0.992 0.008 0.000
#> GSM648710     1  0.0592     0.8739 0.988 0.000 0.012
#> GSM648591     1  0.7919     0.0292 0.556 0.380 0.064
#> GSM648592     1  0.1711     0.8662 0.960 0.032 0.008
#> GSM648607     1  0.2878     0.8261 0.904 0.000 0.096
#> GSM648611     1  0.4291     0.7509 0.820 0.000 0.180
#> GSM648612     1  0.2878     0.8261 0.904 0.000 0.096
#> GSM648616     3  0.7453     0.0287 0.036 0.436 0.528
#> GSM648617     1  0.1031     0.8706 0.976 0.024 0.000
#> GSM648626     1  0.0237     0.8760 0.996 0.000 0.004
#> GSM648711     1  0.2878     0.8261 0.904 0.000 0.096
#> GSM648712     1  0.2878     0.8261 0.904 0.000 0.096
#> GSM648713     1  0.2878     0.8261 0.904 0.000 0.096
#> GSM648714     1  0.6062     0.4535 0.616 0.000 0.384
#> GSM648716     1  0.2878     0.8261 0.904 0.000 0.096
#> GSM648717     1  0.6062     0.4535 0.616 0.000 0.384
#> GSM648590     1  0.2165     0.8477 0.936 0.064 0.000
#> GSM648596     1  0.6111     0.1633 0.604 0.396 0.000
#> GSM648642     2  0.6180     0.4975 0.416 0.584 0.000
#> GSM648696     1  0.1031     0.8706 0.976 0.024 0.000
#> GSM648705     1  0.1289     0.8681 0.968 0.032 0.000
#> GSM648718     2  0.6168     0.5044 0.412 0.588 0.000
#> GSM648599     1  0.0237     0.8762 0.996 0.000 0.004
#> GSM648608     1  0.0592     0.8739 0.988 0.000 0.012
#> GSM648609     1  0.0592     0.8739 0.988 0.000 0.012
#> GSM648610     1  0.0237     0.8762 0.996 0.000 0.004
#> GSM648633     1  0.1031     0.8706 0.976 0.024 0.000
#> GSM648644     2  0.2165     0.6546 0.064 0.936 0.000
#> GSM648652     1  0.1289     0.8681 0.968 0.032 0.000
#> GSM648653     1  0.0000     0.8758 1.000 0.000 0.000
#> GSM648658     1  0.1860     0.8567 0.948 0.052 0.000
#> GSM648659     1  0.3619     0.7685 0.864 0.136 0.000
#> GSM648662     1  0.0592     0.8739 0.988 0.000 0.012
#> GSM648665     1  0.0592     0.8739 0.988 0.000 0.012
#> GSM648666     1  0.0424     0.8757 0.992 0.008 0.000
#> GSM648680     1  0.1289     0.8681 0.968 0.032 0.000
#> GSM648684     1  0.0661     0.8760 0.988 0.004 0.008
#> GSM648709     2  0.6204     0.4776 0.424 0.576 0.000
#> GSM648719     1  0.0000     0.8758 1.000 0.000 0.000
#> GSM648627     1  0.4291     0.7509 0.820 0.000 0.180
#> GSM648637     2  0.6566     0.2700 0.012 0.612 0.376
#> GSM648638     2  0.6566     0.2700 0.012 0.612 0.376
#> GSM648641     3  0.4842     0.6551 0.224 0.000 0.776
#> GSM648672     2  0.1453     0.6190 0.008 0.968 0.024
#> GSM648674     2  0.7013     0.3546 0.036 0.640 0.324
#> GSM648703     2  0.1411     0.6477 0.036 0.964 0.000
#> GSM648631     3  0.1289     0.8654 0.032 0.000 0.968
#> GSM648669     2  0.2682     0.5805 0.004 0.920 0.076
#> GSM648671     2  0.2682     0.5805 0.004 0.920 0.076
#> GSM648678     2  0.0424     0.6248 0.008 0.992 0.000
#> GSM648679     2  0.3459     0.5739 0.012 0.892 0.096
#> GSM648681     1  0.6570     0.3923 0.668 0.308 0.024
#> GSM648686     3  0.1289     0.8654 0.032 0.000 0.968
#> GSM648689     3  0.4555     0.6944 0.200 0.000 0.800
#> GSM648690     3  0.1289     0.8654 0.032 0.000 0.968
#> GSM648691     3  0.1289     0.8654 0.032 0.000 0.968
#> GSM648693     3  0.1289     0.8654 0.032 0.000 0.968
#> GSM648700     2  0.1411     0.6477 0.036 0.964 0.000
#> GSM648630     3  0.1289     0.8654 0.032 0.000 0.968
#> GSM648632     3  0.1289     0.8654 0.032 0.000 0.968
#> GSM648639     3  0.1781     0.8466 0.020 0.020 0.960
#> GSM648640     3  0.1781     0.8466 0.020 0.020 0.960
#> GSM648668     2  0.1453     0.6190 0.008 0.968 0.024
#> GSM648676     2  0.1411     0.6477 0.036 0.964 0.000
#> GSM648692     3  0.1289     0.8654 0.032 0.000 0.968
#> GSM648694     3  0.1289     0.8654 0.032 0.000 0.968
#> GSM648699     2  0.1411     0.6477 0.036 0.964 0.000
#> GSM648701     2  0.1411     0.6477 0.036 0.964 0.000
#> GSM648673     2  0.2682     0.5805 0.004 0.920 0.076
#> GSM648677     2  0.1182     0.6264 0.012 0.976 0.012
#> GSM648687     3  0.4062     0.7599 0.164 0.000 0.836
#> GSM648688     3  0.4062     0.7599 0.164 0.000 0.836

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM648605     2  0.4277      0.669 0.280 0.720 0.000 0.000
#> GSM648618     1  0.5276      0.348 0.560 0.004 0.004 0.432
#> GSM648620     2  0.4277      0.669 0.280 0.720 0.000 0.000
#> GSM648646     2  0.2546      0.578 0.092 0.900 0.000 0.008
#> GSM648649     1  0.1118      0.873 0.964 0.036 0.000 0.000
#> GSM648675     1  0.5276      0.348 0.560 0.004 0.004 0.432
#> GSM648682     2  0.4103      0.666 0.256 0.744 0.000 0.000
#> GSM648698     2  0.4277      0.669 0.280 0.720 0.000 0.000
#> GSM648708     2  0.4277      0.669 0.280 0.720 0.000 0.000
#> GSM648628     1  0.3768      0.748 0.808 0.000 0.184 0.008
#> GSM648595     1  0.0921      0.876 0.972 0.028 0.000 0.000
#> GSM648635     1  0.1118      0.873 0.964 0.036 0.000 0.000
#> GSM648645     1  0.1059      0.878 0.972 0.016 0.000 0.012
#> GSM648647     2  0.4304      0.666 0.284 0.716 0.000 0.000
#> GSM648667     2  0.4989      0.309 0.472 0.528 0.000 0.000
#> GSM648695     2  0.4356      0.660 0.292 0.708 0.000 0.000
#> GSM648704     2  0.1867      0.482 0.000 0.928 0.000 0.072
#> GSM648706     2  0.0672      0.508 0.008 0.984 0.000 0.008
#> GSM648593     1  0.1637      0.859 0.940 0.060 0.000 0.000
#> GSM648594     1  0.1820      0.868 0.944 0.020 0.000 0.036
#> GSM648600     1  0.0921      0.876 0.972 0.028 0.000 0.000
#> GSM648621     1  0.0376      0.881 0.992 0.000 0.004 0.004
#> GSM648622     1  0.0188      0.881 0.996 0.000 0.000 0.004
#> GSM648623     1  0.0188      0.881 0.996 0.000 0.000 0.004
#> GSM648636     1  0.1389      0.867 0.952 0.048 0.000 0.000
#> GSM648655     1  0.1716      0.857 0.936 0.064 0.000 0.000
#> GSM648661     1  0.0657      0.881 0.984 0.004 0.012 0.000
#> GSM648664     1  0.0469      0.881 0.988 0.000 0.012 0.000
#> GSM648683     1  0.0672      0.882 0.984 0.008 0.008 0.000
#> GSM648685     1  0.0469      0.881 0.988 0.000 0.012 0.000
#> GSM648702     1  0.1389      0.867 0.952 0.048 0.000 0.000
#> GSM648597     1  0.1820      0.868 0.944 0.020 0.000 0.036
#> GSM648603     1  0.0336      0.881 0.992 0.000 0.000 0.008
#> GSM648606     1  0.5873      0.342 0.548 0.036 0.416 0.000
#> GSM648613     1  0.5873      0.342 0.548 0.036 0.416 0.000
#> GSM648619     1  0.2611      0.831 0.896 0.000 0.096 0.008
#> GSM648654     1  0.2255      0.843 0.920 0.068 0.012 0.000
#> GSM648663     1  0.5085      0.478 0.616 0.008 0.376 0.000
#> GSM648670     1  0.5421      0.315 0.548 0.008 0.004 0.440
#> GSM648707     4  0.5540      0.533 0.068 0.004 0.208 0.720
#> GSM648615     2  0.4250      0.669 0.276 0.724 0.000 0.000
#> GSM648643     2  0.4252      0.663 0.252 0.744 0.000 0.004
#> GSM648650     1  0.2345      0.827 0.900 0.100 0.000 0.000
#> GSM648656     2  0.3400      0.634 0.180 0.820 0.000 0.000
#> GSM648715     2  0.4989      0.309 0.472 0.528 0.000 0.000
#> GSM648598     1  0.0188      0.881 0.996 0.000 0.000 0.004
#> GSM648601     1  0.0188      0.881 0.996 0.000 0.000 0.004
#> GSM648602     1  0.0188      0.881 0.996 0.000 0.000 0.004
#> GSM648604     1  0.0657      0.880 0.984 0.000 0.012 0.004
#> GSM648614     1  0.5873      0.342 0.548 0.036 0.416 0.000
#> GSM648624     1  0.0188      0.881 0.996 0.000 0.000 0.004
#> GSM648625     1  0.2266      0.841 0.912 0.084 0.000 0.004
#> GSM648629     1  0.0657      0.880 0.984 0.000 0.012 0.004
#> GSM648634     1  0.0336      0.881 0.992 0.008 0.000 0.000
#> GSM648648     1  0.1118      0.873 0.964 0.036 0.000 0.000
#> GSM648651     1  0.0188      0.881 0.996 0.000 0.000 0.004
#> GSM648657     1  0.1059      0.878 0.972 0.016 0.000 0.012
#> GSM648660     1  0.0188      0.881 0.996 0.000 0.000 0.004
#> GSM648697     1  0.0469      0.881 0.988 0.012 0.000 0.000
#> GSM648710     1  0.0657      0.880 0.984 0.000 0.012 0.004
#> GSM648591     1  0.5372      0.307 0.544 0.000 0.012 0.444
#> GSM648592     1  0.1820      0.868 0.944 0.020 0.000 0.036
#> GSM648607     1  0.2611      0.831 0.896 0.000 0.096 0.008
#> GSM648611     1  0.3768      0.748 0.808 0.000 0.184 0.008
#> GSM648612     1  0.2611      0.831 0.896 0.000 0.096 0.008
#> GSM648616     4  0.4773      0.584 0.016 0.012 0.216 0.756
#> GSM648617     1  0.0921      0.876 0.972 0.028 0.000 0.000
#> GSM648626     1  0.0336      0.881 0.992 0.000 0.000 0.008
#> GSM648711     1  0.2611      0.831 0.896 0.000 0.096 0.008
#> GSM648712     1  0.2611      0.831 0.896 0.000 0.096 0.008
#> GSM648713     1  0.2611      0.831 0.896 0.000 0.096 0.008
#> GSM648714     1  0.5873      0.342 0.548 0.036 0.416 0.000
#> GSM648716     1  0.2611      0.831 0.896 0.000 0.096 0.008
#> GSM648717     1  0.5792      0.349 0.552 0.032 0.416 0.000
#> GSM648590     1  0.1867      0.851 0.928 0.072 0.000 0.000
#> GSM648596     2  0.5161      0.296 0.476 0.520 0.000 0.004
#> GSM648642     2  0.4277      0.669 0.280 0.720 0.000 0.000
#> GSM648696     1  0.0921      0.876 0.972 0.028 0.000 0.000
#> GSM648705     1  0.1118      0.873 0.964 0.036 0.000 0.000
#> GSM648718     2  0.4250      0.669 0.276 0.724 0.000 0.000
#> GSM648599     1  0.0376      0.881 0.992 0.000 0.004 0.004
#> GSM648608     1  0.0657      0.881 0.984 0.004 0.012 0.000
#> GSM648609     1  0.0657      0.880 0.984 0.000 0.012 0.004
#> GSM648610     1  0.0376      0.881 0.992 0.000 0.004 0.004
#> GSM648633     1  0.1004      0.878 0.972 0.024 0.000 0.004
#> GSM648644     2  0.1867      0.482 0.000 0.928 0.000 0.072
#> GSM648652     1  0.1118      0.873 0.964 0.036 0.000 0.000
#> GSM648653     1  0.0188      0.881 0.996 0.000 0.000 0.004
#> GSM648658     1  0.1557      0.862 0.944 0.056 0.000 0.000
#> GSM648659     1  0.3907      0.633 0.768 0.232 0.000 0.000
#> GSM648662     1  0.0657      0.881 0.984 0.004 0.012 0.000
#> GSM648665     1  0.0657      0.881 0.984 0.004 0.012 0.000
#> GSM648666     1  0.0336      0.881 0.992 0.008 0.000 0.000
#> GSM648680     1  0.1118      0.873 0.964 0.036 0.000 0.000
#> GSM648684     1  0.0672      0.882 0.984 0.008 0.008 0.000
#> GSM648709     2  0.4356      0.660 0.292 0.708 0.000 0.000
#> GSM648719     1  0.0188      0.881 0.996 0.000 0.000 0.004
#> GSM648627     1  0.3768      0.748 0.808 0.000 0.184 0.008
#> GSM648637     4  0.4946      0.745 0.004 0.088 0.124 0.784
#> GSM648638     4  0.4946      0.745 0.004 0.088 0.124 0.784
#> GSM648641     3  0.4603      0.638 0.160 0.032 0.796 0.012
#> GSM648672     2  0.4222      0.262 0.000 0.728 0.000 0.272
#> GSM648674     4  0.4794      0.758 0.016 0.100 0.076 0.808
#> GSM648703     2  0.3024      0.442 0.000 0.852 0.000 0.148
#> GSM648631     3  0.0000      0.860 0.000 0.000 1.000 0.000
#> GSM648669     4  0.4343      0.758 0.004 0.264 0.000 0.732
#> GSM648671     4  0.4343      0.758 0.004 0.264 0.000 0.732
#> GSM648678     2  0.3024      0.431 0.000 0.852 0.000 0.148
#> GSM648679     4  0.4368      0.767 0.004 0.244 0.004 0.748
#> GSM648681     1  0.7005      0.316 0.572 0.172 0.000 0.256
#> GSM648686     3  0.0188      0.859 0.000 0.000 0.996 0.004
#> GSM648689     3  0.4038      0.683 0.136 0.032 0.828 0.004
#> GSM648690     3  0.0188      0.859 0.000 0.000 0.996 0.004
#> GSM648691     3  0.0000      0.860 0.000 0.000 1.000 0.000
#> GSM648693     3  0.0000      0.860 0.000 0.000 1.000 0.000
#> GSM648700     2  0.3024      0.442 0.000 0.852 0.000 0.148
#> GSM648630     3  0.0000      0.860 0.000 0.000 1.000 0.000
#> GSM648632     3  0.0000      0.860 0.000 0.000 1.000 0.000
#> GSM648639     3  0.4382      0.614 0.000 0.000 0.704 0.296
#> GSM648640     3  0.4382      0.614 0.000 0.000 0.704 0.296
#> GSM648668     2  0.4222      0.262 0.000 0.728 0.000 0.272
#> GSM648676     2  0.3024      0.442 0.000 0.852 0.000 0.148
#> GSM648692     3  0.0000      0.860 0.000 0.000 1.000 0.000
#> GSM648694     3  0.0000      0.860 0.000 0.000 1.000 0.000
#> GSM648699     2  0.3024      0.442 0.000 0.852 0.000 0.148
#> GSM648701     2  0.3024      0.442 0.000 0.852 0.000 0.148
#> GSM648673     4  0.4343      0.758 0.004 0.264 0.000 0.732
#> GSM648677     2  0.3610      0.378 0.000 0.800 0.000 0.200
#> GSM648687     3  0.3597      0.685 0.148 0.000 0.836 0.016
#> GSM648688     3  0.3597      0.685 0.148 0.000 0.836 0.016

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM648605     2  0.1851      0.710 0.088 0.912 0.000 0.000 0.000
#> GSM648618     1  0.5680      0.261 0.508 0.012 0.000 0.052 0.428
#> GSM648620     2  0.1851      0.710 0.088 0.912 0.000 0.000 0.000
#> GSM648646     2  0.2674      0.652 0.012 0.868 0.000 0.120 0.000
#> GSM648649     1  0.2153      0.847 0.916 0.044 0.000 0.040 0.000
#> GSM648675     1  0.5769      0.258 0.504 0.016 0.000 0.052 0.428
#> GSM648682     2  0.1478      0.705 0.064 0.936 0.000 0.000 0.000
#> GSM648698     2  0.1851      0.710 0.088 0.912 0.000 0.000 0.000
#> GSM648708     2  0.1851      0.710 0.088 0.912 0.000 0.000 0.000
#> GSM648628     1  0.4780      0.710 0.744 0.008 0.176 0.068 0.004
#> GSM648595     1  0.1753      0.853 0.936 0.032 0.000 0.032 0.000
#> GSM648635     1  0.1915      0.849 0.928 0.032 0.000 0.040 0.000
#> GSM648645     1  0.1701      0.854 0.944 0.016 0.000 0.028 0.012
#> GSM648647     2  0.2020      0.704 0.100 0.900 0.000 0.000 0.000
#> GSM648667     2  0.4374      0.486 0.272 0.700 0.000 0.028 0.000
#> GSM648695     2  0.2127      0.697 0.108 0.892 0.000 0.000 0.000
#> GSM648704     2  0.3586      0.575 0.000 0.736 0.000 0.264 0.000
#> GSM648706     2  0.3039      0.614 0.000 0.808 0.000 0.192 0.000
#> GSM648593     1  0.2438      0.838 0.900 0.060 0.000 0.040 0.000
#> GSM648594     1  0.2409      0.847 0.912 0.016 0.000 0.028 0.044
#> GSM648600     1  0.1753      0.850 0.936 0.032 0.000 0.032 0.000
#> GSM648621     1  0.1331      0.855 0.952 0.008 0.000 0.040 0.000
#> GSM648622     1  0.0404      0.857 0.988 0.000 0.000 0.012 0.000
#> GSM648623     1  0.0510      0.857 0.984 0.000 0.000 0.016 0.000
#> GSM648636     1  0.2228      0.844 0.912 0.048 0.000 0.040 0.000
#> GSM648655     1  0.2632      0.832 0.888 0.072 0.000 0.040 0.000
#> GSM648661     1  0.2464      0.847 0.908 0.048 0.012 0.032 0.000
#> GSM648664     1  0.1710      0.855 0.944 0.020 0.012 0.024 0.000
#> GSM648683     1  0.1948      0.857 0.932 0.024 0.008 0.036 0.000
#> GSM648685     1  0.1710      0.855 0.944 0.020 0.012 0.024 0.000
#> GSM648702     1  0.2228      0.844 0.912 0.048 0.000 0.040 0.000
#> GSM648597     1  0.2409      0.847 0.912 0.016 0.000 0.028 0.044
#> GSM648603     1  0.0609      0.857 0.980 0.000 0.000 0.020 0.000
#> GSM648606     1  0.7051      0.123 0.444 0.108 0.400 0.040 0.008
#> GSM648613     1  0.7051      0.123 0.444 0.108 0.400 0.040 0.008
#> GSM648619     1  0.3512      0.795 0.840 0.000 0.088 0.068 0.004
#> GSM648654     1  0.4547      0.640 0.712 0.252 0.012 0.024 0.000
#> GSM648663     1  0.5851      0.403 0.560 0.044 0.368 0.024 0.004
#> GSM648670     1  0.5084      0.260 0.520 0.016 0.000 0.012 0.452
#> GSM648707     5  0.2363      0.399 0.024 0.000 0.012 0.052 0.912
#> GSM648615     2  0.1792      0.710 0.084 0.916 0.000 0.000 0.000
#> GSM648643     2  0.1764      0.704 0.064 0.928 0.000 0.008 0.000
#> GSM648650     1  0.4193      0.692 0.748 0.212 0.000 0.040 0.000
#> GSM648656     2  0.1485      0.677 0.020 0.948 0.000 0.032 0.000
#> GSM648715     2  0.4374      0.486 0.272 0.700 0.000 0.028 0.000
#> GSM648598     1  0.0404      0.857 0.988 0.000 0.000 0.012 0.000
#> GSM648601     1  0.0609      0.858 0.980 0.000 0.000 0.020 0.000
#> GSM648602     1  0.1121      0.855 0.956 0.000 0.000 0.044 0.000
#> GSM648604     1  0.1393      0.854 0.956 0.008 0.012 0.024 0.000
#> GSM648614     1  0.7051      0.123 0.444 0.108 0.400 0.040 0.008
#> GSM648624     1  0.0404      0.857 0.988 0.000 0.000 0.012 0.000
#> GSM648625     1  0.2331      0.835 0.900 0.080 0.000 0.020 0.000
#> GSM648629     1  0.1393      0.854 0.956 0.008 0.012 0.024 0.000
#> GSM648634     1  0.1741      0.860 0.936 0.024 0.000 0.040 0.000
#> GSM648648     1  0.1915      0.849 0.928 0.032 0.000 0.040 0.000
#> GSM648651     1  0.0609      0.858 0.980 0.000 0.000 0.020 0.000
#> GSM648657     1  0.1682      0.855 0.944 0.012 0.000 0.032 0.012
#> GSM648660     1  0.0404      0.857 0.988 0.000 0.000 0.012 0.000
#> GSM648697     1  0.1741      0.858 0.936 0.024 0.000 0.040 0.000
#> GSM648710     1  0.1393      0.854 0.956 0.008 0.012 0.024 0.000
#> GSM648591     1  0.5738      0.218 0.496 0.008 0.004 0.052 0.440
#> GSM648592     1  0.2409      0.847 0.912 0.016 0.000 0.028 0.044
#> GSM648607     1  0.3317      0.802 0.852 0.000 0.088 0.056 0.004
#> GSM648611     1  0.4780      0.710 0.744 0.008 0.176 0.068 0.004
#> GSM648612     1  0.3574      0.793 0.836 0.000 0.088 0.072 0.004
#> GSM648616     5  0.0451      0.414 0.000 0.000 0.008 0.004 0.988
#> GSM648617     1  0.1818      0.853 0.932 0.024 0.000 0.044 0.000
#> GSM648626     1  0.0703      0.856 0.976 0.000 0.000 0.024 0.000
#> GSM648711     1  0.3317      0.802 0.852 0.000 0.088 0.056 0.004
#> GSM648712     1  0.3574      0.793 0.836 0.000 0.088 0.072 0.004
#> GSM648713     1  0.3449      0.798 0.844 0.000 0.088 0.064 0.004
#> GSM648714     1  0.7051      0.123 0.444 0.108 0.400 0.040 0.008
#> GSM648716     1  0.3512      0.795 0.840 0.000 0.088 0.068 0.004
#> GSM648717     1  0.6369      0.259 0.504 0.048 0.400 0.040 0.008
#> GSM648590     1  0.2632      0.833 0.888 0.072 0.000 0.040 0.000
#> GSM648596     2  0.4734      0.465 0.288 0.676 0.000 0.028 0.008
#> GSM648642     2  0.1851      0.710 0.088 0.912 0.000 0.000 0.000
#> GSM648696     1  0.1836      0.851 0.932 0.036 0.000 0.032 0.000
#> GSM648705     1  0.1915      0.849 0.928 0.032 0.000 0.040 0.000
#> GSM648718     2  0.1792      0.710 0.084 0.916 0.000 0.000 0.000
#> GSM648599     1  0.1331      0.856 0.952 0.008 0.000 0.040 0.000
#> GSM648608     1  0.1893      0.856 0.936 0.024 0.012 0.028 0.000
#> GSM648609     1  0.1393      0.854 0.956 0.008 0.012 0.024 0.000
#> GSM648610     1  0.1331      0.856 0.952 0.008 0.000 0.040 0.000
#> GSM648633     1  0.1106      0.857 0.964 0.012 0.000 0.024 0.000
#> GSM648644     2  0.3586      0.575 0.000 0.736 0.000 0.264 0.000
#> GSM648652     1  0.1915      0.849 0.928 0.032 0.000 0.040 0.000
#> GSM648653     1  0.1121      0.853 0.956 0.000 0.000 0.044 0.000
#> GSM648658     1  0.2370      0.840 0.904 0.056 0.000 0.040 0.000
#> GSM648659     1  0.5095      0.321 0.560 0.400 0.000 0.040 0.000
#> GSM648662     1  0.2536      0.846 0.904 0.052 0.012 0.032 0.000
#> GSM648665     1  0.2536      0.846 0.904 0.052 0.012 0.032 0.000
#> GSM648666     1  0.1568      0.858 0.944 0.020 0.000 0.036 0.000
#> GSM648680     1  0.1915      0.849 0.928 0.032 0.000 0.040 0.000
#> GSM648684     1  0.1948      0.857 0.932 0.024 0.008 0.036 0.000
#> GSM648709     2  0.2179      0.694 0.112 0.888 0.000 0.000 0.000
#> GSM648719     1  0.0404      0.857 0.988 0.000 0.000 0.012 0.000
#> GSM648627     1  0.4505      0.715 0.752 0.000 0.176 0.068 0.004
#> GSM648637     5  0.4515      0.295 0.000 0.056 0.028 0.136 0.780
#> GSM648638     5  0.4515      0.295 0.000 0.056 0.028 0.136 0.780
#> GSM648641     3  0.5129      0.682 0.104 0.056 0.772 0.040 0.028
#> GSM648672     2  0.4824      0.282 0.000 0.512 0.000 0.468 0.020
#> GSM648674     5  0.4010      0.196 0.000 0.056 0.000 0.160 0.784
#> GSM648703     2  0.4074      0.501 0.000 0.636 0.000 0.364 0.000
#> GSM648631     3  0.0000      0.896 0.000 0.000 1.000 0.000 0.000
#> GSM648669     4  0.4982      1.000 0.000 0.032 0.000 0.556 0.412
#> GSM648671     4  0.4982      1.000 0.000 0.032 0.000 0.556 0.412
#> GSM648678     2  0.3999      0.503 0.000 0.656 0.000 0.344 0.000
#> GSM648679     5  0.5165     -0.812 0.000 0.040 0.000 0.448 0.512
#> GSM648681     1  0.7349      0.019 0.392 0.316 0.000 0.028 0.264
#> GSM648686     3  0.0290      0.893 0.000 0.000 0.992 0.000 0.008
#> GSM648689     3  0.4310      0.731 0.084 0.056 0.816 0.036 0.008
#> GSM648690     3  0.0290      0.893 0.000 0.000 0.992 0.000 0.008
#> GSM648691     3  0.0000      0.896 0.000 0.000 1.000 0.000 0.000
#> GSM648693     3  0.0000      0.896 0.000 0.000 1.000 0.000 0.000
#> GSM648700     2  0.4074      0.501 0.000 0.636 0.000 0.364 0.000
#> GSM648630     3  0.0000      0.896 0.000 0.000 1.000 0.000 0.000
#> GSM648632     3  0.0000      0.896 0.000 0.000 1.000 0.000 0.000
#> GSM648639     5  0.6491      0.333 0.000 0.000 0.228 0.284 0.488
#> GSM648640     5  0.6491      0.333 0.000 0.000 0.228 0.284 0.488
#> GSM648668     2  0.4824      0.282 0.000 0.512 0.000 0.468 0.020
#> GSM648676     2  0.4074      0.501 0.000 0.636 0.000 0.364 0.000
#> GSM648692     3  0.0000      0.896 0.000 0.000 1.000 0.000 0.000
#> GSM648694     3  0.0000      0.896 0.000 0.000 1.000 0.000 0.000
#> GSM648699     2  0.4074      0.501 0.000 0.636 0.000 0.364 0.000
#> GSM648701     2  0.4074      0.501 0.000 0.636 0.000 0.364 0.000
#> GSM648673     4  0.4982      1.000 0.000 0.032 0.000 0.556 0.412
#> GSM648677     2  0.4182      0.436 0.000 0.600 0.000 0.400 0.000
#> GSM648687     3  0.4272      0.682 0.124 0.000 0.796 0.060 0.020
#> GSM648688     3  0.4272      0.682 0.124 0.000 0.796 0.060 0.020

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM648605     2  0.0632     0.6793 0.024 0.976 0.000 0.000 0.000 0.000
#> GSM648618     1  0.6264     0.1469 0.444 0.016 0.000 0.012 0.388 0.140
#> GSM648620     2  0.0632     0.6793 0.024 0.976 0.000 0.000 0.000 0.000
#> GSM648646     2  0.3308     0.5805 0.000 0.828 0.000 0.096 0.004 0.072
#> GSM648649     1  0.2513     0.8133 0.888 0.060 0.000 0.008 0.000 0.044
#> GSM648675     1  0.6335     0.1427 0.440 0.020 0.000 0.012 0.388 0.140
#> GSM648682     2  0.0976     0.6741 0.016 0.968 0.000 0.008 0.000 0.008
#> GSM648698     2  0.0632     0.6793 0.024 0.976 0.000 0.000 0.000 0.000
#> GSM648708     2  0.0632     0.6793 0.024 0.976 0.000 0.000 0.000 0.000
#> GSM648628     1  0.5308     0.6143 0.620 0.008 0.112 0.000 0.004 0.256
#> GSM648595     1  0.2457     0.8104 0.880 0.036 0.000 0.000 0.000 0.084
#> GSM648635     1  0.2259     0.8159 0.904 0.044 0.000 0.008 0.000 0.044
#> GSM648645     1  0.1922     0.8224 0.924 0.024 0.000 0.000 0.012 0.040
#> GSM648647     2  0.0865     0.6752 0.036 0.964 0.000 0.000 0.000 0.000
#> GSM648667     2  0.3529     0.4638 0.208 0.764 0.000 0.000 0.000 0.028
#> GSM648695     2  0.1007     0.6692 0.044 0.956 0.000 0.000 0.000 0.000
#> GSM648704     2  0.4818     0.4293 0.000 0.672 0.000 0.212 0.004 0.112
#> GSM648706     2  0.4256     0.5146 0.000 0.744 0.000 0.140 0.004 0.112
#> GSM648593     1  0.2966     0.8021 0.864 0.072 0.000 0.020 0.000 0.044
#> GSM648594     1  0.2688     0.8148 0.884 0.024 0.000 0.000 0.044 0.048
#> GSM648600     1  0.2003     0.8185 0.912 0.044 0.000 0.000 0.000 0.044
#> GSM648621     1  0.2212     0.8089 0.880 0.008 0.000 0.000 0.000 0.112
#> GSM648622     1  0.0458     0.8277 0.984 0.000 0.000 0.000 0.000 0.016
#> GSM648623     1  0.0632     0.8282 0.976 0.000 0.000 0.000 0.000 0.024
#> GSM648636     1  0.2583     0.8126 0.888 0.052 0.000 0.016 0.000 0.044
#> GSM648655     1  0.3178     0.7942 0.848 0.088 0.000 0.020 0.000 0.044
#> GSM648661     1  0.2733     0.8148 0.864 0.056 0.000 0.000 0.000 0.080
#> GSM648664     1  0.2221     0.8235 0.896 0.032 0.000 0.000 0.000 0.072
#> GSM648683     1  0.2263     0.8277 0.900 0.036 0.000 0.004 0.000 0.060
#> GSM648685     1  0.2221     0.8235 0.896 0.032 0.000 0.000 0.000 0.072
#> GSM648702     1  0.2583     0.8126 0.888 0.052 0.000 0.016 0.000 0.044
#> GSM648597     1  0.2519     0.8152 0.892 0.016 0.000 0.000 0.044 0.048
#> GSM648603     1  0.0777     0.8276 0.972 0.000 0.000 0.000 0.004 0.024
#> GSM648606     1  0.7261     0.0448 0.368 0.068 0.284 0.008 0.000 0.272
#> GSM648613     1  0.7261     0.0448 0.368 0.068 0.284 0.008 0.000 0.272
#> GSM648619     1  0.3823     0.7389 0.760 0.000 0.044 0.000 0.004 0.192
#> GSM648654     1  0.4720     0.5514 0.624 0.304 0.000 0.000 0.000 0.072
#> GSM648663     1  0.6632     0.3542 0.496 0.044 0.268 0.008 0.000 0.184
#> GSM648670     1  0.5509     0.1432 0.464 0.016 0.000 0.004 0.448 0.068
#> GSM648707     5  0.2697     0.5784 0.012 0.000 0.004 0.020 0.876 0.088
#> GSM648615     2  0.0777     0.6794 0.024 0.972 0.000 0.000 0.000 0.004
#> GSM648643     2  0.1350     0.6705 0.020 0.952 0.000 0.020 0.000 0.008
#> GSM648650     1  0.4283     0.6427 0.704 0.244 0.000 0.008 0.000 0.044
#> GSM648656     2  0.1780     0.6331 0.000 0.924 0.000 0.048 0.000 0.028
#> GSM648715     2  0.3529     0.4638 0.208 0.764 0.000 0.000 0.000 0.028
#> GSM648598     1  0.0458     0.8277 0.984 0.000 0.000 0.000 0.000 0.016
#> GSM648601     1  0.1010     0.8282 0.960 0.004 0.000 0.000 0.000 0.036
#> GSM648602     1  0.1644     0.8230 0.920 0.004 0.000 0.000 0.000 0.076
#> GSM648604     1  0.1895     0.8228 0.912 0.016 0.000 0.000 0.000 0.072
#> GSM648614     1  0.7291     0.0462 0.368 0.072 0.284 0.008 0.000 0.268
#> GSM648624     1  0.0458     0.8277 0.984 0.000 0.000 0.000 0.000 0.016
#> GSM648625     1  0.2361     0.8122 0.884 0.088 0.000 0.000 0.000 0.028
#> GSM648629     1  0.1895     0.8228 0.912 0.016 0.000 0.000 0.000 0.072
#> GSM648634     1  0.2331     0.8316 0.888 0.032 0.000 0.000 0.000 0.080
#> GSM648648     1  0.2259     0.8159 0.904 0.044 0.000 0.008 0.000 0.044
#> GSM648651     1  0.1010     0.8282 0.960 0.004 0.000 0.000 0.000 0.036
#> GSM648657     1  0.1820     0.8237 0.928 0.016 0.000 0.000 0.012 0.044
#> GSM648660     1  0.0458     0.8277 0.984 0.000 0.000 0.000 0.000 0.016
#> GSM648697     1  0.2251     0.8282 0.904 0.036 0.000 0.008 0.000 0.052
#> GSM648710     1  0.1895     0.8228 0.912 0.016 0.000 0.000 0.000 0.072
#> GSM648591     1  0.6206     0.1030 0.440 0.008 0.000 0.020 0.400 0.132
#> GSM648592     1  0.2688     0.8148 0.884 0.024 0.000 0.000 0.044 0.048
#> GSM648607     1  0.3628     0.7537 0.784 0.000 0.044 0.000 0.004 0.168
#> GSM648611     1  0.5308     0.6143 0.620 0.008 0.112 0.000 0.004 0.256
#> GSM648612     1  0.3853     0.7365 0.756 0.000 0.044 0.000 0.004 0.196
#> GSM648616     5  0.0291     0.6058 0.000 0.000 0.004 0.004 0.992 0.000
#> GSM648617     1  0.1970     0.8220 0.912 0.028 0.000 0.000 0.000 0.060
#> GSM648626     1  0.0858     0.8279 0.968 0.000 0.000 0.000 0.004 0.028
#> GSM648711     1  0.3628     0.7537 0.784 0.000 0.044 0.000 0.004 0.168
#> GSM648712     1  0.3883     0.7344 0.752 0.000 0.044 0.000 0.004 0.200
#> GSM648713     1  0.3728     0.7465 0.772 0.000 0.044 0.000 0.004 0.180
#> GSM648714     1  0.7261     0.0448 0.368 0.068 0.284 0.008 0.000 0.272
#> GSM648716     1  0.3823     0.7389 0.760 0.000 0.044 0.000 0.004 0.192
#> GSM648717     1  0.6650     0.1735 0.420 0.020 0.284 0.008 0.000 0.268
#> GSM648590     1  0.3127     0.7974 0.852 0.084 0.000 0.020 0.000 0.044
#> GSM648596     2  0.3888     0.4427 0.224 0.740 0.000 0.000 0.008 0.028
#> GSM648642     2  0.0632     0.6793 0.024 0.976 0.000 0.000 0.000 0.000
#> GSM648696     1  0.2070     0.8186 0.908 0.048 0.000 0.000 0.000 0.044
#> GSM648705     1  0.2259     0.8159 0.904 0.044 0.000 0.008 0.000 0.044
#> GSM648718     2  0.0777     0.6794 0.024 0.972 0.000 0.000 0.000 0.004
#> GSM648599     1  0.1895     0.8264 0.912 0.016 0.000 0.000 0.000 0.072
#> GSM648608     1  0.2237     0.8261 0.896 0.036 0.000 0.000 0.000 0.068
#> GSM648609     1  0.1895     0.8228 0.912 0.016 0.000 0.000 0.000 0.072
#> GSM648610     1  0.1895     0.8264 0.912 0.016 0.000 0.000 0.000 0.072
#> GSM648633     1  0.1151     0.8276 0.956 0.012 0.000 0.000 0.000 0.032
#> GSM648644     2  0.4818     0.4293 0.000 0.672 0.000 0.212 0.004 0.112
#> GSM648652     1  0.2259     0.8159 0.904 0.044 0.000 0.008 0.000 0.044
#> GSM648653     1  0.1700     0.8215 0.916 0.004 0.000 0.000 0.000 0.080
#> GSM648658     1  0.2852     0.8063 0.872 0.064 0.000 0.020 0.000 0.044
#> GSM648659     1  0.5163     0.1767 0.492 0.444 0.000 0.020 0.000 0.044
#> GSM648662     1  0.2852     0.8118 0.856 0.064 0.000 0.000 0.000 0.080
#> GSM648665     1  0.2852     0.8118 0.856 0.064 0.000 0.000 0.000 0.080
#> GSM648666     1  0.2046     0.8279 0.916 0.032 0.000 0.008 0.000 0.044
#> GSM648680     1  0.2259     0.8159 0.904 0.044 0.000 0.008 0.000 0.044
#> GSM648684     1  0.2263     0.8277 0.900 0.036 0.000 0.004 0.000 0.060
#> GSM648709     2  0.1075     0.6667 0.048 0.952 0.000 0.000 0.000 0.000
#> GSM648719     1  0.0458     0.8277 0.984 0.000 0.000 0.000 0.000 0.016
#> GSM648627     1  0.4818     0.6626 0.672 0.000 0.112 0.000 0.004 0.212
#> GSM648637     5  0.4191     0.5763 0.000 0.024 0.020 0.152 0.776 0.028
#> GSM648638     5  0.4191     0.5763 0.000 0.024 0.020 0.152 0.776 0.028
#> GSM648641     3  0.5134     0.5522 0.020 0.016 0.580 0.008 0.012 0.364
#> GSM648672     4  0.4303     0.0529 0.000 0.460 0.000 0.524 0.012 0.004
#> GSM648674     5  0.3648     0.5360 0.000 0.024 0.000 0.188 0.776 0.012
#> GSM648703     2  0.4894     0.2131 0.000 0.556 0.000 0.376 0.000 0.068
#> GSM648631     3  0.0000     0.8617 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648669     4  0.3934     0.3150 0.000 0.000 0.000 0.676 0.304 0.020
#> GSM648671     4  0.3934     0.3150 0.000 0.000 0.000 0.676 0.304 0.020
#> GSM648678     2  0.5230     0.2830 0.000 0.592 0.000 0.292 0.004 0.112
#> GSM648679     5  0.4184    -0.1185 0.000 0.000 0.000 0.484 0.504 0.012
#> GSM648681     2  0.6929    -0.0264 0.316 0.376 0.000 0.004 0.260 0.044
#> GSM648686     3  0.1610     0.8324 0.000 0.000 0.916 0.000 0.000 0.084
#> GSM648689     3  0.4642     0.5965 0.016 0.016 0.624 0.008 0.000 0.336
#> GSM648690     3  0.1610     0.8324 0.000 0.000 0.916 0.000 0.000 0.084
#> GSM648691     3  0.0000     0.8617 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648693     3  0.0000     0.8617 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648700     2  0.4894     0.2131 0.000 0.556 0.000 0.376 0.000 0.068
#> GSM648630     3  0.0000     0.8617 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648632     3  0.0000     0.8617 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648639     5  0.6467     0.4476 0.000 0.000 0.040 0.256 0.488 0.216
#> GSM648640     5  0.6467     0.4476 0.000 0.000 0.040 0.256 0.488 0.216
#> GSM648668     4  0.4303     0.0529 0.000 0.460 0.000 0.524 0.012 0.004
#> GSM648676     2  0.4894     0.2131 0.000 0.556 0.000 0.376 0.000 0.068
#> GSM648692     3  0.0000     0.8617 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648694     3  0.0000     0.8617 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648699     2  0.4894     0.2131 0.000 0.556 0.000 0.376 0.000 0.068
#> GSM648701     2  0.4894     0.2131 0.000 0.556 0.000 0.376 0.000 0.068
#> GSM648673     4  0.3934     0.3150 0.000 0.000 0.000 0.676 0.304 0.020
#> GSM648677     2  0.4845     0.1006 0.000 0.540 0.000 0.400 0.000 0.060
#> GSM648687     3  0.4605     0.6093 0.096 0.000 0.736 0.012 0.008 0.148
#> GSM648688     3  0.4605     0.6093 0.096 0.000 0.736 0.012 0.008 0.148

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-SD-hclust-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-SD-hclust-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-SD-hclust-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-SD-hclust-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-SD-hclust-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-SD-hclust-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-SD-hclust-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-SD-hclust-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-SD-hclust-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-SD-hclust-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-SD-hclust-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-SD-hclust-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-SD-hclust-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-SD-hclust-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-SD-hclust-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-SD-hclust-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-SD-hclust-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-SD-hclust-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-SD-hclust-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)
#> Error in mat[ceiling(1:nr/h_ratio), ceiling(1:nc/w_ratio), drop = FALSE]: subscript out of bounds

plot of chunk tab-SD-hclust-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk SD-hclust-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-SD-hclust-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-SD-hclust-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-SD-hclust-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-SD-hclust-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-SD-hclust-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk SD-hclust-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>             n disease.state(p) development.stage(p) other(p) k
#> SD:hclust 121         1.66e-03             0.000155 2.89e-09 2
#> SD:hclust 104         1.93e-17             0.259845 2.13e-18 3
#> SD:hclust 105         1.37e-20             0.002788 7.97e-28 4
#> SD:hclust 104         1.10e-16             0.025770 7.66e-21 5
#> SD:hclust  98         3.23e-19             0.000678 4.96e-26 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


SD:kmeans

The object with results only for a single top-value method and a single partition method can be extracted as:

res = res_list["SD", "kmeans"]
# you can also extract it by
# res = res_list["SD:kmeans"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 130 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#>   Subgroups are detected by 'kmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 3.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk SD-kmeans-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk SD-kmeans-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.479           0.730       0.849         0.4474 0.544   0.544
#> 3 3 0.730           0.849       0.915         0.3382 0.749   0.576
#> 4 4 0.572           0.660       0.791         0.1489 0.862   0.680
#> 5 5 0.641           0.669       0.802         0.0891 0.862   0.612
#> 6 6 0.628           0.614       0.757         0.0565 0.957   0.831

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 3

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM648605     2  0.9983    -0.0511 0.476 0.524
#> GSM648618     1  0.0000     0.8525 1.000 0.000
#> GSM648620     1  0.8327     0.6839 0.736 0.264
#> GSM648646     2  0.4298     0.7589 0.088 0.912
#> GSM648649     1  0.7883     0.7135 0.764 0.236
#> GSM648675     1  0.9866     0.3524 0.568 0.432
#> GSM648682     2  0.6438     0.6914 0.164 0.836
#> GSM648698     2  0.9522     0.3150 0.372 0.628
#> GSM648708     1  0.8443     0.6741 0.728 0.272
#> GSM648628     1  0.4298     0.7771 0.912 0.088
#> GSM648595     1  0.8267     0.6884 0.740 0.260
#> GSM648635     1  0.7815     0.7169 0.768 0.232
#> GSM648645     1  0.1184     0.8514 0.984 0.016
#> GSM648647     1  0.8555     0.6640 0.720 0.280
#> GSM648667     1  0.8327     0.6839 0.736 0.264
#> GSM648695     1  0.8443     0.6741 0.728 0.272
#> GSM648704     2  0.4298     0.7589 0.088 0.912
#> GSM648706     2  0.4298     0.7589 0.088 0.912
#> GSM648593     1  0.7883     0.7135 0.764 0.236
#> GSM648594     1  0.7815     0.7169 0.768 0.232
#> GSM648600     1  0.1184     0.8514 0.984 0.016
#> GSM648621     1  0.0000     0.8525 1.000 0.000
#> GSM648622     1  0.0000     0.8525 1.000 0.000
#> GSM648623     1  0.0376     0.8505 0.996 0.004
#> GSM648636     1  0.7883     0.7135 0.764 0.236
#> GSM648655     1  0.7883     0.7135 0.764 0.236
#> GSM648661     1  0.0376     0.8505 0.996 0.004
#> GSM648664     1  0.0000     0.8525 1.000 0.000
#> GSM648683     1  0.0000     0.8525 1.000 0.000
#> GSM648685     1  0.0000     0.8525 1.000 0.000
#> GSM648702     1  0.7883     0.7135 0.764 0.236
#> GSM648597     1  0.1184     0.8514 0.984 0.016
#> GSM648603     1  0.0000     0.8525 1.000 0.000
#> GSM648606     1  0.2948     0.8153 0.948 0.052
#> GSM648613     1  0.4431     0.7744 0.908 0.092
#> GSM648619     1  0.2948     0.8153 0.948 0.052
#> GSM648654     1  0.1843     0.8344 0.972 0.028
#> GSM648663     1  0.2948     0.8153 0.948 0.052
#> GSM648670     2  0.9922     0.0633 0.448 0.552
#> GSM648707     2  0.8555     0.6756 0.280 0.720
#> GSM648615     2  0.9970    -0.0179 0.468 0.532
#> GSM648643     2  0.9491     0.3258 0.368 0.632
#> GSM648650     1  0.8327     0.6839 0.736 0.264
#> GSM648656     2  0.4298     0.7589 0.088 0.912
#> GSM648715     1  0.8555     0.6640 0.720 0.280
#> GSM648598     1  0.1184     0.8514 0.984 0.016
#> GSM648601     1  0.1184     0.8514 0.984 0.016
#> GSM648602     1  0.0000     0.8525 1.000 0.000
#> GSM648604     1  0.0000     0.8525 1.000 0.000
#> GSM648614     1  0.0000     0.8525 1.000 0.000
#> GSM648624     1  0.0000     0.8525 1.000 0.000
#> GSM648625     1  0.1184     0.8514 0.984 0.016
#> GSM648629     1  0.0000     0.8525 1.000 0.000
#> GSM648634     1  0.1184     0.8514 0.984 0.016
#> GSM648648     1  0.7883     0.7135 0.764 0.236
#> GSM648651     1  0.0000     0.8525 1.000 0.000
#> GSM648657     1  0.1184     0.8514 0.984 0.016
#> GSM648660     1  0.1184     0.8514 0.984 0.016
#> GSM648697     1  0.1184     0.8514 0.984 0.016
#> GSM648710     1  0.0000     0.8525 1.000 0.000
#> GSM648591     1  0.0376     0.8505 0.996 0.004
#> GSM648592     1  0.1633     0.8483 0.976 0.024
#> GSM648607     1  0.2236     0.8283 0.964 0.036
#> GSM648611     1  0.4298     0.7771 0.912 0.088
#> GSM648612     1  0.2948     0.8153 0.948 0.052
#> GSM648616     2  0.8499     0.6788 0.276 0.724
#> GSM648617     1  0.1184     0.8514 0.984 0.016
#> GSM648626     1  0.0376     0.8505 0.996 0.004
#> GSM648711     1  0.2423     0.8252 0.960 0.040
#> GSM648712     1  0.2948     0.8153 0.948 0.052
#> GSM648713     1  0.2948     0.8153 0.948 0.052
#> GSM648714     1  0.4298     0.7908 0.912 0.088
#> GSM648716     1  0.2948     0.8153 0.948 0.052
#> GSM648717     1  0.4298     0.7771 0.912 0.088
#> GSM648590     1  0.8555     0.6640 0.720 0.280
#> GSM648596     1  0.9661     0.4586 0.608 0.392
#> GSM648642     1  0.8555     0.6640 0.720 0.280
#> GSM648696     1  0.7883     0.7135 0.764 0.236
#> GSM648705     1  0.8267     0.6884 0.740 0.260
#> GSM648718     2  0.9998    -0.1159 0.492 0.508
#> GSM648599     1  0.0000     0.8525 1.000 0.000
#> GSM648608     1  0.0000     0.8525 1.000 0.000
#> GSM648609     1  0.0000     0.8525 1.000 0.000
#> GSM648610     1  0.0000     0.8525 1.000 0.000
#> GSM648633     1  0.1184     0.8514 0.984 0.016
#> GSM648644     2  0.4298     0.7589 0.088 0.912
#> GSM648652     1  0.7815     0.7169 0.768 0.232
#> GSM648653     1  0.0000     0.8525 1.000 0.000
#> GSM648658     1  0.7745     0.7200 0.772 0.228
#> GSM648659     1  0.8555     0.6640 0.720 0.280
#> GSM648662     1  0.0000     0.8525 1.000 0.000
#> GSM648665     1  0.0000     0.8525 1.000 0.000
#> GSM648666     1  0.0000     0.8525 1.000 0.000
#> GSM648680     1  0.7745     0.7200 0.772 0.228
#> GSM648684     1  0.0000     0.8525 1.000 0.000
#> GSM648709     1  0.8499     0.6694 0.724 0.276
#> GSM648719     1  0.1184     0.8514 0.984 0.016
#> GSM648627     1  0.2948     0.8153 0.948 0.052
#> GSM648637     2  0.4298     0.7589 0.088 0.912
#> GSM648638     2  0.0000     0.7366 0.000 1.000
#> GSM648641     2  0.8555     0.6756 0.280 0.720
#> GSM648672     2  0.4298     0.7589 0.088 0.912
#> GSM648674     2  0.4298     0.7589 0.088 0.912
#> GSM648703     2  0.4298     0.7589 0.088 0.912
#> GSM648631     2  0.8555     0.6756 0.280 0.720
#> GSM648669     2  0.2778     0.7524 0.048 0.952
#> GSM648671     2  0.2778     0.7524 0.048 0.952
#> GSM648678     2  0.4298     0.7589 0.088 0.912
#> GSM648679     2  0.2778     0.7524 0.048 0.952
#> GSM648681     1  0.9944     0.2785 0.544 0.456
#> GSM648686     2  0.8081     0.6885 0.248 0.752
#> GSM648689     2  0.8499     0.6788 0.276 0.724
#> GSM648690     2  0.8267     0.6845 0.260 0.740
#> GSM648691     2  0.8499     0.6788 0.276 0.724
#> GSM648693     2  0.8555     0.6756 0.280 0.720
#> GSM648700     2  0.4298     0.7589 0.088 0.912
#> GSM648630     2  0.8499     0.6788 0.276 0.724
#> GSM648632     2  0.8555     0.6756 0.280 0.720
#> GSM648639     2  0.7883     0.6915 0.236 0.764
#> GSM648640     2  0.8499     0.6788 0.276 0.724
#> GSM648668     2  0.4298     0.7589 0.088 0.912
#> GSM648676     2  0.4298     0.7589 0.088 0.912
#> GSM648692     2  0.8499     0.6788 0.276 0.724
#> GSM648694     2  0.8499     0.6788 0.276 0.724
#> GSM648699     2  0.4298     0.7589 0.088 0.912
#> GSM648701     2  0.4298     0.7589 0.088 0.912
#> GSM648673     2  0.2778     0.7524 0.048 0.952
#> GSM648677     2  0.4298     0.7589 0.088 0.912
#> GSM648687     2  0.8499     0.6788 0.276 0.724
#> GSM648688     2  0.8555     0.6756 0.280 0.720

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM648605     2  0.3112      0.789 0.096 0.900 0.004
#> GSM648618     1  0.1315      0.949 0.972 0.008 0.020
#> GSM648620     1  0.5678      0.551 0.684 0.316 0.000
#> GSM648646     2  0.0592      0.809 0.000 0.988 0.012
#> GSM648649     1  0.0424      0.957 0.992 0.008 0.000
#> GSM648675     2  0.5201      0.683 0.236 0.760 0.004
#> GSM648682     2  0.0829      0.809 0.004 0.984 0.012
#> GSM648698     2  0.2496      0.802 0.068 0.928 0.004
#> GSM648708     1  0.5733      0.533 0.676 0.324 0.000
#> GSM648628     3  0.6180      0.554 0.332 0.008 0.660
#> GSM648595     1  0.3038      0.872 0.896 0.104 0.000
#> GSM648635     1  0.0424      0.957 0.992 0.008 0.000
#> GSM648645     1  0.0000      0.959 1.000 0.000 0.000
#> GSM648647     2  0.4235      0.724 0.176 0.824 0.000
#> GSM648667     1  0.5363      0.629 0.724 0.276 0.000
#> GSM648695     2  0.6286      0.150 0.464 0.536 0.000
#> GSM648704     2  0.0892      0.809 0.000 0.980 0.020
#> GSM648706     2  0.0892      0.809 0.000 0.980 0.020
#> GSM648593     1  0.0424      0.957 0.992 0.008 0.000
#> GSM648594     1  0.0424      0.957 0.992 0.008 0.000
#> GSM648600     1  0.1015      0.954 0.980 0.008 0.012
#> GSM648621     1  0.1315      0.949 0.972 0.008 0.020
#> GSM648622     1  0.0000      0.959 1.000 0.000 0.000
#> GSM648623     1  0.0892      0.951 0.980 0.000 0.020
#> GSM648636     1  0.0747      0.956 0.984 0.016 0.000
#> GSM648655     1  0.0747      0.956 0.984 0.016 0.000
#> GSM648661     1  0.0000      0.959 1.000 0.000 0.000
#> GSM648664     1  0.0000      0.959 1.000 0.000 0.000
#> GSM648683     1  0.0424      0.958 0.992 0.008 0.000
#> GSM648685     1  0.0000      0.959 1.000 0.000 0.000
#> GSM648702     1  0.0747      0.956 0.984 0.016 0.000
#> GSM648597     1  0.0592      0.956 0.988 0.000 0.012
#> GSM648603     1  0.0592      0.956 0.988 0.000 0.012
#> GSM648606     3  0.7595      0.652 0.176 0.136 0.688
#> GSM648613     3  0.7510      0.654 0.184 0.124 0.692
#> GSM648619     1  0.2537      0.903 0.920 0.000 0.080
#> GSM648654     1  0.4045      0.850 0.872 0.104 0.024
#> GSM648663     3  0.8132      0.554 0.284 0.104 0.612
#> GSM648670     2  0.5574      0.717 0.184 0.784 0.032
#> GSM648707     3  0.0983      0.846 0.016 0.004 0.980
#> GSM648615     2  0.3030      0.792 0.092 0.904 0.004
#> GSM648643     2  0.2261      0.802 0.068 0.932 0.000
#> GSM648650     1  0.5016      0.694 0.760 0.240 0.000
#> GSM648656     2  0.0592      0.809 0.000 0.988 0.012
#> GSM648715     2  0.4399      0.710 0.188 0.812 0.000
#> GSM648598     1  0.0000      0.959 1.000 0.000 0.000
#> GSM648601     1  0.0000      0.959 1.000 0.000 0.000
#> GSM648602     1  0.0424      0.958 0.992 0.008 0.000
#> GSM648604     1  0.0000      0.959 1.000 0.000 0.000
#> GSM648614     1  0.4748      0.813 0.832 0.144 0.024
#> GSM648624     1  0.0000      0.959 1.000 0.000 0.000
#> GSM648625     1  0.0000      0.959 1.000 0.000 0.000
#> GSM648629     1  0.0000      0.959 1.000 0.000 0.000
#> GSM648634     1  0.0424      0.958 0.992 0.008 0.000
#> GSM648648     1  0.0424      0.957 0.992 0.008 0.000
#> GSM648651     1  0.0000      0.959 1.000 0.000 0.000
#> GSM648657     1  0.0000      0.959 1.000 0.000 0.000
#> GSM648660     1  0.0000      0.959 1.000 0.000 0.000
#> GSM648697     1  0.0424      0.958 0.992 0.008 0.000
#> GSM648710     1  0.0000      0.959 1.000 0.000 0.000
#> GSM648591     1  0.1315      0.949 0.972 0.008 0.020
#> GSM648592     1  0.0592      0.956 0.988 0.000 0.012
#> GSM648607     1  0.0592      0.956 0.988 0.000 0.012
#> GSM648611     3  0.5988      0.607 0.304 0.008 0.688
#> GSM648612     1  0.2625      0.899 0.916 0.000 0.084
#> GSM648616     3  0.1529      0.847 0.000 0.040 0.960
#> GSM648617     1  0.0892      0.951 0.980 0.000 0.020
#> GSM648626     1  0.0592      0.956 0.988 0.000 0.012
#> GSM648711     1  0.0592      0.956 0.988 0.000 0.012
#> GSM648712     1  0.2955      0.900 0.912 0.008 0.080
#> GSM648713     1  0.1163      0.947 0.972 0.000 0.028
#> GSM648714     3  0.7759      0.638 0.180 0.144 0.676
#> GSM648716     1  0.2537      0.903 0.920 0.000 0.080
#> GSM648717     3  0.5465      0.633 0.288 0.000 0.712
#> GSM648590     2  0.6140      0.429 0.404 0.596 0.000
#> GSM648596     2  0.2878      0.791 0.096 0.904 0.000
#> GSM648642     2  0.4235      0.724 0.176 0.824 0.000
#> GSM648696     1  0.0747      0.956 0.984 0.016 0.000
#> GSM648705     1  0.0424      0.957 0.992 0.008 0.000
#> GSM648718     2  0.2878      0.791 0.096 0.904 0.000
#> GSM648599     1  0.1015      0.954 0.980 0.008 0.012
#> GSM648608     1  0.0424      0.958 0.992 0.008 0.000
#> GSM648609     1  0.0000      0.959 1.000 0.000 0.000
#> GSM648610     1  0.1015      0.954 0.980 0.008 0.012
#> GSM648633     1  0.0000      0.959 1.000 0.000 0.000
#> GSM648644     2  0.0892      0.809 0.000 0.980 0.020
#> GSM648652     1  0.0424      0.957 0.992 0.008 0.000
#> GSM648653     1  0.0424      0.958 0.992 0.008 0.000
#> GSM648658     1  0.0747      0.956 0.984 0.016 0.000
#> GSM648659     2  0.4002      0.734 0.160 0.840 0.000
#> GSM648662     1  0.0000      0.959 1.000 0.000 0.000
#> GSM648665     1  0.3038      0.866 0.896 0.104 0.000
#> GSM648666     1  0.0424      0.958 0.992 0.008 0.000
#> GSM648680     1  0.0237      0.958 0.996 0.004 0.000
#> GSM648684     1  0.0424      0.958 0.992 0.008 0.000
#> GSM648709     2  0.5835      0.501 0.340 0.660 0.000
#> GSM648719     1  0.0000      0.959 1.000 0.000 0.000
#> GSM648627     1  0.2955      0.900 0.912 0.008 0.080
#> GSM648637     2  0.3941      0.799 0.000 0.844 0.156
#> GSM648638     2  0.4504      0.773 0.000 0.804 0.196
#> GSM648641     3  0.0424      0.855 0.000 0.008 0.992
#> GSM648672     2  0.3941      0.799 0.000 0.844 0.156
#> GSM648674     2  0.3941      0.799 0.000 0.844 0.156
#> GSM648703     2  0.3752      0.802 0.000 0.856 0.144
#> GSM648631     3  0.0424      0.855 0.000 0.008 0.992
#> GSM648669     2  0.4062      0.794 0.000 0.836 0.164
#> GSM648671     2  0.4062      0.794 0.000 0.836 0.164
#> GSM648678     2  0.3340      0.807 0.000 0.880 0.120
#> GSM648679     2  0.4002      0.797 0.000 0.840 0.160
#> GSM648681     2  0.2356      0.801 0.072 0.928 0.000
#> GSM648686     3  0.1031      0.858 0.000 0.024 0.976
#> GSM648689     3  0.1031      0.858 0.000 0.024 0.976
#> GSM648690     3  0.1031      0.858 0.000 0.024 0.976
#> GSM648691     3  0.1031      0.858 0.000 0.024 0.976
#> GSM648693     3  0.0747      0.858 0.000 0.016 0.984
#> GSM648700     2  0.3551      0.806 0.000 0.868 0.132
#> GSM648630     3  0.1031      0.858 0.000 0.024 0.976
#> GSM648632     3  0.0747      0.858 0.000 0.016 0.984
#> GSM648639     3  0.1031      0.855 0.000 0.024 0.976
#> GSM648640     3  0.0892      0.857 0.000 0.020 0.980
#> GSM648668     2  0.3941      0.799 0.000 0.844 0.156
#> GSM648676     2  0.3619      0.805 0.000 0.864 0.136
#> GSM648692     3  0.1031      0.858 0.000 0.024 0.976
#> GSM648694     3  0.1031      0.858 0.000 0.024 0.976
#> GSM648699     2  0.3752      0.802 0.000 0.856 0.144
#> GSM648701     2  0.3752      0.802 0.000 0.856 0.144
#> GSM648673     2  0.4002      0.797 0.000 0.840 0.160
#> GSM648677     2  0.3941      0.799 0.000 0.844 0.156
#> GSM648687     3  0.1163      0.857 0.000 0.028 0.972
#> GSM648688     3  0.1031      0.858 0.000 0.024 0.976

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM648605     2  0.5464   0.564772 0.072 0.716 0.000 0.212
#> GSM648618     1  0.5180   0.709850 0.740 0.196 0.064 0.000
#> GSM648620     2  0.4059   0.583100 0.200 0.788 0.000 0.012
#> GSM648646     2  0.4888   0.344171 0.000 0.588 0.000 0.412
#> GSM648649     1  0.3610   0.735716 0.800 0.200 0.000 0.000
#> GSM648675     2  0.8905   0.220343 0.240 0.428 0.064 0.268
#> GSM648682     2  0.4888   0.344171 0.000 0.588 0.000 0.412
#> GSM648698     2  0.4855   0.527292 0.020 0.712 0.000 0.268
#> GSM648708     2  0.4175   0.584307 0.200 0.784 0.000 0.016
#> GSM648628     1  0.7648   0.014069 0.400 0.208 0.392 0.000
#> GSM648595     1  0.4692   0.723870 0.756 0.212 0.032 0.000
#> GSM648635     1  0.3791   0.735161 0.796 0.200 0.004 0.000
#> GSM648645     1  0.1940   0.805936 0.924 0.076 0.000 0.000
#> GSM648647     2  0.4791   0.603819 0.136 0.784 0.000 0.080
#> GSM648667     2  0.4477   0.485105 0.312 0.688 0.000 0.000
#> GSM648695     2  0.4466   0.593898 0.180 0.784 0.000 0.036
#> GSM648704     2  0.4888   0.344171 0.000 0.588 0.000 0.412
#> GSM648706     2  0.4888   0.344171 0.000 0.588 0.000 0.412
#> GSM648593     1  0.3751   0.734162 0.800 0.196 0.000 0.004
#> GSM648594     1  0.3610   0.735716 0.800 0.200 0.000 0.000
#> GSM648600     1  0.4244   0.794358 0.804 0.160 0.036 0.000
#> GSM648621     1  0.4663   0.743814 0.788 0.148 0.064 0.000
#> GSM648622     1  0.0000   0.810002 1.000 0.000 0.000 0.000
#> GSM648623     1  0.4163   0.726064 0.792 0.188 0.020 0.000
#> GSM648636     1  0.4798   0.725550 0.760 0.204 0.032 0.004
#> GSM648655     1  0.4798   0.725550 0.760 0.204 0.032 0.004
#> GSM648661     1  0.1004   0.807501 0.972 0.024 0.004 0.000
#> GSM648664     1  0.0592   0.807618 0.984 0.016 0.000 0.000
#> GSM648683     1  0.1833   0.805158 0.944 0.024 0.032 0.000
#> GSM648685     1  0.2530   0.801799 0.896 0.100 0.004 0.000
#> GSM648702     1  0.4617   0.728257 0.764 0.204 0.032 0.000
#> GSM648597     1  0.5498   0.735868 0.704 0.252 0.020 0.024
#> GSM648603     1  0.4163   0.726064 0.792 0.188 0.020 0.000
#> GSM648606     2  0.7426  -0.141308 0.172 0.452 0.376 0.000
#> GSM648613     2  0.7472  -0.171138 0.176 0.428 0.396 0.000
#> GSM648619     1  0.4669   0.708286 0.764 0.200 0.036 0.000
#> GSM648654     1  0.4908   0.550585 0.692 0.292 0.016 0.000
#> GSM648663     2  0.7733  -0.002280 0.356 0.412 0.232 0.000
#> GSM648670     4  0.5652   0.567685 0.096 0.068 0.064 0.772
#> GSM648707     3  0.9486   0.352293 0.172 0.192 0.420 0.216
#> GSM648615     2  0.4635   0.523297 0.012 0.720 0.000 0.268
#> GSM648643     2  0.5306   0.445383 0.020 0.632 0.000 0.348
#> GSM648650     2  0.4382   0.496478 0.296 0.704 0.000 0.000
#> GSM648656     2  0.4888   0.344171 0.000 0.588 0.000 0.412
#> GSM648715     2  0.4735   0.604598 0.148 0.784 0.000 0.068
#> GSM648598     1  0.1867   0.805699 0.928 0.072 0.000 0.000
#> GSM648601     1  0.1867   0.805699 0.928 0.072 0.000 0.000
#> GSM648602     1  0.2565   0.808282 0.912 0.056 0.032 0.000
#> GSM648604     1  0.1022   0.805809 0.968 0.032 0.000 0.000
#> GSM648614     2  0.4699   0.300791 0.320 0.676 0.004 0.000
#> GSM648624     1  0.0000   0.810002 1.000 0.000 0.000 0.000
#> GSM648625     1  0.2921   0.783590 0.860 0.140 0.000 0.000
#> GSM648629     1  0.1022   0.805809 0.968 0.032 0.000 0.000
#> GSM648634     1  0.3013   0.803153 0.888 0.080 0.032 0.000
#> GSM648648     1  0.3751   0.735772 0.800 0.196 0.004 0.000
#> GSM648651     1  0.1389   0.809753 0.952 0.048 0.000 0.000
#> GSM648657     1  0.2081   0.808128 0.916 0.084 0.000 0.000
#> GSM648660     1  0.1940   0.805936 0.924 0.076 0.000 0.000
#> GSM648697     1  0.2714   0.794935 0.884 0.112 0.004 0.000
#> GSM648710     1  0.1022   0.805809 0.968 0.032 0.000 0.000
#> GSM648591     1  0.5944   0.692787 0.716 0.196 0.064 0.024
#> GSM648592     1  0.5193   0.724102 0.656 0.324 0.020 0.000
#> GSM648607     1  0.4284   0.719087 0.780 0.200 0.020 0.000
#> GSM648611     3  0.7641   0.000972 0.376 0.208 0.416 0.000
#> GSM648612     1  0.4957   0.697961 0.748 0.204 0.048 0.000
#> GSM648616     4  0.7704  -0.283166 0.004 0.188 0.388 0.420
#> GSM648617     1  0.4675   0.744826 0.736 0.244 0.020 0.000
#> GSM648626     1  0.4163   0.726064 0.792 0.188 0.020 0.000
#> GSM648711     1  0.3893   0.729756 0.796 0.196 0.008 0.000
#> GSM648712     1  0.5530   0.688183 0.712 0.212 0.076 0.000
#> GSM648713     1  0.4387   0.716520 0.776 0.200 0.024 0.000
#> GSM648714     2  0.4507   0.420993 0.168 0.788 0.044 0.000
#> GSM648716     1  0.4839   0.702184 0.756 0.200 0.044 0.000
#> GSM648717     3  0.7526   0.244138 0.332 0.200 0.468 0.000
#> GSM648590     1  0.6790   0.106601 0.476 0.456 0.032 0.036
#> GSM648596     2  0.4606   0.527030 0.012 0.724 0.000 0.264
#> GSM648642     2  0.4735   0.604598 0.148 0.784 0.000 0.068
#> GSM648696     1  0.5169   0.649877 0.696 0.272 0.032 0.000
#> GSM648705     1  0.3791   0.735161 0.796 0.200 0.004 0.000
#> GSM648718     2  0.4898   0.534197 0.024 0.716 0.000 0.260
#> GSM648599     1  0.4100   0.758037 0.816 0.148 0.036 0.000
#> GSM648608     1  0.2224   0.803006 0.928 0.040 0.032 0.000
#> GSM648609     1  0.0592   0.807618 0.984 0.016 0.000 0.000
#> GSM648610     1  0.2224   0.803006 0.928 0.040 0.032 0.000
#> GSM648633     1  0.1940   0.805936 0.924 0.076 0.000 0.000
#> GSM648644     2  0.4916   0.318420 0.000 0.576 0.000 0.424
#> GSM648652     1  0.3751   0.735772 0.800 0.196 0.004 0.000
#> GSM648653     1  0.2943   0.804270 0.892 0.076 0.032 0.000
#> GSM648658     1  0.4640   0.739707 0.776 0.188 0.032 0.004
#> GSM648659     2  0.4706   0.602492 0.140 0.788 0.000 0.072
#> GSM648662     1  0.1474   0.801807 0.948 0.052 0.000 0.000
#> GSM648665     1  0.4331   0.479815 0.712 0.288 0.000 0.000
#> GSM648666     1  0.2125   0.807166 0.920 0.076 0.004 0.000
#> GSM648680     1  0.3583   0.747998 0.816 0.180 0.004 0.000
#> GSM648684     1  0.1833   0.805158 0.944 0.024 0.032 0.000
#> GSM648709     2  0.4711   0.603949 0.152 0.784 0.000 0.064
#> GSM648719     1  0.1867   0.805699 0.928 0.072 0.000 0.000
#> GSM648627     1  0.5558   0.689097 0.712 0.208 0.080 0.000
#> GSM648637     4  0.0895   0.837900 0.000 0.020 0.004 0.976
#> GSM648638     4  0.1297   0.835463 0.000 0.020 0.016 0.964
#> GSM648641     3  0.2844   0.807595 0.000 0.048 0.900 0.052
#> GSM648672     4  0.1109   0.838041 0.000 0.028 0.004 0.968
#> GSM648674     4  0.0524   0.834757 0.000 0.008 0.004 0.988
#> GSM648703     4  0.3123   0.785844 0.000 0.156 0.000 0.844
#> GSM648631     3  0.1474   0.837189 0.000 0.000 0.948 0.052
#> GSM648669     4  0.0657   0.831455 0.000 0.004 0.012 0.984
#> GSM648671     4  0.0657   0.831455 0.000 0.004 0.012 0.984
#> GSM648678     4  0.3172   0.783389 0.000 0.160 0.000 0.840
#> GSM648679     4  0.0524   0.834757 0.000 0.008 0.004 0.988
#> GSM648681     2  0.5436   0.459482 0.024 0.620 0.000 0.356
#> GSM648686     3  0.1716   0.842814 0.000 0.000 0.936 0.064
#> GSM648689     3  0.1716   0.842814 0.000 0.000 0.936 0.064
#> GSM648690     3  0.1716   0.842814 0.000 0.000 0.936 0.064
#> GSM648691     3  0.1716   0.842814 0.000 0.000 0.936 0.064
#> GSM648693     3  0.1474   0.837189 0.000 0.000 0.948 0.052
#> GSM648700     4  0.3123   0.785844 0.000 0.156 0.000 0.844
#> GSM648630     3  0.1716   0.842814 0.000 0.000 0.936 0.064
#> GSM648632     3  0.1716   0.842814 0.000 0.000 0.936 0.064
#> GSM648639     3  0.5920   0.516930 0.000 0.052 0.612 0.336
#> GSM648640     3  0.1902   0.841407 0.000 0.004 0.932 0.064
#> GSM648668     4  0.1109   0.838041 0.000 0.028 0.004 0.968
#> GSM648676     4  0.3123   0.785844 0.000 0.156 0.000 0.844
#> GSM648692     3  0.1716   0.842814 0.000 0.000 0.936 0.064
#> GSM648694     3  0.1716   0.842814 0.000 0.000 0.936 0.064
#> GSM648699     4  0.3123   0.785844 0.000 0.156 0.000 0.844
#> GSM648701     4  0.3123   0.785844 0.000 0.156 0.000 0.844
#> GSM648673     4  0.0376   0.835518 0.000 0.004 0.004 0.992
#> GSM648677     4  0.3024   0.791958 0.000 0.148 0.000 0.852
#> GSM648687     3  0.2704   0.797628 0.000 0.000 0.876 0.124
#> GSM648688     3  0.1716   0.842814 0.000 0.000 0.936 0.064

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM648605     2  0.1173    0.83555 0.012 0.964 0.000 0.020 0.004
#> GSM648618     5  0.5066    0.57597 0.384 0.004 0.004 0.024 0.584
#> GSM648620     2  0.1628    0.82444 0.056 0.936 0.000 0.000 0.008
#> GSM648646     2  0.2209    0.81496 0.000 0.912 0.000 0.056 0.032
#> GSM648649     1  0.2060    0.75643 0.924 0.052 0.000 0.008 0.016
#> GSM648675     5  0.8332    0.13948 0.264 0.264 0.000 0.136 0.336
#> GSM648682     2  0.2209    0.81400 0.000 0.912 0.000 0.056 0.032
#> GSM648698     2  0.1211    0.83229 0.000 0.960 0.000 0.024 0.016
#> GSM648708     2  0.1788    0.82223 0.056 0.932 0.000 0.004 0.008
#> GSM648628     5  0.5127    0.68047 0.156 0.000 0.104 0.016 0.724
#> GSM648595     1  0.3646    0.71991 0.836 0.052 0.000 0.012 0.100
#> GSM648635     1  0.1830    0.75670 0.932 0.052 0.000 0.004 0.012
#> GSM648645     1  0.0727    0.76286 0.980 0.004 0.000 0.004 0.012
#> GSM648647     2  0.1408    0.82980 0.044 0.948 0.000 0.000 0.008
#> GSM648667     1  0.4702    0.02114 0.512 0.476 0.000 0.004 0.008
#> GSM648695     2  0.1628    0.82444 0.056 0.936 0.000 0.000 0.008
#> GSM648704     2  0.2209    0.81496 0.000 0.912 0.000 0.056 0.032
#> GSM648706     2  0.2209    0.81496 0.000 0.912 0.000 0.056 0.032
#> GSM648593     1  0.2214    0.74766 0.916 0.052 0.000 0.004 0.028
#> GSM648594     1  0.1913    0.75776 0.932 0.044 0.000 0.008 0.016
#> GSM648600     1  0.4061    0.49490 0.740 0.004 0.000 0.016 0.240
#> GSM648621     1  0.4288    0.30995 0.664 0.000 0.000 0.012 0.324
#> GSM648622     1  0.1124    0.75064 0.960 0.000 0.000 0.004 0.036
#> GSM648623     5  0.4560    0.53176 0.484 0.000 0.000 0.008 0.508
#> GSM648636     1  0.3372    0.72587 0.852 0.052 0.000 0.008 0.088
#> GSM648655     1  0.3372    0.72587 0.852 0.052 0.000 0.008 0.088
#> GSM648661     1  0.3242    0.58890 0.784 0.000 0.000 0.000 0.216
#> GSM648664     1  0.3003    0.62574 0.812 0.000 0.000 0.000 0.188
#> GSM648683     1  0.3662    0.60511 0.744 0.000 0.000 0.004 0.252
#> GSM648685     1  0.2513    0.70376 0.876 0.008 0.000 0.000 0.116
#> GSM648702     1  0.3009    0.73953 0.876 0.052 0.000 0.008 0.064
#> GSM648597     1  0.5591   -0.45772 0.496 0.004 0.000 0.060 0.440
#> GSM648603     5  0.4727    0.57279 0.452 0.000 0.000 0.016 0.532
#> GSM648606     5  0.5816    0.53904 0.036 0.148 0.136 0.000 0.680
#> GSM648613     5  0.5934    0.52908 0.028 0.136 0.148 0.008 0.680
#> GSM648619     5  0.4166    0.67222 0.348 0.000 0.004 0.000 0.648
#> GSM648654     5  0.6680    0.39167 0.352 0.204 0.004 0.000 0.440
#> GSM648663     5  0.5994    0.65059 0.136 0.132 0.056 0.000 0.676
#> GSM648670     4  0.5877    0.43289 0.060 0.028 0.004 0.620 0.288
#> GSM648707     5  0.6623    0.24409 0.076 0.004 0.052 0.320 0.548
#> GSM648615     2  0.1485    0.82887 0.000 0.948 0.000 0.032 0.020
#> GSM648643     2  0.1626    0.82463 0.000 0.940 0.000 0.044 0.016
#> GSM648650     2  0.4870    0.14076 0.448 0.532 0.000 0.004 0.016
#> GSM648656     2  0.2291    0.81317 0.000 0.908 0.000 0.056 0.036
#> GSM648715     2  0.1557    0.82660 0.052 0.940 0.000 0.000 0.008
#> GSM648598     1  0.0162    0.76361 0.996 0.000 0.000 0.000 0.004
#> GSM648601     1  0.0324    0.76391 0.992 0.004 0.000 0.000 0.004
#> GSM648602     1  0.1894    0.74768 0.920 0.000 0.000 0.008 0.072
#> GSM648604     1  0.3274    0.58647 0.780 0.000 0.000 0.000 0.220
#> GSM648614     2  0.5651    0.06447 0.056 0.492 0.008 0.000 0.444
#> GSM648624     1  0.1043    0.74953 0.960 0.000 0.000 0.000 0.040
#> GSM648625     1  0.1492    0.75860 0.948 0.040 0.004 0.000 0.008
#> GSM648629     1  0.3242    0.59251 0.784 0.000 0.000 0.000 0.216
#> GSM648634     1  0.1731    0.75132 0.932 0.004 0.000 0.004 0.060
#> GSM648648     1  0.1591    0.75869 0.940 0.052 0.000 0.004 0.004
#> GSM648651     1  0.0771    0.75813 0.976 0.000 0.000 0.004 0.020
#> GSM648657     1  0.0727    0.76286 0.980 0.004 0.000 0.004 0.012
#> GSM648660     1  0.0486    0.76343 0.988 0.004 0.000 0.004 0.004
#> GSM648697     1  0.1281    0.76620 0.956 0.032 0.000 0.000 0.012
#> GSM648710     1  0.3274    0.58647 0.780 0.000 0.000 0.000 0.220
#> GSM648591     5  0.5613    0.58028 0.348 0.004 0.004 0.064 0.580
#> GSM648592     5  0.5709    0.49158 0.468 0.036 0.000 0.024 0.472
#> GSM648607     5  0.4030    0.66887 0.352 0.000 0.000 0.000 0.648
#> GSM648611     5  0.4905    0.65964 0.116 0.000 0.152 0.004 0.728
#> GSM648612     5  0.4299    0.69083 0.316 0.000 0.008 0.004 0.672
#> GSM648616     4  0.5803    0.38374 0.012 0.012 0.052 0.596 0.328
#> GSM648617     1  0.4700   -0.47937 0.516 0.000 0.004 0.008 0.472
#> GSM648626     5  0.4727    0.57279 0.452 0.000 0.000 0.016 0.532
#> GSM648711     5  0.4161    0.61865 0.392 0.000 0.000 0.000 0.608
#> GSM648712     5  0.3989    0.68777 0.260 0.000 0.008 0.004 0.728
#> GSM648713     5  0.4030    0.66887 0.352 0.000 0.000 0.000 0.648
#> GSM648714     2  0.5189    0.32590 0.028 0.584 0.012 0.000 0.376
#> GSM648716     5  0.4084    0.68503 0.328 0.000 0.004 0.000 0.668
#> GSM648717     5  0.5699    0.62980 0.128 0.020 0.180 0.000 0.672
#> GSM648590     1  0.5822    0.44418 0.628 0.232 0.000 0.008 0.132
#> GSM648596     2  0.1356    0.83197 0.000 0.956 0.004 0.028 0.012
#> GSM648642     2  0.1357    0.82913 0.048 0.948 0.000 0.000 0.004
#> GSM648696     1  0.3919    0.69571 0.816 0.100 0.000 0.008 0.076
#> GSM648705     1  0.1830    0.75670 0.932 0.052 0.000 0.004 0.012
#> GSM648718     2  0.1095    0.83437 0.008 0.968 0.000 0.012 0.012
#> GSM648599     1  0.4249    0.38359 0.688 0.000 0.000 0.016 0.296
#> GSM648608     1  0.3814    0.56904 0.720 0.000 0.000 0.004 0.276
#> GSM648609     1  0.3074    0.61933 0.804 0.000 0.000 0.000 0.196
#> GSM648610     1  0.3906    0.54625 0.704 0.000 0.000 0.004 0.292
#> GSM648633     1  0.0486    0.76343 0.988 0.004 0.000 0.004 0.004
#> GSM648644     2  0.2359    0.81001 0.000 0.904 0.000 0.060 0.036
#> GSM648652     1  0.1591    0.75869 0.940 0.052 0.000 0.004 0.004
#> GSM648653     1  0.1571    0.75133 0.936 0.000 0.000 0.004 0.060
#> GSM648658     1  0.3229    0.73051 0.860 0.044 0.000 0.008 0.088
#> GSM648659     2  0.2949    0.79908 0.052 0.876 0.000 0.004 0.068
#> GSM648662     1  0.5070   -0.00767 0.568 0.024 0.008 0.000 0.400
#> GSM648665     1  0.6298    0.28139 0.572 0.212 0.008 0.000 0.208
#> GSM648666     1  0.0290    0.76593 0.992 0.000 0.000 0.000 0.008
#> GSM648680     1  0.1443    0.76145 0.948 0.044 0.000 0.004 0.004
#> GSM648684     1  0.3430    0.64722 0.776 0.000 0.000 0.004 0.220
#> GSM648709     2  0.1670    0.82723 0.052 0.936 0.000 0.000 0.012
#> GSM648719     1  0.0486    0.76343 0.988 0.004 0.000 0.004 0.004
#> GSM648627     5  0.3989    0.68527 0.260 0.000 0.008 0.004 0.728
#> GSM648637     4  0.2900    0.77736 0.000 0.064 0.012 0.884 0.040
#> GSM648638     4  0.2766    0.77552 0.000 0.056 0.012 0.892 0.040
#> GSM648641     3  0.2806    0.79773 0.000 0.000 0.844 0.004 0.152
#> GSM648672     4  0.2507    0.78281 0.000 0.072 0.016 0.900 0.012
#> GSM648674     4  0.2515    0.76770 0.000 0.044 0.008 0.904 0.044
#> GSM648703     4  0.6020    0.70249 0.000 0.204 0.016 0.628 0.152
#> GSM648631     3  0.0290    0.97369 0.000 0.000 0.992 0.008 0.000
#> GSM648669     4  0.1891    0.77556 0.000 0.032 0.016 0.936 0.016
#> GSM648671     4  0.1891    0.77556 0.000 0.032 0.016 0.936 0.016
#> GSM648678     4  0.5945    0.65479 0.000 0.256 0.012 0.612 0.120
#> GSM648679     4  0.2546    0.76522 0.000 0.036 0.012 0.904 0.048
#> GSM648681     2  0.5477    0.47531 0.036 0.652 0.000 0.272 0.040
#> GSM648686     3  0.0693    0.97290 0.000 0.000 0.980 0.012 0.008
#> GSM648689     3  0.0451    0.96909 0.000 0.000 0.988 0.004 0.008
#> GSM648690     3  0.0693    0.97290 0.000 0.000 0.980 0.012 0.008
#> GSM648691     3  0.0404    0.97441 0.000 0.000 0.988 0.012 0.000
#> GSM648693     3  0.0290    0.97369 0.000 0.000 0.992 0.008 0.000
#> GSM648700     4  0.5981    0.69555 0.000 0.212 0.012 0.624 0.152
#> GSM648630     3  0.0404    0.97441 0.000 0.000 0.988 0.012 0.000
#> GSM648632     3  0.0290    0.97369 0.000 0.000 0.992 0.008 0.000
#> GSM648639     4  0.6434    0.15210 0.000 0.012 0.344 0.508 0.136
#> GSM648640     3  0.1579    0.94668 0.000 0.000 0.944 0.032 0.024
#> GSM648668     4  0.2507    0.78281 0.000 0.072 0.016 0.900 0.012
#> GSM648676     4  0.5992    0.70396 0.000 0.200 0.016 0.632 0.152
#> GSM648692     3  0.0404    0.97441 0.000 0.000 0.988 0.012 0.000
#> GSM648694     3  0.0404    0.97441 0.000 0.000 0.988 0.012 0.000
#> GSM648699     4  0.5992    0.70396 0.000 0.200 0.016 0.632 0.152
#> GSM648701     4  0.5992    0.70396 0.000 0.200 0.016 0.632 0.152
#> GSM648673     4  0.1989    0.77596 0.000 0.032 0.016 0.932 0.020
#> GSM648677     4  0.6020    0.70768 0.000 0.204 0.016 0.628 0.152
#> GSM648687     3  0.1557    0.93667 0.000 0.000 0.940 0.052 0.008
#> GSM648688     3  0.0566    0.97337 0.000 0.000 0.984 0.012 0.004

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM648605     2  0.2571     0.7962 0.004 0.892 0.000 0.024 0.020 0.060
#> GSM648618     5  0.6002     0.2190 0.224 0.000 0.000 0.012 0.516 0.248
#> GSM648620     2  0.1679     0.7914 0.016 0.936 0.000 0.000 0.036 0.012
#> GSM648646     2  0.3910     0.7555 0.000 0.784 0.000 0.072 0.012 0.132
#> GSM648649     1  0.4157     0.6598 0.772 0.124 0.000 0.000 0.020 0.084
#> GSM648675     6  0.8055     0.2765 0.256 0.208 0.000 0.040 0.136 0.360
#> GSM648682     2  0.3438     0.7686 0.000 0.816 0.000 0.068 0.004 0.112
#> GSM648698     2  0.2437     0.7949 0.000 0.888 0.000 0.036 0.004 0.072
#> GSM648708     2  0.1503     0.7930 0.016 0.944 0.000 0.000 0.032 0.008
#> GSM648628     5  0.4410     0.5309 0.072 0.000 0.020 0.008 0.760 0.140
#> GSM648595     1  0.5428     0.5734 0.648 0.116 0.000 0.000 0.036 0.200
#> GSM648635     1  0.3221     0.6941 0.828 0.096 0.000 0.000 0.000 0.076
#> GSM648645     1  0.2699     0.7190 0.880 0.020 0.000 0.000 0.032 0.068
#> GSM648647     2  0.1245     0.7956 0.016 0.952 0.000 0.000 0.032 0.000
#> GSM648667     2  0.5569     0.0572 0.400 0.504 0.000 0.000 0.032 0.064
#> GSM648695     2  0.1503     0.7930 0.016 0.944 0.000 0.000 0.032 0.008
#> GSM648704     2  0.4078     0.7487 0.000 0.772 0.000 0.072 0.016 0.140
#> GSM648706     2  0.4000     0.7539 0.000 0.780 0.000 0.072 0.016 0.132
#> GSM648593     1  0.2997     0.7019 0.844 0.096 0.000 0.000 0.000 0.060
#> GSM648594     1  0.3970     0.6744 0.800 0.080 0.000 0.000 0.040 0.080
#> GSM648600     1  0.4892     0.6030 0.696 0.016 0.000 0.000 0.144 0.144
#> GSM648621     1  0.4915     0.5187 0.652 0.000 0.000 0.000 0.208 0.140
#> GSM648622     1  0.2420     0.7193 0.884 0.000 0.000 0.000 0.076 0.040
#> GSM648623     5  0.4703     0.4057 0.408 0.000 0.000 0.000 0.544 0.048
#> GSM648636     1  0.4426     0.6607 0.748 0.100 0.000 0.000 0.020 0.132
#> GSM648655     1  0.4464     0.6569 0.744 0.100 0.000 0.000 0.020 0.136
#> GSM648661     1  0.4051     0.5759 0.728 0.004 0.000 0.000 0.224 0.044
#> GSM648664     1  0.3819     0.5994 0.756 0.004 0.000 0.000 0.200 0.040
#> GSM648683     1  0.4908     0.5806 0.660 0.004 0.000 0.000 0.220 0.116
#> GSM648685     1  0.3207     0.7030 0.844 0.016 0.000 0.000 0.092 0.048
#> GSM648702     1  0.4380     0.6645 0.752 0.096 0.000 0.000 0.020 0.132
#> GSM648597     1  0.6329    -0.2568 0.412 0.000 0.000 0.016 0.348 0.224
#> GSM648603     5  0.5100     0.4640 0.284 0.000 0.000 0.000 0.600 0.116
#> GSM648606     5  0.4127     0.4947 0.004 0.084 0.020 0.016 0.804 0.072
#> GSM648613     5  0.4243     0.4858 0.004 0.064 0.024 0.016 0.796 0.096
#> GSM648619     5  0.2772     0.6186 0.180 0.000 0.004 0.000 0.816 0.000
#> GSM648654     5  0.6474     0.3866 0.196 0.204 0.004 0.000 0.540 0.056
#> GSM648663     5  0.4073     0.5145 0.016 0.088 0.016 0.012 0.812 0.056
#> GSM648670     6  0.7237     0.3126 0.084 0.020 0.000 0.368 0.140 0.388
#> GSM648707     6  0.7071     0.2239 0.020 0.000 0.040 0.204 0.368 0.368
#> GSM648615     2  0.2627     0.7962 0.000 0.884 0.000 0.036 0.016 0.064
#> GSM648643     2  0.2744     0.7853 0.000 0.864 0.000 0.064 0.000 0.072
#> GSM648650     2  0.5562     0.1347 0.348 0.548 0.000 0.000 0.032 0.072
#> GSM648656     2  0.3949     0.7522 0.000 0.780 0.000 0.072 0.012 0.136
#> GSM648715     2  0.1503     0.7930 0.016 0.944 0.000 0.000 0.032 0.008
#> GSM648598     1  0.0508     0.7363 0.984 0.000 0.000 0.000 0.012 0.004
#> GSM648601     1  0.1826     0.7276 0.924 0.004 0.000 0.000 0.052 0.020
#> GSM648602     1  0.2542     0.7164 0.876 0.000 0.000 0.000 0.044 0.080
#> GSM648604     1  0.3987     0.5767 0.732 0.004 0.000 0.000 0.224 0.040
#> GSM648614     5  0.4923     0.3577 0.012 0.260 0.000 0.012 0.664 0.052
#> GSM648624     1  0.2579     0.7059 0.872 0.000 0.000 0.000 0.088 0.040
#> GSM648625     1  0.4941     0.6106 0.728 0.092 0.000 0.008 0.132 0.040
#> GSM648629     1  0.3987     0.5771 0.732 0.004 0.000 0.000 0.224 0.040
#> GSM648634     1  0.2904     0.7154 0.852 0.008 0.000 0.000 0.028 0.112
#> GSM648648     1  0.2537     0.7100 0.872 0.096 0.000 0.000 0.000 0.032
#> GSM648651     1  0.2201     0.7232 0.896 0.000 0.000 0.000 0.076 0.028
#> GSM648657     1  0.3177     0.7087 0.852 0.024 0.000 0.000 0.052 0.072
#> GSM648660     1  0.1713     0.7304 0.928 0.000 0.000 0.000 0.028 0.044
#> GSM648697     1  0.2361     0.7347 0.896 0.032 0.000 0.000 0.008 0.064
#> GSM648710     1  0.3987     0.5767 0.732 0.004 0.000 0.000 0.224 0.040
#> GSM648591     5  0.6031     0.1473 0.188 0.000 0.000 0.016 0.512 0.284
#> GSM648592     5  0.6435     0.1828 0.276 0.040 0.000 0.004 0.508 0.172
#> GSM648607     5  0.3619     0.5863 0.232 0.000 0.000 0.000 0.744 0.024
#> GSM648611     5  0.4169     0.5507 0.068 0.000 0.024 0.004 0.780 0.124
#> GSM648612     5  0.2714     0.6179 0.136 0.000 0.004 0.000 0.848 0.012
#> GSM648616     4  0.7159    -0.1380 0.016 0.000 0.060 0.416 0.196 0.312
#> GSM648617     5  0.4666     0.3431 0.388 0.000 0.000 0.000 0.564 0.048
#> GSM648626     5  0.5066     0.4690 0.276 0.000 0.000 0.000 0.608 0.116
#> GSM648711     5  0.4392     0.4884 0.332 0.000 0.000 0.000 0.628 0.040
#> GSM648712     5  0.3510     0.5860 0.088 0.000 0.004 0.004 0.820 0.084
#> GSM648713     5  0.2738     0.6193 0.176 0.000 0.000 0.000 0.820 0.004
#> GSM648714     5  0.5156     0.2199 0.004 0.356 0.000 0.012 0.572 0.056
#> GSM648716     5  0.2913     0.6181 0.180 0.000 0.004 0.000 0.812 0.004
#> GSM648717     5  0.3454     0.5625 0.048 0.016 0.024 0.008 0.856 0.048
#> GSM648590     1  0.5887     0.4279 0.572 0.212 0.000 0.000 0.024 0.192
#> GSM648596     2  0.3754     0.7838 0.004 0.824 0.000 0.052 0.064 0.056
#> GSM648642     2  0.1059     0.7968 0.016 0.964 0.000 0.000 0.016 0.004
#> GSM648696     1  0.5153     0.5989 0.676 0.148 0.000 0.000 0.024 0.152
#> GSM648705     1  0.3481     0.6732 0.804 0.124 0.000 0.000 0.000 0.072
#> GSM648718     2  0.0665     0.7990 0.008 0.980 0.000 0.004 0.000 0.008
#> GSM648599     1  0.4624     0.5760 0.688 0.000 0.000 0.000 0.192 0.120
#> GSM648608     1  0.5001     0.5611 0.644 0.004 0.000 0.000 0.236 0.116
#> GSM648609     1  0.3960     0.5813 0.736 0.004 0.000 0.000 0.220 0.040
#> GSM648610     1  0.5061     0.5548 0.636 0.004 0.000 0.000 0.240 0.120
#> GSM648633     1  0.2594     0.7263 0.888 0.020 0.000 0.000 0.036 0.056
#> GSM648644     2  0.4078     0.7487 0.000 0.772 0.000 0.072 0.016 0.140
#> GSM648652     1  0.2997     0.7007 0.844 0.096 0.000 0.000 0.000 0.060
#> GSM648653     1  0.2436     0.7186 0.880 0.000 0.000 0.000 0.032 0.088
#> GSM648658     1  0.4030     0.6835 0.780 0.068 0.000 0.000 0.020 0.132
#> GSM648659     2  0.2815     0.7456 0.012 0.864 0.000 0.000 0.028 0.096
#> GSM648662     5  0.5811     0.4365 0.268 0.052 0.000 0.008 0.600 0.072
#> GSM648665     1  0.6976     0.1752 0.464 0.184 0.000 0.008 0.272 0.072
#> GSM648666     1  0.1700     0.7326 0.928 0.000 0.000 0.000 0.024 0.048
#> GSM648680     1  0.1970     0.7276 0.912 0.060 0.000 0.000 0.000 0.028
#> GSM648684     1  0.4722     0.6178 0.688 0.004 0.000 0.000 0.192 0.116
#> GSM648709     2  0.1577     0.7935 0.016 0.940 0.000 0.000 0.036 0.008
#> GSM648719     1  0.1257     0.7318 0.952 0.000 0.000 0.000 0.028 0.020
#> GSM648627     5  0.3754     0.5768 0.096 0.000 0.004 0.004 0.800 0.096
#> GSM648637     4  0.4297     0.5775 0.000 0.016 0.020 0.732 0.016 0.216
#> GSM648638     4  0.4875     0.5411 0.000 0.016 0.036 0.688 0.024 0.236
#> GSM648641     3  0.4704     0.4534 0.000 0.004 0.632 0.000 0.304 0.060
#> GSM648672     4  0.2196     0.6659 0.000 0.016 0.020 0.908 0.000 0.056
#> GSM648674     4  0.3859     0.5483 0.000 0.000 0.016 0.756 0.024 0.204
#> GSM648703     4  0.5139     0.6369 0.000 0.084 0.020 0.640 0.000 0.256
#> GSM648631     3  0.0291     0.9448 0.000 0.000 0.992 0.000 0.004 0.004
#> GSM648669     4  0.1974     0.6433 0.000 0.000 0.020 0.920 0.012 0.048
#> GSM648671     4  0.1974     0.6433 0.000 0.000 0.020 0.920 0.012 0.048
#> GSM648678     4  0.6069     0.5275 0.000 0.176 0.016 0.548 0.008 0.252
#> GSM648679     4  0.3593     0.5701 0.000 0.000 0.020 0.784 0.016 0.180
#> GSM648681     2  0.7035     0.2544 0.076 0.536 0.000 0.188 0.036 0.164
#> GSM648686     3  0.0603     0.9400 0.000 0.004 0.980 0.000 0.000 0.016
#> GSM648689     3  0.1003     0.9312 0.000 0.004 0.964 0.000 0.004 0.028
#> GSM648690     3  0.0603     0.9400 0.000 0.004 0.980 0.000 0.000 0.016
#> GSM648691     3  0.0000     0.9452 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648693     3  0.0000     0.9452 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648700     4  0.5425     0.6026 0.000 0.112 0.016 0.600 0.000 0.272
#> GSM648630     3  0.0000     0.9452 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648632     3  0.0291     0.9448 0.000 0.000 0.992 0.000 0.004 0.004
#> GSM648639     4  0.7368    -0.0681 0.000 0.000 0.212 0.364 0.128 0.296
#> GSM648640     3  0.2748     0.8181 0.000 0.000 0.848 0.000 0.024 0.128
#> GSM648668     4  0.2196     0.6659 0.000 0.016 0.020 0.908 0.000 0.056
#> GSM648676     4  0.5133     0.6339 0.000 0.080 0.020 0.636 0.000 0.264
#> GSM648692     3  0.0000     0.9452 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648694     3  0.0291     0.9448 0.000 0.000 0.992 0.000 0.004 0.004
#> GSM648699     4  0.5139     0.6369 0.000 0.084 0.020 0.640 0.000 0.256
#> GSM648701     4  0.5139     0.6369 0.000 0.084 0.020 0.640 0.000 0.256
#> GSM648673     4  0.1908     0.6441 0.000 0.000 0.020 0.924 0.012 0.044
#> GSM648677     4  0.5125     0.6346 0.000 0.076 0.020 0.632 0.000 0.272
#> GSM648687     3  0.1251     0.9234 0.000 0.000 0.956 0.024 0.008 0.012
#> GSM648688     3  0.0405     0.9438 0.000 0.000 0.988 0.000 0.004 0.008

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-SD-kmeans-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-SD-kmeans-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-SD-kmeans-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-SD-kmeans-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-SD-kmeans-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-SD-kmeans-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-SD-kmeans-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-SD-kmeans-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-SD-kmeans-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-SD-kmeans-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-SD-kmeans-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-SD-kmeans-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-SD-kmeans-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-SD-kmeans-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-SD-kmeans-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-SD-kmeans-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-SD-kmeans-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-SD-kmeans-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)
#> Error in mat[ceiling(1:nr/h_ratio), ceiling(1:nc/w_ratio), drop = FALSE]: subscript out of bounds

plot of chunk tab-SD-kmeans-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-SD-kmeans-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk SD-kmeans-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-SD-kmeans-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-SD-kmeans-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-SD-kmeans-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-SD-kmeans-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-SD-kmeans-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk SD-kmeans-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>             n disease.state(p) development.stage(p) other(p) k
#> SD:kmeans 121         6.34e-20               0.0570 1.56e-19 2
#> SD:kmeans 128         1.29e-11               0.0207 3.03e-17 3
#> SD:kmeans 107         4.67e-22               0.0164 2.32e-27 4
#> SD:kmeans 110         7.28e-23               0.0305 1.50e-47 5
#> SD:kmeans 104         1.38e-21               0.0120 3.86e-48 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


SD:skmeans

The object with results only for a single top-value method and a single partition method can be extracted as:

res = res_list["SD", "skmeans"]
# you can also extract it by
# res = res_list["SD:skmeans"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 130 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#>   Subgroups are detected by 'skmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 3.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk SD-skmeans-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk SD-skmeans-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.521           0.791       0.892         0.4964 0.504   0.504
#> 3 3 0.705           0.826       0.907         0.3124 0.720   0.502
#> 4 4 0.571           0.625       0.690         0.1310 0.871   0.662
#> 5 5 0.674           0.537       0.757         0.0764 0.858   0.554
#> 6 6 0.753           0.728       0.819         0.0471 0.903   0.579

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 3

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM648605     2  0.0000      0.844 0.000 1.000
#> GSM648618     1  0.6712      0.665 0.824 0.176
#> GSM648620     1  0.9933      0.391 0.548 0.452
#> GSM648646     2  0.0000      0.844 0.000 1.000
#> GSM648649     1  0.8608      0.685 0.716 0.284
#> GSM648675     2  0.0672      0.839 0.008 0.992
#> GSM648682     2  0.0000      0.844 0.000 1.000
#> GSM648698     2  0.0000      0.844 0.000 1.000
#> GSM648708     1  0.9522      0.560 0.628 0.372
#> GSM648628     1  0.0000      0.876 1.000 0.000
#> GSM648595     1  0.8608      0.685 0.716 0.284
#> GSM648635     1  0.8608      0.685 0.716 0.284
#> GSM648645     1  0.0000      0.876 1.000 0.000
#> GSM648647     2  0.6343      0.691 0.160 0.840
#> GSM648667     1  0.8608      0.685 0.716 0.284
#> GSM648695     1  0.9710      0.508 0.600 0.400
#> GSM648704     2  0.0000      0.844 0.000 1.000
#> GSM648706     2  0.0000      0.844 0.000 1.000
#> GSM648593     1  0.8608      0.685 0.716 0.284
#> GSM648594     1  0.8608      0.685 0.716 0.284
#> GSM648600     1  0.0000      0.876 1.000 0.000
#> GSM648621     1  0.0000      0.876 1.000 0.000
#> GSM648622     1  0.0000      0.876 1.000 0.000
#> GSM648623     1  0.0000      0.876 1.000 0.000
#> GSM648636     1  0.8608      0.685 0.716 0.284
#> GSM648655     1  0.8608      0.685 0.716 0.284
#> GSM648661     1  0.0000      0.876 1.000 0.000
#> GSM648664     1  0.0000      0.876 1.000 0.000
#> GSM648683     1  0.0000      0.876 1.000 0.000
#> GSM648685     1  0.0000      0.876 1.000 0.000
#> GSM648702     1  0.8608      0.685 0.716 0.284
#> GSM648597     1  0.0000      0.876 1.000 0.000
#> GSM648603     1  0.0000      0.876 1.000 0.000
#> GSM648606     2  0.8608      0.720 0.284 0.716
#> GSM648613     2  0.8608      0.720 0.284 0.716
#> GSM648619     1  0.0000      0.876 1.000 0.000
#> GSM648654     1  0.0000      0.876 1.000 0.000
#> GSM648663     1  0.6712      0.664 0.824 0.176
#> GSM648670     2  0.0000      0.844 0.000 1.000
#> GSM648707     2  0.8608      0.720 0.284 0.716
#> GSM648615     2  0.0000      0.844 0.000 1.000
#> GSM648643     2  0.0000      0.844 0.000 1.000
#> GSM648650     1  0.8608      0.685 0.716 0.284
#> GSM648656     2  0.0000      0.844 0.000 1.000
#> GSM648715     2  0.8555      0.469 0.280 0.720
#> GSM648598     1  0.0000      0.876 1.000 0.000
#> GSM648601     1  0.0000      0.876 1.000 0.000
#> GSM648602     1  0.0000      0.876 1.000 0.000
#> GSM648604     1  0.0000      0.876 1.000 0.000
#> GSM648614     2  0.9881      0.480 0.436 0.564
#> GSM648624     1  0.0000      0.876 1.000 0.000
#> GSM648625     1  0.7219      0.749 0.800 0.200
#> GSM648629     1  0.0000      0.876 1.000 0.000
#> GSM648634     1  0.0000      0.876 1.000 0.000
#> GSM648648     1  0.8608      0.685 0.716 0.284
#> GSM648651     1  0.0000      0.876 1.000 0.000
#> GSM648657     1  0.0000      0.876 1.000 0.000
#> GSM648660     1  0.0000      0.876 1.000 0.000
#> GSM648697     1  0.0000      0.876 1.000 0.000
#> GSM648710     1  0.0000      0.876 1.000 0.000
#> GSM648591     1  0.0000      0.876 1.000 0.000
#> GSM648592     1  0.8608      0.685 0.716 0.284
#> GSM648607     1  0.0000      0.876 1.000 0.000
#> GSM648611     1  0.0376      0.873 0.996 0.004
#> GSM648612     1  0.0000      0.876 1.000 0.000
#> GSM648616     2  0.8608      0.720 0.284 0.716
#> GSM648617     1  0.0000      0.876 1.000 0.000
#> GSM648626     1  0.0000      0.876 1.000 0.000
#> GSM648711     1  0.0000      0.876 1.000 0.000
#> GSM648712     1  0.0000      0.876 1.000 0.000
#> GSM648713     1  0.0000      0.876 1.000 0.000
#> GSM648714     2  0.8608      0.720 0.284 0.716
#> GSM648716     1  0.0000      0.876 1.000 0.000
#> GSM648717     1  0.3114      0.826 0.944 0.056
#> GSM648590     1  0.9732      0.500 0.596 0.404
#> GSM648596     2  0.0376      0.842 0.004 0.996
#> GSM648642     2  0.6531      0.680 0.168 0.832
#> GSM648696     1  0.8608      0.685 0.716 0.284
#> GSM648705     1  0.8608      0.685 0.716 0.284
#> GSM648718     2  0.0000      0.844 0.000 1.000
#> GSM648599     1  0.0000      0.876 1.000 0.000
#> GSM648608     1  0.0000      0.876 1.000 0.000
#> GSM648609     1  0.0000      0.876 1.000 0.000
#> GSM648610     1  0.0000      0.876 1.000 0.000
#> GSM648633     1  0.0000      0.876 1.000 0.000
#> GSM648644     2  0.0000      0.844 0.000 1.000
#> GSM648652     1  0.8608      0.685 0.716 0.284
#> GSM648653     1  0.0000      0.876 1.000 0.000
#> GSM648658     1  0.8608      0.685 0.716 0.284
#> GSM648659     2  0.1633      0.829 0.024 0.976
#> GSM648662     1  0.0000      0.876 1.000 0.000
#> GSM648665     1  0.0000      0.876 1.000 0.000
#> GSM648666     1  0.0000      0.876 1.000 0.000
#> GSM648680     1  0.8608      0.685 0.716 0.284
#> GSM648684     1  0.0000      0.876 1.000 0.000
#> GSM648709     2  0.5946      0.712 0.144 0.856
#> GSM648719     1  0.0000      0.876 1.000 0.000
#> GSM648627     1  0.0000      0.876 1.000 0.000
#> GSM648637     2  0.0000      0.844 0.000 1.000
#> GSM648638     2  0.0000      0.844 0.000 1.000
#> GSM648641     2  0.8608      0.720 0.284 0.716
#> GSM648672     2  0.0000      0.844 0.000 1.000
#> GSM648674     2  0.0000      0.844 0.000 1.000
#> GSM648703     2  0.0000      0.844 0.000 1.000
#> GSM648631     2  0.9522      0.593 0.372 0.628
#> GSM648669     2  0.0000      0.844 0.000 1.000
#> GSM648671     2  0.0000      0.844 0.000 1.000
#> GSM648678     2  0.0000      0.844 0.000 1.000
#> GSM648679     2  0.0000      0.844 0.000 1.000
#> GSM648681     2  0.0000      0.844 0.000 1.000
#> GSM648686     2  0.8608      0.720 0.284 0.716
#> GSM648689     2  0.8608      0.720 0.284 0.716
#> GSM648690     2  0.8608      0.720 0.284 0.716
#> GSM648691     2  0.8608      0.720 0.284 0.716
#> GSM648693     2  0.8608      0.720 0.284 0.716
#> GSM648700     2  0.0000      0.844 0.000 1.000
#> GSM648630     2  0.8608      0.720 0.284 0.716
#> GSM648632     2  0.8713      0.711 0.292 0.708
#> GSM648639     2  0.8267      0.733 0.260 0.740
#> GSM648640     2  0.8608      0.720 0.284 0.716
#> GSM648668     2  0.0000      0.844 0.000 1.000
#> GSM648676     2  0.0000      0.844 0.000 1.000
#> GSM648692     2  0.8608      0.720 0.284 0.716
#> GSM648694     2  0.8608      0.720 0.284 0.716
#> GSM648699     2  0.0000      0.844 0.000 1.000
#> GSM648701     2  0.0000      0.844 0.000 1.000
#> GSM648673     2  0.0000      0.844 0.000 1.000
#> GSM648677     2  0.0000      0.844 0.000 1.000
#> GSM648687     2  0.8608      0.720 0.284 0.716
#> GSM648688     2  0.8608      0.720 0.284 0.716

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM648605     2  0.0000      0.846 0.000 1.000 0.000
#> GSM648618     3  0.2959      0.786 0.100 0.000 0.900
#> GSM648620     2  0.0237      0.844 0.004 0.996 0.000
#> GSM648646     2  0.0000      0.846 0.000 1.000 0.000
#> GSM648649     1  0.0424      0.955 0.992 0.008 0.000
#> GSM648675     2  0.5406      0.805 0.012 0.764 0.224
#> GSM648682     2  0.0892      0.844 0.000 0.980 0.020
#> GSM648698     2  0.0000      0.846 0.000 1.000 0.000
#> GSM648708     2  0.0237      0.844 0.004 0.996 0.000
#> GSM648628     3  0.4974      0.710 0.236 0.000 0.764
#> GSM648595     1  0.5882      0.439 0.652 0.348 0.000
#> GSM648635     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648645     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648647     2  0.0000      0.846 0.000 1.000 0.000
#> GSM648667     2  0.5968      0.329 0.364 0.636 0.000
#> GSM648695     2  0.0237      0.844 0.004 0.996 0.000
#> GSM648704     2  0.0000      0.846 0.000 1.000 0.000
#> GSM648706     2  0.0000      0.846 0.000 1.000 0.000
#> GSM648593     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648594     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648600     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648621     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648622     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648623     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648636     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648655     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648661     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648664     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648683     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648685     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648702     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648597     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648603     1  0.1163      0.935 0.972 0.000 0.028
#> GSM648606     3  0.4974      0.691 0.000 0.236 0.764
#> GSM648613     3  0.4974      0.691 0.000 0.236 0.764
#> GSM648619     3  0.6126      0.485 0.400 0.000 0.600
#> GSM648654     3  0.8590      0.615 0.164 0.236 0.600
#> GSM648663     3  0.4974      0.691 0.000 0.236 0.764
#> GSM648670     2  0.4974      0.808 0.000 0.764 0.236
#> GSM648707     3  0.0000      0.806 0.000 0.000 1.000
#> GSM648615     2  0.0000      0.846 0.000 1.000 0.000
#> GSM648643     2  0.0000      0.846 0.000 1.000 0.000
#> GSM648650     2  0.5968      0.329 0.364 0.636 0.000
#> GSM648656     2  0.0000      0.846 0.000 1.000 0.000
#> GSM648715     2  0.0000      0.846 0.000 1.000 0.000
#> GSM648598     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648601     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648602     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648604     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648614     3  0.4974      0.691 0.000 0.236 0.764
#> GSM648624     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648625     1  0.0424      0.955 0.992 0.008 0.000
#> GSM648629     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648634     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648648     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648651     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648657     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648660     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648697     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648710     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648591     3  0.6062      0.514 0.384 0.000 0.616
#> GSM648592     1  0.6299      0.169 0.524 0.476 0.000
#> GSM648607     1  0.3551      0.809 0.868 0.000 0.132
#> GSM648611     3  0.4346      0.754 0.184 0.000 0.816
#> GSM648612     3  0.5138      0.694 0.252 0.000 0.748
#> GSM648616     3  0.0000      0.806 0.000 0.000 1.000
#> GSM648617     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648626     1  0.3412      0.820 0.876 0.000 0.124
#> GSM648711     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648712     3  0.6126      0.485 0.400 0.000 0.600
#> GSM648713     3  0.6126      0.485 0.400 0.000 0.600
#> GSM648714     3  0.4974      0.691 0.000 0.236 0.764
#> GSM648716     3  0.6126      0.485 0.400 0.000 0.600
#> GSM648717     3  0.6148      0.750 0.148 0.076 0.776
#> GSM648590     2  0.5016      0.641 0.240 0.760 0.000
#> GSM648596     2  0.0000      0.846 0.000 1.000 0.000
#> GSM648642     2  0.0000      0.846 0.000 1.000 0.000
#> GSM648696     1  0.4555      0.722 0.800 0.200 0.000
#> GSM648705     1  0.0424      0.955 0.992 0.008 0.000
#> GSM648718     2  0.0000      0.846 0.000 1.000 0.000
#> GSM648599     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648608     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648609     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648610     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648633     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648644     2  0.0000      0.846 0.000 1.000 0.000
#> GSM648652     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648653     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648658     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648659     2  0.0000      0.846 0.000 1.000 0.000
#> GSM648662     1  0.4206      0.836 0.872 0.088 0.040
#> GSM648665     1  0.4974      0.669 0.764 0.236 0.000
#> GSM648666     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648680     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648684     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648709     2  0.0000      0.846 0.000 1.000 0.000
#> GSM648719     1  0.0000      0.962 1.000 0.000 0.000
#> GSM648627     3  0.6126      0.485 0.400 0.000 0.600
#> GSM648637     2  0.4974      0.808 0.000 0.764 0.236
#> GSM648638     2  0.6126      0.607 0.000 0.600 0.400
#> GSM648641     3  0.0000      0.806 0.000 0.000 1.000
#> GSM648672     2  0.4974      0.808 0.000 0.764 0.236
#> GSM648674     2  0.4974      0.808 0.000 0.764 0.236
#> GSM648703     2  0.4974      0.808 0.000 0.764 0.236
#> GSM648631     3  0.0000      0.806 0.000 0.000 1.000
#> GSM648669     2  0.4974      0.808 0.000 0.764 0.236
#> GSM648671     2  0.4974      0.808 0.000 0.764 0.236
#> GSM648678     2  0.4974      0.808 0.000 0.764 0.236
#> GSM648679     2  0.4974      0.808 0.000 0.764 0.236
#> GSM648681     2  0.0000      0.846 0.000 1.000 0.000
#> GSM648686     3  0.0000      0.806 0.000 0.000 1.000
#> GSM648689     3  0.0000      0.806 0.000 0.000 1.000
#> GSM648690     3  0.0000      0.806 0.000 0.000 1.000
#> GSM648691     3  0.0000      0.806 0.000 0.000 1.000
#> GSM648693     3  0.0000      0.806 0.000 0.000 1.000
#> GSM648700     2  0.4974      0.808 0.000 0.764 0.236
#> GSM648630     3  0.0000      0.806 0.000 0.000 1.000
#> GSM648632     3  0.0000      0.806 0.000 0.000 1.000
#> GSM648639     3  0.0000      0.806 0.000 0.000 1.000
#> GSM648640     3  0.0000      0.806 0.000 0.000 1.000
#> GSM648668     2  0.4974      0.808 0.000 0.764 0.236
#> GSM648676     2  0.4974      0.808 0.000 0.764 0.236
#> GSM648692     3  0.0000      0.806 0.000 0.000 1.000
#> GSM648694     3  0.0000      0.806 0.000 0.000 1.000
#> GSM648699     2  0.4974      0.808 0.000 0.764 0.236
#> GSM648701     2  0.4974      0.808 0.000 0.764 0.236
#> GSM648673     2  0.4974      0.808 0.000 0.764 0.236
#> GSM648677     2  0.4974      0.808 0.000 0.764 0.236
#> GSM648687     3  0.0000      0.806 0.000 0.000 1.000
#> GSM648688     3  0.0000      0.806 0.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM648605     2  0.2868    0.61204 0.000 0.864 0.000 0.136
#> GSM648618     3  0.4304    0.71185 0.000 0.000 0.716 0.284
#> GSM648620     2  0.0000    0.64094 0.000 1.000 0.000 0.000
#> GSM648646     2  0.3400    0.58099 0.000 0.820 0.000 0.180
#> GSM648649     1  0.3791    0.64367 0.796 0.200 0.000 0.004
#> GSM648675     4  0.6182    0.53987 0.000 0.308 0.076 0.616
#> GSM648682     2  0.4382    0.38861 0.000 0.704 0.000 0.296
#> GSM648698     2  0.2868    0.61204 0.000 0.864 0.000 0.136
#> GSM648708     2  0.0000    0.64094 0.000 1.000 0.000 0.000
#> GSM648628     3  0.4304    0.71028 0.000 0.000 0.716 0.284
#> GSM648595     1  0.6848    0.51033 0.592 0.160 0.000 0.248
#> GSM648635     1  0.3208    0.68191 0.848 0.148 0.000 0.004
#> GSM648645     1  0.0469    0.74473 0.988 0.000 0.000 0.012
#> GSM648647     2  0.0000    0.64094 0.000 1.000 0.000 0.000
#> GSM648667     2  0.4522    0.34569 0.320 0.680 0.000 0.000
#> GSM648695     2  0.0000    0.64094 0.000 1.000 0.000 0.000
#> GSM648704     2  0.3569    0.56300 0.000 0.804 0.000 0.196
#> GSM648706     2  0.3074    0.60283 0.000 0.848 0.000 0.152
#> GSM648593     1  0.3208    0.68191 0.848 0.148 0.000 0.004
#> GSM648594     1  0.3862    0.67596 0.824 0.152 0.000 0.024
#> GSM648600     1  0.3649    0.71307 0.796 0.000 0.000 0.204
#> GSM648621     1  0.4697    0.71572 0.644 0.000 0.000 0.356
#> GSM648622     1  0.4008    0.73558 0.756 0.000 0.000 0.244
#> GSM648623     1  0.4843    0.67254 0.604 0.000 0.000 0.396
#> GSM648636     1  0.5619    0.63971 0.724 0.152 0.000 0.124
#> GSM648655     1  0.5619    0.63971 0.724 0.152 0.000 0.124
#> GSM648661     1  0.4193    0.72991 0.732 0.000 0.000 0.268
#> GSM648664     1  0.4193    0.72991 0.732 0.000 0.000 0.268
#> GSM648683     1  0.4817    0.70664 0.612 0.000 0.000 0.388
#> GSM648685     1  0.5471    0.72992 0.684 0.048 0.000 0.268
#> GSM648702     1  0.5619    0.63971 0.724 0.152 0.000 0.124
#> GSM648597     1  0.3311    0.70365 0.828 0.000 0.000 0.172
#> GSM648603     1  0.4990    0.68437 0.640 0.000 0.008 0.352
#> GSM648606     3  0.5568    0.68556 0.000 0.152 0.728 0.120
#> GSM648613     3  0.5483    0.70065 0.000 0.128 0.736 0.136
#> GSM648619     1  0.7446    0.45513 0.432 0.000 0.172 0.396
#> GSM648654     2  0.8231   -0.00694 0.012 0.392 0.312 0.284
#> GSM648663     3  0.5568    0.68556 0.000 0.152 0.728 0.120
#> GSM648670     4  0.6597    0.58766 0.000 0.304 0.108 0.588
#> GSM648707     3  0.3123    0.78983 0.000 0.000 0.844 0.156
#> GSM648615     2  0.3123    0.60039 0.000 0.844 0.000 0.156
#> GSM648643     2  0.3486    0.57262 0.000 0.812 0.000 0.188
#> GSM648650     2  0.4406    0.37656 0.300 0.700 0.000 0.000
#> GSM648656     2  0.4250    0.43308 0.000 0.724 0.000 0.276
#> GSM648715     2  0.0000    0.64094 0.000 1.000 0.000 0.000
#> GSM648598     1  0.0188    0.74391 0.996 0.000 0.000 0.004
#> GSM648601     1  0.0469    0.74473 0.988 0.000 0.000 0.012
#> GSM648602     1  0.3726    0.73712 0.788 0.000 0.000 0.212
#> GSM648604     1  0.4164    0.72947 0.736 0.000 0.000 0.264
#> GSM648614     2  0.7175    0.08486 0.000 0.496 0.360 0.144
#> GSM648624     1  0.4103    0.73366 0.744 0.000 0.000 0.256
#> GSM648625     1  0.3450    0.68129 0.836 0.156 0.000 0.008
#> GSM648629     1  0.4164    0.72947 0.736 0.000 0.000 0.264
#> GSM648634     1  0.2704    0.72156 0.876 0.000 0.000 0.124
#> GSM648648     1  0.3257    0.67923 0.844 0.152 0.000 0.004
#> GSM648651     1  0.3123    0.75246 0.844 0.000 0.000 0.156
#> GSM648657     1  0.1022    0.74513 0.968 0.000 0.000 0.032
#> GSM648660     1  0.0000    0.74388 1.000 0.000 0.000 0.000
#> GSM648697     1  0.4633    0.75057 0.780 0.048 0.000 0.172
#> GSM648710     1  0.4164    0.72947 0.736 0.000 0.000 0.264
#> GSM648591     3  0.7904   -0.03085 0.324 0.000 0.368 0.308
#> GSM648592     1  0.7358    0.11526 0.448 0.392 0.000 0.160
#> GSM648607     1  0.5865    0.63239 0.552 0.000 0.036 0.412
#> GSM648611     3  0.4134    0.72237 0.000 0.000 0.740 0.260
#> GSM648612     1  0.7808    0.32394 0.400 0.000 0.256 0.344
#> GSM648616     3  0.3074    0.70622 0.000 0.000 0.848 0.152
#> GSM648617     1  0.3024    0.71434 0.852 0.000 0.000 0.148
#> GSM648626     1  0.5110    0.68151 0.636 0.000 0.012 0.352
#> GSM648711     1  0.5060    0.65934 0.584 0.000 0.004 0.412
#> GSM648712     4  0.7330   -0.49111 0.312 0.000 0.180 0.508
#> GSM648713     1  0.7342    0.47058 0.432 0.000 0.156 0.412
#> GSM648714     2  0.5859   -0.09392 0.000 0.496 0.472 0.032
#> GSM648716     1  0.7446    0.45513 0.432 0.000 0.172 0.396
#> GSM648717     3  0.5432    0.69374 0.124 0.000 0.740 0.136
#> GSM648590     2  0.7012   -0.05048 0.124 0.504 0.000 0.372
#> GSM648596     2  0.3074    0.60283 0.000 0.848 0.000 0.152
#> GSM648642     2  0.0000    0.64094 0.000 1.000 0.000 0.000
#> GSM648696     1  0.6571    0.51461 0.612 0.264 0.000 0.124
#> GSM648705     1  0.3610    0.64543 0.800 0.200 0.000 0.000
#> GSM648718     2  0.3400    0.58164 0.000 0.820 0.000 0.180
#> GSM648599     1  0.4843    0.70564 0.604 0.000 0.000 0.396
#> GSM648608     1  0.4817    0.70664 0.612 0.000 0.000 0.388
#> GSM648609     1  0.4164    0.72947 0.736 0.000 0.000 0.264
#> GSM648610     1  0.4817    0.70664 0.612 0.000 0.000 0.388
#> GSM648633     1  0.0000    0.74388 1.000 0.000 0.000 0.000
#> GSM648644     2  0.4277    0.42496 0.000 0.720 0.000 0.280
#> GSM648652     1  0.3074    0.67949 0.848 0.152 0.000 0.000
#> GSM648653     1  0.3486    0.73507 0.812 0.000 0.000 0.188
#> GSM648658     1  0.5574    0.64277 0.728 0.148 0.000 0.124
#> GSM648659     2  0.0000    0.64094 0.000 1.000 0.000 0.000
#> GSM648662     1  0.7216    0.64229 0.564 0.080 0.032 0.324
#> GSM648665     2  0.7798   -0.20600 0.320 0.416 0.000 0.264
#> GSM648666     1  0.4164    0.74528 0.736 0.000 0.000 0.264
#> GSM648680     1  0.3208    0.68191 0.848 0.148 0.000 0.004
#> GSM648684     1  0.4817    0.70664 0.612 0.000 0.000 0.388
#> GSM648709     2  0.0000    0.64094 0.000 1.000 0.000 0.000
#> GSM648719     1  0.0000    0.74388 1.000 0.000 0.000 0.000
#> GSM648627     4  0.7359   -0.48254 0.304 0.000 0.188 0.508
#> GSM648637     4  0.7649    0.77032 0.000 0.312 0.232 0.456
#> GSM648638     4  0.7537    0.63373 0.000 0.196 0.348 0.456
#> GSM648641     3  0.0000    0.84598 0.000 0.000 1.000 0.000
#> GSM648672     4  0.7640    0.77009 0.000 0.316 0.228 0.456
#> GSM648674     4  0.7626    0.76840 0.000 0.304 0.232 0.464
#> GSM648703     4  0.7640    0.77009 0.000 0.316 0.228 0.456
#> GSM648631     3  0.0000    0.84598 0.000 0.000 1.000 0.000
#> GSM648669     4  0.7660    0.74966 0.000 0.276 0.260 0.464
#> GSM648671     4  0.7660    0.74966 0.000 0.276 0.260 0.464
#> GSM648678     4  0.7617    0.74639 0.000 0.332 0.216 0.452
#> GSM648679     4  0.7634    0.76714 0.000 0.300 0.236 0.464
#> GSM648681     2  0.4977   -0.13625 0.000 0.540 0.000 0.460
#> GSM648686     3  0.0000    0.84598 0.000 0.000 1.000 0.000
#> GSM648689     3  0.0000    0.84598 0.000 0.000 1.000 0.000
#> GSM648690     3  0.0000    0.84598 0.000 0.000 1.000 0.000
#> GSM648691     3  0.0000    0.84598 0.000 0.000 1.000 0.000
#> GSM648693     3  0.0000    0.84598 0.000 0.000 1.000 0.000
#> GSM648700     4  0.7640    0.77009 0.000 0.316 0.228 0.456
#> GSM648630     3  0.0000    0.84598 0.000 0.000 1.000 0.000
#> GSM648632     3  0.0000    0.84598 0.000 0.000 1.000 0.000
#> GSM648639     3  0.1716    0.78982 0.000 0.000 0.936 0.064
#> GSM648640     3  0.0000    0.84598 0.000 0.000 1.000 0.000
#> GSM648668     4  0.7649    0.77032 0.000 0.312 0.232 0.456
#> GSM648676     4  0.7640    0.77009 0.000 0.316 0.228 0.456
#> GSM648692     3  0.0000    0.84598 0.000 0.000 1.000 0.000
#> GSM648694     3  0.0000    0.84598 0.000 0.000 1.000 0.000
#> GSM648699     4  0.7640    0.77009 0.000 0.316 0.228 0.456
#> GSM648701     4  0.7640    0.77009 0.000 0.316 0.228 0.456
#> GSM648673     4  0.7651    0.75968 0.000 0.288 0.248 0.464
#> GSM648677     4  0.7640    0.77009 0.000 0.316 0.228 0.456
#> GSM648687     3  0.2408    0.73908 0.000 0.000 0.896 0.104
#> GSM648688     3  0.0000    0.84598 0.000 0.000 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM648605     2  0.1270     0.8711 0.000 0.948 0.000 0.052 0.000
#> GSM648618     5  0.5418    -0.0774 0.000 0.000 0.364 0.068 0.568
#> GSM648620     2  0.0510     0.8727 0.000 0.984 0.000 0.016 0.000
#> GSM648646     2  0.1544     0.8672 0.000 0.932 0.000 0.068 0.000
#> GSM648649     1  0.5856     0.3785 0.504 0.100 0.000 0.000 0.396
#> GSM648675     4  0.3566     0.7523 0.000 0.024 0.004 0.812 0.160
#> GSM648682     2  0.3837     0.5734 0.000 0.692 0.000 0.308 0.000
#> GSM648698     2  0.1270     0.8711 0.000 0.948 0.000 0.052 0.000
#> GSM648708     2  0.0510     0.8727 0.000 0.984 0.000 0.016 0.000
#> GSM648628     5  0.4249    -0.1813 0.000 0.000 0.432 0.000 0.568
#> GSM648595     5  0.7448    -0.1420 0.276 0.056 0.004 0.180 0.484
#> GSM648635     1  0.5069     0.4697 0.620 0.052 0.000 0.000 0.328
#> GSM648645     5  0.4718    -0.2868 0.444 0.016 0.000 0.000 0.540
#> GSM648647     2  0.0510     0.8727 0.000 0.984 0.000 0.016 0.000
#> GSM648667     2  0.3454     0.6921 0.028 0.816 0.000 0.000 0.156
#> GSM648695     2  0.0510     0.8727 0.000 0.984 0.000 0.016 0.000
#> GSM648704     2  0.2074     0.8461 0.000 0.896 0.000 0.104 0.000
#> GSM648706     2  0.1410     0.8697 0.000 0.940 0.000 0.060 0.000
#> GSM648593     1  0.5069     0.4697 0.620 0.052 0.000 0.000 0.328
#> GSM648594     5  0.6261    -0.3032 0.452 0.036 0.012 0.036 0.464
#> GSM648600     5  0.2393     0.2750 0.080 0.016 0.004 0.000 0.900
#> GSM648621     5  0.3300     0.3119 0.204 0.000 0.004 0.000 0.792
#> GSM648622     1  0.2690     0.4855 0.844 0.000 0.000 0.000 0.156
#> GSM648623     5  0.4808     0.3217 0.400 0.000 0.024 0.000 0.576
#> GSM648636     5  0.5405    -0.3251 0.460 0.056 0.000 0.000 0.484
#> GSM648655     5  0.5405    -0.3251 0.460 0.056 0.000 0.000 0.484
#> GSM648661     1  0.0000     0.5196 1.000 0.000 0.000 0.000 0.000
#> GSM648664     1  0.0000     0.5196 1.000 0.000 0.000 0.000 0.000
#> GSM648683     1  0.2732     0.4163 0.840 0.000 0.000 0.000 0.160
#> GSM648685     1  0.0290     0.5220 0.992 0.000 0.000 0.000 0.008
#> GSM648702     5  0.5350    -0.3258 0.460 0.052 0.000 0.000 0.488
#> GSM648597     5  0.4716     0.3400 0.148 0.000 0.020 0.072 0.760
#> GSM648603     5  0.5412     0.3500 0.340 0.000 0.024 0.032 0.604
#> GSM648606     3  0.3956     0.7653 0.004 0.080 0.808 0.000 0.108
#> GSM648613     3  0.3667     0.7576 0.000 0.048 0.812 0.000 0.140
#> GSM648619     5  0.5803     0.3304 0.420 0.000 0.092 0.000 0.488
#> GSM648654     2  0.7204     0.1534 0.380 0.388 0.204 0.000 0.028
#> GSM648663     3  0.4658     0.7360 0.036 0.076 0.780 0.000 0.108
#> GSM648670     4  0.2890     0.7477 0.000 0.000 0.004 0.836 0.160
#> GSM648707     3  0.6477     0.2749 0.000 0.000 0.424 0.184 0.392
#> GSM648615     2  0.1410     0.8698 0.000 0.940 0.000 0.060 0.000
#> GSM648643     2  0.1851     0.8570 0.000 0.912 0.000 0.088 0.000
#> GSM648650     2  0.2773     0.7109 0.000 0.836 0.000 0.000 0.164
#> GSM648656     2  0.2929     0.7724 0.000 0.820 0.000 0.180 0.000
#> GSM648715     2  0.0510     0.8727 0.000 0.984 0.000 0.016 0.000
#> GSM648598     1  0.4497     0.4758 0.632 0.016 0.000 0.000 0.352
#> GSM648601     1  0.4936     0.4155 0.560 0.016 0.008 0.000 0.416
#> GSM648602     1  0.4658     0.3860 0.576 0.016 0.000 0.000 0.408
#> GSM648604     1  0.0794     0.5067 0.972 0.000 0.000 0.000 0.028
#> GSM648614     2  0.5165     0.5967 0.064 0.684 0.240 0.000 0.012
#> GSM648624     1  0.1732     0.5204 0.920 0.000 0.000 0.000 0.080
#> GSM648625     1  0.6509     0.3667 0.464 0.072 0.044 0.000 0.420
#> GSM648629     1  0.0794     0.5067 0.972 0.000 0.000 0.000 0.028
#> GSM648634     5  0.4744    -0.3448 0.476 0.016 0.000 0.000 0.508
#> GSM648648     1  0.5069     0.4697 0.620 0.052 0.000 0.000 0.328
#> GSM648651     1  0.3885     0.4845 0.724 0.000 0.008 0.000 0.268
#> GSM648657     5  0.4579     0.0247 0.308 0.016 0.008 0.000 0.668
#> GSM648660     1  0.4674     0.4437 0.568 0.016 0.000 0.000 0.416
#> GSM648697     1  0.3596     0.5337 0.784 0.016 0.000 0.000 0.200
#> GSM648710     1  0.0510     0.5128 0.984 0.000 0.000 0.000 0.016
#> GSM648591     5  0.4684     0.3272 0.008 0.000 0.176 0.072 0.744
#> GSM648592     5  0.5279     0.3580 0.112 0.016 0.044 0.072 0.756
#> GSM648607     1  0.5049    -0.3230 0.488 0.000 0.032 0.000 0.480
#> GSM648611     3  0.3838     0.6654 0.004 0.000 0.716 0.000 0.280
#> GSM648612     5  0.6094     0.3407 0.384 0.000 0.128 0.000 0.488
#> GSM648616     4  0.6315    -0.1734 0.000 0.000 0.396 0.448 0.156
#> GSM648617     5  0.3437     0.3276 0.120 0.000 0.048 0.000 0.832
#> GSM648626     5  0.5729     0.3575 0.320 0.000 0.024 0.056 0.600
#> GSM648711     1  0.4821    -0.3009 0.516 0.000 0.020 0.000 0.464
#> GSM648712     5  0.5487     0.3515 0.280 0.000 0.100 0.000 0.620
#> GSM648713     5  0.5504     0.3053 0.448 0.000 0.064 0.000 0.488
#> GSM648714     2  0.4016     0.6085 0.000 0.716 0.272 0.000 0.012
#> GSM648716     5  0.5803     0.3304 0.420 0.000 0.092 0.000 0.488
#> GSM648717     3  0.1831     0.8277 0.004 0.000 0.920 0.000 0.076
#> GSM648590     4  0.8117     0.1981 0.220 0.136 0.000 0.416 0.228
#> GSM648596     2  0.2104     0.8655 0.000 0.916 0.024 0.060 0.000
#> GSM648642     2  0.0510     0.8727 0.000 0.984 0.000 0.016 0.000
#> GSM648696     5  0.6908    -0.1555 0.316 0.288 0.004 0.000 0.392
#> GSM648705     1  0.5878     0.4147 0.556 0.120 0.000 0.000 0.324
#> GSM648718     2  0.1792     0.8593 0.000 0.916 0.000 0.084 0.000
#> GSM648599     5  0.3662     0.3278 0.252 0.000 0.004 0.000 0.744
#> GSM648608     1  0.2813     0.4123 0.832 0.000 0.000 0.000 0.168
#> GSM648609     1  0.0162     0.5185 0.996 0.000 0.000 0.000 0.004
#> GSM648610     1  0.3048     0.4039 0.820 0.000 0.004 0.000 0.176
#> GSM648633     1  0.4760     0.4412 0.564 0.020 0.000 0.000 0.416
#> GSM648644     2  0.3336     0.7113 0.000 0.772 0.000 0.228 0.000
#> GSM648652     1  0.5069     0.4697 0.620 0.052 0.000 0.000 0.328
#> GSM648653     1  0.4682     0.3766 0.564 0.016 0.000 0.000 0.420
#> GSM648658     5  0.5237    -0.3322 0.468 0.044 0.000 0.000 0.488
#> GSM648659     2  0.0510     0.8727 0.000 0.984 0.000 0.016 0.000
#> GSM648662     1  0.4689     0.3014 0.784 0.080 0.052 0.000 0.084
#> GSM648665     1  0.4608     0.1461 0.640 0.336 0.024 0.000 0.000
#> GSM648666     1  0.3109     0.5318 0.800 0.000 0.000 0.000 0.200
#> GSM648680     1  0.4874     0.4751 0.632 0.040 0.000 0.000 0.328
#> GSM648684     1  0.2732     0.4163 0.840 0.000 0.000 0.000 0.160
#> GSM648709     2  0.0510     0.8727 0.000 0.984 0.000 0.016 0.000
#> GSM648719     1  0.4674     0.4437 0.568 0.016 0.000 0.000 0.416
#> GSM648627     5  0.5296     0.3471 0.280 0.000 0.084 0.000 0.636
#> GSM648637     4  0.1197     0.8811 0.000 0.048 0.000 0.952 0.000
#> GSM648638     4  0.1357     0.8807 0.000 0.048 0.004 0.948 0.000
#> GSM648641     3  0.1270     0.9013 0.000 0.000 0.948 0.052 0.000
#> GSM648672     4  0.1544     0.8820 0.000 0.068 0.000 0.932 0.000
#> GSM648674     4  0.0000     0.8675 0.000 0.000 0.000 1.000 0.000
#> GSM648703     4  0.1544     0.8820 0.000 0.068 0.000 0.932 0.000
#> GSM648631     3  0.1270     0.9013 0.000 0.000 0.948 0.052 0.000
#> GSM648669     4  0.0162     0.8651 0.000 0.000 0.004 0.996 0.000
#> GSM648671     4  0.0162     0.8651 0.000 0.000 0.004 0.996 0.000
#> GSM648678     4  0.1608     0.8789 0.000 0.072 0.000 0.928 0.000
#> GSM648679     4  0.0000     0.8675 0.000 0.000 0.000 1.000 0.000
#> GSM648681     4  0.2732     0.7297 0.000 0.160 0.000 0.840 0.000
#> GSM648686     3  0.1270     0.9013 0.000 0.000 0.948 0.052 0.000
#> GSM648689     3  0.1270     0.9013 0.000 0.000 0.948 0.052 0.000
#> GSM648690     3  0.1270     0.9013 0.000 0.000 0.948 0.052 0.000
#> GSM648691     3  0.1270     0.9013 0.000 0.000 0.948 0.052 0.000
#> GSM648693     3  0.1270     0.9013 0.000 0.000 0.948 0.052 0.000
#> GSM648700     4  0.1544     0.8820 0.000 0.068 0.000 0.932 0.000
#> GSM648630     3  0.1270     0.9013 0.000 0.000 0.948 0.052 0.000
#> GSM648632     3  0.1270     0.9013 0.000 0.000 0.948 0.052 0.000
#> GSM648639     3  0.3366     0.7495 0.000 0.000 0.768 0.232 0.000
#> GSM648640     3  0.1270     0.9013 0.000 0.000 0.948 0.052 0.000
#> GSM648668     4  0.1544     0.8820 0.000 0.068 0.000 0.932 0.000
#> GSM648676     4  0.1544     0.8820 0.000 0.068 0.000 0.932 0.000
#> GSM648692     3  0.1270     0.9013 0.000 0.000 0.948 0.052 0.000
#> GSM648694     3  0.1270     0.9013 0.000 0.000 0.948 0.052 0.000
#> GSM648699     4  0.1544     0.8820 0.000 0.068 0.000 0.932 0.000
#> GSM648701     4  0.1544     0.8820 0.000 0.068 0.000 0.932 0.000
#> GSM648673     4  0.0000     0.8675 0.000 0.000 0.000 1.000 0.000
#> GSM648677     4  0.1544     0.8820 0.000 0.068 0.000 0.932 0.000
#> GSM648687     3  0.3039     0.7832 0.000 0.000 0.808 0.192 0.000
#> GSM648688     3  0.1270     0.9013 0.000 0.000 0.948 0.052 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM648605     2  0.0146     0.8917 0.004 0.996 0.000 0.000 0.000 0.000
#> GSM648618     5  0.4352     0.7408 0.016 0.000 0.080 0.008 0.764 0.132
#> GSM648620     2  0.0508     0.8913 0.012 0.984 0.000 0.000 0.000 0.004
#> GSM648646     2  0.0547     0.8884 0.000 0.980 0.000 0.020 0.000 0.000
#> GSM648649     6  0.3628     0.7287 0.168 0.004 0.000 0.000 0.044 0.784
#> GSM648675     4  0.3523     0.7783 0.016 0.008 0.000 0.812 0.020 0.144
#> GSM648682     2  0.2178     0.8029 0.000 0.868 0.000 0.132 0.000 0.000
#> GSM648698     2  0.0000     0.8914 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648708     2  0.0603     0.8906 0.016 0.980 0.000 0.000 0.000 0.004
#> GSM648628     5  0.5085     0.6921 0.028 0.000 0.152 0.000 0.688 0.132
#> GSM648595     6  0.1448     0.6850 0.024 0.000 0.000 0.016 0.012 0.948
#> GSM648635     6  0.2597     0.7290 0.176 0.000 0.000 0.000 0.000 0.824
#> GSM648645     6  0.4860     0.6653 0.160 0.000 0.000 0.000 0.176 0.664
#> GSM648647     2  0.0508     0.8913 0.012 0.984 0.000 0.000 0.000 0.004
#> GSM648667     2  0.5022     0.0808 0.060 0.496 0.000 0.000 0.004 0.440
#> GSM648695     2  0.0653     0.8908 0.012 0.980 0.000 0.000 0.004 0.004
#> GSM648704     2  0.1007     0.8780 0.000 0.956 0.000 0.044 0.000 0.000
#> GSM648706     2  0.0146     0.8915 0.000 0.996 0.000 0.004 0.000 0.000
#> GSM648593     6  0.3121     0.7224 0.192 0.000 0.000 0.004 0.008 0.796
#> GSM648594     6  0.5125     0.6261 0.132 0.004 0.000 0.000 0.232 0.632
#> GSM648600     6  0.4230     0.1536 0.024 0.000 0.000 0.000 0.364 0.612
#> GSM648621     5  0.4868     0.5742 0.076 0.000 0.000 0.000 0.592 0.332
#> GSM648622     1  0.4487     0.5343 0.668 0.000 0.000 0.000 0.068 0.264
#> GSM648623     5  0.2709     0.7771 0.132 0.000 0.000 0.000 0.848 0.020
#> GSM648636     6  0.1644     0.6802 0.052 0.000 0.000 0.004 0.012 0.932
#> GSM648655     6  0.1707     0.6825 0.056 0.000 0.000 0.004 0.012 0.928
#> GSM648661     1  0.2595     0.7463 0.836 0.000 0.000 0.000 0.004 0.160
#> GSM648664     1  0.2558     0.7457 0.840 0.000 0.000 0.000 0.004 0.156
#> GSM648683     1  0.3758     0.6643 0.668 0.000 0.000 0.000 0.008 0.324
#> GSM648685     1  0.2558     0.7457 0.840 0.000 0.000 0.000 0.004 0.156
#> GSM648702     6  0.1082     0.6889 0.040 0.000 0.000 0.000 0.004 0.956
#> GSM648597     5  0.3721     0.7545 0.108 0.000 0.000 0.020 0.808 0.064
#> GSM648603     5  0.2491     0.7831 0.112 0.000 0.000 0.000 0.868 0.020
#> GSM648606     3  0.5950     0.5411 0.124 0.044 0.572 0.000 0.260 0.000
#> GSM648613     3  0.5924     0.4863 0.124 0.032 0.544 0.000 0.300 0.000
#> GSM648619     5  0.3543     0.7637 0.200 0.000 0.032 0.000 0.768 0.000
#> GSM648654     1  0.3766     0.4894 0.736 0.232 0.000 0.000 0.032 0.000
#> GSM648663     3  0.6062     0.5277 0.140 0.044 0.560 0.000 0.256 0.000
#> GSM648670     4  0.3192     0.7858 0.016 0.000 0.000 0.828 0.020 0.136
#> GSM648707     5  0.4340     0.6572 0.012 0.000 0.168 0.080 0.740 0.000
#> GSM648615     2  0.0260     0.8912 0.000 0.992 0.000 0.008 0.000 0.000
#> GSM648643     2  0.0547     0.8883 0.000 0.980 0.000 0.020 0.000 0.000
#> GSM648650     2  0.4318     0.1715 0.020 0.532 0.000 0.000 0.000 0.448
#> GSM648656     2  0.1007     0.8773 0.000 0.956 0.000 0.044 0.000 0.000
#> GSM648715     2  0.0508     0.8913 0.012 0.984 0.000 0.000 0.000 0.004
#> GSM648598     6  0.3964     0.6884 0.232 0.000 0.000 0.000 0.044 0.724
#> GSM648601     6  0.4795     0.6617 0.176 0.000 0.000 0.000 0.152 0.672
#> GSM648602     6  0.3512     0.5011 0.196 0.000 0.000 0.000 0.032 0.772
#> GSM648604     1  0.2520     0.7468 0.844 0.000 0.000 0.000 0.004 0.152
#> GSM648614     2  0.6335     0.5061 0.152 0.584 0.132 0.000 0.132 0.000
#> GSM648624     1  0.3202     0.7240 0.800 0.000 0.000 0.000 0.024 0.176
#> GSM648625     6  0.5661     0.5572 0.196 0.012 0.008 0.000 0.172 0.612
#> GSM648629     1  0.2558     0.7449 0.840 0.000 0.000 0.000 0.004 0.156
#> GSM648634     6  0.1462     0.6835 0.056 0.000 0.000 0.000 0.008 0.936
#> GSM648648     6  0.2762     0.7227 0.196 0.000 0.000 0.000 0.000 0.804
#> GSM648651     1  0.5300     0.1027 0.496 0.000 0.000 0.000 0.104 0.400
#> GSM648657     6  0.4823     0.6386 0.124 0.000 0.000 0.000 0.216 0.660
#> GSM648660     6  0.3971     0.7149 0.184 0.000 0.000 0.000 0.068 0.748
#> GSM648697     1  0.3805     0.5349 0.664 0.000 0.000 0.004 0.004 0.328
#> GSM648710     1  0.2520     0.7468 0.844 0.000 0.000 0.000 0.004 0.152
#> GSM648591     5  0.3348     0.7596 0.016 0.000 0.000 0.020 0.812 0.152
#> GSM648592     5  0.2216     0.7775 0.024 0.000 0.000 0.016 0.908 0.052
#> GSM648607     5  0.3807     0.5535 0.368 0.000 0.000 0.000 0.628 0.004
#> GSM648611     3  0.5502     0.5153 0.028 0.000 0.632 0.000 0.204 0.136
#> GSM648612     5  0.2474     0.7759 0.080 0.000 0.040 0.000 0.880 0.000
#> GSM648616     4  0.5521     0.0520 0.000 0.000 0.132 0.468 0.400 0.000
#> GSM648617     5  0.2723     0.7543 0.016 0.000 0.004 0.000 0.852 0.128
#> GSM648626     5  0.2445     0.7832 0.108 0.000 0.000 0.000 0.872 0.020
#> GSM648711     1  0.4184    -0.2667 0.504 0.000 0.000 0.000 0.484 0.012
#> GSM648712     5  0.4129     0.7796 0.088 0.000 0.032 0.000 0.784 0.096
#> GSM648713     5  0.2768     0.7564 0.156 0.000 0.012 0.000 0.832 0.000
#> GSM648714     2  0.6304     0.5014 0.132 0.588 0.148 0.000 0.132 0.000
#> GSM648716     5  0.3572     0.7600 0.204 0.000 0.032 0.000 0.764 0.000
#> GSM648717     3  0.4734     0.6483 0.120 0.000 0.672 0.000 0.208 0.000
#> GSM648590     6  0.5829     0.2529 0.036 0.072 0.000 0.308 0.012 0.572
#> GSM648596     2  0.2996     0.8187 0.044 0.864 0.008 0.008 0.076 0.000
#> GSM648642     2  0.0508     0.8913 0.012 0.984 0.000 0.000 0.000 0.004
#> GSM648696     6  0.2932     0.5901 0.024 0.132 0.000 0.000 0.004 0.840
#> GSM648705     6  0.3053     0.7308 0.172 0.012 0.000 0.000 0.004 0.812
#> GSM648718     2  0.0603     0.8890 0.000 0.980 0.000 0.016 0.000 0.004
#> GSM648599     5  0.4436     0.6323 0.048 0.000 0.000 0.000 0.640 0.312
#> GSM648608     1  0.3619     0.6702 0.680 0.000 0.000 0.000 0.004 0.316
#> GSM648609     1  0.2520     0.7468 0.844 0.000 0.000 0.000 0.004 0.152
#> GSM648610     1  0.3707     0.6570 0.680 0.000 0.000 0.000 0.008 0.312
#> GSM648633     6  0.3960     0.7162 0.176 0.000 0.000 0.000 0.072 0.752
#> GSM648644     2  0.1765     0.8429 0.000 0.904 0.000 0.096 0.000 0.000
#> GSM648652     6  0.2703     0.7302 0.172 0.000 0.000 0.000 0.004 0.824
#> GSM648653     6  0.2915     0.5246 0.184 0.000 0.000 0.000 0.008 0.808
#> GSM648658     6  0.1707     0.6825 0.056 0.000 0.000 0.004 0.012 0.928
#> GSM648659     2  0.1140     0.8888 0.012 0.964 0.000 0.008 0.008 0.008
#> GSM648662     1  0.3147     0.5272 0.816 0.016 0.008 0.000 0.160 0.000
#> GSM648665     1  0.3950     0.5418 0.792 0.116 0.008 0.000 0.076 0.008
#> GSM648666     1  0.4052     0.5554 0.628 0.000 0.000 0.000 0.016 0.356
#> GSM648680     6  0.2730     0.7236 0.192 0.000 0.000 0.000 0.000 0.808
#> GSM648684     1  0.3774     0.6611 0.664 0.000 0.000 0.000 0.008 0.328
#> GSM648709     2  0.0748     0.8900 0.016 0.976 0.000 0.000 0.004 0.004
#> GSM648719     6  0.4024     0.7126 0.184 0.000 0.000 0.000 0.072 0.744
#> GSM648627     5  0.5013     0.7409 0.140 0.000 0.032 0.000 0.700 0.128
#> GSM648637     4  0.0363     0.9347 0.000 0.012 0.000 0.988 0.000 0.000
#> GSM648638     4  0.0622     0.9333 0.000 0.012 0.008 0.980 0.000 0.000
#> GSM648641     3  0.0551     0.8807 0.004 0.000 0.984 0.008 0.004 0.000
#> GSM648672     4  0.0458     0.9347 0.000 0.016 0.000 0.984 0.000 0.000
#> GSM648674     4  0.0260     0.9313 0.000 0.000 0.000 0.992 0.008 0.000
#> GSM648703     4  0.0622     0.9347 0.000 0.012 0.000 0.980 0.008 0.000
#> GSM648631     3  0.0260     0.8845 0.000 0.000 0.992 0.008 0.000 0.000
#> GSM648669     4  0.0260     0.9313 0.000 0.000 0.000 0.992 0.008 0.000
#> GSM648671     4  0.0260     0.9313 0.000 0.000 0.000 0.992 0.008 0.000
#> GSM648678     4  0.0937     0.9230 0.000 0.040 0.000 0.960 0.000 0.000
#> GSM648679     4  0.0260     0.9313 0.000 0.000 0.000 0.992 0.008 0.000
#> GSM648681     4  0.2313     0.8481 0.004 0.100 0.000 0.884 0.012 0.000
#> GSM648686     3  0.0260     0.8845 0.000 0.000 0.992 0.008 0.000 0.000
#> GSM648689     3  0.0260     0.8845 0.000 0.000 0.992 0.008 0.000 0.000
#> GSM648690     3  0.0260     0.8845 0.000 0.000 0.992 0.008 0.000 0.000
#> GSM648691     3  0.0260     0.8845 0.000 0.000 0.992 0.008 0.000 0.000
#> GSM648693     3  0.0260     0.8845 0.000 0.000 0.992 0.008 0.000 0.000
#> GSM648700     4  0.0622     0.9347 0.000 0.012 0.000 0.980 0.008 0.000
#> GSM648630     3  0.0260     0.8845 0.000 0.000 0.992 0.008 0.000 0.000
#> GSM648632     3  0.0260     0.8845 0.000 0.000 0.992 0.008 0.000 0.000
#> GSM648639     3  0.3013     0.7840 0.000 0.000 0.844 0.088 0.068 0.000
#> GSM648640     3  0.0260     0.8845 0.000 0.000 0.992 0.008 0.000 0.000
#> GSM648668     4  0.0458     0.9347 0.000 0.016 0.000 0.984 0.000 0.000
#> GSM648676     4  0.0622     0.9347 0.000 0.012 0.000 0.980 0.008 0.000
#> GSM648692     3  0.0260     0.8845 0.000 0.000 0.992 0.008 0.000 0.000
#> GSM648694     3  0.0260     0.8845 0.000 0.000 0.992 0.008 0.000 0.000
#> GSM648699     4  0.0622     0.9347 0.000 0.012 0.000 0.980 0.008 0.000
#> GSM648701     4  0.0622     0.9347 0.000 0.012 0.000 0.980 0.008 0.000
#> GSM648673     4  0.0260     0.9313 0.000 0.000 0.000 0.992 0.008 0.000
#> GSM648677     4  0.0717     0.9342 0.000 0.016 0.000 0.976 0.008 0.000
#> GSM648687     3  0.1444     0.8400 0.000 0.000 0.928 0.072 0.000 0.000
#> GSM648688     3  0.0260     0.8845 0.000 0.000 0.992 0.008 0.000 0.000

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-SD-skmeans-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-SD-skmeans-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-SD-skmeans-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-SD-skmeans-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-SD-skmeans-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-SD-skmeans-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-SD-skmeans-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-SD-skmeans-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-SD-skmeans-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-SD-skmeans-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-SD-skmeans-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-SD-skmeans-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-SD-skmeans-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-SD-skmeans-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-SD-skmeans-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-SD-skmeans-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-SD-skmeans-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-SD-skmeans-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-SD-skmeans-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-SD-skmeans-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk SD-skmeans-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-SD-skmeans-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-SD-skmeans-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-SD-skmeans-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-SD-skmeans-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-SD-skmeans-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk SD-skmeans-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>              n disease.state(p) development.stage(p) other(p) k
#> SD:skmeans 127         3.41e-13              0.06533 2.99e-15 2
#> SD:skmeans 121         5.26e-08              0.00101 1.66e-20 3
#> SD:skmeans 111         5.32e-16              0.01194 1.90e-27 4
#> SD:skmeans  73         6.25e-11              0.18269 5.50e-20 5
#> SD:skmeans 121         4.54e-19              0.04426 4.89e-38 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


SD:pam

The object with results only for a single top-value method and a single partition method can be extracted as:

res = res_list["SD", "pam"]
# you can also extract it by
# res = res_list["SD:pam"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 130 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#>   Subgroups are detected by 'pam' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 3.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk SD-pam-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk SD-pam-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.378           0.587       0.841         0.4322 0.577   0.577
#> 3 3 0.499           0.798       0.863         0.2829 0.797   0.676
#> 4 4 0.591           0.570       0.785         0.2448 0.812   0.609
#> 5 5 0.598           0.565       0.764         0.1219 0.827   0.503
#> 6 6 0.618           0.521       0.733         0.0462 0.883   0.550

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 3

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM648605     2  0.8499    0.59792 0.276 0.724
#> GSM648618     1  0.1843    0.77829 0.972 0.028
#> GSM648620     1  0.9988   -0.07538 0.520 0.480
#> GSM648646     2  0.6801    0.66720 0.180 0.820
#> GSM648649     1  0.9209    0.41036 0.664 0.336
#> GSM648675     1  0.9922    0.05493 0.552 0.448
#> GSM648682     2  0.5629    0.69173 0.132 0.868
#> GSM648698     2  0.8081    0.61462 0.248 0.752
#> GSM648708     1  0.9323    0.38214 0.652 0.348
#> GSM648628     1  0.0000    0.78857 1.000 0.000
#> GSM648595     1  0.9209    0.41036 0.664 0.336
#> GSM648635     1  0.9209    0.41036 0.664 0.336
#> GSM648645     1  0.1843    0.77829 0.972 0.028
#> GSM648647     2  0.8081    0.61462 0.248 0.752
#> GSM648667     1  0.9209    0.41036 0.664 0.336
#> GSM648695     1  0.9522    0.31620 0.628 0.372
#> GSM648704     2  0.0000    0.72523 0.000 1.000
#> GSM648706     2  0.0000    0.72523 0.000 1.000
#> GSM648593     1  0.9209    0.41036 0.664 0.336
#> GSM648594     1  0.9129    0.42196 0.672 0.328
#> GSM648600     1  0.2236    0.77322 0.964 0.036
#> GSM648621     1  0.0672    0.78668 0.992 0.008
#> GSM648622     1  0.0000    0.78857 1.000 0.000
#> GSM648623     1  0.0000    0.78857 1.000 0.000
#> GSM648636     1  0.1414    0.78217 0.980 0.020
#> GSM648655     1  0.9000    0.43639 0.684 0.316
#> GSM648661     1  0.0000    0.78857 1.000 0.000
#> GSM648664     1  0.0000    0.78857 1.000 0.000
#> GSM648683     1  0.0000    0.78857 1.000 0.000
#> GSM648685     1  0.0000    0.78857 1.000 0.000
#> GSM648702     1  0.4431    0.73026 0.908 0.092
#> GSM648597     1  0.6048    0.67596 0.852 0.148
#> GSM648603     1  0.1843    0.77829 0.972 0.028
#> GSM648606     1  0.0376    0.78771 0.996 0.004
#> GSM648613     1  0.0000    0.78857 1.000 0.000
#> GSM648619     1  0.0000    0.78857 1.000 0.000
#> GSM648654     1  0.0000    0.78857 1.000 0.000
#> GSM648663     1  0.0000    0.78857 1.000 0.000
#> GSM648670     2  0.9993    0.14960 0.484 0.516
#> GSM648707     1  0.6623    0.63839 0.828 0.172
#> GSM648615     2  0.9970    0.21676 0.468 0.532
#> GSM648643     2  0.7056    0.65927 0.192 0.808
#> GSM648650     1  0.9209    0.41036 0.664 0.336
#> GSM648656     2  0.1414    0.72343 0.020 0.980
#> GSM648715     2  0.9998    0.14840 0.492 0.508
#> GSM648598     1  0.0000    0.78857 1.000 0.000
#> GSM648601     1  0.1843    0.77829 0.972 0.028
#> GSM648602     1  0.0000    0.78857 1.000 0.000
#> GSM648604     1  0.0000    0.78857 1.000 0.000
#> GSM648614     1  0.0672    0.78668 0.992 0.008
#> GSM648624     1  0.0000    0.78857 1.000 0.000
#> GSM648625     1  0.9209    0.41036 0.664 0.336
#> GSM648629     1  0.0000    0.78857 1.000 0.000
#> GSM648634     1  0.1414    0.78217 0.980 0.020
#> GSM648648     1  0.9129    0.42196 0.672 0.328
#> GSM648651     1  0.0000    0.78857 1.000 0.000
#> GSM648657     1  0.9209    0.41036 0.664 0.336
#> GSM648660     1  0.3733    0.74954 0.928 0.072
#> GSM648697     1  0.0000    0.78857 1.000 0.000
#> GSM648710     1  0.0000    0.78857 1.000 0.000
#> GSM648591     1  0.1633    0.78107 0.976 0.024
#> GSM648592     1  0.9209    0.41036 0.664 0.336
#> GSM648607     1  0.0000    0.78857 1.000 0.000
#> GSM648611     1  0.0000    0.78857 1.000 0.000
#> GSM648612     1  0.0000    0.78857 1.000 0.000
#> GSM648616     2  0.9909    0.18232 0.444 0.556
#> GSM648617     1  0.9209    0.41036 0.664 0.336
#> GSM648626     1  0.1843    0.77829 0.972 0.028
#> GSM648711     1  0.0000    0.78857 1.000 0.000
#> GSM648712     1  0.0000    0.78857 1.000 0.000
#> GSM648713     1  0.0000    0.78857 1.000 0.000
#> GSM648714     2  0.8499    0.59792 0.276 0.724
#> GSM648716     1  0.0000    0.78857 1.000 0.000
#> GSM648717     1  0.0000    0.78857 1.000 0.000
#> GSM648590     1  0.9580    0.29270 0.620 0.380
#> GSM648596     2  0.9922    0.26523 0.448 0.552
#> GSM648642     2  0.8081    0.61462 0.248 0.752
#> GSM648696     1  0.9209    0.41036 0.664 0.336
#> GSM648705     1  0.9209    0.41036 0.664 0.336
#> GSM648718     2  0.9998    0.14840 0.492 0.508
#> GSM648599     1  0.0672    0.78668 0.992 0.008
#> GSM648608     1  0.0000    0.78857 1.000 0.000
#> GSM648609     1  0.0000    0.78857 1.000 0.000
#> GSM648610     1  0.0000    0.78857 1.000 0.000
#> GSM648633     1  0.9209    0.41036 0.664 0.336
#> GSM648644     2  0.0000    0.72523 0.000 1.000
#> GSM648652     1  0.9209    0.41036 0.664 0.336
#> GSM648653     1  0.0000    0.78857 1.000 0.000
#> GSM648658     1  0.0672    0.78668 0.992 0.008
#> GSM648659     1  0.9993   -0.09138 0.516 0.484
#> GSM648662     1  0.0000    0.78857 1.000 0.000
#> GSM648665     1  0.0000    0.78857 1.000 0.000
#> GSM648666     1  0.0000    0.78857 1.000 0.000
#> GSM648680     1  0.5519    0.69884 0.872 0.128
#> GSM648684     1  0.0000    0.78857 1.000 0.000
#> GSM648709     2  0.9998    0.14840 0.492 0.508
#> GSM648719     1  0.1843    0.77829 0.972 0.028
#> GSM648627     1  0.0000    0.78857 1.000 0.000
#> GSM648637     2  0.0000    0.72523 0.000 1.000
#> GSM648638     2  0.0000    0.72523 0.000 1.000
#> GSM648641     1  0.7453    0.54986 0.788 0.212
#> GSM648672     2  0.0000    0.72523 0.000 1.000
#> GSM648674     2  0.8327    0.55991 0.264 0.736
#> GSM648703     2  0.0000    0.72523 0.000 1.000
#> GSM648631     1  0.1414    0.77445 0.980 0.020
#> GSM648669     2  0.1843    0.72069 0.028 0.972
#> GSM648671     2  0.0000    0.72523 0.000 1.000
#> GSM648678     2  0.0000    0.72523 0.000 1.000
#> GSM648679     2  0.0000    0.72523 0.000 1.000
#> GSM648681     2  0.9993    0.17187 0.484 0.516
#> GSM648686     2  0.9993    0.04433 0.484 0.516
#> GSM648689     1  0.9866    0.11905 0.568 0.432
#> GSM648690     2  0.9954    0.10178 0.460 0.540
#> GSM648691     1  0.9922    0.08662 0.552 0.448
#> GSM648693     1  0.8608    0.43022 0.716 0.284
#> GSM648700     2  0.9909    0.15778 0.444 0.556
#> GSM648630     1  0.9996   -0.00632 0.512 0.488
#> GSM648632     1  0.2043    0.76543 0.968 0.032
#> GSM648639     2  0.0938    0.71896 0.012 0.988
#> GSM648640     1  0.9996   -0.00632 0.512 0.488
#> GSM648668     2  0.7376    0.62495 0.208 0.792
#> GSM648676     2  0.8327    0.55991 0.264 0.736
#> GSM648692     1  0.9996   -0.00632 0.512 0.488
#> GSM648694     1  0.9944    0.06874 0.544 0.456
#> GSM648699     2  0.0000    0.72523 0.000 1.000
#> GSM648701     2  0.0000    0.72523 0.000 1.000
#> GSM648673     2  0.0000    0.72523 0.000 1.000
#> GSM648677     2  0.0000    0.72523 0.000 1.000
#> GSM648687     1  0.7299    0.55945 0.796 0.204
#> GSM648688     1  0.6973    0.58308 0.812 0.188

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM648605     2  0.5519      0.750 0.120 0.812 0.068
#> GSM648618     1  0.2711      0.850 0.912 0.000 0.088
#> GSM648620     1  0.7764      0.390 0.604 0.328 0.068
#> GSM648646     2  0.3888      0.796 0.064 0.888 0.048
#> GSM648649     1  0.0000      0.853 1.000 0.000 0.000
#> GSM648675     1  0.0000      0.853 1.000 0.000 0.000
#> GSM648682     2  0.3340      0.786 0.120 0.880 0.000
#> GSM648698     2  0.5519      0.750 0.120 0.812 0.068
#> GSM648708     1  0.4569      0.821 0.860 0.072 0.068
#> GSM648628     1  0.5621      0.677 0.692 0.000 0.308
#> GSM648595     1  0.0000      0.853 1.000 0.000 0.000
#> GSM648635     1  0.0000      0.853 1.000 0.000 0.000
#> GSM648645     1  0.2261      0.853 0.932 0.000 0.068
#> GSM648647     2  0.5787      0.732 0.136 0.796 0.068
#> GSM648667     1  0.4087      0.834 0.880 0.052 0.068
#> GSM648695     1  0.4288      0.830 0.872 0.060 0.068
#> GSM648704     2  0.0000      0.827 0.000 1.000 0.000
#> GSM648706     2  0.0424      0.826 0.000 0.992 0.008
#> GSM648593     1  0.2261      0.855 0.932 0.000 0.068
#> GSM648594     1  0.2796      0.856 0.908 0.000 0.092
#> GSM648600     1  0.0000      0.853 1.000 0.000 0.000
#> GSM648621     1  0.0237      0.853 0.996 0.000 0.004
#> GSM648622     1  0.5098      0.810 0.752 0.000 0.248
#> GSM648623     1  0.5098      0.810 0.752 0.000 0.248
#> GSM648636     1  0.0000      0.853 1.000 0.000 0.000
#> GSM648655     1  0.0000      0.853 1.000 0.000 0.000
#> GSM648661     1  0.5138      0.808 0.748 0.000 0.252
#> GSM648664     1  0.5138      0.808 0.748 0.000 0.252
#> GSM648683     1  0.0237      0.853 0.996 0.000 0.004
#> GSM648685     1  0.2448      0.856 0.924 0.000 0.076
#> GSM648702     1  0.0237      0.853 0.996 0.000 0.004
#> GSM648597     1  0.3340      0.842 0.880 0.000 0.120
#> GSM648603     1  0.4452      0.816 0.808 0.000 0.192
#> GSM648606     1  0.5977      0.800 0.728 0.020 0.252
#> GSM648613     1  0.5948      0.689 0.640 0.000 0.360
#> GSM648619     1  0.5138      0.808 0.748 0.000 0.252
#> GSM648654     1  0.6950      0.777 0.692 0.056 0.252
#> GSM648663     1  0.5138      0.808 0.748 0.000 0.252
#> GSM648670     1  0.0000      0.853 1.000 0.000 0.000
#> GSM648707     1  0.6982      0.740 0.708 0.072 0.220
#> GSM648615     2  0.5538      0.748 0.132 0.808 0.060
#> GSM648643     2  0.4569      0.781 0.072 0.860 0.068
#> GSM648650     1  0.1860      0.832 0.948 0.052 0.000
#> GSM648656     2  0.0747      0.825 0.000 0.984 0.016
#> GSM648715     2  0.6981      0.586 0.228 0.704 0.068
#> GSM648598     1  0.2261      0.855 0.932 0.000 0.068
#> GSM648601     1  0.2261      0.855 0.932 0.000 0.068
#> GSM648602     1  0.0237      0.853 0.996 0.000 0.004
#> GSM648604     1  0.5138      0.808 0.748 0.000 0.252
#> GSM648614     1  0.6820      0.782 0.700 0.052 0.248
#> GSM648624     1  0.5058      0.813 0.756 0.000 0.244
#> GSM648625     1  0.3141      0.850 0.912 0.020 0.068
#> GSM648629     1  0.5138      0.808 0.748 0.000 0.252
#> GSM648634     1  0.0237      0.853 0.996 0.000 0.004
#> GSM648648     1  0.2261      0.855 0.932 0.000 0.068
#> GSM648651     1  0.4235      0.838 0.824 0.000 0.176
#> GSM648657     1  0.0000      0.853 1.000 0.000 0.000
#> GSM648660     1  0.2261      0.855 0.932 0.000 0.068
#> GSM648697     1  0.1289      0.857 0.968 0.000 0.032
#> GSM648710     1  0.5138      0.808 0.748 0.000 0.252
#> GSM648591     1  0.4291      0.815 0.820 0.000 0.180
#> GSM648592     1  0.3499      0.848 0.900 0.028 0.072
#> GSM648607     1  0.5138      0.808 0.748 0.000 0.252
#> GSM648611     1  0.5948      0.578 0.640 0.000 0.360
#> GSM648612     1  0.5138      0.808 0.748 0.000 0.252
#> GSM648616     1  0.8129      0.634 0.632 0.124 0.244
#> GSM648617     1  0.1860      0.857 0.948 0.000 0.052
#> GSM648626     1  0.5098      0.810 0.752 0.000 0.248
#> GSM648711     1  0.5138      0.808 0.748 0.000 0.252
#> GSM648712     1  0.4346      0.814 0.816 0.000 0.184
#> GSM648713     1  0.5138      0.808 0.748 0.000 0.252
#> GSM648714     2  0.7164      0.636 0.140 0.720 0.140
#> GSM648716     1  0.5138      0.808 0.748 0.000 0.252
#> GSM648717     3  0.5882      0.179 0.348 0.000 0.652
#> GSM648590     1  0.0000      0.853 1.000 0.000 0.000
#> GSM648596     2  0.5722      0.739 0.132 0.800 0.068
#> GSM648642     2  0.5588      0.746 0.124 0.808 0.068
#> GSM648696     1  0.0000      0.853 1.000 0.000 0.000
#> GSM648705     1  0.0000      0.853 1.000 0.000 0.000
#> GSM648718     2  0.5656      0.742 0.128 0.804 0.068
#> GSM648599     1  0.0000      0.853 1.000 0.000 0.000
#> GSM648608     1  0.3038      0.852 0.896 0.000 0.104
#> GSM648609     1  0.5138      0.808 0.748 0.000 0.252
#> GSM648610     1  0.0237      0.853 0.996 0.000 0.004
#> GSM648633     1  0.2261      0.855 0.932 0.000 0.068
#> GSM648644     2  0.0000      0.827 0.000 1.000 0.000
#> GSM648652     1  0.0237      0.854 0.996 0.000 0.004
#> GSM648653     1  0.0237      0.853 0.996 0.000 0.004
#> GSM648658     1  0.0000      0.853 1.000 0.000 0.000
#> GSM648659     1  0.1964      0.829 0.944 0.056 0.000
#> GSM648662     1  0.5763      0.809 0.740 0.016 0.244
#> GSM648665     1  0.6857      0.780 0.696 0.052 0.252
#> GSM648666     1  0.0237      0.853 0.996 0.000 0.004
#> GSM648680     1  0.2261      0.855 0.932 0.000 0.068
#> GSM648684     1  0.0237      0.853 0.996 0.000 0.004
#> GSM648709     1  0.7248      0.671 0.676 0.256 0.068
#> GSM648719     1  0.2261      0.855 0.932 0.000 0.068
#> GSM648627     1  0.4346      0.814 0.816 0.000 0.184
#> GSM648637     2  0.1964      0.828 0.000 0.944 0.056
#> GSM648638     2  0.1964      0.828 0.000 0.944 0.056
#> GSM648641     3  0.2165      0.865 0.000 0.064 0.936
#> GSM648672     2  0.1860      0.830 0.000 0.948 0.052
#> GSM648674     2  0.2096      0.830 0.004 0.944 0.052
#> GSM648703     2  0.2096      0.830 0.004 0.944 0.052
#> GSM648631     3  0.1860      0.818 0.052 0.000 0.948
#> GSM648669     2  0.3267      0.780 0.000 0.884 0.116
#> GSM648671     2  0.1964      0.828 0.000 0.944 0.056
#> GSM648678     2  0.1643      0.831 0.000 0.956 0.044
#> GSM648679     2  0.1860      0.830 0.000 0.948 0.052
#> GSM648681     1  0.7567      0.405 0.576 0.376 0.048
#> GSM648686     3  0.2261      0.864 0.000 0.068 0.932
#> GSM648689     3  0.1860      0.815 0.000 0.052 0.948
#> GSM648690     3  0.2261      0.864 0.000 0.068 0.932
#> GSM648691     3  0.2261      0.865 0.000 0.068 0.932
#> GSM648693     3  0.1643      0.825 0.044 0.000 0.956
#> GSM648700     1  0.3989      0.732 0.864 0.124 0.012
#> GSM648630     3  0.2261      0.864 0.000 0.068 0.932
#> GSM648632     3  0.1860      0.818 0.052 0.000 0.948
#> GSM648639     3  0.5905      0.388 0.000 0.352 0.648
#> GSM648640     3  0.2537      0.858 0.000 0.080 0.920
#> GSM648668     2  0.2096      0.830 0.004 0.944 0.052
#> GSM648676     2  0.7274      0.416 0.304 0.644 0.052
#> GSM648692     3  0.2261      0.864 0.000 0.068 0.932
#> GSM648694     3  0.1860      0.865 0.000 0.052 0.948
#> GSM648699     2  0.1860      0.830 0.000 0.948 0.052
#> GSM648701     2  0.1860      0.830 0.000 0.948 0.052
#> GSM648673     2  0.1964      0.828 0.000 0.944 0.056
#> GSM648677     2  0.1860      0.830 0.000 0.948 0.052
#> GSM648687     3  0.5576      0.777 0.104 0.084 0.812
#> GSM648688     3  0.0000      0.845 0.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM648605     2  0.4730     0.7710 0.000 0.636 0.000 0.364
#> GSM648618     1  0.3873     0.4050 0.772 0.000 0.000 0.228
#> GSM648620     4  0.7810    -0.2801 0.364 0.252 0.000 0.384
#> GSM648646     2  0.4643     0.7786 0.000 0.656 0.000 0.344
#> GSM648649     1  0.0188     0.6400 0.996 0.000 0.000 0.004
#> GSM648675     1  0.0000     0.6394 1.000 0.000 0.000 0.000
#> GSM648682     2  0.5549     0.7770 0.048 0.672 0.000 0.280
#> GSM648698     2  0.4730     0.7710 0.000 0.636 0.000 0.364
#> GSM648708     1  0.5050     0.3171 0.588 0.004 0.000 0.408
#> GSM648628     4  0.4830     0.6044 0.392 0.000 0.000 0.608
#> GSM648595     1  0.0188     0.6385 0.996 0.000 0.000 0.004
#> GSM648635     1  0.0336     0.6402 0.992 0.000 0.000 0.008
#> GSM648645     1  0.4164     0.3773 0.736 0.000 0.000 0.264
#> GSM648647     2  0.5040     0.7668 0.008 0.628 0.000 0.364
#> GSM648667     1  0.4697     0.3508 0.644 0.000 0.000 0.356
#> GSM648695     1  0.5217     0.3320 0.608 0.012 0.000 0.380
#> GSM648704     2  0.4500     0.7841 0.000 0.684 0.000 0.316
#> GSM648706     2  0.4936     0.7804 0.000 0.672 0.012 0.316
#> GSM648593     1  0.1557     0.6346 0.944 0.000 0.000 0.056
#> GSM648594     1  0.2408     0.6176 0.896 0.000 0.000 0.104
#> GSM648600     1  0.2814     0.5322 0.868 0.000 0.000 0.132
#> GSM648621     1  0.4697     0.0899 0.644 0.000 0.000 0.356
#> GSM648622     1  0.4477     0.3343 0.688 0.000 0.000 0.312
#> GSM648623     1  0.4564     0.2991 0.672 0.000 0.000 0.328
#> GSM648636     1  0.3942     0.3618 0.764 0.000 0.000 0.236
#> GSM648655     1  0.0000     0.6394 1.000 0.000 0.000 0.000
#> GSM648661     4  0.4500     0.6955 0.316 0.000 0.000 0.684
#> GSM648664     4  0.4500     0.6955 0.316 0.000 0.000 0.684
#> GSM648683     1  0.4713     0.0863 0.640 0.000 0.000 0.360
#> GSM648685     1  0.4981    -0.1311 0.536 0.000 0.000 0.464
#> GSM648702     1  0.4679     0.1002 0.648 0.000 0.000 0.352
#> GSM648597     1  0.1557     0.6202 0.944 0.000 0.000 0.056
#> GSM648603     1  0.4304     0.3449 0.716 0.000 0.000 0.284
#> GSM648606     4  0.3907     0.6072 0.232 0.000 0.000 0.768
#> GSM648613     4  0.4624     0.6670 0.340 0.000 0.000 0.660
#> GSM648619     4  0.4522     0.6929 0.320 0.000 0.000 0.680
#> GSM648654     4  0.0592     0.4038 0.016 0.000 0.000 0.984
#> GSM648663     4  0.4776     0.5986 0.376 0.000 0.000 0.624
#> GSM648670     1  0.0336     0.6374 0.992 0.008 0.000 0.000
#> GSM648707     1  0.5644     0.3771 0.708 0.068 0.004 0.220
#> GSM648615     2  0.6373     0.7010 0.116 0.636 0.000 0.248
#> GSM648643     2  0.4730     0.7710 0.000 0.636 0.000 0.364
#> GSM648650     1  0.2868     0.5531 0.864 0.000 0.000 0.136
#> GSM648656     2  0.4454     0.7865 0.000 0.692 0.000 0.308
#> GSM648715     2  0.5159     0.7645 0.012 0.624 0.000 0.364
#> GSM648598     1  0.2408     0.6176 0.896 0.000 0.000 0.104
#> GSM648601     1  0.2281     0.6212 0.904 0.000 0.000 0.096
#> GSM648602     1  0.4697     0.0899 0.644 0.000 0.000 0.356
#> GSM648604     4  0.4500     0.6955 0.316 0.000 0.000 0.684
#> GSM648614     4  0.4761    -0.0965 0.372 0.000 0.000 0.628
#> GSM648624     4  0.4776     0.5931 0.376 0.000 0.000 0.624
#> GSM648625     1  0.3172     0.5898 0.840 0.000 0.000 0.160
#> GSM648629     4  0.4500     0.6955 0.316 0.000 0.000 0.684
#> GSM648634     1  0.4697     0.0899 0.644 0.000 0.000 0.356
#> GSM648648     1  0.2081     0.6265 0.916 0.000 0.000 0.084
#> GSM648651     1  0.2408     0.6174 0.896 0.000 0.000 0.104
#> GSM648657     1  0.0000     0.6394 1.000 0.000 0.000 0.000
#> GSM648660     1  0.2408     0.6176 0.896 0.000 0.000 0.104
#> GSM648697     1  0.4817     0.0400 0.612 0.000 0.000 0.388
#> GSM648710     4  0.4500     0.6955 0.316 0.000 0.000 0.684
#> GSM648591     1  0.3801     0.4153 0.780 0.000 0.000 0.220
#> GSM648592     1  0.4382     0.3719 0.704 0.000 0.000 0.296
#> GSM648607     4  0.4522     0.6929 0.320 0.000 0.000 0.680
#> GSM648611     4  0.4855     0.5925 0.400 0.000 0.000 0.600
#> GSM648612     4  0.4543     0.6888 0.324 0.000 0.000 0.676
#> GSM648616     1  0.7533     0.2638 0.580 0.176 0.024 0.220
#> GSM648617     1  0.1211     0.6384 0.960 0.000 0.000 0.040
#> GSM648626     1  0.4543     0.3023 0.676 0.000 0.000 0.324
#> GSM648711     4  0.4500     0.6955 0.316 0.000 0.000 0.684
#> GSM648712     4  0.4907     0.5566 0.420 0.000 0.000 0.580
#> GSM648713     4  0.4500     0.6955 0.316 0.000 0.000 0.684
#> GSM648714     4  0.5611    -0.4996 0.024 0.412 0.000 0.564
#> GSM648716     4  0.4522     0.6929 0.320 0.000 0.000 0.680
#> GSM648717     4  0.5038     0.6835 0.296 0.000 0.020 0.684
#> GSM648590     1  0.0000     0.6394 1.000 0.000 0.000 0.000
#> GSM648596     2  0.5878     0.7461 0.056 0.632 0.000 0.312
#> GSM648642     2  0.4730     0.7710 0.000 0.636 0.000 0.364
#> GSM648696     1  0.0000     0.6394 1.000 0.000 0.000 0.000
#> GSM648705     1  0.1022     0.6393 0.968 0.000 0.000 0.032
#> GSM648718     2  0.4905     0.7696 0.004 0.632 0.000 0.364
#> GSM648599     1  0.0000     0.6394 1.000 0.000 0.000 0.000
#> GSM648608     1  0.4916    -0.0802 0.576 0.000 0.000 0.424
#> GSM648609     4  0.4500     0.6955 0.316 0.000 0.000 0.684
#> GSM648610     1  0.4697     0.0899 0.644 0.000 0.000 0.356
#> GSM648633     1  0.1557     0.6346 0.944 0.000 0.000 0.056
#> GSM648644     2  0.3528     0.8012 0.000 0.808 0.000 0.192
#> GSM648652     1  0.0469     0.6408 0.988 0.000 0.000 0.012
#> GSM648653     1  0.4697     0.0899 0.644 0.000 0.000 0.356
#> GSM648658     1  0.0000     0.6394 1.000 0.000 0.000 0.000
#> GSM648659     1  0.4477     0.3576 0.688 0.000 0.000 0.312
#> GSM648662     4  0.4356     0.6805 0.292 0.000 0.000 0.708
#> GSM648665     4  0.0707     0.4062 0.020 0.000 0.000 0.980
#> GSM648666     1  0.4776     0.0511 0.624 0.000 0.000 0.376
#> GSM648680     1  0.2216     0.6236 0.908 0.000 0.000 0.092
#> GSM648684     1  0.4697     0.0899 0.644 0.000 0.000 0.356
#> GSM648709     4  0.7877    -0.3333 0.356 0.280 0.000 0.364
#> GSM648719     1  0.2469     0.6149 0.892 0.000 0.000 0.108
#> GSM648627     4  0.4776     0.6242 0.376 0.000 0.000 0.624
#> GSM648637     2  0.0188     0.8031 0.000 0.996 0.004 0.000
#> GSM648638     2  0.0336     0.8004 0.000 0.992 0.008 0.000
#> GSM648641     3  0.3486     0.7522 0.000 0.000 0.812 0.188
#> GSM648672     2  0.0188     0.8031 0.000 0.996 0.004 0.000
#> GSM648674     2  0.0188     0.8031 0.000 0.996 0.004 0.000
#> GSM648703     2  0.0188     0.8031 0.000 0.996 0.004 0.000
#> GSM648631     3  0.0188     0.9356 0.000 0.000 0.996 0.004
#> GSM648669     2  0.0817     0.7884 0.000 0.976 0.024 0.000
#> GSM648671     2  0.0188     0.8031 0.000 0.996 0.004 0.000
#> GSM648678     2  0.0000     0.8031 0.000 1.000 0.000 0.000
#> GSM648679     2  0.0188     0.8031 0.000 0.996 0.004 0.000
#> GSM648681     1  0.7896    -0.2563 0.368 0.296 0.000 0.336
#> GSM648686     3  0.0000     0.9366 0.000 0.000 1.000 0.000
#> GSM648689     3  0.0188     0.9354 0.000 0.004 0.996 0.000
#> GSM648690     3  0.0000     0.9366 0.000 0.000 1.000 0.000
#> GSM648691     3  0.0188     0.9354 0.000 0.004 0.996 0.000
#> GSM648693     3  0.0188     0.9349 0.004 0.000 0.996 0.000
#> GSM648700     1  0.4522     0.3593 0.680 0.320 0.000 0.000
#> GSM648630     3  0.0000     0.9366 0.000 0.000 1.000 0.000
#> GSM648632     3  0.0188     0.9356 0.000 0.000 0.996 0.004
#> GSM648639     3  0.1940     0.8861 0.000 0.076 0.924 0.000
#> GSM648640     3  0.1716     0.8958 0.000 0.064 0.936 0.000
#> GSM648668     2  0.0188     0.8031 0.000 0.996 0.004 0.000
#> GSM648676     2  0.3208     0.6618 0.148 0.848 0.004 0.000
#> GSM648692     3  0.0000     0.9366 0.000 0.000 1.000 0.000
#> GSM648694     3  0.0000     0.9366 0.000 0.000 1.000 0.000
#> GSM648699     2  0.0188     0.8031 0.000 0.996 0.004 0.000
#> GSM648701     2  0.0188     0.8031 0.000 0.996 0.004 0.000
#> GSM648673     2  0.0188     0.8031 0.000 0.996 0.004 0.000
#> GSM648677     2  0.0188     0.8031 0.000 0.996 0.004 0.000
#> GSM648687     3  0.8085     0.3288 0.156 0.040 0.512 0.292
#> GSM648688     3  0.0188     0.9356 0.000 0.000 0.996 0.004

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM648605     2  0.1608   0.758768 0.000 0.928 0.000 0.072 0.000
#> GSM648618     1  0.3109   0.481132 0.800 0.000 0.000 0.000 0.200
#> GSM648620     2  0.2690   0.698624 0.156 0.844 0.000 0.000 0.000
#> GSM648646     2  0.1608   0.758768 0.000 0.928 0.000 0.072 0.000
#> GSM648649     1  0.4479   0.579024 0.744 0.072 0.000 0.000 0.184
#> GSM648675     1  0.0290   0.599566 0.992 0.000 0.000 0.000 0.008
#> GSM648682     2  0.3741   0.531618 0.004 0.732 0.000 0.264 0.000
#> GSM648698     2  0.1608   0.758768 0.000 0.928 0.000 0.072 0.000
#> GSM648708     2  0.2929   0.685972 0.180 0.820 0.000 0.000 0.000
#> GSM648628     5  0.5334   0.482485 0.244 0.000 0.000 0.104 0.652
#> GSM648595     1  0.3921   0.492873 0.800 0.072 0.000 0.000 0.128
#> GSM648635     1  0.3875   0.594306 0.804 0.072 0.000 0.000 0.124
#> GSM648645     1  0.4256   0.280786 0.564 0.000 0.000 0.000 0.436
#> GSM648647     2  0.0000   0.762865 0.000 1.000 0.000 0.000 0.000
#> GSM648667     2  0.4026   0.618280 0.244 0.736 0.000 0.000 0.020
#> GSM648695     2  0.3821   0.655556 0.216 0.764 0.000 0.000 0.020
#> GSM648704     2  0.1608   0.758768 0.000 0.928 0.000 0.072 0.000
#> GSM648706     2  0.1608   0.758768 0.000 0.928 0.000 0.072 0.000
#> GSM648593     1  0.3353   0.583486 0.796 0.008 0.000 0.000 0.196
#> GSM648594     1  0.3752   0.512500 0.708 0.000 0.000 0.000 0.292
#> GSM648600     1  0.3661   0.311508 0.724 0.000 0.000 0.000 0.276
#> GSM648621     1  0.4249   0.009127 0.568 0.000 0.000 0.000 0.432
#> GSM648622     5  0.4268  -0.114731 0.444 0.000 0.000 0.000 0.556
#> GSM648623     5  0.5929  -0.086480 0.432 0.000 0.000 0.104 0.464
#> GSM648636     1  0.4060   0.148861 0.640 0.000 0.000 0.000 0.360
#> GSM648655     1  0.0609   0.607485 0.980 0.000 0.000 0.000 0.020
#> GSM648661     5  0.0000   0.650589 0.000 0.000 0.000 0.000 1.000
#> GSM648664     5  0.0000   0.650589 0.000 0.000 0.000 0.000 1.000
#> GSM648683     5  0.4307   0.105603 0.496 0.000 0.000 0.000 0.504
#> GSM648685     5  0.3109   0.452200 0.200 0.000 0.000 0.000 0.800
#> GSM648702     1  0.4825   0.045620 0.568 0.024 0.000 0.000 0.408
#> GSM648597     1  0.1608   0.603657 0.928 0.000 0.000 0.000 0.072
#> GSM648603     5  0.5933  -0.104114 0.444 0.000 0.000 0.104 0.452
#> GSM648606     5  0.5572   0.554322 0.104 0.072 0.000 0.104 0.720
#> GSM648613     5  0.4648   0.497909 0.156 0.000 0.000 0.104 0.740
#> GSM648619     5  0.3164   0.613611 0.044 0.000 0.000 0.104 0.852
#> GSM648654     5  0.0703   0.644027 0.000 0.024 0.000 0.000 0.976
#> GSM648663     5  0.5030   0.423721 0.200 0.000 0.000 0.104 0.696
#> GSM648670     1  0.2054   0.586033 0.916 0.072 0.000 0.008 0.004
#> GSM648707     1  0.5848   0.316467 0.608 0.000 0.000 0.192 0.200
#> GSM648615     2  0.3640   0.721478 0.084 0.836 0.000 0.072 0.008
#> GSM648643     2  0.1608   0.758768 0.000 0.928 0.000 0.072 0.000
#> GSM648650     1  0.4740   0.000546 0.516 0.468 0.000 0.000 0.016
#> GSM648656     2  0.3534   0.535542 0.000 0.744 0.000 0.256 0.000
#> GSM648715     2  0.0000   0.762865 0.000 1.000 0.000 0.000 0.000
#> GSM648598     1  0.3949   0.478066 0.668 0.000 0.000 0.000 0.332
#> GSM648601     1  0.2690   0.593001 0.844 0.000 0.000 0.000 0.156
#> GSM648602     1  0.4249   0.009127 0.568 0.000 0.000 0.000 0.432
#> GSM648604     5  0.0000   0.650589 0.000 0.000 0.000 0.000 1.000
#> GSM648614     2  0.6445   0.345648 0.216 0.496 0.000 0.000 0.288
#> GSM648624     5  0.1341   0.625403 0.056 0.000 0.000 0.000 0.944
#> GSM648625     1  0.4201   0.380263 0.592 0.000 0.000 0.000 0.408
#> GSM648629     5  0.0162   0.649536 0.004 0.000 0.000 0.000 0.996
#> GSM648634     1  0.4249   0.009127 0.568 0.000 0.000 0.000 0.432
#> GSM648648     1  0.4060   0.447605 0.640 0.000 0.000 0.000 0.360
#> GSM648651     1  0.3561   0.509205 0.740 0.000 0.000 0.000 0.260
#> GSM648657     1  0.0609   0.607485 0.980 0.000 0.000 0.000 0.020
#> GSM648660     1  0.3684   0.520797 0.720 0.000 0.000 0.000 0.280
#> GSM648697     5  0.4287   0.172683 0.460 0.000 0.000 0.000 0.540
#> GSM648710     5  0.0000   0.650589 0.000 0.000 0.000 0.000 1.000
#> GSM648591     1  0.3109   0.492329 0.800 0.000 0.000 0.000 0.200
#> GSM648592     1  0.5352   0.241125 0.536 0.000 0.000 0.056 0.408
#> GSM648607     5  0.2280   0.561101 0.120 0.000 0.000 0.000 0.880
#> GSM648611     5  0.5405   0.468842 0.256 0.000 0.000 0.104 0.640
#> GSM648612     5  0.4569   0.510650 0.148 0.000 0.000 0.104 0.748
#> GSM648616     1  0.6806   0.196897 0.436 0.000 0.016 0.380 0.168
#> GSM648617     1  0.3770   0.572094 0.832 0.040 0.000 0.104 0.024
#> GSM648626     5  0.5929  -0.086480 0.432 0.000 0.000 0.104 0.464
#> GSM648711     5  0.0000   0.650589 0.000 0.000 0.000 0.000 1.000
#> GSM648712     5  0.5512   0.444163 0.276 0.000 0.000 0.104 0.620
#> GSM648713     5  0.3569   0.597026 0.068 0.000 0.000 0.104 0.828
#> GSM648714     2  0.6817   0.524417 0.060 0.584 0.000 0.172 0.184
#> GSM648716     5  0.2074   0.629232 0.000 0.000 0.000 0.104 0.896
#> GSM648717     5  0.2074   0.629232 0.000 0.000 0.000 0.104 0.896
#> GSM648590     1  0.1571   0.592210 0.936 0.060 0.000 0.000 0.004
#> GSM648596     2  0.2300   0.739686 0.072 0.904 0.000 0.000 0.024
#> GSM648642     2  0.0000   0.762865 0.000 1.000 0.000 0.000 0.000
#> GSM648696     1  0.1608   0.589416 0.928 0.072 0.000 0.000 0.000
#> GSM648705     1  0.4877   0.549236 0.692 0.072 0.000 0.000 0.236
#> GSM648718     2  0.1608   0.758768 0.000 0.928 0.000 0.072 0.000
#> GSM648599     1  0.0000   0.601299 1.000 0.000 0.000 0.000 0.000
#> GSM648608     5  0.4074   0.324925 0.364 0.000 0.000 0.000 0.636
#> GSM648609     5  0.0000   0.650589 0.000 0.000 0.000 0.000 1.000
#> GSM648610     1  0.4249   0.009127 0.568 0.000 0.000 0.000 0.432
#> GSM648633     1  0.3074   0.582350 0.804 0.000 0.000 0.000 0.196
#> GSM648644     2  0.4307  -0.217094 0.000 0.504 0.000 0.496 0.000
#> GSM648652     1  0.3246   0.588041 0.808 0.008 0.000 0.000 0.184
#> GSM648653     1  0.4249   0.009127 0.568 0.000 0.000 0.000 0.432
#> GSM648658     1  0.0609   0.607485 0.980 0.000 0.000 0.000 0.020
#> GSM648659     2  0.3305   0.661077 0.224 0.776 0.000 0.000 0.000
#> GSM648662     5  0.0162   0.649536 0.004 0.000 0.000 0.000 0.996
#> GSM648665     5  0.4060   0.264029 0.000 0.360 0.000 0.000 0.640
#> GSM648666     5  0.4227   0.233510 0.420 0.000 0.000 0.000 0.580
#> GSM648680     1  0.3561   0.538221 0.740 0.000 0.000 0.000 0.260
#> GSM648684     5  0.4291   0.166848 0.464 0.000 0.000 0.000 0.536
#> GSM648709     2  0.0703   0.762517 0.024 0.976 0.000 0.000 0.000
#> GSM648719     1  0.4126   0.419002 0.620 0.000 0.000 0.000 0.380
#> GSM648627     5  0.5032   0.512242 0.220 0.000 0.000 0.092 0.688
#> GSM648637     4  0.2929   0.898527 0.000 0.180 0.000 0.820 0.000
#> GSM648638     4  0.2929   0.898527 0.000 0.180 0.000 0.820 0.000
#> GSM648641     3  0.4528   0.683861 0.000 0.000 0.752 0.104 0.144
#> GSM648672     4  0.2929   0.898527 0.000 0.180 0.000 0.820 0.000
#> GSM648674     4  0.2929   0.898527 0.000 0.180 0.000 0.820 0.000
#> GSM648703     4  0.2074   0.888388 0.000 0.104 0.000 0.896 0.000
#> GSM648631     3  0.0000   0.919799 0.000 0.000 1.000 0.000 0.000
#> GSM648669     4  0.2813   0.851627 0.000 0.168 0.000 0.832 0.000
#> GSM648671     4  0.2074   0.888388 0.000 0.104 0.000 0.896 0.000
#> GSM648678     4  0.3003   0.892450 0.000 0.188 0.000 0.812 0.000
#> GSM648679     4  0.2929   0.898527 0.000 0.180 0.000 0.820 0.000
#> GSM648681     2  0.3246   0.660202 0.184 0.808 0.000 0.000 0.008
#> GSM648686     3  0.0000   0.919799 0.000 0.000 1.000 0.000 0.000
#> GSM648689     3  0.0000   0.919799 0.000 0.000 1.000 0.000 0.000
#> GSM648690     3  0.0000   0.919799 0.000 0.000 1.000 0.000 0.000
#> GSM648691     3  0.0000   0.919799 0.000 0.000 1.000 0.000 0.000
#> GSM648693     3  0.0000   0.919799 0.000 0.000 1.000 0.000 0.000
#> GSM648700     4  0.3932   0.488586 0.328 0.000 0.000 0.672 0.000
#> GSM648630     3  0.0000   0.919799 0.000 0.000 1.000 0.000 0.000
#> GSM648632     3  0.0000   0.919799 0.000 0.000 1.000 0.000 0.000
#> GSM648639     3  0.3480   0.723616 0.000 0.000 0.752 0.248 0.000
#> GSM648640     3  0.1671   0.861755 0.000 0.000 0.924 0.076 0.000
#> GSM648668     4  0.3480   0.856877 0.000 0.248 0.000 0.752 0.000
#> GSM648676     4  0.3366   0.813025 0.000 0.232 0.000 0.768 0.000
#> GSM648692     3  0.0000   0.919799 0.000 0.000 1.000 0.000 0.000
#> GSM648694     3  0.0000   0.919799 0.000 0.000 1.000 0.000 0.000
#> GSM648699     4  0.2732   0.870651 0.000 0.160 0.000 0.840 0.000
#> GSM648701     4  0.2732   0.870651 0.000 0.160 0.000 0.840 0.000
#> GSM648673     4  0.2074   0.888388 0.000 0.104 0.000 0.896 0.000
#> GSM648677     4  0.2929   0.898527 0.000 0.180 0.000 0.820 0.000
#> GSM648687     3  0.6712   0.256071 0.108 0.000 0.508 0.040 0.344
#> GSM648688     3  0.0000   0.919799 0.000 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM648605     2  0.3930     0.6687 0.000 0.764 0.000 0.092 0.144 0.000
#> GSM648618     6  0.3859     0.5642 0.024 0.056 0.000 0.000 0.124 0.796
#> GSM648620     2  0.2135     0.6823 0.000 0.872 0.000 0.000 0.000 0.128
#> GSM648646     2  0.4728     0.6248 0.000 0.652 0.000 0.092 0.256 0.000
#> GSM648649     6  0.6214     0.4522 0.092 0.232 0.000 0.000 0.104 0.572
#> GSM648675     6  0.2632     0.5552 0.004 0.164 0.000 0.000 0.000 0.832
#> GSM648682     2  0.5513     0.4959 0.000 0.596 0.000 0.188 0.208 0.008
#> GSM648698     2  0.3930     0.6687 0.000 0.764 0.000 0.092 0.144 0.000
#> GSM648708     2  0.2135     0.6823 0.000 0.872 0.000 0.000 0.000 0.128
#> GSM648628     5  0.5291     0.4114 0.328 0.000 0.000 0.000 0.552 0.120
#> GSM648595     6  0.4787     0.4736 0.108 0.236 0.000 0.000 0.000 0.656
#> GSM648635     6  0.4173     0.5223 0.060 0.228 0.000 0.000 0.000 0.712
#> GSM648645     6  0.4125     0.4656 0.128 0.000 0.000 0.000 0.124 0.748
#> GSM648647     2  0.0000     0.7262 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648667     2  0.2950     0.6611 0.024 0.828 0.000 0.000 0.000 0.148
#> GSM648695     2  0.2748     0.6736 0.024 0.848 0.000 0.000 0.000 0.128
#> GSM648704     2  0.4728     0.6248 0.000 0.652 0.000 0.092 0.256 0.000
#> GSM648706     2  0.4728     0.6248 0.000 0.652 0.000 0.092 0.256 0.000
#> GSM648593     6  0.3511     0.5028 0.216 0.024 0.000 0.000 0.000 0.760
#> GSM648594     6  0.4125     0.4656 0.128 0.000 0.000 0.000 0.124 0.748
#> GSM648600     6  0.3288     0.4505 0.276 0.000 0.000 0.000 0.000 0.724
#> GSM648621     6  0.3547     0.3885 0.332 0.000 0.000 0.000 0.000 0.668
#> GSM648622     1  0.3804     0.2463 0.576 0.000 0.000 0.000 0.000 0.424
#> GSM648623     6  0.6007    -0.2799 0.252 0.000 0.000 0.000 0.324 0.424
#> GSM648636     6  0.3601     0.4111 0.312 0.004 0.000 0.000 0.000 0.684
#> GSM648655     6  0.0458     0.5877 0.016 0.000 0.000 0.000 0.000 0.984
#> GSM648661     1  0.0000     0.6008 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648664     1  0.0000     0.6008 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648683     1  0.3866    -0.0584 0.516 0.000 0.000 0.000 0.000 0.484
#> GSM648685     1  0.0291     0.5998 0.992 0.004 0.000 0.000 0.000 0.004
#> GSM648702     6  0.5122     0.3486 0.320 0.104 0.000 0.000 0.000 0.576
#> GSM648597     6  0.2234     0.5495 0.004 0.000 0.000 0.000 0.124 0.872
#> GSM648603     5  0.5507     0.2705 0.128 0.000 0.000 0.000 0.448 0.424
#> GSM648606     1  0.5773    -0.3322 0.460 0.060 0.000 0.000 0.432 0.048
#> GSM648613     5  0.5440     0.5366 0.296 0.000 0.000 0.000 0.552 0.152
#> GSM648619     5  0.4654     0.4631 0.412 0.000 0.000 0.000 0.544 0.044
#> GSM648654     1  0.1663     0.5571 0.912 0.088 0.000 0.000 0.000 0.000
#> GSM648663     5  0.5848     0.4178 0.380 0.000 0.000 0.000 0.428 0.192
#> GSM648670     6  0.3163     0.5237 0.004 0.232 0.000 0.000 0.000 0.764
#> GSM648707     5  0.3955     0.4255 0.004 0.000 0.000 0.008 0.648 0.340
#> GSM648615     2  0.4879     0.6362 0.000 0.712 0.000 0.092 0.036 0.160
#> GSM648643     2  0.3172     0.6733 0.000 0.816 0.000 0.148 0.036 0.000
#> GSM648650     2  0.3717     0.2906 0.000 0.616 0.000 0.000 0.000 0.384
#> GSM648656     2  0.5802     0.3930 0.000 0.500 0.000 0.244 0.256 0.000
#> GSM648715     2  0.0000     0.7262 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648598     1  0.3868     0.0811 0.504 0.000 0.000 0.000 0.000 0.496
#> GSM648601     6  0.3426     0.5144 0.068 0.000 0.000 0.000 0.124 0.808
#> GSM648602     6  0.3547     0.3885 0.332 0.000 0.000 0.000 0.000 0.668
#> GSM648604     1  0.0000     0.6008 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648614     1  0.6123     0.2130 0.464 0.280 0.000 0.000 0.008 0.248
#> GSM648624     1  0.0260     0.5983 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM648625     1  0.3804     0.2463 0.576 0.000 0.000 0.000 0.000 0.424
#> GSM648629     1  0.0146     0.5997 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM648634     6  0.3547     0.3885 0.332 0.000 0.000 0.000 0.000 0.668
#> GSM648648     1  0.4491     0.2602 0.576 0.036 0.000 0.000 0.000 0.388
#> GSM648651     1  0.3867     0.1889 0.512 0.000 0.000 0.000 0.000 0.488
#> GSM648657     6  0.2234     0.5495 0.004 0.000 0.000 0.000 0.124 0.872
#> GSM648660     6  0.3175     0.4548 0.256 0.000 0.000 0.000 0.000 0.744
#> GSM648697     1  0.2838     0.4853 0.808 0.004 0.000 0.000 0.000 0.188
#> GSM648710     1  0.0000     0.6008 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648591     6  0.1219     0.5805 0.004 0.000 0.000 0.000 0.048 0.948
#> GSM648592     6  0.5468    -0.1616 0.128 0.000 0.000 0.000 0.380 0.492
#> GSM648607     1  0.4045     0.4045 0.756 0.000 0.000 0.000 0.124 0.120
#> GSM648611     5  0.6018     0.2907 0.332 0.000 0.000 0.000 0.416 0.252
#> GSM648612     5  0.5425     0.5338 0.300 0.000 0.000 0.000 0.552 0.148
#> GSM648616     5  0.4085     0.4513 0.000 0.000 0.000 0.052 0.716 0.232
#> GSM648617     5  0.4697     0.3453 0.028 0.008 0.000 0.000 0.500 0.464
#> GSM648626     5  0.5456     0.3618 0.128 0.000 0.000 0.000 0.500 0.372
#> GSM648711     1  0.0000     0.6008 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648712     5  0.5919     0.3284 0.320 0.000 0.000 0.000 0.452 0.228
#> GSM648713     5  0.4903     0.4921 0.380 0.000 0.000 0.000 0.552 0.068
#> GSM648714     5  0.3956    -0.0424 0.024 0.292 0.000 0.000 0.684 0.000
#> GSM648716     5  0.3838     0.4122 0.448 0.000 0.000 0.000 0.552 0.000
#> GSM648717     1  0.3810    -0.2806 0.572 0.000 0.000 0.000 0.428 0.000
#> GSM648590     6  0.1958     0.5769 0.004 0.100 0.000 0.000 0.000 0.896
#> GSM648596     2  0.2822     0.7076 0.000 0.852 0.000 0.000 0.108 0.040
#> GSM648642     2  0.0000     0.7262 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648696     6  0.2912     0.5334 0.000 0.216 0.000 0.000 0.000 0.784
#> GSM648705     6  0.6824     0.3536 0.128 0.340 0.000 0.000 0.100 0.432
#> GSM648718     2  0.2250     0.7072 0.000 0.888 0.000 0.092 0.020 0.000
#> GSM648599     6  0.0000     0.5866 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648608     1  0.2562     0.4957 0.828 0.000 0.000 0.000 0.000 0.172
#> GSM648609     1  0.0000     0.6008 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648610     6  0.3804     0.2406 0.424 0.000 0.000 0.000 0.000 0.576
#> GSM648633     6  0.2793     0.5108 0.200 0.000 0.000 0.000 0.000 0.800
#> GSM648644     2  0.6093     0.0792 0.000 0.380 0.000 0.336 0.284 0.000
#> GSM648652     6  0.2218     0.5703 0.104 0.012 0.000 0.000 0.000 0.884
#> GSM648653     6  0.3547     0.3885 0.332 0.000 0.000 0.000 0.000 0.668
#> GSM648658     6  0.0291     0.5877 0.004 0.004 0.000 0.000 0.000 0.992
#> GSM648659     2  0.2378     0.6683 0.000 0.848 0.000 0.000 0.000 0.152
#> GSM648662     1  0.0146     0.5997 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM648665     1  0.2631     0.4790 0.820 0.180 0.000 0.000 0.000 0.000
#> GSM648666     1  0.2854     0.4670 0.792 0.000 0.000 0.000 0.000 0.208
#> GSM648680     6  0.3360     0.4475 0.264 0.004 0.000 0.000 0.000 0.732
#> GSM648684     1  0.3531     0.3326 0.672 0.000 0.000 0.000 0.000 0.328
#> GSM648709     2  0.0146     0.7265 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM648719     1  0.3851     0.1735 0.540 0.000 0.000 0.000 0.000 0.460
#> GSM648627     6  0.6049    -0.1079 0.356 0.000 0.000 0.000 0.256 0.388
#> GSM648637     4  0.4884     0.7611 0.000 0.128 0.000 0.652 0.220 0.000
#> GSM648638     4  0.5081     0.7359 0.000 0.128 0.000 0.616 0.256 0.000
#> GSM648641     3  0.3810     0.2380 0.000 0.000 0.572 0.000 0.428 0.000
#> GSM648672     4  0.4125     0.7832 0.000 0.128 0.000 0.748 0.124 0.000
#> GSM648674     4  0.4884     0.7611 0.000 0.128 0.000 0.652 0.220 0.000
#> GSM648703     4  0.0000     0.8054 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648631     3  0.0000     0.9489 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648669     4  0.3586     0.7707 0.000 0.080 0.000 0.796 0.124 0.000
#> GSM648671     4  0.1663     0.8094 0.000 0.000 0.000 0.912 0.088 0.000
#> GSM648678     4  0.4977     0.6011 0.000 0.128 0.000 0.636 0.236 0.000
#> GSM648679     4  0.4884     0.7611 0.000 0.128 0.000 0.652 0.220 0.000
#> GSM648681     2  0.2219     0.6815 0.000 0.864 0.000 0.000 0.000 0.136
#> GSM648686     3  0.0000     0.9489 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648689     3  0.0000     0.9489 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648690     3  0.0000     0.9489 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648691     3  0.0000     0.9489 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648693     3  0.0000     0.9489 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648700     4  0.2520     0.6814 0.000 0.004 0.000 0.844 0.000 0.152
#> GSM648630     3  0.0000     0.9489 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648632     3  0.0000     0.9489 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648639     5  0.4606    -0.0252 0.000 0.000 0.344 0.052 0.604 0.000
#> GSM648640     3  0.2282     0.8476 0.000 0.000 0.888 0.024 0.088 0.000
#> GSM648668     4  0.4641     0.7365 0.000 0.240 0.000 0.668 0.092 0.000
#> GSM648676     4  0.1957     0.7340 0.000 0.112 0.000 0.888 0.000 0.000
#> GSM648692     3  0.0000     0.9489 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648694     3  0.0000     0.9489 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648699     4  0.0146     0.8048 0.000 0.004 0.000 0.996 0.000 0.000
#> GSM648701     4  0.0146     0.8048 0.000 0.004 0.000 0.996 0.000 0.000
#> GSM648673     4  0.0000     0.8054 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648677     4  0.3426     0.7882 0.000 0.124 0.000 0.808 0.068 0.000
#> GSM648687     1  0.4762    -0.0721 0.488 0.000 0.472 0.032 0.008 0.000
#> GSM648688     3  0.0000     0.9489 0.000 0.000 1.000 0.000 0.000 0.000

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-SD-pam-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-SD-pam-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-SD-pam-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-SD-pam-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-SD-pam-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-SD-pam-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-SD-pam-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-SD-pam-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-SD-pam-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-SD-pam-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-SD-pam-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-SD-pam-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-SD-pam-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-SD-pam-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-SD-pam-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-SD-pam-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-SD-pam-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-SD-pam-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-SD-pam-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-SD-pam-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk SD-pam-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-SD-pam-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-SD-pam-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-SD-pam-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-SD-pam-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-SD-pam-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk SD-pam-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>          n disease.state(p) development.stage(p) other(p) k
#> SD:pam  89         1.74e-06              0.00628 8.03e-12 2
#> SD:pam 125         1.45e-17              0.04099 3.43e-20 3
#> SD:pam  94         1.04e-12              0.06078 4.85e-20 4
#> SD:pam  90         1.08e-17              0.08397 3.95e-24 5
#> SD:pam  76         3.96e-14              0.31412 2.13e-20 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


SD:mclust

The object with results only for a single top-value method and a single partition method can be extracted as:

res = res_list["SD", "mclust"]
# you can also extract it by
# res = res_list["SD:mclust"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 130 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#>   Subgroups are detected by 'mclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk SD-mclust-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk SD-mclust-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.472           0.825       0.874         0.4898 0.500   0.500
#> 3 3 0.398           0.183       0.618         0.2797 0.713   0.511
#> 4 4 0.591           0.562       0.759         0.1123 0.737   0.485
#> 5 5 0.604           0.639       0.791         0.0583 0.788   0.480
#> 6 6 0.622           0.579       0.681         0.0557 0.950   0.804

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 2

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM648605     2  0.7376     0.8097 0.208 0.792
#> GSM648618     2  0.8813     0.3403 0.300 0.700
#> GSM648620     2  0.0000     0.8747 0.000 1.000
#> GSM648646     2  0.0000     0.8747 0.000 1.000
#> GSM648649     1  0.7376     0.8876 0.792 0.208
#> GSM648675     2  0.0000     0.8747 0.000 1.000
#> GSM648682     2  0.0000     0.8747 0.000 1.000
#> GSM648698     2  0.0000     0.8747 0.000 1.000
#> GSM648708     2  0.0000     0.8747 0.000 1.000
#> GSM648628     2  0.9087     0.7101 0.324 0.676
#> GSM648595     2  0.9552     0.0663 0.376 0.624
#> GSM648635     1  0.7376     0.8876 0.792 0.208
#> GSM648645     1  0.7376     0.8876 0.792 0.208
#> GSM648647     2  0.0000     0.8747 0.000 1.000
#> GSM648667     1  0.9686     0.6434 0.604 0.396
#> GSM648695     2  0.0000     0.8747 0.000 1.000
#> GSM648704     2  0.0000     0.8747 0.000 1.000
#> GSM648706     2  0.7376     0.8097 0.208 0.792
#> GSM648593     1  0.7376     0.8876 0.792 0.208
#> GSM648594     1  0.7453     0.8853 0.788 0.212
#> GSM648600     1  0.7376     0.8876 0.792 0.208
#> GSM648621     1  0.7602     0.8813 0.780 0.220
#> GSM648622     1  0.7376     0.8876 0.792 0.208
#> GSM648623     1  0.7602     0.8813 0.780 0.220
#> GSM648636     1  0.7376     0.8876 0.792 0.208
#> GSM648655     1  0.7376     0.8876 0.792 0.208
#> GSM648661     1  0.0672     0.7983 0.992 0.008
#> GSM648664     1  0.0672     0.7983 0.992 0.008
#> GSM648683     1  0.0672     0.7983 0.992 0.008
#> GSM648685     1  0.0672     0.7983 0.992 0.008
#> GSM648702     1  0.7376     0.8876 0.792 0.208
#> GSM648597     1  0.9922     0.5363 0.552 0.448
#> GSM648603     1  0.7528     0.8836 0.784 0.216
#> GSM648606     2  0.7376     0.8097 0.208 0.792
#> GSM648613     2  0.7376     0.8097 0.208 0.792
#> GSM648619     1  0.0938     0.7969 0.988 0.012
#> GSM648654     2  0.7745     0.7990 0.228 0.772
#> GSM648663     2  0.7376     0.8097 0.208 0.792
#> GSM648670     2  0.0000     0.8747 0.000 1.000
#> GSM648707     2  0.0000     0.8747 0.000 1.000
#> GSM648615     2  0.0000     0.8747 0.000 1.000
#> GSM648643     2  0.0000     0.8747 0.000 1.000
#> GSM648650     1  0.9732     0.6237 0.596 0.404
#> GSM648656     2  0.0000     0.8747 0.000 1.000
#> GSM648715     2  0.0000     0.8747 0.000 1.000
#> GSM648598     1  0.7376     0.8876 0.792 0.208
#> GSM648601     1  0.7376     0.8876 0.792 0.208
#> GSM648602     1  0.7376     0.8876 0.792 0.208
#> GSM648604     1  0.0672     0.7983 0.992 0.008
#> GSM648614     2  0.7376     0.8097 0.208 0.792
#> GSM648624     1  0.7376     0.8876 0.792 0.208
#> GSM648625     1  0.7376     0.8876 0.792 0.208
#> GSM648629     1  0.0672     0.7983 0.992 0.008
#> GSM648634     1  0.7376     0.8876 0.792 0.208
#> GSM648648     1  0.7376     0.8876 0.792 0.208
#> GSM648651     1  0.7376     0.8876 0.792 0.208
#> GSM648657     1  0.7376     0.8876 0.792 0.208
#> GSM648660     1  0.7376     0.8876 0.792 0.208
#> GSM648697     1  0.7376     0.8876 0.792 0.208
#> GSM648710     1  0.0672     0.7983 0.992 0.008
#> GSM648591     2  0.9460     0.1088 0.364 0.636
#> GSM648592     1  0.9970     0.4869 0.532 0.468
#> GSM648607     1  0.0672     0.7983 0.992 0.008
#> GSM648611     2  0.7528     0.8056 0.216 0.784
#> GSM648612     1  0.3879     0.7445 0.924 0.076
#> GSM648616     2  0.0000     0.8747 0.000 1.000
#> GSM648617     1  0.7674     0.8778 0.776 0.224
#> GSM648626     1  0.7602     0.8813 0.780 0.220
#> GSM648711     1  0.0672     0.7983 0.992 0.008
#> GSM648712     1  0.0938     0.7969 0.988 0.012
#> GSM648713     1  0.0938     0.7969 0.988 0.012
#> GSM648714     2  0.7376     0.8097 0.208 0.792
#> GSM648716     1  0.0938     0.7969 0.988 0.012
#> GSM648717     2  0.7376     0.8097 0.208 0.792
#> GSM648590     2  0.4815     0.7599 0.104 0.896
#> GSM648596     2  0.0000     0.8747 0.000 1.000
#> GSM648642     2  0.0000     0.8747 0.000 1.000
#> GSM648696     1  0.7453     0.8851 0.788 0.212
#> GSM648705     1  0.7376     0.8876 0.792 0.208
#> GSM648718     2  0.0000     0.8747 0.000 1.000
#> GSM648599     1  0.7376     0.8876 0.792 0.208
#> GSM648608     1  0.0672     0.7983 0.992 0.008
#> GSM648609     1  0.0672     0.7983 0.992 0.008
#> GSM648610     1  0.0672     0.7983 0.992 0.008
#> GSM648633     1  0.7376     0.8876 0.792 0.208
#> GSM648644     2  0.0000     0.8747 0.000 1.000
#> GSM648652     1  0.7376     0.8876 0.792 0.208
#> GSM648653     1  0.7376     0.8876 0.792 0.208
#> GSM648658     1  0.7376     0.8876 0.792 0.208
#> GSM648659     2  0.0000     0.8747 0.000 1.000
#> GSM648662     2  0.8909     0.7296 0.308 0.692
#> GSM648665     2  0.8081     0.7856 0.248 0.752
#> GSM648666     1  0.7376     0.8876 0.792 0.208
#> GSM648680     1  0.7376     0.8876 0.792 0.208
#> GSM648684     1  0.0672     0.7983 0.992 0.008
#> GSM648709     2  0.0000     0.8747 0.000 1.000
#> GSM648719     1  0.7376     0.8876 0.792 0.208
#> GSM648627     1  0.0938     0.7969 0.988 0.012
#> GSM648637     2  0.0000     0.8747 0.000 1.000
#> GSM648638     2  0.0000     0.8747 0.000 1.000
#> GSM648641     2  0.7376     0.8097 0.208 0.792
#> GSM648672     2  0.0000     0.8747 0.000 1.000
#> GSM648674     2  0.0000     0.8747 0.000 1.000
#> GSM648703     2  0.0000     0.8747 0.000 1.000
#> GSM648631     2  0.7376     0.8097 0.208 0.792
#> GSM648669     2  0.0000     0.8747 0.000 1.000
#> GSM648671     2  0.0000     0.8747 0.000 1.000
#> GSM648678     2  0.0000     0.8747 0.000 1.000
#> GSM648679     2  0.0000     0.8747 0.000 1.000
#> GSM648681     2  0.0000     0.8747 0.000 1.000
#> GSM648686     2  0.7376     0.8097 0.208 0.792
#> GSM648689     2  0.7376     0.8097 0.208 0.792
#> GSM648690     2  0.7376     0.8097 0.208 0.792
#> GSM648691     2  0.7376     0.8097 0.208 0.792
#> GSM648693     2  0.7376     0.8097 0.208 0.792
#> GSM648700     2  0.0000     0.8747 0.000 1.000
#> GSM648630     2  0.7376     0.8097 0.208 0.792
#> GSM648632     2  0.7376     0.8097 0.208 0.792
#> GSM648639     2  0.0000     0.8747 0.000 1.000
#> GSM648640     2  0.7376     0.8097 0.208 0.792
#> GSM648668     2  0.0000     0.8747 0.000 1.000
#> GSM648676     2  0.0000     0.8747 0.000 1.000
#> GSM648692     2  0.7376     0.8097 0.208 0.792
#> GSM648694     2  0.7376     0.8097 0.208 0.792
#> GSM648699     2  0.0000     0.8747 0.000 1.000
#> GSM648701     2  0.0000     0.8747 0.000 1.000
#> GSM648673     2  0.0000     0.8747 0.000 1.000
#> GSM648677     2  0.0000     0.8747 0.000 1.000
#> GSM648687     2  0.1843     0.8671 0.028 0.972
#> GSM648688     2  0.7376     0.8097 0.208 0.792

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM648605     2  0.3116     0.5238 0.108 0.892 0.000
#> GSM648618     2  0.8222     0.2209 0.100 0.592 0.308
#> GSM648620     2  0.6416     0.1938 0.008 0.616 0.376
#> GSM648646     2  0.5905     0.6047 0.000 0.648 0.352
#> GSM648649     3  0.6252     0.5897 0.444 0.000 0.556
#> GSM648675     2  0.6180     0.4068 0.000 0.584 0.416
#> GSM648682     2  0.4062     0.5793 0.000 0.836 0.164
#> GSM648698     2  0.3686     0.4959 0.000 0.860 0.140
#> GSM648708     2  0.6416     0.1938 0.008 0.616 0.376
#> GSM648628     1  0.7353    -0.0895 0.568 0.396 0.036
#> GSM648595     3  0.9712     0.3998 0.232 0.332 0.436
#> GSM648635     3  0.6252     0.5897 0.444 0.000 0.556
#> GSM648645     1  0.6154    -0.3104 0.592 0.000 0.408
#> GSM648647     2  0.6026     0.2085 0.000 0.624 0.376
#> GSM648667     3  0.9579     0.4626 0.352 0.204 0.444
#> GSM648695     2  0.6416     0.1938 0.008 0.616 0.376
#> GSM648704     2  0.5785     0.6091 0.000 0.668 0.332
#> GSM648706     2  0.5650     0.6089 0.000 0.688 0.312
#> GSM648593     3  0.6252     0.5897 0.444 0.000 0.556
#> GSM648594     1  0.8938    -0.4817 0.444 0.124 0.432
#> GSM648600     1  0.6154    -0.3104 0.592 0.000 0.408
#> GSM648621     1  0.6154    -0.3104 0.592 0.000 0.408
#> GSM648622     1  0.6154    -0.3104 0.592 0.000 0.408
#> GSM648623     1  0.6154    -0.3104 0.592 0.000 0.408
#> GSM648636     3  0.6252     0.5897 0.444 0.000 0.556
#> GSM648655     3  0.6252     0.5897 0.444 0.000 0.556
#> GSM648661     1  0.0000     0.3273 1.000 0.000 0.000
#> GSM648664     1  0.0892     0.3154 0.980 0.000 0.020
#> GSM648683     1  0.0747     0.3183 0.984 0.000 0.016
#> GSM648685     1  0.1411     0.3013 0.964 0.000 0.036
#> GSM648702     3  0.6252     0.5897 0.444 0.000 0.556
#> GSM648597     1  0.9825    -0.4009 0.424 0.268 0.308
#> GSM648603     1  0.6154    -0.3104 0.592 0.000 0.408
#> GSM648606     2  0.7203     0.2638 0.416 0.556 0.028
#> GSM648613     2  0.7411     0.2648 0.416 0.548 0.036
#> GSM648619     1  0.0000     0.3273 1.000 0.000 0.000
#> GSM648654     2  0.7240     0.2504 0.432 0.540 0.028
#> GSM648663     2  0.7203     0.2638 0.416 0.556 0.028
#> GSM648670     2  0.6008     0.5053 0.000 0.628 0.372
#> GSM648707     2  0.5706     0.6092 0.000 0.680 0.320
#> GSM648615     2  0.4452     0.4511 0.000 0.808 0.192
#> GSM648643     2  0.5678     0.4934 0.000 0.684 0.316
#> GSM648650     3  0.8933     0.4827 0.276 0.168 0.556
#> GSM648656     2  0.5785     0.6091 0.000 0.668 0.332
#> GSM648715     2  0.6026     0.2085 0.000 0.624 0.376
#> GSM648598     1  0.6154    -0.3104 0.592 0.000 0.408
#> GSM648601     1  0.6154    -0.3104 0.592 0.000 0.408
#> GSM648602     1  0.6154    -0.3104 0.592 0.000 0.408
#> GSM648604     1  0.0424     0.3233 0.992 0.000 0.008
#> GSM648614     2  0.7203     0.2638 0.416 0.556 0.028
#> GSM648624     1  0.6154    -0.3104 0.592 0.000 0.408
#> GSM648625     1  0.7841    -0.4163 0.536 0.056 0.408
#> GSM648629     1  0.0237     0.3255 0.996 0.000 0.004
#> GSM648634     1  0.6154    -0.3104 0.592 0.000 0.408
#> GSM648648     3  0.6252     0.5897 0.444 0.000 0.556
#> GSM648651     1  0.6154    -0.3104 0.592 0.000 0.408
#> GSM648657     1  0.6154    -0.3104 0.592 0.000 0.408
#> GSM648660     1  0.6154    -0.3104 0.592 0.000 0.408
#> GSM648697     1  0.6154    -0.3104 0.592 0.000 0.408
#> GSM648710     1  0.0000     0.3273 1.000 0.000 0.000
#> GSM648591     2  0.8889     0.0707 0.164 0.560 0.276
#> GSM648592     3  0.9885     0.3807 0.260 0.368 0.372
#> GSM648607     1  0.0000     0.3273 1.000 0.000 0.000
#> GSM648611     1  0.7487    -0.1176 0.552 0.408 0.040
#> GSM648612     1  0.3539     0.2795 0.888 0.100 0.012
#> GSM648616     2  0.5733     0.6082 0.000 0.676 0.324
#> GSM648617     1  0.9334    -0.4676 0.428 0.164 0.408
#> GSM648626     1  0.6154    -0.3104 0.592 0.000 0.408
#> GSM648711     1  0.0000     0.3273 1.000 0.000 0.000
#> GSM648712     1  0.0000     0.3273 1.000 0.000 0.000
#> GSM648713     1  0.0592     0.3227 0.988 0.012 0.000
#> GSM648714     2  0.7203     0.2638 0.416 0.556 0.028
#> GSM648716     1  0.0000     0.3273 1.000 0.000 0.000
#> GSM648717     2  0.7203     0.2638 0.416 0.556 0.028
#> GSM648590     3  0.9402     0.2801 0.172 0.408 0.420
#> GSM648596     2  0.5397     0.3593 0.000 0.720 0.280
#> GSM648642     2  0.6026     0.2085 0.000 0.624 0.376
#> GSM648696     1  0.8938    -0.4817 0.444 0.124 0.432
#> GSM648705     3  0.6252     0.5897 0.444 0.000 0.556
#> GSM648718     2  0.5650     0.3631 0.000 0.688 0.312
#> GSM648599     1  0.6154    -0.3104 0.592 0.000 0.408
#> GSM648608     1  0.0000     0.3273 1.000 0.000 0.000
#> GSM648609     1  0.0000     0.3273 1.000 0.000 0.000
#> GSM648610     1  0.1289     0.3053 0.968 0.000 0.032
#> GSM648633     1  0.6154    -0.3104 0.592 0.000 0.408
#> GSM648644     2  0.5785     0.6091 0.000 0.668 0.332
#> GSM648652     3  0.6252     0.5897 0.444 0.000 0.556
#> GSM648653     1  0.6154    -0.3104 0.592 0.000 0.408
#> GSM648658     3  0.6252     0.5897 0.444 0.000 0.556
#> GSM648659     2  0.6026     0.2085 0.000 0.624 0.376
#> GSM648662     2  0.7283     0.2102 0.460 0.512 0.028
#> GSM648665     2  0.7240     0.2504 0.432 0.540 0.028
#> GSM648666     1  0.6154    -0.3104 0.592 0.000 0.408
#> GSM648680     3  0.6260     0.5807 0.448 0.000 0.552
#> GSM648684     1  0.1163     0.3091 0.972 0.000 0.028
#> GSM648709     2  0.6416     0.1938 0.008 0.616 0.376
#> GSM648719     1  0.6154    -0.3104 0.592 0.000 0.408
#> GSM648627     1  0.0000     0.3273 1.000 0.000 0.000
#> GSM648637     2  0.6204     0.5853 0.000 0.576 0.424
#> GSM648638     2  0.5706     0.6082 0.000 0.680 0.320
#> GSM648641     1  0.9806    -0.2455 0.408 0.244 0.348
#> GSM648672     2  0.6215     0.5844 0.000 0.572 0.428
#> GSM648674     2  0.6168     0.5859 0.000 0.588 0.412
#> GSM648703     2  0.6252     0.5844 0.000 0.556 0.444
#> GSM648631     1  0.9806    -0.2455 0.408 0.244 0.348
#> GSM648669     2  0.6154     0.5858 0.000 0.592 0.408
#> GSM648671     2  0.6154     0.5858 0.000 0.592 0.408
#> GSM648678     2  0.5785     0.6091 0.000 0.668 0.332
#> GSM648679     2  0.6154     0.5858 0.000 0.592 0.408
#> GSM648681     2  0.5785     0.4849 0.000 0.668 0.332
#> GSM648686     1  0.9946    -0.3003 0.368 0.284 0.348
#> GSM648689     1  0.9806    -0.2455 0.408 0.244 0.348
#> GSM648690     1  0.9806    -0.2455 0.408 0.244 0.348
#> GSM648691     1  0.9806    -0.2455 0.408 0.244 0.348
#> GSM648693     1  0.9806    -0.2455 0.408 0.244 0.348
#> GSM648700     3  0.6291    -0.5348 0.000 0.468 0.532
#> GSM648630     1  0.9806    -0.2455 0.408 0.244 0.348
#> GSM648632     1  0.9806    -0.2455 0.408 0.244 0.348
#> GSM648639     2  0.5706     0.6082 0.000 0.680 0.320
#> GSM648640     1  0.9806    -0.2455 0.408 0.244 0.348
#> GSM648668     2  0.6305     0.5726 0.000 0.516 0.484
#> GSM648676     3  0.6302    -0.5433 0.000 0.480 0.520
#> GSM648692     1  0.9806    -0.2455 0.408 0.244 0.348
#> GSM648694     1  0.9806    -0.2455 0.408 0.244 0.348
#> GSM648699     2  0.6252     0.5844 0.000 0.556 0.444
#> GSM648701     2  0.6280     0.5812 0.000 0.540 0.460
#> GSM648673     2  0.6154     0.5858 0.000 0.592 0.408
#> GSM648677     2  0.6260     0.5839 0.000 0.552 0.448
#> GSM648687     2  0.5733     0.6082 0.000 0.676 0.324
#> GSM648688     1  0.9806    -0.2455 0.408 0.244 0.348

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM648605     2  0.5666    -0.0578 0.000 0.616 0.348 0.036
#> GSM648618     1  0.7393     0.2907 0.612 0.228 0.116 0.044
#> GSM648620     2  0.2830     0.5938 0.040 0.900 0.000 0.060
#> GSM648646     2  0.1389     0.6640 0.000 0.952 0.048 0.000
#> GSM648649     1  0.2984     0.6968 0.888 0.028 0.000 0.084
#> GSM648675     2  0.7238     0.6026 0.112 0.624 0.040 0.224
#> GSM648682     2  0.0921     0.6569 0.000 0.972 0.028 0.000
#> GSM648698     2  0.0376     0.6471 0.000 0.992 0.004 0.004
#> GSM648708     2  0.2739     0.5980 0.036 0.904 0.000 0.060
#> GSM648628     1  0.8447    -0.1003 0.400 0.032 0.208 0.360
#> GSM648595     1  0.5010     0.5867 0.772 0.120 0.000 0.108
#> GSM648635     1  0.2530     0.7028 0.896 0.004 0.000 0.100
#> GSM648645     1  0.0707     0.7267 0.980 0.000 0.000 0.020
#> GSM648647     2  0.2483     0.6075 0.032 0.916 0.000 0.052
#> GSM648667     1  0.5941     0.3571 0.652 0.276 0.000 0.072
#> GSM648695     2  0.2739     0.5980 0.036 0.904 0.000 0.060
#> GSM648704     2  0.1557     0.6653 0.000 0.944 0.056 0.000
#> GSM648706     2  0.3583     0.5598 0.000 0.816 0.180 0.004
#> GSM648593     1  0.2542     0.7028 0.904 0.012 0.000 0.084
#> GSM648594     1  0.3239     0.6879 0.880 0.068 0.000 0.052
#> GSM648600     1  0.0469     0.7277 0.988 0.000 0.000 0.012
#> GSM648621     1  0.1576     0.7211 0.948 0.004 0.000 0.048
#> GSM648622     1  0.0921     0.7264 0.972 0.000 0.000 0.028
#> GSM648623     1  0.1576     0.7211 0.948 0.004 0.000 0.048
#> GSM648636     1  0.2984     0.6960 0.888 0.028 0.000 0.084
#> GSM648655     1  0.2882     0.6974 0.892 0.024 0.000 0.084
#> GSM648661     1  0.6932     0.2797 0.532 0.004 0.104 0.360
#> GSM648664     1  0.6228     0.3521 0.572 0.000 0.064 0.364
#> GSM648683     1  0.6228     0.3521 0.572 0.000 0.064 0.364
#> GSM648685     1  0.6163     0.3582 0.576 0.000 0.060 0.364
#> GSM648702     1  0.2412     0.7046 0.908 0.008 0.000 0.084
#> GSM648597     1  0.4185     0.6360 0.832 0.120 0.012 0.036
#> GSM648603     1  0.1398     0.7227 0.956 0.004 0.000 0.040
#> GSM648606     3  0.6217     0.3919 0.012 0.340 0.604 0.044
#> GSM648613     3  0.6004     0.4107 0.008 0.336 0.616 0.040
#> GSM648619     1  0.6921     0.2846 0.536 0.004 0.104 0.356
#> GSM648654     3  0.9232    -0.5920 0.076 0.320 0.336 0.268
#> GSM648663     3  0.7377     0.2463 0.068 0.332 0.552 0.048
#> GSM648670     2  0.6864     0.6546 0.024 0.584 0.068 0.324
#> GSM648707     2  0.8046     0.5590 0.016 0.456 0.208 0.320
#> GSM648615     2  0.1182     0.6475 0.000 0.968 0.016 0.016
#> GSM648643     2  0.0188     0.6485 0.000 0.996 0.004 0.000
#> GSM648650     1  0.5875     0.4492 0.692 0.204 0.000 0.104
#> GSM648656     2  0.1557     0.6653 0.000 0.944 0.056 0.000
#> GSM648715     2  0.2565     0.6045 0.032 0.912 0.000 0.056
#> GSM648598     1  0.0592     0.7269 0.984 0.000 0.000 0.016
#> GSM648601     1  0.0000     0.7269 1.000 0.000 0.000 0.000
#> GSM648602     1  0.1022     0.7262 0.968 0.000 0.000 0.032
#> GSM648604     1  0.6574     0.3099 0.548 0.000 0.088 0.364
#> GSM648614     3  0.7344     0.2483 0.064 0.340 0.548 0.048
#> GSM648624     1  0.0817     0.7261 0.976 0.000 0.000 0.024
#> GSM648625     1  0.2101     0.7042 0.928 0.060 0.000 0.012
#> GSM648629     1  0.6562     0.3141 0.552 0.000 0.088 0.360
#> GSM648634     1  0.0592     0.7269 0.984 0.000 0.000 0.016
#> GSM648648     1  0.2412     0.7046 0.908 0.008 0.000 0.084
#> GSM648651     1  0.1022     0.7262 0.968 0.000 0.000 0.032
#> GSM648657     1  0.0707     0.7267 0.980 0.000 0.000 0.020
#> GSM648660     1  0.0707     0.7267 0.980 0.000 0.000 0.020
#> GSM648697     1  0.0707     0.7267 0.980 0.000 0.000 0.020
#> GSM648710     1  0.6574     0.3099 0.548 0.000 0.088 0.364
#> GSM648591     1  0.6491     0.4573 0.700 0.164 0.096 0.040
#> GSM648592     1  0.4001     0.6490 0.844 0.112 0.016 0.028
#> GSM648607     1  0.6614     0.3078 0.548 0.000 0.092 0.360
#> GSM648611     3  0.8125    -0.2391 0.312 0.080 0.516 0.092
#> GSM648612     1  0.7398     0.1790 0.496 0.008 0.136 0.360
#> GSM648616     2  0.7739     0.5591 0.004 0.456 0.208 0.332
#> GSM648617     1  0.2861     0.7071 0.908 0.032 0.012 0.048
#> GSM648626     1  0.1489     0.7219 0.952 0.004 0.000 0.044
#> GSM648711     1  0.6773     0.3070 0.548 0.004 0.092 0.356
#> GSM648712     1  0.6932     0.2795 0.532 0.004 0.104 0.360
#> GSM648713     1  0.6932     0.2795 0.532 0.004 0.104 0.360
#> GSM648714     3  0.6140     0.3982 0.012 0.340 0.608 0.040
#> GSM648716     1  0.6932     0.2795 0.532 0.004 0.104 0.360
#> GSM648717     3  0.6120     0.4103 0.008 0.328 0.616 0.048
#> GSM648590     2  0.6327    -0.0173 0.444 0.496 0.000 0.060
#> GSM648596     2  0.0000     0.6471 0.000 1.000 0.000 0.000
#> GSM648642     2  0.2565     0.6045 0.032 0.912 0.000 0.056
#> GSM648696     1  0.3157     0.6465 0.852 0.144 0.000 0.004
#> GSM648705     1  0.2984     0.6968 0.888 0.028 0.000 0.084
#> GSM648718     2  0.1296     0.6395 0.028 0.964 0.004 0.004
#> GSM648599     1  0.1022     0.7262 0.968 0.000 0.000 0.032
#> GSM648608     1  0.6574     0.3099 0.548 0.000 0.088 0.364
#> GSM648609     1  0.6574     0.3099 0.548 0.000 0.088 0.364
#> GSM648610     1  0.6308     0.3615 0.580 0.004 0.060 0.356
#> GSM648633     1  0.0592     0.7269 0.984 0.000 0.000 0.016
#> GSM648644     2  0.1557     0.6653 0.000 0.944 0.056 0.000
#> GSM648652     1  0.2466     0.7040 0.900 0.004 0.000 0.096
#> GSM648653     1  0.0921     0.7267 0.972 0.000 0.000 0.028
#> GSM648658     1  0.2266     0.7060 0.912 0.004 0.000 0.084
#> GSM648659     2  0.2036     0.6213 0.032 0.936 0.000 0.032
#> GSM648662     4  0.9376     0.8589 0.152 0.312 0.148 0.388
#> GSM648665     4  0.9227     0.8461 0.100 0.340 0.188 0.372
#> GSM648666     1  0.0707     0.7263 0.980 0.000 0.000 0.020
#> GSM648680     1  0.2530     0.7028 0.896 0.004 0.000 0.100
#> GSM648684     1  0.6176     0.3575 0.572 0.000 0.060 0.368
#> GSM648709     2  0.2644     0.6011 0.032 0.908 0.000 0.060
#> GSM648719     1  0.0592     0.7269 0.984 0.000 0.000 0.016
#> GSM648627     1  0.6932     0.2795 0.532 0.004 0.104 0.360
#> GSM648637     2  0.6064     0.6290 0.000 0.512 0.044 0.444
#> GSM648638     2  0.7830     0.4976 0.000 0.404 0.272 0.324
#> GSM648641     3  0.0000     0.7229 0.000 0.000 1.000 0.000
#> GSM648672     2  0.5681     0.6503 0.000 0.568 0.028 0.404
#> GSM648674     2  0.6211     0.6197 0.000 0.488 0.052 0.460
#> GSM648703     2  0.5511     0.6634 0.000 0.620 0.028 0.352
#> GSM648631     3  0.0000     0.7229 0.000 0.000 1.000 0.000
#> GSM648669     2  0.6214     0.6148 0.000 0.476 0.052 0.472
#> GSM648671     2  0.6214     0.6148 0.000 0.476 0.052 0.472
#> GSM648678     2  0.1743     0.6663 0.000 0.940 0.056 0.004
#> GSM648679     2  0.6214     0.6148 0.000 0.476 0.052 0.472
#> GSM648681     2  0.2992     0.6732 0.008 0.892 0.016 0.084
#> GSM648686     3  0.1118     0.6935 0.000 0.036 0.964 0.000
#> GSM648689     3  0.4353     0.5461 0.000 0.232 0.756 0.012
#> GSM648690     3  0.0000     0.7229 0.000 0.000 1.000 0.000
#> GSM648691     3  0.0000     0.7229 0.000 0.000 1.000 0.000
#> GSM648693     3  0.0000     0.7229 0.000 0.000 1.000 0.000
#> GSM648700     2  0.5980     0.6740 0.008 0.644 0.048 0.300
#> GSM648630     3  0.0000     0.7229 0.000 0.000 1.000 0.000
#> GSM648632     3  0.0000     0.7229 0.000 0.000 1.000 0.000
#> GSM648639     2  0.7845     0.4713 0.000 0.404 0.304 0.292
#> GSM648640     3  0.0188     0.7200 0.000 0.000 0.996 0.004
#> GSM648668     2  0.5686     0.6583 0.000 0.592 0.032 0.376
#> GSM648676     2  0.5720     0.6742 0.000 0.652 0.052 0.296
#> GSM648692     3  0.0000     0.7229 0.000 0.000 1.000 0.000
#> GSM648694     3  0.0000     0.7229 0.000 0.000 1.000 0.000
#> GSM648699     2  0.5543     0.6621 0.000 0.612 0.028 0.360
#> GSM648701     2  0.5478     0.6650 0.000 0.628 0.028 0.344
#> GSM648673     2  0.6214     0.6148 0.000 0.476 0.052 0.472
#> GSM648677     2  0.5511     0.6634 0.000 0.620 0.028 0.352
#> GSM648687     2  0.7899     0.5463 0.008 0.448 0.216 0.328
#> GSM648688     3  0.0000     0.7229 0.000 0.000 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM648605     5  0.6778    -0.1846 0.000 0.316 0.216 0.008 0.460
#> GSM648618     1  0.5071     0.6665 0.724 0.048 0.000 0.192 0.036
#> GSM648620     2  0.6114     0.5187 0.152 0.536 0.000 0.000 0.312
#> GSM648646     2  0.1341     0.7537 0.000 0.944 0.000 0.056 0.000
#> GSM648649     1  0.0693     0.8313 0.980 0.008 0.000 0.000 0.012
#> GSM648675     4  0.6421     0.3760 0.244 0.160 0.000 0.576 0.020
#> GSM648682     2  0.2813     0.7416 0.000 0.876 0.000 0.084 0.040
#> GSM648698     2  0.2304     0.7614 0.000 0.908 0.000 0.048 0.044
#> GSM648708     2  0.4237     0.7072 0.152 0.772 0.000 0.000 0.076
#> GSM648628     5  0.4537     0.5752 0.396 0.012 0.000 0.000 0.592
#> GSM648595     1  0.5163     0.6405 0.712 0.136 0.000 0.144 0.008
#> GSM648635     1  0.0404     0.8316 0.988 0.000 0.000 0.000 0.012
#> GSM648645     1  0.0000     0.8330 1.000 0.000 0.000 0.000 0.000
#> GSM648647     2  0.5163     0.6634 0.152 0.692 0.000 0.000 0.156
#> GSM648667     1  0.4327     0.3752 0.632 0.360 0.000 0.000 0.008
#> GSM648695     2  0.4277     0.7045 0.156 0.768 0.000 0.000 0.076
#> GSM648704     2  0.1341     0.7537 0.000 0.944 0.000 0.056 0.000
#> GSM648706     2  0.2835     0.6795 0.000 0.868 0.112 0.016 0.004
#> GSM648593     1  0.0566     0.8310 0.984 0.004 0.000 0.000 0.012
#> GSM648594     1  0.3289     0.7358 0.816 0.008 0.000 0.172 0.004
#> GSM648600     1  0.1251     0.8231 0.956 0.000 0.000 0.008 0.036
#> GSM648621     1  0.3953     0.7227 0.784 0.000 0.000 0.168 0.048
#> GSM648622     1  0.1357     0.8167 0.948 0.000 0.000 0.004 0.048
#> GSM648623     1  0.3953     0.7227 0.784 0.000 0.000 0.168 0.048
#> GSM648636     1  0.1106     0.8233 0.964 0.024 0.000 0.000 0.012
#> GSM648655     1  0.0912     0.8275 0.972 0.016 0.000 0.000 0.012
#> GSM648661     5  0.4201     0.5824 0.408 0.000 0.000 0.000 0.592
#> GSM648664     5  0.4210     0.5777 0.412 0.000 0.000 0.000 0.588
#> GSM648683     5  0.4201     0.5824 0.408 0.000 0.000 0.000 0.592
#> GSM648685     1  0.4291    -0.3571 0.536 0.000 0.000 0.000 0.464
#> GSM648702     1  0.0566     0.8310 0.984 0.004 0.000 0.000 0.012
#> GSM648597     1  0.4690     0.6551 0.724 0.036 0.000 0.224 0.016
#> GSM648603     1  0.3953     0.7227 0.784 0.000 0.000 0.168 0.048
#> GSM648606     5  0.5156    -0.0798 0.000 0.060 0.320 0.000 0.620
#> GSM648613     5  0.5203    -0.1026 0.000 0.060 0.332 0.000 0.608
#> GSM648619     5  0.4201     0.5824 0.408 0.000 0.000 0.000 0.592
#> GSM648654     5  0.3823     0.2461 0.008 0.060 0.112 0.000 0.820
#> GSM648663     5  0.5156    -0.0798 0.000 0.060 0.320 0.000 0.620
#> GSM648670     4  0.2900     0.7092 0.020 0.092 0.000 0.876 0.012
#> GSM648707     4  0.2656     0.7122 0.000 0.064 0.028 0.896 0.012
#> GSM648615     2  0.3840     0.7042 0.000 0.808 0.000 0.116 0.076
#> GSM648643     2  0.2221     0.7609 0.000 0.912 0.000 0.052 0.036
#> GSM648650     1  0.3885     0.5721 0.724 0.268 0.000 0.000 0.008
#> GSM648656     2  0.1341     0.7537 0.000 0.944 0.000 0.056 0.000
#> GSM648715     2  0.4509     0.6979 0.152 0.752 0.000 0.000 0.096
#> GSM648598     1  0.0000     0.8330 1.000 0.000 0.000 0.000 0.000
#> GSM648601     1  0.0865     0.8275 0.972 0.000 0.000 0.004 0.024
#> GSM648602     1  0.1357     0.8167 0.948 0.000 0.000 0.004 0.048
#> GSM648604     5  0.4210     0.5777 0.412 0.000 0.000 0.000 0.588
#> GSM648614     5  0.5421    -0.0915 0.000 0.060 0.320 0.008 0.612
#> GSM648624     1  0.1357     0.8167 0.948 0.000 0.000 0.004 0.048
#> GSM648625     1  0.2928     0.7757 0.872 0.092 0.000 0.004 0.032
#> GSM648629     5  0.4210     0.5777 0.412 0.000 0.000 0.000 0.588
#> GSM648634     1  0.0162     0.8329 0.996 0.000 0.000 0.004 0.000
#> GSM648648     1  0.0566     0.8310 0.984 0.004 0.000 0.000 0.012
#> GSM648651     1  0.1357     0.8167 0.948 0.000 0.000 0.004 0.048
#> GSM648657     1  0.0000     0.8330 1.000 0.000 0.000 0.000 0.000
#> GSM648660     1  0.0000     0.8330 1.000 0.000 0.000 0.000 0.000
#> GSM648697     1  0.0324     0.8332 0.992 0.000 0.000 0.004 0.004
#> GSM648710     5  0.4201     0.5824 0.408 0.000 0.000 0.000 0.592
#> GSM648591     1  0.4910     0.6614 0.724 0.036 0.000 0.208 0.032
#> GSM648592     1  0.4530     0.6893 0.752 0.036 0.000 0.192 0.020
#> GSM648607     5  0.4201     0.5824 0.408 0.000 0.000 0.000 0.592
#> GSM648611     1  0.7391    -0.4346 0.384 0.044 0.192 0.000 0.380
#> GSM648612     5  0.4331     0.5811 0.400 0.004 0.000 0.000 0.596
#> GSM648616     4  0.2597     0.7127 0.000 0.060 0.040 0.896 0.004
#> GSM648617     1  0.4291     0.7047 0.760 0.004 0.000 0.188 0.048
#> GSM648626     1  0.4136     0.7049 0.764 0.000 0.000 0.188 0.048
#> GSM648711     5  0.4201     0.5824 0.408 0.000 0.000 0.000 0.592
#> GSM648712     5  0.4341     0.5819 0.404 0.004 0.000 0.000 0.592
#> GSM648713     5  0.4331     0.5811 0.400 0.004 0.000 0.000 0.596
#> GSM648714     5  0.5478    -0.0972 0.000 0.064 0.320 0.008 0.608
#> GSM648716     5  0.4201     0.5824 0.408 0.000 0.000 0.000 0.592
#> GSM648717     5  0.5113    -0.0856 0.000 0.056 0.324 0.000 0.620
#> GSM648590     1  0.5726     0.5280 0.640 0.240 0.000 0.108 0.012
#> GSM648596     2  0.2804     0.7551 0.004 0.884 0.000 0.068 0.044
#> GSM648642     2  0.4119     0.7084 0.152 0.780 0.000 0.000 0.068
#> GSM648696     1  0.2179     0.7633 0.888 0.112 0.000 0.000 0.000
#> GSM648705     1  0.1012     0.8251 0.968 0.020 0.000 0.000 0.012
#> GSM648718     2  0.3288     0.7640 0.028 0.868 0.000 0.060 0.044
#> GSM648599     1  0.2149     0.8093 0.916 0.000 0.000 0.036 0.048
#> GSM648608     5  0.4210     0.5777 0.412 0.000 0.000 0.000 0.588
#> GSM648609     5  0.4201     0.5824 0.408 0.000 0.000 0.000 0.592
#> GSM648610     5  0.4219     0.5698 0.416 0.000 0.000 0.000 0.584
#> GSM648633     1  0.0000     0.8330 1.000 0.000 0.000 0.000 0.000
#> GSM648644     2  0.1341     0.7537 0.000 0.944 0.000 0.056 0.000
#> GSM648652     1  0.0404     0.8316 0.988 0.000 0.000 0.000 0.012
#> GSM648653     1  0.1205     0.8210 0.956 0.000 0.000 0.004 0.040
#> GSM648658     1  0.0404     0.8316 0.988 0.000 0.000 0.000 0.012
#> GSM648659     2  0.3649     0.7099 0.152 0.808 0.000 0.000 0.040
#> GSM648662     5  0.4219     0.3509 0.056 0.060 0.068 0.000 0.816
#> GSM648665     5  0.3209     0.2914 0.008 0.060 0.068 0.000 0.864
#> GSM648666     1  0.0771     0.8286 0.976 0.000 0.000 0.004 0.020
#> GSM648680     1  0.0404     0.8316 0.988 0.000 0.000 0.000 0.012
#> GSM648684     5  0.4304     0.4277 0.484 0.000 0.000 0.000 0.516
#> GSM648709     2  0.5583     0.6282 0.152 0.640 0.000 0.000 0.208
#> GSM648719     1  0.0162     0.8329 0.996 0.000 0.000 0.004 0.000
#> GSM648627     5  0.4341     0.5819 0.404 0.004 0.000 0.000 0.592
#> GSM648637     4  0.1608     0.7213 0.000 0.072 0.000 0.928 0.000
#> GSM648638     4  0.6510     0.4585 0.000 0.256 0.256 0.488 0.000
#> GSM648641     3  0.0000     0.9800 0.000 0.000 1.000 0.000 0.000
#> GSM648672     4  0.2280     0.7077 0.000 0.120 0.000 0.880 0.000
#> GSM648674     4  0.0510     0.7196 0.000 0.016 0.000 0.984 0.000
#> GSM648703     4  0.4291     0.3587 0.000 0.464 0.000 0.536 0.000
#> GSM648631     3  0.0000     0.9800 0.000 0.000 1.000 0.000 0.000
#> GSM648669     4  0.0162     0.7172 0.000 0.004 0.000 0.996 0.000
#> GSM648671     4  0.0162     0.7172 0.000 0.004 0.000 0.996 0.000
#> GSM648678     2  0.1478     0.7487 0.000 0.936 0.000 0.064 0.000
#> GSM648679     4  0.0162     0.7172 0.000 0.004 0.000 0.996 0.000
#> GSM648681     2  0.5839     0.2079 0.072 0.576 0.000 0.336 0.016
#> GSM648686     3  0.0162     0.9750 0.000 0.004 0.996 0.000 0.000
#> GSM648689     3  0.4221     0.7466 0.000 0.044 0.764 0.004 0.188
#> GSM648690     3  0.0000     0.9800 0.000 0.000 1.000 0.000 0.000
#> GSM648691     3  0.0000     0.9800 0.000 0.000 1.000 0.000 0.000
#> GSM648693     3  0.0000     0.9800 0.000 0.000 1.000 0.000 0.000
#> GSM648700     4  0.5508     0.5310 0.096 0.264 0.000 0.636 0.004
#> GSM648630     3  0.0000     0.9800 0.000 0.000 1.000 0.000 0.000
#> GSM648632     3  0.0000     0.9800 0.000 0.000 1.000 0.000 0.000
#> GSM648639     4  0.5104     0.4738 0.000 0.068 0.284 0.648 0.000
#> GSM648640     3  0.0000     0.9800 0.000 0.000 1.000 0.000 0.000
#> GSM648668     4  0.3612     0.6335 0.000 0.268 0.000 0.732 0.000
#> GSM648676     4  0.4449     0.3269 0.000 0.484 0.000 0.512 0.004
#> GSM648692     3  0.0000     0.9800 0.000 0.000 1.000 0.000 0.000
#> GSM648694     3  0.0000     0.9800 0.000 0.000 1.000 0.000 0.000
#> GSM648699     4  0.4268     0.4010 0.000 0.444 0.000 0.556 0.000
#> GSM648701     4  0.4297     0.3398 0.000 0.472 0.000 0.528 0.000
#> GSM648673     4  0.0162     0.7172 0.000 0.004 0.000 0.996 0.000
#> GSM648677     4  0.4287     0.3641 0.000 0.460 0.000 0.540 0.000
#> GSM648687     4  0.6693     0.5911 0.036 0.104 0.076 0.664 0.120
#> GSM648688     3  0.0000     0.9800 0.000 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4 p5    p6
#> GSM648605     2  0.7613     0.3619 0.228 0.360 0.156 0.004 NA 0.000
#> GSM648618     6  0.7358     0.4415 0.164 0.248 0.000 0.024 NA 0.464
#> GSM648620     2  0.7668     0.4762 0.232 0.384 0.000 0.108 NA 0.020
#> GSM648646     2  0.2048     0.3544 0.000 0.880 0.000 0.120 NA 0.000
#> GSM648649     6  0.3996     0.6669 0.004 0.008 0.000 0.000 NA 0.636
#> GSM648675     2  0.7692     0.0473 0.012 0.392 0.000 0.184 NA 0.176
#> GSM648682     2  0.2476     0.3844 0.004 0.880 0.000 0.092 NA 0.000
#> GSM648698     2  0.4187     0.5355 0.076 0.756 0.000 0.012 NA 0.000
#> GSM648708     2  0.7007     0.5309 0.116 0.512 0.000 0.108 NA 0.020
#> GSM648628     1  0.4818     0.6694 0.636 0.000 0.000 0.004 NA 0.284
#> GSM648595     6  0.6377     0.3953 0.008 0.276 0.000 0.040 NA 0.528
#> GSM648635     6  0.3647     0.6647 0.000 0.000 0.000 0.000 NA 0.640
#> GSM648645     6  0.2743     0.7006 0.000 0.008 0.000 0.000 NA 0.828
#> GSM648647     2  0.7342     0.5153 0.164 0.464 0.000 0.108 NA 0.020
#> GSM648667     2  0.6178     0.0956 0.004 0.396 0.000 0.000 NA 0.264
#> GSM648695     2  0.7076     0.5353 0.100 0.524 0.000 0.108 NA 0.036
#> GSM648704     2  0.2178     0.3384 0.000 0.868 0.000 0.132 NA 0.000
#> GSM648706     2  0.4140     0.4412 0.000 0.784 0.036 0.076 NA 0.000
#> GSM648593     6  0.3717     0.6557 0.000 0.000 0.000 0.000 NA 0.616
#> GSM648594     6  0.5237     0.6406 0.004 0.140 0.000 0.000 NA 0.616
#> GSM648600     6  0.1701     0.6784 0.072 0.000 0.000 0.000 NA 0.920
#> GSM648621     6  0.2562     0.6182 0.172 0.000 0.000 0.000 NA 0.828
#> GSM648622     6  0.2092     0.6472 0.124 0.000 0.000 0.000 NA 0.876
#> GSM648623     6  0.2730     0.5932 0.192 0.000 0.000 0.000 NA 0.808
#> GSM648636     6  0.3706     0.6566 0.000 0.000 0.000 0.000 NA 0.620
#> GSM648655     6  0.3717     0.6551 0.000 0.000 0.000 0.000 NA 0.616
#> GSM648661     1  0.3508     0.6843 0.704 0.000 0.000 0.000 NA 0.292
#> GSM648664     1  0.3547     0.6838 0.696 0.000 0.000 0.000 NA 0.300
#> GSM648683     1  0.3547     0.6838 0.696 0.000 0.000 0.000 NA 0.300
#> GSM648685     1  0.3699     0.6515 0.660 0.000 0.000 0.000 NA 0.336
#> GSM648702     6  0.3695     0.6594 0.000 0.000 0.000 0.000 NA 0.624
#> GSM648597     6  0.6996     0.3957 0.080 0.312 0.000 0.084 NA 0.484
#> GSM648603     6  0.2597     0.6084 0.176 0.000 0.000 0.000 NA 0.824
#> GSM648606     1  0.6131     0.2563 0.632 0.040 0.176 0.040 NA 0.000
#> GSM648613     1  0.6742    -0.0279 0.508 0.040 0.300 0.040 NA 0.000
#> GSM648619     1  0.4291     0.6815 0.664 0.000 0.000 0.000 NA 0.292
#> GSM648654     1  0.4549     0.4114 0.784 0.040 0.036 0.040 NA 0.004
#> GSM648663     1  0.5947     0.2922 0.656 0.040 0.152 0.040 NA 0.000
#> GSM648670     4  0.5608     0.4494 0.008 0.348 0.000 0.520 NA 0.000
#> GSM648707     4  0.6368     0.3529 0.000 0.316 0.032 0.468 NA 0.000
#> GSM648615     2  0.2876     0.5208 0.016 0.844 0.000 0.008 NA 0.000
#> GSM648643     2  0.0858     0.4583 0.004 0.968 0.000 0.028 NA 0.000
#> GSM648650     6  0.6243     0.2035 0.004 0.320 0.000 0.000 NA 0.360
#> GSM648656     2  0.2260     0.3264 0.000 0.860 0.000 0.140 NA 0.000
#> GSM648715     2  0.7174     0.5241 0.140 0.492 0.000 0.108 NA 0.020
#> GSM648598     6  0.0146     0.6970 0.000 0.000 0.000 0.000 NA 0.996
#> GSM648601     6  0.1387     0.6875 0.068 0.000 0.000 0.000 NA 0.932
#> GSM648602     6  0.1714     0.6618 0.092 0.000 0.000 0.000 NA 0.908
#> GSM648604     1  0.3547     0.6838 0.696 0.000 0.000 0.000 NA 0.300
#> GSM648614     1  0.6036     0.2836 0.652 0.052 0.156 0.040 NA 0.000
#> GSM648624     6  0.2562     0.6122 0.172 0.000 0.000 0.000 NA 0.828
#> GSM648625     6  0.3477     0.6537 0.112 0.040 0.000 0.000 NA 0.824
#> GSM648629     1  0.3547     0.6838 0.696 0.000 0.000 0.000 NA 0.300
#> GSM648634     6  0.0000     0.6960 0.000 0.000 0.000 0.000 NA 1.000
#> GSM648648     6  0.3659     0.6635 0.000 0.000 0.000 0.000 NA 0.636
#> GSM648651     6  0.1714     0.6618 0.092 0.000 0.000 0.000 NA 0.908
#> GSM648657     6  0.3098     0.7002 0.000 0.024 0.000 0.000 NA 0.812
#> GSM648660     6  0.2454     0.7006 0.000 0.000 0.000 0.000 NA 0.840
#> GSM648697     6  0.0806     0.6984 0.020 0.000 0.000 0.000 NA 0.972
#> GSM648710     1  0.3547     0.6838 0.696 0.000 0.000 0.000 NA 0.300
#> GSM648591     6  0.7669     0.3219 0.096 0.296 0.000 0.076 NA 0.432
#> GSM648592     6  0.5455     0.5812 0.096 0.216 0.000 0.012 NA 0.652
#> GSM648607     1  0.3409     0.6841 0.700 0.000 0.000 0.000 NA 0.300
#> GSM648611     1  0.7247     0.5217 0.480 0.020 0.176 0.004 NA 0.244
#> GSM648612     1  0.4291     0.6815 0.664 0.000 0.000 0.000 NA 0.292
#> GSM648616     4  0.6232     0.4006 0.000 0.312 0.040 0.504 NA 0.000
#> GSM648617     6  0.4290     0.6006 0.180 0.076 0.000 0.000 NA 0.736
#> GSM648626     6  0.3104     0.6060 0.184 0.016 0.000 0.000 NA 0.800
#> GSM648711     1  0.4326     0.6796 0.656 0.000 0.000 0.000 NA 0.300
#> GSM648712     1  0.4291     0.6815 0.664 0.000 0.000 0.000 NA 0.292
#> GSM648713     1  0.4291     0.6815 0.664 0.000 0.000 0.000 NA 0.292
#> GSM648714     1  0.6828     0.1743 0.572 0.080 0.176 0.040 NA 0.000
#> GSM648716     1  0.4291     0.6815 0.664 0.000 0.000 0.000 NA 0.292
#> GSM648717     1  0.6265     0.2255 0.612 0.040 0.196 0.040 NA 0.000
#> GSM648590     6  0.6514     0.1988 0.008 0.316 0.000 0.020 NA 0.448
#> GSM648596     2  0.3090     0.5094 0.004 0.828 0.000 0.028 NA 0.000
#> GSM648642     2  0.6849     0.5339 0.104 0.536 0.000 0.108 NA 0.020
#> GSM648696     6  0.5109     0.6272 0.012 0.136 0.000 0.000 NA 0.660
#> GSM648705     6  0.3672     0.6621 0.000 0.000 0.000 0.000 NA 0.632
#> GSM648718     2  0.2631     0.5232 0.004 0.860 0.000 0.008 NA 0.004
#> GSM648599     6  0.2135     0.6447 0.128 0.000 0.000 0.000 NA 0.872
#> GSM648608     1  0.3547     0.6838 0.696 0.000 0.000 0.000 NA 0.300
#> GSM648609     1  0.3547     0.6838 0.696 0.000 0.000 0.000 NA 0.300
#> GSM648610     1  0.3482     0.6674 0.684 0.000 0.000 0.000 NA 0.316
#> GSM648633     6  0.2482     0.7017 0.004 0.000 0.000 0.000 NA 0.848
#> GSM648644     2  0.2219     0.3304 0.000 0.864 0.000 0.136 NA 0.000
#> GSM648652     6  0.3647     0.6647 0.000 0.000 0.000 0.000 NA 0.640
#> GSM648653     6  0.1714     0.6618 0.092 0.000 0.000 0.000 NA 0.908
#> GSM648658     6  0.3717     0.6549 0.000 0.000 0.000 0.000 NA 0.616
#> GSM648659     2  0.5310     0.5410 0.004 0.644 0.000 0.088 NA 0.024
#> GSM648662     1  0.4936     0.4247 0.764 0.040 0.036 0.040 NA 0.016
#> GSM648665     1  0.4723     0.4054 0.772 0.048 0.036 0.040 NA 0.004
#> GSM648666     6  0.1806     0.6742 0.088 0.000 0.000 0.000 NA 0.908
#> GSM648680     6  0.3659     0.6638 0.000 0.000 0.000 0.000 NA 0.636
#> GSM648684     1  0.3636     0.6687 0.676 0.000 0.000 0.000 NA 0.320
#> GSM648709     2  0.7506     0.5051 0.188 0.428 0.000 0.108 NA 0.020
#> GSM648719     6  0.0260     0.6951 0.008 0.000 0.000 0.000 NA 0.992
#> GSM648627     1  0.4291     0.6815 0.664 0.000 0.000 0.000 NA 0.292
#> GSM648637     4  0.3772     0.7384 0.000 0.296 0.008 0.692 NA 0.000
#> GSM648638     2  0.6587    -0.2533 0.000 0.452 0.136 0.344 NA 0.000
#> GSM648641     3  0.0260     0.9785 0.000 0.000 0.992 0.000 NA 0.000
#> GSM648672     4  0.3652     0.7322 0.000 0.324 0.004 0.672 NA 0.000
#> GSM648674     4  0.2562     0.7308 0.000 0.172 0.000 0.828 NA 0.000
#> GSM648703     4  0.3727     0.7088 0.000 0.388 0.000 0.612 NA 0.000
#> GSM648631     3  0.0000     0.9833 0.000 0.000 1.000 0.000 NA 0.000
#> GSM648669     4  0.2340     0.7256 0.000 0.148 0.000 0.852 NA 0.000
#> GSM648671     4  0.2340     0.7256 0.000 0.148 0.000 0.852 NA 0.000
#> GSM648678     2  0.3076     0.0779 0.000 0.760 0.000 0.240 NA 0.000
#> GSM648679     4  0.2340     0.7256 0.000 0.148 0.000 0.852 NA 0.000
#> GSM648681     2  0.5438     0.3370 0.004 0.672 0.000 0.160 NA 0.044
#> GSM648686     3  0.1458     0.9402 0.000 0.016 0.948 0.016 NA 0.000
#> GSM648689     3  0.2733     0.8565 0.080 0.056 0.864 0.000 NA 0.000
#> GSM648690     3  0.0000     0.9833 0.000 0.000 1.000 0.000 NA 0.000
#> GSM648691     3  0.0000     0.9833 0.000 0.000 1.000 0.000 NA 0.000
#> GSM648693     3  0.0000     0.9833 0.000 0.000 1.000 0.000 NA 0.000
#> GSM648700     2  0.6258    -0.3320 0.000 0.412 0.004 0.408 NA 0.020
#> GSM648630     3  0.0000     0.9833 0.000 0.000 1.000 0.000 NA 0.000
#> GSM648632     3  0.0146     0.9803 0.004 0.000 0.996 0.000 NA 0.000
#> GSM648639     4  0.6827     0.2581 0.000 0.312 0.220 0.412 NA 0.000
#> GSM648640     3  0.0000     0.9833 0.000 0.000 1.000 0.000 NA 0.000
#> GSM648668     4  0.3684     0.7186 0.000 0.372 0.000 0.628 NA 0.000
#> GSM648676     4  0.4591     0.6688 0.000 0.408 0.000 0.552 NA 0.000
#> GSM648692     3  0.0000     0.9833 0.000 0.000 1.000 0.000 NA 0.000
#> GSM648694     3  0.0000     0.9833 0.000 0.000 1.000 0.000 NA 0.000
#> GSM648699     4  0.3727     0.7088 0.000 0.388 0.000 0.612 NA 0.000
#> GSM648701     4  0.3765     0.6934 0.000 0.404 0.000 0.596 NA 0.000
#> GSM648673     4  0.2340     0.7256 0.000 0.148 0.000 0.852 NA 0.000
#> GSM648677     4  0.3706     0.7141 0.000 0.380 0.000 0.620 NA 0.000
#> GSM648687     2  0.8601    -0.1480 0.112 0.372 0.048 0.264 NA 0.044
#> GSM648688     3  0.0000     0.9833 0.000 0.000 1.000 0.000 NA 0.000

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-SD-mclust-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-SD-mclust-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-SD-mclust-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-SD-mclust-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-SD-mclust-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-SD-mclust-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-SD-mclust-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-SD-mclust-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-SD-mclust-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-SD-mclust-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-SD-mclust-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-SD-mclust-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-SD-mclust-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-SD-mclust-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-SD-mclust-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-SD-mclust-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-SD-mclust-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-SD-mclust-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-SD-mclust-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-SD-mclust-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk SD-mclust-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-SD-mclust-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-SD-mclust-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-SD-mclust-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-SD-mclust-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-SD-mclust-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk SD-mclust-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>             n disease.state(p) development.stage(p) other(p) k
#> SD:mclust 126         5.12e-09               0.0103 2.99e-13 2
#> SD:mclust  37         2.00e-03               0.2270 3.72e-05 3
#> SD:mclust  94         1.30e-10               0.0301 8.18e-13 4
#> SD:mclust 107         3.06e-18               0.1884 3.37e-25 5
#> SD:mclust  95         1.14e-19               0.1297 1.34e-26 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


SD:NMF*

The object with results only for a single top-value method and a single partition method can be extracted as:

res = res_list["SD", "NMF"]
# you can also extract it by
# res = res_list["SD:NMF"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 130 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#>   Subgroups are detected by 'NMF' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 3.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk SD-NMF-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk SD-NMF-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.387           0.525       0.821         0.4671 0.565   0.565
#> 3 3 0.903           0.918       0.965         0.3144 0.654   0.468
#> 4 4 0.810           0.812       0.914         0.1129 0.881   0.709
#> 5 5 0.864           0.859       0.937         0.0741 0.889   0.676
#> 6 6 0.676           0.646       0.817         0.0713 0.901   0.656

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 3

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM648605     2  0.9954    0.21665 0.460 0.540
#> GSM648618     2  0.9866    0.03516 0.432 0.568
#> GSM648620     2  0.0000    0.73697 0.000 1.000
#> GSM648646     2  0.9954    0.21665 0.460 0.540
#> GSM648649     2  0.0000    0.73697 0.000 1.000
#> GSM648675     2  0.0000    0.73697 0.000 1.000
#> GSM648682     2  0.2043    0.71746 0.032 0.968
#> GSM648698     2  0.9635    0.31634 0.388 0.612
#> GSM648708     2  0.0000    0.73697 0.000 1.000
#> GSM648628     1  0.9954    0.27372 0.540 0.460
#> GSM648595     2  0.0000    0.73697 0.000 1.000
#> GSM648635     2  0.0000    0.73697 0.000 1.000
#> GSM648645     2  0.0000    0.73697 0.000 1.000
#> GSM648647     2  0.0000    0.73697 0.000 1.000
#> GSM648667     2  0.0000    0.73697 0.000 1.000
#> GSM648695     2  0.0000    0.73697 0.000 1.000
#> GSM648704     2  0.9954    0.21665 0.460 0.540
#> GSM648706     2  0.9954    0.21665 0.460 0.540
#> GSM648593     2  0.0000    0.73697 0.000 1.000
#> GSM648594     2  0.0000    0.73697 0.000 1.000
#> GSM648600     2  0.0000    0.73697 0.000 1.000
#> GSM648621     2  0.9427    0.25261 0.360 0.640
#> GSM648622     2  0.7453    0.53954 0.212 0.788
#> GSM648623     1  0.9970    0.25525 0.532 0.468
#> GSM648636     2  0.0000    0.73697 0.000 1.000
#> GSM648655     2  0.0000    0.73697 0.000 1.000
#> GSM648661     2  0.9754    0.11663 0.408 0.592
#> GSM648664     2  0.8443    0.44151 0.272 0.728
#> GSM648683     2  0.7528    0.53395 0.216 0.784
#> GSM648685     2  0.5842    0.62446 0.140 0.860
#> GSM648702     2  0.0000    0.73697 0.000 1.000
#> GSM648597     2  0.2603    0.70979 0.044 0.956
#> GSM648603     2  0.9286    0.29138 0.344 0.656
#> GSM648606     1  0.0000    0.71172 1.000 0.000
#> GSM648613     1  0.0000    0.71172 1.000 0.000
#> GSM648619     1  0.9954    0.27372 0.540 0.460
#> GSM648654     1  0.9996    0.20306 0.512 0.488
#> GSM648663     1  0.0376    0.70995 0.996 0.004
#> GSM648670     2  0.0000    0.73697 0.000 1.000
#> GSM648707     1  0.8555    0.48943 0.720 0.280
#> GSM648615     2  0.9754    0.28902 0.408 0.592
#> GSM648643     2  0.0376    0.73510 0.004 0.996
#> GSM648650     2  0.0000    0.73697 0.000 1.000
#> GSM648656     2  0.9954    0.21665 0.460 0.540
#> GSM648715     2  0.0000    0.73697 0.000 1.000
#> GSM648598     2  0.0000    0.73697 0.000 1.000
#> GSM648601     2  0.0000    0.73697 0.000 1.000
#> GSM648602     2  0.6148    0.61176 0.152 0.848
#> GSM648604     2  0.9608    0.18939 0.384 0.616
#> GSM648614     1  0.8608    0.37841 0.716 0.284
#> GSM648624     2  0.7602    0.52808 0.220 0.780
#> GSM648625     2  0.0000    0.73697 0.000 1.000
#> GSM648629     2  0.9608    0.18939 0.384 0.616
#> GSM648634     2  0.0000    0.73697 0.000 1.000
#> GSM648648     2  0.0000    0.73697 0.000 1.000
#> GSM648651     2  0.7056    0.56528 0.192 0.808
#> GSM648657     2  0.0000    0.73697 0.000 1.000
#> GSM648660     2  0.0000    0.73697 0.000 1.000
#> GSM648697     2  0.0000    0.73697 0.000 1.000
#> GSM648710     2  0.9686    0.15423 0.396 0.604
#> GSM648591     1  0.9963    0.26485 0.536 0.464
#> GSM648592     2  0.0000    0.73697 0.000 1.000
#> GSM648607     1  0.9996    0.20306 0.512 0.488
#> GSM648611     1  0.9522    0.38417 0.628 0.372
#> GSM648612     1  0.9954    0.27372 0.540 0.460
#> GSM648616     1  0.0000    0.71172 1.000 0.000
#> GSM648617     2  0.0672    0.73273 0.008 0.992
#> GSM648626     2  0.9977   -0.10711 0.472 0.528
#> GSM648711     1  0.9954    0.27372 0.540 0.460
#> GSM648712     1  0.9954    0.27372 0.540 0.460
#> GSM648713     1  0.9954    0.27372 0.540 0.460
#> GSM648714     1  0.0000    0.71172 1.000 0.000
#> GSM648716     1  0.9954    0.27372 0.540 0.460
#> GSM648717     1  0.0672    0.70795 0.992 0.008
#> GSM648590     2  0.0000    0.73697 0.000 1.000
#> GSM648596     2  0.9393    0.35878 0.356 0.644
#> GSM648642     2  0.0000    0.73697 0.000 1.000
#> GSM648696     2  0.0000    0.73697 0.000 1.000
#> GSM648705     2  0.0000    0.73697 0.000 1.000
#> GSM648718     2  0.0000    0.73697 0.000 1.000
#> GSM648599     2  0.7528    0.53405 0.216 0.784
#> GSM648608     2  0.9661    0.16620 0.392 0.608
#> GSM648609     2  0.8327    0.45601 0.264 0.736
#> GSM648610     2  0.9552    0.21119 0.376 0.624
#> GSM648633     2  0.0000    0.73697 0.000 1.000
#> GSM648644     2  0.9954    0.21665 0.460 0.540
#> GSM648652     2  0.0000    0.73697 0.000 1.000
#> GSM648653     2  0.2423    0.71252 0.040 0.960
#> GSM648658     2  0.0000    0.73697 0.000 1.000
#> GSM648659     2  0.1184    0.72810 0.016 0.984
#> GSM648662     2  0.9323    0.28198 0.348 0.652
#> GSM648665     2  0.7376    0.54482 0.208 0.792
#> GSM648666     2  0.3114    0.70067 0.056 0.944
#> GSM648680     2  0.0000    0.73697 0.000 1.000
#> GSM648684     2  0.7453    0.53954 0.212 0.788
#> GSM648709     2  0.4815    0.65772 0.104 0.896
#> GSM648719     2  0.0000    0.73697 0.000 1.000
#> GSM648627     1  0.9954    0.27372 0.540 0.460
#> GSM648637     2  0.9954    0.21665 0.460 0.540
#> GSM648638     1  0.0000    0.71172 1.000 0.000
#> GSM648641     1  0.0000    0.71172 1.000 0.000
#> GSM648672     2  0.9954    0.21665 0.460 0.540
#> GSM648674     2  0.9954    0.21665 0.460 0.540
#> GSM648703     2  0.9954    0.21665 0.460 0.540
#> GSM648631     1  0.0000    0.71172 1.000 0.000
#> GSM648669     1  0.7376    0.47328 0.792 0.208
#> GSM648671     1  0.7745    0.44383 0.772 0.228
#> GSM648678     2  0.9954    0.21665 0.460 0.540
#> GSM648679     1  0.9881    0.01309 0.564 0.436
#> GSM648681     2  0.9795    0.27791 0.416 0.584
#> GSM648686     1  0.0000    0.71172 1.000 0.000
#> GSM648689     1  0.0000    0.71172 1.000 0.000
#> GSM648690     1  0.0000    0.71172 1.000 0.000
#> GSM648691     1  0.0000    0.71172 1.000 0.000
#> GSM648693     1  0.0000    0.71172 1.000 0.000
#> GSM648700     2  0.0376    0.73509 0.004 0.996
#> GSM648630     1  0.0000    0.71172 1.000 0.000
#> GSM648632     1  0.0000    0.71172 1.000 0.000
#> GSM648639     1  0.0000    0.71172 1.000 0.000
#> GSM648640     1  0.0000    0.71172 1.000 0.000
#> GSM648668     2  0.9954    0.21665 0.460 0.540
#> GSM648676     2  0.0376    0.73509 0.004 0.996
#> GSM648692     1  0.0000    0.71172 1.000 0.000
#> GSM648694     1  0.0000    0.71172 1.000 0.000
#> GSM648699     2  0.9954    0.21665 0.460 0.540
#> GSM648701     2  0.9954    0.21665 0.460 0.540
#> GSM648673     1  0.9896    0.00216 0.560 0.440
#> GSM648677     2  0.9954    0.21665 0.460 0.540
#> GSM648687     1  0.0000    0.71172 1.000 0.000
#> GSM648688     1  0.0000    0.71172 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM648605     2  0.0237      0.943 0.000 0.996 0.004
#> GSM648618     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648620     1  0.5216      0.639 0.740 0.260 0.000
#> GSM648646     2  0.0237      0.943 0.000 0.996 0.004
#> GSM648649     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648675     1  0.2066      0.917 0.940 0.060 0.000
#> GSM648682     2  0.2625      0.880 0.084 0.916 0.000
#> GSM648698     2  0.0237      0.943 0.000 0.996 0.004
#> GSM648708     1  0.0237      0.964 0.996 0.004 0.000
#> GSM648628     3  0.0892      0.948 0.020 0.000 0.980
#> GSM648595     1  0.0424      0.961 0.992 0.008 0.000
#> GSM648635     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648645     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648647     2  0.0592      0.939 0.012 0.988 0.000
#> GSM648667     1  0.0592      0.958 0.988 0.012 0.000
#> GSM648695     1  0.3816      0.815 0.852 0.148 0.000
#> GSM648704     2  0.0237      0.943 0.000 0.996 0.004
#> GSM648706     2  0.0237      0.943 0.000 0.996 0.004
#> GSM648593     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648594     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648600     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648621     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648622     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648623     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648636     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648655     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648661     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648664     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648683     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648685     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648702     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648597     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648603     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648606     3  0.0000      0.966 0.000 0.000 1.000
#> GSM648613     3  0.0000      0.966 0.000 0.000 1.000
#> GSM648619     1  0.1411      0.937 0.964 0.000 0.036
#> GSM648654     1  0.6274      0.181 0.544 0.000 0.456
#> GSM648663     3  0.1163      0.938 0.028 0.000 0.972
#> GSM648670     2  0.7236      0.346 0.392 0.576 0.032
#> GSM648707     3  0.0237      0.963 0.004 0.000 0.996
#> GSM648615     2  0.0237      0.943 0.000 0.996 0.004
#> GSM648643     2  0.3192      0.851 0.112 0.888 0.000
#> GSM648650     1  0.1411      0.938 0.964 0.036 0.000
#> GSM648656     2  0.0237      0.943 0.000 0.996 0.004
#> GSM648715     2  0.2066      0.903 0.060 0.940 0.000
#> GSM648598     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648601     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648602     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648604     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648614     1  0.3587      0.871 0.892 0.088 0.020
#> GSM648624     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648625     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648629     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648634     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648648     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648651     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648657     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648660     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648697     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648710     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648591     1  0.3879      0.816 0.848 0.000 0.152
#> GSM648592     1  0.0237      0.964 0.996 0.004 0.000
#> GSM648607     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648611     3  0.0237      0.963 0.004 0.000 0.996
#> GSM648612     3  0.0592      0.957 0.012 0.000 0.988
#> GSM648616     3  0.0237      0.963 0.004 0.000 0.996
#> GSM648617     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648626     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648711     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648712     1  0.5988      0.437 0.632 0.000 0.368
#> GSM648713     1  0.4178      0.789 0.828 0.000 0.172
#> GSM648714     3  0.4974      0.692 0.000 0.236 0.764
#> GSM648716     1  0.6079      0.383 0.612 0.000 0.388
#> GSM648717     3  0.0000      0.966 0.000 0.000 1.000
#> GSM648590     1  0.0237      0.964 0.996 0.004 0.000
#> GSM648596     2  0.0829      0.939 0.012 0.984 0.004
#> GSM648642     2  0.1753      0.913 0.048 0.952 0.000
#> GSM648696     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648705     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648718     2  0.4399      0.758 0.188 0.812 0.000
#> GSM648599     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648608     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648609     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648610     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648633     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648644     2  0.0237      0.943 0.000 0.996 0.004
#> GSM648652     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648653     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648658     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648659     2  0.0000      0.943 0.000 1.000 0.000
#> GSM648662     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648665     1  0.0237      0.963 0.996 0.000 0.004
#> GSM648666     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648680     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648684     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648709     2  0.0475      0.942 0.004 0.992 0.004
#> GSM648719     1  0.0000      0.966 1.000 0.000 0.000
#> GSM648627     3  0.6180      0.246 0.416 0.000 0.584
#> GSM648637     2  0.4452      0.769 0.000 0.808 0.192
#> GSM648638     3  0.0000      0.966 0.000 0.000 1.000
#> GSM648641     3  0.0000      0.966 0.000 0.000 1.000
#> GSM648672     2  0.0000      0.943 0.000 1.000 0.000
#> GSM648674     2  0.0424      0.941 0.000 0.992 0.008
#> GSM648703     2  0.0000      0.943 0.000 1.000 0.000
#> GSM648631     3  0.0000      0.966 0.000 0.000 1.000
#> GSM648669     2  0.4452      0.766 0.000 0.808 0.192
#> GSM648671     2  0.1031      0.932 0.000 0.976 0.024
#> GSM648678     2  0.0237      0.943 0.000 0.996 0.004
#> GSM648679     2  0.0592      0.939 0.000 0.988 0.012
#> GSM648681     2  0.0000      0.943 0.000 1.000 0.000
#> GSM648686     3  0.0000      0.966 0.000 0.000 1.000
#> GSM648689     3  0.0000      0.966 0.000 0.000 1.000
#> GSM648690     3  0.0000      0.966 0.000 0.000 1.000
#> GSM648691     3  0.0000      0.966 0.000 0.000 1.000
#> GSM648693     3  0.0000      0.966 0.000 0.000 1.000
#> GSM648700     2  0.3879      0.802 0.152 0.848 0.000
#> GSM648630     3  0.0000      0.966 0.000 0.000 1.000
#> GSM648632     3  0.0000      0.966 0.000 0.000 1.000
#> GSM648639     3  0.0000      0.966 0.000 0.000 1.000
#> GSM648640     3  0.0000      0.966 0.000 0.000 1.000
#> GSM648668     2  0.0237      0.942 0.000 0.996 0.004
#> GSM648676     2  0.0592      0.939 0.012 0.988 0.000
#> GSM648692     3  0.0000      0.966 0.000 0.000 1.000
#> GSM648694     3  0.0000      0.966 0.000 0.000 1.000
#> GSM648699     2  0.0000      0.943 0.000 1.000 0.000
#> GSM648701     2  0.0000      0.943 0.000 1.000 0.000
#> GSM648673     2  0.0237      0.942 0.000 0.996 0.004
#> GSM648677     2  0.0000      0.943 0.000 1.000 0.000
#> GSM648687     3  0.0000      0.966 0.000 0.000 1.000
#> GSM648688     3  0.0000      0.966 0.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM648605     2  0.0336      0.811 0.000 0.992 0.008 0.000
#> GSM648618     1  0.1792      0.907 0.932 0.000 0.000 0.068
#> GSM648620     2  0.4008      0.595 0.244 0.756 0.000 0.000
#> GSM648646     2  0.0000      0.814 0.000 1.000 0.000 0.000
#> GSM648649     1  0.0336      0.945 0.992 0.000 0.000 0.008
#> GSM648675     4  0.4095      0.650 0.192 0.016 0.000 0.792
#> GSM648682     2  0.1211      0.802 0.040 0.960 0.000 0.000
#> GSM648698     2  0.0000      0.814 0.000 1.000 0.000 0.000
#> GSM648708     1  0.5000     -0.123 0.504 0.496 0.000 0.000
#> GSM648628     3  0.1109      0.868 0.028 0.000 0.968 0.004
#> GSM648595     4  0.4103      0.578 0.256 0.000 0.000 0.744
#> GSM648635     1  0.0188      0.946 0.996 0.000 0.000 0.004
#> GSM648645     1  0.0336      0.945 0.992 0.000 0.000 0.008
#> GSM648647     2  0.0000      0.814 0.000 1.000 0.000 0.000
#> GSM648667     1  0.2216      0.870 0.908 0.092 0.000 0.000
#> GSM648695     2  0.4985      0.182 0.468 0.532 0.000 0.000
#> GSM648704     2  0.0000      0.814 0.000 1.000 0.000 0.000
#> GSM648706     2  0.0000      0.814 0.000 1.000 0.000 0.000
#> GSM648593     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM648594     1  0.3266      0.812 0.832 0.000 0.000 0.168
#> GSM648600     1  0.0336      0.945 0.992 0.000 0.000 0.008
#> GSM648621     1  0.0336      0.945 0.992 0.000 0.000 0.008
#> GSM648622     1  0.0188      0.946 0.996 0.000 0.000 0.004
#> GSM648623     1  0.3400      0.801 0.820 0.000 0.000 0.180
#> GSM648636     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM648655     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM648661     1  0.1022      0.925 0.968 0.000 0.032 0.000
#> GSM648664     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM648683     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM648685     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM648702     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM648597     1  0.4989      0.250 0.528 0.000 0.000 0.472
#> GSM648603     1  0.2704      0.858 0.876 0.000 0.000 0.124
#> GSM648606     3  0.0188      0.889 0.000 0.004 0.996 0.000
#> GSM648613     3  0.0000      0.892 0.000 0.000 1.000 0.000
#> GSM648619     1  0.1305      0.921 0.960 0.000 0.036 0.004
#> GSM648654     1  0.4916      0.274 0.576 0.000 0.424 0.000
#> GSM648663     3  0.0524      0.885 0.008 0.004 0.988 0.000
#> GSM648670     4  0.0000      0.771 0.000 0.000 0.000 1.000
#> GSM648707     3  0.4522      0.588 0.000 0.000 0.680 0.320
#> GSM648615     2  0.0188      0.813 0.000 0.996 0.000 0.004
#> GSM648643     2  0.2921      0.712 0.140 0.860 0.000 0.000
#> GSM648650     1  0.1557      0.905 0.944 0.056 0.000 0.000
#> GSM648656     2  0.0000      0.814 0.000 1.000 0.000 0.000
#> GSM648715     2  0.1389      0.798 0.048 0.952 0.000 0.000
#> GSM648598     1  0.0188      0.946 0.996 0.000 0.000 0.004
#> GSM648601     1  0.0188      0.946 0.996 0.000 0.000 0.004
#> GSM648602     1  0.0188      0.946 0.996 0.000 0.000 0.004
#> GSM648604     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM648614     2  0.5950      0.574 0.156 0.696 0.148 0.000
#> GSM648624     1  0.0188      0.946 0.996 0.000 0.000 0.004
#> GSM648625     1  0.0188      0.946 0.996 0.000 0.000 0.004
#> GSM648629     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM648634     1  0.0188      0.946 0.996 0.000 0.000 0.004
#> GSM648648     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM648651     1  0.0188      0.946 0.996 0.000 0.000 0.004
#> GSM648657     1  0.1792      0.906 0.932 0.000 0.000 0.068
#> GSM648660     1  0.0336      0.945 0.992 0.000 0.000 0.008
#> GSM648697     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM648710     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM648591     4  0.4919      0.539 0.200 0.000 0.048 0.752
#> GSM648592     1  0.4382      0.641 0.704 0.000 0.000 0.296
#> GSM648607     1  0.0188      0.946 0.996 0.000 0.000 0.004
#> GSM648611     3  0.0000      0.892 0.000 0.000 1.000 0.000
#> GSM648612     3  0.1610      0.867 0.016 0.000 0.952 0.032
#> GSM648616     3  0.4564      0.575 0.000 0.000 0.672 0.328
#> GSM648617     1  0.1474      0.918 0.948 0.000 0.000 0.052
#> GSM648626     1  0.3942      0.731 0.764 0.000 0.000 0.236
#> GSM648711     1  0.0188      0.946 0.996 0.000 0.000 0.004
#> GSM648712     3  0.5816      0.362 0.392 0.000 0.572 0.036
#> GSM648713     1  0.3402      0.789 0.832 0.000 0.164 0.004
#> GSM648714     2  0.4406      0.494 0.000 0.700 0.300 0.000
#> GSM648716     3  0.4955      0.198 0.444 0.000 0.556 0.000
#> GSM648717     3  0.0000      0.892 0.000 0.000 1.000 0.000
#> GSM648590     1  0.0524      0.941 0.988 0.008 0.000 0.004
#> GSM648596     2  0.2334      0.764 0.088 0.908 0.000 0.004
#> GSM648642     2  0.0707      0.812 0.020 0.980 0.000 0.000
#> GSM648696     1  0.0188      0.946 0.996 0.000 0.000 0.004
#> GSM648705     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM648718     2  0.5807      0.441 0.312 0.636 0.000 0.052
#> GSM648599     1  0.0336      0.945 0.992 0.000 0.000 0.008
#> GSM648608     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM648609     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM648610     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM648633     1  0.0336      0.945 0.992 0.000 0.000 0.008
#> GSM648644     2  0.0000      0.814 0.000 1.000 0.000 0.000
#> GSM648652     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM648653     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM648658     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM648659     2  0.6709      0.380 0.212 0.616 0.000 0.172
#> GSM648662     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM648665     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM648666     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM648680     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM648684     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM648709     2  0.0336      0.814 0.008 0.992 0.000 0.000
#> GSM648719     1  0.0188      0.946 0.996 0.000 0.000 0.004
#> GSM648627     3  0.4679      0.435 0.352 0.000 0.648 0.000
#> GSM648637     4  0.2224      0.776 0.000 0.040 0.032 0.928
#> GSM648638     3  0.2011      0.843 0.000 0.000 0.920 0.080
#> GSM648641     3  0.0000      0.892 0.000 0.000 1.000 0.000
#> GSM648672     4  0.4331      0.724 0.000 0.288 0.000 0.712
#> GSM648674     4  0.0707      0.781 0.000 0.020 0.000 0.980
#> GSM648703     4  0.4431      0.711 0.000 0.304 0.000 0.696
#> GSM648631     3  0.0000      0.892 0.000 0.000 1.000 0.000
#> GSM648669     4  0.0779      0.780 0.000 0.016 0.004 0.980
#> GSM648671     4  0.0592      0.779 0.000 0.016 0.000 0.984
#> GSM648678     2  0.0188      0.811 0.000 0.996 0.000 0.004
#> GSM648679     4  0.0336      0.775 0.000 0.008 0.000 0.992
#> GSM648681     4  0.2973      0.786 0.000 0.144 0.000 0.856
#> GSM648686     3  0.0707      0.879 0.000 0.000 0.980 0.020
#> GSM648689     3  0.0000      0.892 0.000 0.000 1.000 0.000
#> GSM648690     3  0.0000      0.892 0.000 0.000 1.000 0.000
#> GSM648691     3  0.0000      0.892 0.000 0.000 1.000 0.000
#> GSM648693     3  0.0000      0.892 0.000 0.000 1.000 0.000
#> GSM648700     4  0.4539      0.732 0.008 0.272 0.000 0.720
#> GSM648630     3  0.0000      0.892 0.000 0.000 1.000 0.000
#> GSM648632     3  0.0000      0.892 0.000 0.000 1.000 0.000
#> GSM648639     3  0.4277      0.639 0.000 0.000 0.720 0.280
#> GSM648640     3  0.0000      0.892 0.000 0.000 1.000 0.000
#> GSM648668     4  0.3219      0.780 0.000 0.164 0.000 0.836
#> GSM648676     4  0.4431      0.711 0.000 0.304 0.000 0.696
#> GSM648692     3  0.0000      0.892 0.000 0.000 1.000 0.000
#> GSM648694     3  0.0000      0.892 0.000 0.000 1.000 0.000
#> GSM648699     4  0.4431      0.711 0.000 0.304 0.000 0.696
#> GSM648701     4  0.4431      0.711 0.000 0.304 0.000 0.696
#> GSM648673     4  0.2216      0.789 0.000 0.092 0.000 0.908
#> GSM648677     4  0.4431      0.711 0.000 0.304 0.000 0.696
#> GSM648687     3  0.0000      0.892 0.000 0.000 1.000 0.000
#> GSM648688     3  0.0000      0.892 0.000 0.000 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM648605     2  0.0000     0.8911 0.000 1.000 0.000 0.000 0.000
#> GSM648618     1  0.0404     0.9489 0.988 0.000 0.000 0.000 0.012
#> GSM648620     2  0.2966     0.7305 0.184 0.816 0.000 0.000 0.000
#> GSM648646     2  0.0000     0.8911 0.000 1.000 0.000 0.000 0.000
#> GSM648649     1  0.0404     0.9489 0.988 0.000 0.000 0.000 0.012
#> GSM648675     4  0.0566     0.9472 0.012 0.000 0.000 0.984 0.004
#> GSM648682     2  0.2127     0.8211 0.108 0.892 0.000 0.000 0.000
#> GSM648698     2  0.0000     0.8911 0.000 1.000 0.000 0.000 0.000
#> GSM648708     1  0.3612     0.6205 0.732 0.268 0.000 0.000 0.000
#> GSM648628     3  0.1668     0.8634 0.028 0.000 0.940 0.000 0.032
#> GSM648595     4  0.1041     0.9276 0.032 0.000 0.000 0.964 0.004
#> GSM648635     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648645     1  0.0162     0.9519 0.996 0.000 0.000 0.000 0.004
#> GSM648647     2  0.0000     0.8911 0.000 1.000 0.000 0.000 0.000
#> GSM648667     1  0.1908     0.8793 0.908 0.092 0.000 0.000 0.000
#> GSM648695     2  0.4287     0.1707 0.460 0.540 0.000 0.000 0.000
#> GSM648704     2  0.0000     0.8911 0.000 1.000 0.000 0.000 0.000
#> GSM648706     2  0.0000     0.8911 0.000 1.000 0.000 0.000 0.000
#> GSM648593     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648594     1  0.1893     0.9065 0.928 0.000 0.000 0.048 0.024
#> GSM648600     1  0.0880     0.9368 0.968 0.000 0.000 0.000 0.032
#> GSM648621     1  0.1981     0.9078 0.924 0.000 0.000 0.028 0.048
#> GSM648622     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648623     5  0.1544     0.8301 0.068 0.000 0.000 0.000 0.932
#> GSM648636     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648655     1  0.0794     0.9352 0.972 0.000 0.000 0.028 0.000
#> GSM648661     1  0.2732     0.7965 0.840 0.000 0.160 0.000 0.000
#> GSM648664     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648683     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648685     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648702     1  0.0162     0.9514 0.996 0.000 0.000 0.004 0.000
#> GSM648597     5  0.0693     0.8357 0.008 0.000 0.000 0.012 0.980
#> GSM648603     5  0.3395     0.6573 0.236 0.000 0.000 0.000 0.764
#> GSM648606     3  0.5373     0.5783 0.000 0.236 0.652 0.000 0.112
#> GSM648613     5  0.3621     0.6894 0.000 0.020 0.192 0.000 0.788
#> GSM648619     1  0.4109     0.5673 0.700 0.000 0.012 0.000 0.288
#> GSM648654     3  0.4219     0.2566 0.416 0.000 0.584 0.000 0.000
#> GSM648663     3  0.5233     0.6373 0.004 0.164 0.696 0.000 0.136
#> GSM648670     4  0.1043     0.9444 0.000 0.000 0.000 0.960 0.040
#> GSM648707     5  0.0000     0.8371 0.000 0.000 0.000 0.000 1.000
#> GSM648615     2  0.0000     0.8911 0.000 1.000 0.000 0.000 0.000
#> GSM648643     2  0.2813     0.7535 0.168 0.832 0.000 0.000 0.000
#> GSM648650     1  0.1043     0.9278 0.960 0.040 0.000 0.000 0.000
#> GSM648656     2  0.0000     0.8911 0.000 1.000 0.000 0.000 0.000
#> GSM648715     2  0.2020     0.8286 0.100 0.900 0.000 0.000 0.000
#> GSM648598     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648601     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648602     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648604     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648614     2  0.1195     0.8744 0.028 0.960 0.012 0.000 0.000
#> GSM648624     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648625     1  0.0510     0.9472 0.984 0.000 0.000 0.000 0.016
#> GSM648629     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648634     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648648     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648651     1  0.0162     0.9516 0.996 0.000 0.000 0.000 0.004
#> GSM648657     1  0.1043     0.9323 0.960 0.000 0.000 0.000 0.040
#> GSM648660     1  0.0404     0.9489 0.988 0.000 0.000 0.000 0.012
#> GSM648697     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648710     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648591     5  0.0609     0.8350 0.000 0.000 0.000 0.020 0.980
#> GSM648592     5  0.0703     0.8427 0.024 0.000 0.000 0.000 0.976
#> GSM648607     1  0.0404     0.9489 0.988 0.000 0.000 0.000 0.012
#> GSM648611     3  0.0162     0.8942 0.000 0.000 0.996 0.000 0.004
#> GSM648612     5  0.1792     0.8087 0.000 0.000 0.084 0.000 0.916
#> GSM648616     5  0.0000     0.8371 0.000 0.000 0.000 0.000 1.000
#> GSM648617     5  0.1478     0.8322 0.064 0.000 0.000 0.000 0.936
#> GSM648626     5  0.2732     0.7428 0.160 0.000 0.000 0.000 0.840
#> GSM648711     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648712     5  0.2592     0.8207 0.052 0.000 0.056 0.000 0.892
#> GSM648713     5  0.4306     0.5374 0.328 0.000 0.012 0.000 0.660
#> GSM648714     2  0.0404     0.8829 0.000 0.988 0.012 0.000 0.000
#> GSM648716     1  0.4547     0.6650 0.736 0.000 0.192 0.000 0.072
#> GSM648717     3  0.1197     0.8710 0.000 0.000 0.952 0.000 0.048
#> GSM648590     1  0.1410     0.9124 0.940 0.000 0.000 0.060 0.000
#> GSM648596     2  0.3010     0.7583 0.000 0.824 0.000 0.004 0.172
#> GSM648642     2  0.2605     0.7796 0.148 0.852 0.000 0.000 0.000
#> GSM648696     1  0.0324     0.9509 0.992 0.004 0.000 0.000 0.004
#> GSM648705     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648718     1  0.6289     0.2768 0.536 0.236 0.000 0.228 0.000
#> GSM648599     1  0.1270     0.9214 0.948 0.000 0.000 0.000 0.052
#> GSM648608     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648609     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648610     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648633     1  0.0510     0.9472 0.984 0.000 0.000 0.000 0.016
#> GSM648644     2  0.0000     0.8911 0.000 1.000 0.000 0.000 0.000
#> GSM648652     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648653     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648658     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648659     1  0.4444     0.4233 0.624 0.012 0.000 0.364 0.000
#> GSM648662     1  0.0324     0.9502 0.992 0.000 0.004 0.000 0.004
#> GSM648665     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648666     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648680     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648684     1  0.0000     0.9531 1.000 0.000 0.000 0.000 0.000
#> GSM648709     2  0.0000     0.8911 0.000 1.000 0.000 0.000 0.000
#> GSM648719     1  0.0404     0.9489 0.988 0.000 0.000 0.000 0.012
#> GSM648627     3  0.3395     0.5742 0.236 0.000 0.764 0.000 0.000
#> GSM648637     5  0.4249     0.0427 0.000 0.000 0.000 0.432 0.568
#> GSM648638     5  0.1168     0.8327 0.000 0.008 0.032 0.000 0.960
#> GSM648641     3  0.0794     0.8833 0.000 0.000 0.972 0.000 0.028
#> GSM648672     4  0.2230     0.9307 0.000 0.044 0.000 0.912 0.044
#> GSM648674     4  0.3074     0.8191 0.000 0.000 0.000 0.804 0.196
#> GSM648703     4  0.0000     0.9519 0.000 0.000 0.000 1.000 0.000
#> GSM648631     3  0.0000     0.8950 0.000 0.000 1.000 0.000 0.000
#> GSM648669     4  0.1121     0.9467 0.000 0.000 0.000 0.956 0.044
#> GSM648671     4  0.1043     0.9479 0.000 0.000 0.000 0.960 0.040
#> GSM648678     2  0.0000     0.8911 0.000 1.000 0.000 0.000 0.000
#> GSM648679     4  0.2690     0.8675 0.000 0.000 0.000 0.844 0.156
#> GSM648681     4  0.2719     0.9082 0.000 0.068 0.000 0.884 0.048
#> GSM648686     3  0.0404     0.8902 0.000 0.000 0.988 0.012 0.000
#> GSM648689     3  0.0000     0.8950 0.000 0.000 1.000 0.000 0.000
#> GSM648690     3  0.0000     0.8950 0.000 0.000 1.000 0.000 0.000
#> GSM648691     3  0.0000     0.8950 0.000 0.000 1.000 0.000 0.000
#> GSM648693     3  0.0000     0.8950 0.000 0.000 1.000 0.000 0.000
#> GSM648700     4  0.0162     0.9517 0.000 0.000 0.004 0.996 0.000
#> GSM648630     3  0.0162     0.8942 0.000 0.000 0.996 0.000 0.004
#> GSM648632     3  0.0000     0.8950 0.000 0.000 1.000 0.000 0.000
#> GSM648639     5  0.0609     0.8350 0.000 0.000 0.020 0.000 0.980
#> GSM648640     3  0.3177     0.7010 0.000 0.000 0.792 0.000 0.208
#> GSM648668     4  0.1764     0.9381 0.000 0.008 0.000 0.928 0.064
#> GSM648676     4  0.0000     0.9519 0.000 0.000 0.000 1.000 0.000
#> GSM648692     3  0.0162     0.8942 0.000 0.000 0.996 0.000 0.004
#> GSM648694     3  0.0000     0.8950 0.000 0.000 1.000 0.000 0.000
#> GSM648699     4  0.0162     0.9517 0.000 0.000 0.004 0.996 0.000
#> GSM648701     4  0.0162     0.9517 0.000 0.000 0.004 0.996 0.000
#> GSM648673     4  0.0404     0.9527 0.000 0.000 0.000 0.988 0.012
#> GSM648677     4  0.0566     0.9508 0.000 0.012 0.000 0.984 0.004
#> GSM648687     3  0.0510     0.8872 0.000 0.000 0.984 0.016 0.000
#> GSM648688     3  0.0162     0.8936 0.000 0.000 0.996 0.004 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM648605     2  0.1124    0.82643 0.008 0.956 0.000 0.000 0.000 0.036
#> GSM648618     6  0.5597    0.15171 0.380 0.000 0.000 0.016 0.096 0.508
#> GSM648620     2  0.4474    0.63616 0.188 0.704 0.000 0.000 0.000 0.108
#> GSM648646     2  0.0000    0.82951 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648649     1  0.2655    0.81637 0.848 0.000 0.000 0.008 0.004 0.140
#> GSM648675     6  0.2176    0.36039 0.024 0.000 0.000 0.080 0.000 0.896
#> GSM648682     2  0.3394    0.73987 0.052 0.804 0.000 0.000 0.000 0.144
#> GSM648698     2  0.1686    0.81496 0.012 0.924 0.000 0.000 0.000 0.064
#> GSM648708     1  0.3985    0.73777 0.760 0.100 0.000 0.000 0.000 0.140
#> GSM648628     6  0.5879    0.11304 0.004 0.000 0.228 0.000 0.260 0.508
#> GSM648595     6  0.4907    0.23593 0.100 0.000 0.000 0.248 0.004 0.648
#> GSM648635     1  0.2219    0.82293 0.864 0.000 0.000 0.000 0.000 0.136
#> GSM648645     1  0.2260    0.82060 0.860 0.000 0.000 0.000 0.000 0.140
#> GSM648647     2  0.0790    0.82678 0.032 0.968 0.000 0.000 0.000 0.000
#> GSM648667     1  0.2066    0.83966 0.904 0.072 0.000 0.000 0.000 0.024
#> GSM648695     2  0.3869   -0.01829 0.500 0.500 0.000 0.000 0.000 0.000
#> GSM648704     2  0.0000    0.82951 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648706     2  0.0000    0.82951 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648593     1  0.1858    0.83731 0.904 0.000 0.000 0.000 0.004 0.092
#> GSM648594     1  0.4702    0.70933 0.736 0.000 0.000 0.140 0.048 0.076
#> GSM648600     1  0.5393    0.36332 0.576 0.000 0.000 0.000 0.256 0.168
#> GSM648621     6  0.5835    0.09792 0.232 0.000 0.000 0.000 0.280 0.488
#> GSM648622     1  0.0520    0.85990 0.984 0.000 0.000 0.000 0.008 0.008
#> GSM648623     5  0.3679    0.53184 0.260 0.000 0.000 0.012 0.724 0.004
#> GSM648636     6  0.3854   -0.12451 0.464 0.000 0.000 0.000 0.000 0.536
#> GSM648655     6  0.4130    0.36161 0.300 0.000 0.000 0.024 0.004 0.672
#> GSM648661     1  0.3125    0.76730 0.828 0.000 0.136 0.000 0.004 0.032
#> GSM648664     1  0.0790    0.86014 0.968 0.000 0.000 0.000 0.000 0.032
#> GSM648683     1  0.1908    0.83245 0.900 0.000 0.000 0.000 0.004 0.096
#> GSM648685     1  0.0713    0.86131 0.972 0.000 0.000 0.000 0.000 0.028
#> GSM648702     1  0.1926    0.85411 0.912 0.000 0.000 0.020 0.000 0.068
#> GSM648597     5  0.2941    0.50908 0.000 0.000 0.000 0.220 0.780 0.000
#> GSM648603     5  0.4331    0.52795 0.192 0.000 0.000 0.008 0.728 0.072
#> GSM648606     6  0.7509   -0.07040 0.016 0.116 0.164 0.000 0.324 0.380
#> GSM648613     5  0.3207    0.65739 0.000 0.004 0.124 0.000 0.828 0.044
#> GSM648619     5  0.5621    0.33096 0.380 0.000 0.052 0.000 0.520 0.048
#> GSM648654     1  0.5698    0.17886 0.452 0.000 0.424 0.012 0.000 0.112
#> GSM648663     5  0.7481    0.36712 0.064 0.276 0.140 0.000 0.456 0.064
#> GSM648670     6  0.4066    0.20436 0.000 0.000 0.000 0.272 0.036 0.692
#> GSM648707     5  0.0937    0.68714 0.000 0.000 0.000 0.040 0.960 0.000
#> GSM648615     2  0.1471    0.81718 0.004 0.932 0.000 0.000 0.000 0.064
#> GSM648643     2  0.3202    0.70178 0.176 0.800 0.000 0.000 0.000 0.024
#> GSM648650     1  0.3236    0.79736 0.820 0.036 0.000 0.004 0.000 0.140
#> GSM648656     2  0.0000    0.82951 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648715     2  0.3198    0.59437 0.260 0.740 0.000 0.000 0.000 0.000
#> GSM648598     1  0.0935    0.85568 0.964 0.000 0.000 0.000 0.004 0.032
#> GSM648601     1  0.1531    0.85367 0.928 0.000 0.000 0.000 0.004 0.068
#> GSM648602     1  0.1958    0.84624 0.896 0.000 0.000 0.000 0.004 0.100
#> GSM648604     1  0.1204    0.85479 0.944 0.000 0.000 0.000 0.000 0.056
#> GSM648614     2  0.3527    0.73508 0.040 0.840 0.072 0.000 0.008 0.040
#> GSM648624     1  0.0777    0.85718 0.972 0.000 0.000 0.000 0.004 0.024
#> GSM648625     1  0.1720    0.84527 0.928 0.000 0.000 0.000 0.032 0.040
#> GSM648629     1  0.1765    0.84072 0.904 0.000 0.000 0.000 0.000 0.096
#> GSM648634     1  0.1610    0.85593 0.916 0.000 0.000 0.000 0.000 0.084
#> GSM648648     1  0.1327    0.85297 0.936 0.000 0.000 0.000 0.000 0.064
#> GSM648651     1  0.1434    0.84906 0.940 0.000 0.000 0.000 0.012 0.048
#> GSM648657     1  0.3329    0.75904 0.796 0.000 0.000 0.012 0.180 0.012
#> GSM648660     1  0.0717    0.86090 0.976 0.000 0.000 0.000 0.008 0.016
#> GSM648697     1  0.1007    0.85811 0.956 0.000 0.000 0.000 0.000 0.044
#> GSM648710     1  0.0713    0.85969 0.972 0.000 0.000 0.000 0.000 0.028
#> GSM648591     5  0.3879    0.42091 0.000 0.000 0.000 0.020 0.688 0.292
#> GSM648592     5  0.0937    0.68743 0.000 0.000 0.000 0.040 0.960 0.000
#> GSM648607     1  0.3505    0.80707 0.812 0.000 0.008 0.000 0.056 0.124
#> GSM648611     6  0.5223   -0.00148 0.000 0.000 0.436 0.000 0.092 0.472
#> GSM648612     5  0.3406    0.68013 0.036 0.000 0.068 0.000 0.840 0.056
#> GSM648616     5  0.1007    0.68621 0.000 0.000 0.000 0.044 0.956 0.000
#> GSM648617     5  0.3032    0.67952 0.104 0.000 0.000 0.000 0.840 0.056
#> GSM648626     5  0.1633    0.69594 0.044 0.000 0.000 0.024 0.932 0.000
#> GSM648711     1  0.1245    0.85401 0.952 0.000 0.000 0.000 0.016 0.032
#> GSM648712     5  0.3841    0.67333 0.052 0.000 0.064 0.000 0.812 0.072
#> GSM648713     5  0.4332    0.64550 0.144 0.000 0.060 0.000 0.760 0.036
#> GSM648714     2  0.1434    0.79895 0.000 0.940 0.048 0.000 0.012 0.000
#> GSM648716     5  0.6285    0.46822 0.176 0.000 0.216 0.000 0.552 0.056
#> GSM648717     3  0.4998    0.20384 0.008 0.000 0.552 0.000 0.384 0.056
#> GSM648590     6  0.4303    0.35027 0.132 0.004 0.000 0.124 0.000 0.740
#> GSM648596     2  0.2595    0.72956 0.004 0.836 0.000 0.000 0.160 0.000
#> GSM648642     2  0.4890    0.58183 0.204 0.656 0.000 0.000 0.000 0.140
#> GSM648696     1  0.3014    0.79650 0.804 0.012 0.000 0.000 0.000 0.184
#> GSM648705     1  0.2260    0.82060 0.860 0.000 0.000 0.000 0.000 0.140
#> GSM648718     1  0.6005    0.41388 0.560 0.256 0.000 0.036 0.000 0.148
#> GSM648599     5  0.5973    0.18513 0.360 0.000 0.000 0.000 0.412 0.228
#> GSM648608     1  0.1588    0.84425 0.924 0.000 0.000 0.000 0.004 0.072
#> GSM648609     1  0.0935    0.85494 0.964 0.000 0.000 0.000 0.004 0.032
#> GSM648610     1  0.4116    0.25374 0.572 0.000 0.000 0.000 0.012 0.416
#> GSM648633     1  0.1003    0.85771 0.964 0.000 0.000 0.000 0.016 0.020
#> GSM648644     2  0.0000    0.82951 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648652     1  0.2135    0.82711 0.872 0.000 0.000 0.000 0.000 0.128
#> GSM648653     1  0.1152    0.85967 0.952 0.000 0.000 0.000 0.004 0.044
#> GSM648658     1  0.4015    0.36365 0.616 0.000 0.000 0.012 0.000 0.372
#> GSM648659     6  0.3617    0.32770 0.044 0.012 0.000 0.144 0.000 0.800
#> GSM648662     1  0.2872    0.81407 0.868 0.004 0.016 0.000 0.024 0.088
#> GSM648665     1  0.1226    0.85206 0.952 0.000 0.004 0.000 0.004 0.040
#> GSM648666     1  0.1501    0.86069 0.924 0.000 0.000 0.000 0.000 0.076
#> GSM648680     1  0.1910    0.83751 0.892 0.000 0.000 0.000 0.000 0.108
#> GSM648684     1  0.2442    0.79256 0.852 0.000 0.000 0.000 0.004 0.144
#> GSM648709     2  0.0000    0.82951 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648719     1  0.0622    0.86107 0.980 0.000 0.000 0.000 0.008 0.012
#> GSM648627     6  0.5682    0.01557 0.048 0.000 0.448 0.000 0.052 0.452
#> GSM648637     4  0.4358    0.44925 0.000 0.016 0.000 0.624 0.348 0.012
#> GSM648638     5  0.2613    0.68057 0.000 0.032 0.068 0.016 0.884 0.000
#> GSM648641     3  0.4099    0.34109 0.000 0.000 0.612 0.000 0.372 0.016
#> GSM648672     4  0.2982    0.74387 0.000 0.060 0.000 0.860 0.012 0.068
#> GSM648674     4  0.4062    0.71053 0.000 0.000 0.000 0.744 0.080 0.176
#> GSM648703     6  0.3938    0.05324 0.000 0.016 0.000 0.324 0.000 0.660
#> GSM648631     3  0.0000    0.87984 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648669     4  0.0909    0.74195 0.000 0.000 0.020 0.968 0.012 0.000
#> GSM648671     4  0.0820    0.74314 0.000 0.000 0.016 0.972 0.012 0.000
#> GSM648678     2  0.0146    0.82802 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM648679     4  0.2572    0.70494 0.000 0.000 0.000 0.852 0.136 0.012
#> GSM648681     4  0.2776    0.74478 0.004 0.040 0.000 0.884 0.044 0.028
#> GSM648686     3  0.1267    0.85422 0.000 0.000 0.940 0.060 0.000 0.000
#> GSM648689     3  0.0363    0.87332 0.000 0.000 0.988 0.000 0.012 0.000
#> GSM648690     3  0.0000    0.87984 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648691     3  0.1501    0.84594 0.000 0.000 0.924 0.076 0.000 0.000
#> GSM648693     3  0.0000    0.87984 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648700     6  0.3198    0.20518 0.000 0.000 0.000 0.260 0.000 0.740
#> GSM648630     3  0.0000    0.87984 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648632     3  0.0458    0.87567 0.000 0.000 0.984 0.016 0.000 0.000
#> GSM648639     5  0.1411    0.67791 0.000 0.000 0.004 0.060 0.936 0.000
#> GSM648640     3  0.2697    0.71723 0.000 0.000 0.812 0.000 0.188 0.000
#> GSM648668     4  0.3018    0.74632 0.000 0.024 0.000 0.848 0.016 0.112
#> GSM648676     4  0.3854    0.36132 0.000 0.000 0.000 0.536 0.000 0.464
#> GSM648692     3  0.0146    0.87804 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM648694     3  0.0000    0.87984 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648699     6  0.3868   -0.35307 0.000 0.000 0.000 0.496 0.000 0.504
#> GSM648701     4  0.3986    0.35077 0.000 0.004 0.000 0.532 0.000 0.464
#> GSM648673     4  0.0993    0.74168 0.000 0.000 0.024 0.964 0.000 0.012
#> GSM648677     4  0.3984    0.55332 0.000 0.016 0.000 0.648 0.000 0.336
#> GSM648687     3  0.1814    0.82642 0.000 0.000 0.900 0.100 0.000 0.000
#> GSM648688     3  0.1556    0.84285 0.000 0.000 0.920 0.080 0.000 0.000

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-SD-NMF-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-SD-NMF-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-SD-NMF-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-SD-NMF-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-SD-NMF-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-SD-NMF-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-SD-NMF-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-SD-NMF-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-SD-NMF-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-SD-NMF-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-SD-NMF-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-SD-NMF-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-SD-NMF-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-SD-NMF-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-SD-NMF-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-SD-NMF-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-SD-NMF-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-SD-NMF-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-SD-NMF-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-SD-NMF-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk SD-NMF-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-SD-NMF-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-SD-NMF-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-SD-NMF-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-SD-NMF-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-SD-NMF-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk SD-NMF-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>          n disease.state(p) development.stage(p) other(p) k
#> SD:NMF  79         3.48e-10               0.2797 1.42e-12 2
#> SD:NMF 125         1.86e-11               0.1322 1.14e-17 3
#> SD:NMF 120         5.28e-15               0.0475 4.25e-24 4
#> SD:NMF 125         2.14e-15               0.0759 7.19e-30 5
#> SD:NMF  98         2.48e-17               0.0753 1.70e-30 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


CV:hclust

The object with results only for a single top-value method and a single partition method can be extracted as:

res = res_list["CV", "hclust"]
# you can also extract it by
# res = res_list["CV:hclust"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 130 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#>   Subgroups are detected by 'hclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 4.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk CV-hclust-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk CV-hclust-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.409           0.660       0.826         0.3345 0.706   0.706
#> 3 3 0.480           0.739       0.838         0.4332 0.695   0.584
#> 4 4 0.599           0.804       0.900         0.2271 0.938   0.866
#> 5 5 0.653           0.792       0.891         0.0421 0.979   0.948
#> 6 6 0.691           0.780       0.883         0.0331 0.997   0.992

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 4

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM648605     2  0.8661    0.59941 0.288 0.712
#> GSM648618     2  0.7602    0.61881 0.220 0.780
#> GSM648620     2  0.8661    0.59941 0.288 0.712
#> GSM648646     2  0.9491    0.49993 0.368 0.632
#> GSM648649     2  0.0672    0.78911 0.008 0.992
#> GSM648675     2  0.7602    0.61881 0.220 0.780
#> GSM648682     2  0.7815    0.64627 0.232 0.768
#> GSM648698     2  0.8661    0.59941 0.288 0.712
#> GSM648708     2  0.8661    0.59941 0.288 0.712
#> GSM648628     2  0.2948    0.74801 0.052 0.948
#> GSM648595     2  0.4022    0.75525 0.080 0.920
#> GSM648635     2  0.0376    0.78963 0.004 0.996
#> GSM648645     2  0.0000    0.78964 0.000 1.000
#> GSM648647     2  0.8661    0.59941 0.288 0.712
#> GSM648667     2  0.8661    0.59941 0.288 0.712
#> GSM648695     2  0.8661    0.59941 0.288 0.712
#> GSM648704     2  0.9491    0.49993 0.368 0.632
#> GSM648706     2  0.8661    0.59941 0.288 0.712
#> GSM648593     2  0.1184    0.78718 0.016 0.984
#> GSM648594     2  0.7674    0.57604 0.224 0.776
#> GSM648600     2  0.0000    0.78964 0.000 1.000
#> GSM648621     2  0.0672    0.78913 0.008 0.992
#> GSM648622     2  0.0000    0.78964 0.000 1.000
#> GSM648623     2  0.1633    0.77438 0.024 0.976
#> GSM648636     2  0.0000    0.78964 0.000 1.000
#> GSM648655     2  0.1184    0.78718 0.016 0.984
#> GSM648661     2  0.0000    0.78964 0.000 1.000
#> GSM648664     2  0.0000    0.78964 0.000 1.000
#> GSM648683     2  0.0000    0.78964 0.000 1.000
#> GSM648685     2  0.0000    0.78964 0.000 1.000
#> GSM648702     2  0.0000    0.78964 0.000 1.000
#> GSM648597     2  0.7674    0.57604 0.224 0.776
#> GSM648603     2  0.3274    0.73510 0.060 0.940
#> GSM648606     2  0.2948    0.75197 0.052 0.948
#> GSM648613     2  0.2948    0.75197 0.052 0.948
#> GSM648619     2  0.2423    0.76014 0.040 0.960
#> GSM648654     2  0.1414    0.78570 0.020 0.980
#> GSM648663     2  0.2423    0.76378 0.040 0.960
#> GSM648670     2  0.8713    0.48386 0.292 0.708
#> GSM648707     2  0.9996   -0.34119 0.488 0.512
#> GSM648615     2  0.8661    0.59941 0.288 0.712
#> GSM648643     2  0.9358    0.52149 0.352 0.648
#> GSM648650     2  0.4939    0.73243 0.108 0.892
#> GSM648656     2  0.9358    0.52149 0.352 0.648
#> GSM648715     2  0.8661    0.59941 0.288 0.712
#> GSM648598     2  0.0000    0.78964 0.000 1.000
#> GSM648601     2  0.0000    0.78964 0.000 1.000
#> GSM648602     2  0.0000    0.78964 0.000 1.000
#> GSM648604     2  0.0000    0.78964 0.000 1.000
#> GSM648614     2  0.1843    0.77592 0.028 0.972
#> GSM648624     2  0.0000    0.78964 0.000 1.000
#> GSM648625     2  0.0376    0.78989 0.004 0.996
#> GSM648629     2  0.0000    0.78964 0.000 1.000
#> GSM648634     2  0.0000    0.78964 0.000 1.000
#> GSM648648     2  0.0376    0.78963 0.004 0.996
#> GSM648651     2  0.0000    0.78964 0.000 1.000
#> GSM648657     2  0.0000    0.78964 0.000 1.000
#> GSM648660     2  0.0000    0.78964 0.000 1.000
#> GSM648697     2  0.0000    0.78964 0.000 1.000
#> GSM648710     2  0.0000    0.78964 0.000 1.000
#> GSM648591     2  0.9522    0.16185 0.372 0.628
#> GSM648592     2  0.7602    0.55189 0.220 0.780
#> GSM648607     2  0.2423    0.76014 0.040 0.960
#> GSM648611     2  0.3274    0.73855 0.060 0.940
#> GSM648612     2  0.2423    0.76014 0.040 0.960
#> GSM648616     1  0.9866    0.37211 0.568 0.432
#> GSM648617     2  0.0000    0.78964 0.000 1.000
#> GSM648626     2  0.3274    0.73510 0.060 0.940
#> GSM648711     2  0.2423    0.76014 0.040 0.960
#> GSM648712     2  0.2423    0.76014 0.040 0.960
#> GSM648713     2  0.2423    0.76014 0.040 0.960
#> GSM648714     2  0.1843    0.77592 0.028 0.972
#> GSM648716     2  0.2423    0.76014 0.040 0.960
#> GSM648717     2  0.3733    0.72173 0.072 0.928
#> GSM648590     2  0.3879    0.75728 0.076 0.924
#> GSM648596     2  0.8661    0.59941 0.288 0.712
#> GSM648642     2  0.8661    0.59941 0.288 0.712
#> GSM648696     2  0.0376    0.78987 0.004 0.996
#> GSM648705     2  0.0376    0.78963 0.004 0.996
#> GSM648718     2  0.8555    0.60632 0.280 0.720
#> GSM648599     2  0.0000    0.78964 0.000 1.000
#> GSM648608     2  0.0000    0.78964 0.000 1.000
#> GSM648609     2  0.0000    0.78964 0.000 1.000
#> GSM648610     2  0.0000    0.78964 0.000 1.000
#> GSM648633     2  0.0000    0.78964 0.000 1.000
#> GSM648644     2  0.9491    0.49993 0.368 0.632
#> GSM648652     2  0.0376    0.78963 0.004 0.996
#> GSM648653     2  0.0000    0.78964 0.000 1.000
#> GSM648658     2  0.1184    0.78718 0.016 0.984
#> GSM648659     2  0.7376    0.66216 0.208 0.792
#> GSM648662     2  0.0376    0.78917 0.004 0.996
#> GSM648665     2  0.0376    0.78917 0.004 0.996
#> GSM648666     2  0.0000    0.78964 0.000 1.000
#> GSM648680     2  0.0376    0.78963 0.004 0.996
#> GSM648684     2  0.0000    0.78964 0.000 1.000
#> GSM648709     2  0.8661    0.59941 0.288 0.712
#> GSM648719     2  0.0000    0.78964 0.000 1.000
#> GSM648627     2  0.2948    0.74801 0.052 0.948
#> GSM648637     1  0.9998    0.00361 0.508 0.492
#> GSM648638     1  0.9998    0.00361 0.508 0.492
#> GSM648641     1  0.9977    0.65217 0.528 0.472
#> GSM648672     2  0.9732    0.44275 0.404 0.596
#> GSM648674     1  0.9998   -0.00945 0.508 0.492
#> GSM648703     2  0.9833    0.40529 0.424 0.576
#> GSM648631     1  0.9608    0.75156 0.616 0.384
#> GSM648669     1  0.3431    0.53116 0.936 0.064
#> GSM648671     1  0.3431    0.53116 0.936 0.064
#> GSM648678     2  0.9608    0.47613 0.384 0.616
#> GSM648679     1  0.9129    0.40523 0.672 0.328
#> GSM648681     2  0.9909    0.18369 0.444 0.556
#> GSM648686     1  0.9608    0.75156 0.616 0.384
#> GSM648689     1  0.9896    0.69693 0.560 0.440
#> GSM648690     1  0.9608    0.75156 0.616 0.384
#> GSM648691     1  0.9608    0.75156 0.616 0.384
#> GSM648693     1  0.9608    0.75156 0.616 0.384
#> GSM648700     2  0.9833    0.40529 0.424 0.576
#> GSM648630     1  0.9608    0.75156 0.616 0.384
#> GSM648632     1  0.9608    0.75156 0.616 0.384
#> GSM648639     1  0.9833    0.72098 0.576 0.424
#> GSM648640     1  0.9833    0.72098 0.576 0.424
#> GSM648668     2  0.9732    0.44275 0.404 0.596
#> GSM648676     2  0.9833    0.40529 0.424 0.576
#> GSM648692     1  0.9608    0.75156 0.616 0.384
#> GSM648694     1  0.9608    0.75156 0.616 0.384
#> GSM648699     2  0.9833    0.40529 0.424 0.576
#> GSM648701     2  0.9833    0.40529 0.424 0.576
#> GSM648673     1  0.3431    0.53116 0.936 0.064
#> GSM648677     2  0.9686    0.45614 0.396 0.604
#> GSM648687     1  0.9635    0.74461 0.612 0.388
#> GSM648688     1  0.9635    0.74461 0.612 0.388

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM648605     2  0.6267      0.713 0.452 0.548 0.000
#> GSM648618     1  0.6302      0.547 0.744 0.208 0.048
#> GSM648620     2  0.6267      0.713 0.452 0.548 0.000
#> GSM648646     2  0.5968      0.755 0.364 0.636 0.000
#> GSM648649     1  0.0747      0.876 0.984 0.016 0.000
#> GSM648675     1  0.6302      0.547 0.744 0.208 0.048
#> GSM648682     1  0.6260     -0.481 0.552 0.448 0.000
#> GSM648698     2  0.6267      0.713 0.452 0.548 0.000
#> GSM648708     2  0.6267      0.713 0.452 0.548 0.000
#> GSM648628     1  0.2280      0.848 0.940 0.008 0.052
#> GSM648595     1  0.3038      0.771 0.896 0.104 0.000
#> GSM648635     1  0.0237      0.883 0.996 0.004 0.000
#> GSM648645     1  0.0000      0.884 1.000 0.000 0.000
#> GSM648647     2  0.6260      0.717 0.448 0.552 0.000
#> GSM648667     2  0.6260      0.717 0.448 0.552 0.000
#> GSM648695     2  0.6267      0.713 0.452 0.548 0.000
#> GSM648704     2  0.5968      0.755 0.364 0.636 0.000
#> GSM648706     2  0.6267      0.713 0.452 0.548 0.000
#> GSM648593     1  0.1031      0.869 0.976 0.024 0.000
#> GSM648594     1  0.6124      0.517 0.744 0.220 0.036
#> GSM648600     1  0.0000      0.884 1.000 0.000 0.000
#> GSM648621     1  0.0592      0.882 0.988 0.012 0.000
#> GSM648622     1  0.0237      0.884 0.996 0.004 0.000
#> GSM648623     1  0.1482      0.871 0.968 0.012 0.020
#> GSM648636     1  0.0000      0.884 1.000 0.000 0.000
#> GSM648655     1  0.1031      0.869 0.976 0.024 0.000
#> GSM648661     1  0.0592      0.878 0.988 0.012 0.000
#> GSM648664     1  0.0000      0.884 1.000 0.000 0.000
#> GSM648683     1  0.0000      0.884 1.000 0.000 0.000
#> GSM648685     1  0.0000      0.884 1.000 0.000 0.000
#> GSM648702     1  0.0000      0.884 1.000 0.000 0.000
#> GSM648597     1  0.6124      0.517 0.744 0.220 0.036
#> GSM648603     1  0.3120      0.820 0.908 0.012 0.080
#> GSM648606     1  0.2599      0.848 0.932 0.016 0.052
#> GSM648613     1  0.2599      0.848 0.932 0.016 0.052
#> GSM648619     1  0.1950      0.858 0.952 0.008 0.040
#> GSM648654     1  0.1643      0.849 0.956 0.044 0.000
#> GSM648663     1  0.2681      0.852 0.932 0.028 0.040
#> GSM648670     1  0.7250      0.319 0.656 0.288 0.056
#> GSM648707     1  0.9887     -0.158 0.408 0.304 0.288
#> GSM648615     2  0.6260      0.717 0.448 0.552 0.000
#> GSM648643     2  0.6045      0.751 0.380 0.620 0.000
#> GSM648650     1  0.4178      0.605 0.828 0.172 0.000
#> GSM648656     2  0.6045      0.751 0.380 0.620 0.000
#> GSM648715     2  0.6260      0.717 0.448 0.552 0.000
#> GSM648598     1  0.0237      0.884 0.996 0.004 0.000
#> GSM648601     1  0.0237      0.884 0.996 0.004 0.000
#> GSM648602     1  0.0000      0.884 1.000 0.000 0.000
#> GSM648604     1  0.0000      0.884 1.000 0.000 0.000
#> GSM648614     1  0.3550      0.790 0.896 0.080 0.024
#> GSM648624     1  0.0237      0.884 0.996 0.004 0.000
#> GSM648625     1  0.0592      0.882 0.988 0.012 0.000
#> GSM648629     1  0.0000      0.884 1.000 0.000 0.000
#> GSM648634     1  0.0000      0.884 1.000 0.000 0.000
#> GSM648648     1  0.0237      0.883 0.996 0.004 0.000
#> GSM648651     1  0.0237      0.884 0.996 0.004 0.000
#> GSM648657     1  0.0237      0.884 0.996 0.004 0.000
#> GSM648660     1  0.0237      0.884 0.996 0.004 0.000
#> GSM648697     1  0.0000      0.884 1.000 0.000 0.000
#> GSM648710     1  0.0000      0.884 1.000 0.000 0.000
#> GSM648591     1  0.8958      0.107 0.552 0.280 0.168
#> GSM648592     1  0.6625      0.537 0.744 0.176 0.080
#> GSM648607     1  0.1950      0.858 0.952 0.008 0.040
#> GSM648611     1  0.2486      0.843 0.932 0.008 0.060
#> GSM648612     1  0.1950      0.858 0.952 0.008 0.040
#> GSM648616     2  0.9863      0.161 0.340 0.400 0.260
#> GSM648617     1  0.0237      0.884 0.996 0.004 0.000
#> GSM648626     1  0.3120      0.820 0.908 0.012 0.080
#> GSM648711     1  0.1950      0.858 0.952 0.008 0.040
#> GSM648712     1  0.1950      0.858 0.952 0.008 0.040
#> GSM648713     1  0.1950      0.858 0.952 0.008 0.040
#> GSM648714     1  0.3550      0.790 0.896 0.080 0.024
#> GSM648716     1  0.1950      0.858 0.952 0.008 0.040
#> GSM648717     1  0.3129      0.815 0.904 0.008 0.088
#> GSM648590     1  0.3267      0.737 0.884 0.116 0.000
#> GSM648596     2  0.6260      0.717 0.448 0.552 0.000
#> GSM648642     2  0.6267      0.713 0.452 0.548 0.000
#> GSM648696     1  0.0592      0.879 0.988 0.012 0.000
#> GSM648705     1  0.0237      0.883 0.996 0.004 0.000
#> GSM648718     2  0.6274      0.705 0.456 0.544 0.000
#> GSM648599     1  0.0000      0.884 1.000 0.000 0.000
#> GSM648608     1  0.0000      0.884 1.000 0.000 0.000
#> GSM648609     1  0.0000      0.884 1.000 0.000 0.000
#> GSM648610     1  0.0000      0.884 1.000 0.000 0.000
#> GSM648633     1  0.0237      0.884 0.996 0.004 0.000
#> GSM648644     2  0.5968      0.755 0.364 0.636 0.000
#> GSM648652     1  0.0237      0.883 0.996 0.004 0.000
#> GSM648653     1  0.0000      0.884 1.000 0.000 0.000
#> GSM648658     1  0.1031      0.869 0.976 0.024 0.000
#> GSM648659     1  0.6111     -0.300 0.604 0.396 0.000
#> GSM648662     1  0.1031      0.869 0.976 0.024 0.000
#> GSM648665     1  0.1031      0.869 0.976 0.024 0.000
#> GSM648666     1  0.0000      0.884 1.000 0.000 0.000
#> GSM648680     1  0.0237      0.883 0.996 0.004 0.000
#> GSM648684     1  0.0000      0.884 1.000 0.000 0.000
#> GSM648709     2  0.6267      0.713 0.452 0.548 0.000
#> GSM648719     1  0.0237      0.884 0.996 0.004 0.000
#> GSM648627     1  0.2280      0.848 0.940 0.008 0.052
#> GSM648637     2  0.8257      0.428 0.372 0.544 0.084
#> GSM648638     2  0.8257      0.428 0.372 0.544 0.084
#> GSM648641     3  0.4605      0.710 0.204 0.000 0.796
#> GSM648672     2  0.6008      0.749 0.332 0.664 0.004
#> GSM648674     2  0.8131      0.426 0.376 0.548 0.076
#> GSM648703     2  0.5815      0.737 0.304 0.692 0.004
#> GSM648631     3  0.0592      0.951 0.012 0.000 0.988
#> GSM648669     2  0.6090     -0.121 0.020 0.716 0.264
#> GSM648671     2  0.6090     -0.121 0.020 0.716 0.264
#> GSM648678     2  0.5882      0.754 0.348 0.652 0.000
#> GSM648679     2  0.7741      0.299 0.236 0.660 0.104
#> GSM648681     1  0.8069     -0.308 0.476 0.460 0.064
#> GSM648686     3  0.0592      0.951 0.012 0.000 0.988
#> GSM648689     3  0.3192      0.855 0.112 0.000 0.888
#> GSM648690     3  0.0592      0.951 0.012 0.000 0.988
#> GSM648691     3  0.0592      0.951 0.012 0.000 0.988
#> GSM648693     3  0.0592      0.951 0.012 0.000 0.988
#> GSM648700     2  0.5815      0.737 0.304 0.692 0.004
#> GSM648630     3  0.0592      0.951 0.012 0.000 0.988
#> GSM648632     3  0.0592      0.951 0.012 0.000 0.988
#> GSM648639     3  0.3875      0.897 0.068 0.044 0.888
#> GSM648640     3  0.3875      0.897 0.068 0.044 0.888
#> GSM648668     2  0.6008      0.749 0.332 0.664 0.004
#> GSM648676     2  0.5815      0.737 0.304 0.692 0.004
#> GSM648692     3  0.0592      0.951 0.012 0.000 0.988
#> GSM648694     3  0.0592      0.951 0.012 0.000 0.988
#> GSM648699     2  0.5815      0.737 0.304 0.692 0.004
#> GSM648701     2  0.5815      0.737 0.304 0.692 0.004
#> GSM648673     2  0.6090     -0.121 0.020 0.716 0.264
#> GSM648677     2  0.5835      0.751 0.340 0.660 0.000
#> GSM648687     3  0.2318      0.935 0.028 0.028 0.944
#> GSM648688     3  0.2318      0.935 0.028 0.028 0.944

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM648605     2  0.2888     0.8619 0.124 0.872 0.000 0.004
#> GSM648618     1  0.5172     0.5815 0.736 0.036 0.008 0.220
#> GSM648620     2  0.2888     0.8619 0.124 0.872 0.000 0.004
#> GSM648646     2  0.0817     0.8328 0.024 0.976 0.000 0.000
#> GSM648649     1  0.1389     0.8823 0.952 0.048 0.000 0.000
#> GSM648675     1  0.5172     0.5815 0.736 0.036 0.008 0.220
#> GSM648682     2  0.4088     0.6738 0.232 0.764 0.000 0.004
#> GSM648698     2  0.2888     0.8619 0.124 0.872 0.000 0.004
#> GSM648708     2  0.2888     0.8619 0.124 0.872 0.000 0.004
#> GSM648628     1  0.2099     0.8805 0.936 0.008 0.044 0.012
#> GSM648595     1  0.3009     0.8235 0.892 0.056 0.000 0.052
#> GSM648635     1  0.0336     0.9093 0.992 0.008 0.000 0.000
#> GSM648645     1  0.0188     0.9101 0.996 0.004 0.000 0.000
#> GSM648647     2  0.2704     0.8622 0.124 0.876 0.000 0.000
#> GSM648667     2  0.2704     0.8622 0.124 0.876 0.000 0.000
#> GSM648695     2  0.2888     0.8619 0.124 0.872 0.000 0.004
#> GSM648704     2  0.0817     0.8328 0.024 0.976 0.000 0.000
#> GSM648706     2  0.2888     0.8619 0.124 0.872 0.000 0.004
#> GSM648593     1  0.0921     0.8995 0.972 0.028 0.000 0.000
#> GSM648594     1  0.5432     0.5219 0.716 0.068 0.000 0.216
#> GSM648600     1  0.0188     0.9101 0.996 0.004 0.000 0.000
#> GSM648621     1  0.0592     0.9045 0.984 0.000 0.000 0.016
#> GSM648622     1  0.0000     0.9095 1.000 0.000 0.000 0.000
#> GSM648623     1  0.1262     0.8972 0.968 0.008 0.008 0.016
#> GSM648636     1  0.0188     0.9101 0.996 0.004 0.000 0.000
#> GSM648655     1  0.0921     0.8995 0.972 0.028 0.000 0.000
#> GSM648661     1  0.0779     0.9040 0.980 0.016 0.000 0.004
#> GSM648664     1  0.0188     0.9101 0.996 0.004 0.000 0.000
#> GSM648683     1  0.0188     0.9101 0.996 0.004 0.000 0.000
#> GSM648685     1  0.0188     0.9101 0.996 0.004 0.000 0.000
#> GSM648702     1  0.0188     0.9101 0.996 0.004 0.000 0.000
#> GSM648597     1  0.5432     0.5219 0.716 0.068 0.000 0.216
#> GSM648603     1  0.2707     0.8512 0.908 0.008 0.068 0.016
#> GSM648606     1  0.2352     0.8775 0.928 0.016 0.044 0.012
#> GSM648613     1  0.2352     0.8775 0.928 0.016 0.044 0.012
#> GSM648619     1  0.1690     0.8894 0.952 0.008 0.032 0.008
#> GSM648654     1  0.1576     0.8802 0.948 0.048 0.000 0.004
#> GSM648663     1  0.2400     0.8797 0.928 0.028 0.032 0.012
#> GSM648670     1  0.6028     0.3342 0.644 0.076 0.000 0.280
#> GSM648707     4  0.7912     0.4530 0.392 0.008 0.204 0.396
#> GSM648615     2  0.2704     0.8622 0.124 0.876 0.000 0.000
#> GSM648643     2  0.1474     0.8479 0.052 0.948 0.000 0.000
#> GSM648650     1  0.3837     0.6137 0.776 0.224 0.000 0.000
#> GSM648656     2  0.1474     0.8479 0.052 0.948 0.000 0.000
#> GSM648715     2  0.2704     0.8622 0.124 0.876 0.000 0.000
#> GSM648598     1  0.0000     0.9095 1.000 0.000 0.000 0.000
#> GSM648601     1  0.0000     0.9095 1.000 0.000 0.000 0.000
#> GSM648602     1  0.0188     0.9101 0.996 0.004 0.000 0.000
#> GSM648604     1  0.0188     0.9101 0.996 0.004 0.000 0.000
#> GSM648614     1  0.4890     0.5567 0.736 0.236 0.024 0.004
#> GSM648624     1  0.0000     0.9095 1.000 0.000 0.000 0.000
#> GSM648625     1  0.0336     0.9090 0.992 0.008 0.000 0.000
#> GSM648629     1  0.0188     0.9101 0.996 0.004 0.000 0.000
#> GSM648634     1  0.0188     0.9101 0.996 0.004 0.000 0.000
#> GSM648648     1  0.0336     0.9093 0.992 0.008 0.000 0.000
#> GSM648651     1  0.0000     0.9095 1.000 0.000 0.000 0.000
#> GSM648657     1  0.0000     0.9095 1.000 0.000 0.000 0.000
#> GSM648660     1  0.0000     0.9095 1.000 0.000 0.000 0.000
#> GSM648697     1  0.0188     0.9101 0.996 0.004 0.000 0.000
#> GSM648710     1  0.0188     0.9101 0.996 0.004 0.000 0.000
#> GSM648591     1  0.6927    -0.0813 0.536 0.008 0.092 0.364
#> GSM648592     1  0.6161     0.5353 0.716 0.044 0.060 0.180
#> GSM648607     1  0.1690     0.8894 0.952 0.008 0.032 0.008
#> GSM648611     1  0.2271     0.8753 0.928 0.008 0.052 0.012
#> GSM648612     1  0.1690     0.8894 0.952 0.008 0.032 0.008
#> GSM648616     4  0.7909     0.5410 0.312 0.020 0.176 0.492
#> GSM648617     1  0.0000     0.9095 1.000 0.000 0.000 0.000
#> GSM648626     1  0.2707     0.8512 0.908 0.008 0.068 0.016
#> GSM648711     1  0.1690     0.8894 0.952 0.008 0.032 0.008
#> GSM648712     1  0.1690     0.8894 0.952 0.008 0.032 0.008
#> GSM648713     1  0.1690     0.8894 0.952 0.008 0.032 0.008
#> GSM648714     1  0.4890     0.5567 0.736 0.236 0.024 0.004
#> GSM648716     1  0.1690     0.8894 0.952 0.008 0.032 0.008
#> GSM648717     1  0.2803     0.8476 0.900 0.008 0.080 0.012
#> GSM648590     1  0.2973     0.7615 0.856 0.144 0.000 0.000
#> GSM648596     2  0.2704     0.8622 0.124 0.876 0.000 0.000
#> GSM648642     2  0.2888     0.8619 0.124 0.872 0.000 0.004
#> GSM648696     1  0.1302     0.8857 0.956 0.044 0.000 0.000
#> GSM648705     1  0.0336     0.9093 0.992 0.008 0.000 0.000
#> GSM648718     2  0.2814     0.8533 0.132 0.868 0.000 0.000
#> GSM648599     1  0.0188     0.9101 0.996 0.004 0.000 0.000
#> GSM648608     1  0.0188     0.9101 0.996 0.004 0.000 0.000
#> GSM648609     1  0.0188     0.9101 0.996 0.004 0.000 0.000
#> GSM648610     1  0.0188     0.9101 0.996 0.004 0.000 0.000
#> GSM648633     1  0.0000     0.9095 1.000 0.000 0.000 0.000
#> GSM648644     2  0.0817     0.8328 0.024 0.976 0.000 0.000
#> GSM648652     1  0.0336     0.9093 0.992 0.008 0.000 0.000
#> GSM648653     1  0.0188     0.9101 0.996 0.004 0.000 0.000
#> GSM648658     1  0.0921     0.8995 0.972 0.028 0.000 0.000
#> GSM648659     2  0.4697     0.4022 0.356 0.644 0.000 0.000
#> GSM648662     1  0.1305     0.8907 0.960 0.036 0.000 0.004
#> GSM648665     1  0.1305     0.8907 0.960 0.036 0.000 0.004
#> GSM648666     1  0.0188     0.9101 0.996 0.004 0.000 0.000
#> GSM648680     1  0.0336     0.9093 0.992 0.008 0.000 0.000
#> GSM648684     1  0.0188     0.9101 0.996 0.004 0.000 0.000
#> GSM648709     2  0.2888     0.8619 0.124 0.872 0.000 0.004
#> GSM648719     1  0.0000     0.9095 1.000 0.000 0.000 0.000
#> GSM648627     1  0.1968     0.8831 0.940 0.008 0.044 0.008
#> GSM648637     4  0.7804     0.6339 0.272 0.232 0.008 0.488
#> GSM648638     4  0.7804     0.6339 0.272 0.232 0.008 0.488
#> GSM648641     3  0.3751     0.5809 0.196 0.000 0.800 0.004
#> GSM648672     2  0.3271     0.7497 0.012 0.856 0.000 0.132
#> GSM648674     4  0.7547     0.6284 0.276 0.236 0.000 0.488
#> GSM648703     2  0.3280     0.7684 0.016 0.860 0.000 0.124
#> GSM648631     3  0.0000     0.9158 0.000 0.000 1.000 0.000
#> GSM648669     4  0.1767     0.4279 0.000 0.044 0.012 0.944
#> GSM648671     4  0.1767     0.4279 0.000 0.044 0.012 0.944
#> GSM648678     2  0.0657     0.8214 0.012 0.984 0.000 0.004
#> GSM648679     4  0.6386     0.6434 0.212 0.140 0.000 0.648
#> GSM648681     1  0.7249    -0.4195 0.444 0.144 0.000 0.412
#> GSM648686     3  0.0000     0.9158 0.000 0.000 1.000 0.000
#> GSM648689     3  0.2408     0.7839 0.104 0.000 0.896 0.000
#> GSM648690     3  0.0000     0.9158 0.000 0.000 1.000 0.000
#> GSM648691     3  0.0000     0.9158 0.000 0.000 1.000 0.000
#> GSM648693     3  0.0000     0.9158 0.000 0.000 1.000 0.000
#> GSM648700     2  0.3280     0.7684 0.016 0.860 0.000 0.124
#> GSM648630     3  0.0000     0.9158 0.000 0.000 1.000 0.000
#> GSM648632     3  0.0000     0.9158 0.000 0.000 1.000 0.000
#> GSM648639     3  0.3697     0.8178 0.048 0.000 0.852 0.100
#> GSM648640     3  0.3697     0.8178 0.048 0.000 0.852 0.100
#> GSM648668     2  0.3271     0.7497 0.012 0.856 0.000 0.132
#> GSM648676     2  0.3280     0.7684 0.016 0.860 0.000 0.124
#> GSM648692     3  0.0000     0.9158 0.000 0.000 1.000 0.000
#> GSM648694     3  0.0000     0.9158 0.000 0.000 1.000 0.000
#> GSM648699     2  0.3280     0.7684 0.016 0.860 0.000 0.124
#> GSM648701     2  0.3280     0.7684 0.016 0.860 0.000 0.124
#> GSM648673     4  0.1767     0.4279 0.000 0.044 0.012 0.944
#> GSM648677     2  0.1975     0.8090 0.016 0.936 0.000 0.048
#> GSM648687     3  0.3123     0.8359 0.000 0.000 0.844 0.156
#> GSM648688     3  0.3123     0.8359 0.000 0.000 0.844 0.156

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM648605     2  0.2488      0.840 0.124 0.872 0.000 0.000 0.004
#> GSM648618     1  0.4789      0.355 0.644 0.028 0.000 0.004 0.324
#> GSM648620     2  0.2488      0.840 0.124 0.872 0.000 0.000 0.004
#> GSM648646     2  0.0740      0.805 0.008 0.980 0.000 0.004 0.008
#> GSM648649     1  0.1121      0.888 0.956 0.044 0.000 0.000 0.000
#> GSM648675     1  0.4789      0.355 0.644 0.028 0.000 0.004 0.324
#> GSM648682     2  0.3521      0.648 0.232 0.764 0.000 0.000 0.004
#> GSM648698     2  0.2488      0.840 0.124 0.872 0.000 0.000 0.004
#> GSM648708     2  0.2488      0.840 0.124 0.872 0.000 0.000 0.004
#> GSM648628     1  0.2075      0.882 0.924 0.000 0.032 0.004 0.040
#> GSM648595     1  0.3191      0.791 0.860 0.052 0.000 0.004 0.084
#> GSM648635     1  0.0162      0.915 0.996 0.004 0.000 0.000 0.000
#> GSM648645     1  0.0000      0.916 1.000 0.000 0.000 0.000 0.000
#> GSM648647     2  0.2329      0.840 0.124 0.876 0.000 0.000 0.000
#> GSM648667     2  0.2329      0.840 0.124 0.876 0.000 0.000 0.000
#> GSM648695     2  0.2488      0.840 0.124 0.872 0.000 0.000 0.004
#> GSM648704     2  0.0740      0.805 0.008 0.980 0.000 0.004 0.008
#> GSM648706     2  0.2488      0.840 0.124 0.872 0.000 0.000 0.004
#> GSM648593     1  0.0703      0.905 0.976 0.024 0.000 0.000 0.000
#> GSM648594     1  0.5411      0.269 0.632 0.068 0.000 0.008 0.292
#> GSM648600     1  0.0000      0.916 1.000 0.000 0.000 0.000 0.000
#> GSM648621     1  0.0703      0.909 0.976 0.000 0.000 0.000 0.024
#> GSM648622     1  0.0162      0.916 0.996 0.000 0.000 0.000 0.004
#> GSM648623     1  0.1124      0.901 0.960 0.000 0.000 0.004 0.036
#> GSM648636     1  0.0000      0.916 1.000 0.000 0.000 0.000 0.000
#> GSM648655     1  0.0703      0.905 0.976 0.024 0.000 0.000 0.000
#> GSM648661     1  0.0566      0.910 0.984 0.012 0.000 0.000 0.004
#> GSM648664     1  0.0000      0.916 1.000 0.000 0.000 0.000 0.000
#> GSM648683     1  0.0000      0.916 1.000 0.000 0.000 0.000 0.000
#> GSM648685     1  0.0000      0.916 1.000 0.000 0.000 0.000 0.000
#> GSM648702     1  0.0000      0.916 1.000 0.000 0.000 0.000 0.000
#> GSM648597     1  0.5411      0.269 0.632 0.068 0.000 0.008 0.292
#> GSM648603     1  0.2124      0.858 0.900 0.000 0.000 0.004 0.096
#> GSM648606     1  0.2282      0.882 0.920 0.008 0.032 0.004 0.036
#> GSM648613     1  0.2282      0.882 0.920 0.008 0.032 0.004 0.036
#> GSM648619     1  0.1653      0.893 0.944 0.000 0.024 0.004 0.028
#> GSM648654     1  0.1282      0.887 0.952 0.044 0.000 0.000 0.004
#> GSM648663     1  0.2341      0.884 0.920 0.020 0.024 0.004 0.032
#> GSM648670     1  0.5941     -0.067 0.540 0.072 0.000 0.016 0.372
#> GSM648707     5  0.4065      0.520 0.224 0.000 0.016 0.008 0.752
#> GSM648615     2  0.2329      0.840 0.124 0.876 0.000 0.000 0.000
#> GSM648643     2  0.1412      0.821 0.036 0.952 0.000 0.004 0.008
#> GSM648650     1  0.3274      0.625 0.780 0.220 0.000 0.000 0.000
#> GSM648656     2  0.1124      0.821 0.036 0.960 0.000 0.004 0.000
#> GSM648715     2  0.2329      0.840 0.124 0.876 0.000 0.000 0.000
#> GSM648598     1  0.0162      0.916 0.996 0.000 0.000 0.000 0.004
#> GSM648601     1  0.0162      0.916 0.996 0.000 0.000 0.000 0.004
#> GSM648602     1  0.0000      0.916 1.000 0.000 0.000 0.000 0.000
#> GSM648604     1  0.0000      0.916 1.000 0.000 0.000 0.000 0.000
#> GSM648614     1  0.4212      0.564 0.736 0.236 0.024 0.000 0.004
#> GSM648624     1  0.0162      0.916 0.996 0.000 0.000 0.000 0.004
#> GSM648625     1  0.0451      0.915 0.988 0.008 0.000 0.000 0.004
#> GSM648629     1  0.0000      0.916 1.000 0.000 0.000 0.000 0.000
#> GSM648634     1  0.0000      0.916 1.000 0.000 0.000 0.000 0.000
#> GSM648648     1  0.0162      0.915 0.996 0.004 0.000 0.000 0.000
#> GSM648651     1  0.0162      0.916 0.996 0.000 0.000 0.000 0.004
#> GSM648657     1  0.0162      0.916 0.996 0.000 0.000 0.000 0.004
#> GSM648660     1  0.0162      0.916 0.996 0.000 0.000 0.000 0.004
#> GSM648697     1  0.0000      0.916 1.000 0.000 0.000 0.000 0.000
#> GSM648710     1  0.0000      0.916 1.000 0.000 0.000 0.000 0.000
#> GSM648591     5  0.4810      0.440 0.400 0.000 0.012 0.008 0.580
#> GSM648592     1  0.5089      0.302 0.636 0.048 0.000 0.004 0.312
#> GSM648607     1  0.1653      0.893 0.944 0.000 0.024 0.004 0.028
#> GSM648611     1  0.2234      0.877 0.916 0.000 0.036 0.004 0.044
#> GSM648612     1  0.1653      0.893 0.944 0.000 0.024 0.004 0.028
#> GSM648616     5  0.3471      0.492 0.124 0.020 0.004 0.012 0.840
#> GSM648617     1  0.0162      0.916 0.996 0.000 0.000 0.000 0.004
#> GSM648626     1  0.2124      0.858 0.900 0.000 0.000 0.004 0.096
#> GSM648711     1  0.1653      0.893 0.944 0.000 0.024 0.004 0.028
#> GSM648712     1  0.1739      0.892 0.940 0.000 0.024 0.004 0.032
#> GSM648713     1  0.1653      0.893 0.944 0.000 0.024 0.004 0.028
#> GSM648714     1  0.4212      0.564 0.736 0.236 0.024 0.000 0.004
#> GSM648716     1  0.1653      0.893 0.944 0.000 0.024 0.004 0.028
#> GSM648717     1  0.2756      0.855 0.892 0.000 0.036 0.012 0.060
#> GSM648590     1  0.2516      0.766 0.860 0.140 0.000 0.000 0.000
#> GSM648596     2  0.2329      0.840 0.124 0.876 0.000 0.000 0.000
#> GSM648642     2  0.2488      0.840 0.124 0.872 0.000 0.000 0.004
#> GSM648696     1  0.1043      0.891 0.960 0.040 0.000 0.000 0.000
#> GSM648705     1  0.0162      0.915 0.996 0.004 0.000 0.000 0.000
#> GSM648718     2  0.2424      0.831 0.132 0.868 0.000 0.000 0.000
#> GSM648599     1  0.0000      0.916 1.000 0.000 0.000 0.000 0.000
#> GSM648608     1  0.0000      0.916 1.000 0.000 0.000 0.000 0.000
#> GSM648609     1  0.0000      0.916 1.000 0.000 0.000 0.000 0.000
#> GSM648610     1  0.0000      0.916 1.000 0.000 0.000 0.000 0.000
#> GSM648633     1  0.0162      0.916 0.996 0.000 0.000 0.000 0.004
#> GSM648644     2  0.0740      0.805 0.008 0.980 0.000 0.004 0.008
#> GSM648652     1  0.0162      0.915 0.996 0.004 0.000 0.000 0.000
#> GSM648653     1  0.0000      0.916 1.000 0.000 0.000 0.000 0.000
#> GSM648658     1  0.0703      0.905 0.976 0.024 0.000 0.000 0.000
#> GSM648659     2  0.4045      0.379 0.356 0.644 0.000 0.000 0.000
#> GSM648662     1  0.1041      0.897 0.964 0.032 0.000 0.000 0.004
#> GSM648665     1  0.1041      0.897 0.964 0.032 0.000 0.000 0.004
#> GSM648666     1  0.0000      0.916 1.000 0.000 0.000 0.000 0.000
#> GSM648680     1  0.0162      0.915 0.996 0.004 0.000 0.000 0.000
#> GSM648684     1  0.0000      0.916 1.000 0.000 0.000 0.000 0.000
#> GSM648709     2  0.2488      0.840 0.124 0.872 0.000 0.000 0.004
#> GSM648719     1  0.0162      0.916 0.996 0.000 0.000 0.000 0.004
#> GSM648627     1  0.1996      0.885 0.928 0.000 0.032 0.004 0.036
#> GSM648637     5  0.5815      0.601 0.112 0.232 0.000 0.016 0.640
#> GSM648638     5  0.5815      0.601 0.112 0.232 0.000 0.016 0.640
#> GSM648641     3  0.4187      0.517 0.196 0.000 0.764 0.008 0.032
#> GSM648672     2  0.3359      0.712 0.000 0.844 0.000 0.072 0.084
#> GSM648674     5  0.5883      0.603 0.116 0.236 0.000 0.016 0.632
#> GSM648703     2  0.3304      0.723 0.004 0.840 0.000 0.128 0.028
#> GSM648631     3  0.0000      0.834 0.000 0.000 1.000 0.000 0.000
#> GSM648669     4  0.2439      1.000 0.000 0.004 0.000 0.876 0.120
#> GSM648671     4  0.2439      1.000 0.000 0.004 0.000 0.876 0.120
#> GSM648678     2  0.0912      0.793 0.000 0.972 0.000 0.012 0.016
#> GSM648679     5  0.6745      0.278 0.056 0.124 0.000 0.248 0.572
#> GSM648681     5  0.6410      0.565 0.288 0.144 0.000 0.016 0.552
#> GSM648686     3  0.0000      0.834 0.000 0.000 1.000 0.000 0.000
#> GSM648689     3  0.2074      0.692 0.104 0.000 0.896 0.000 0.000
#> GSM648690     3  0.0000      0.834 0.000 0.000 1.000 0.000 0.000
#> GSM648691     3  0.0000      0.834 0.000 0.000 1.000 0.000 0.000
#> GSM648693     3  0.0000      0.834 0.000 0.000 1.000 0.000 0.000
#> GSM648700     2  0.3304      0.723 0.004 0.840 0.000 0.128 0.028
#> GSM648630     3  0.0000      0.834 0.000 0.000 1.000 0.000 0.000
#> GSM648632     3  0.0000      0.834 0.000 0.000 1.000 0.000 0.000
#> GSM648639     3  0.6032      0.370 0.000 0.000 0.460 0.116 0.424
#> GSM648640     3  0.6032      0.370 0.000 0.000 0.460 0.116 0.424
#> GSM648668     2  0.3359      0.712 0.000 0.844 0.000 0.072 0.084
#> GSM648676     2  0.3304      0.723 0.004 0.840 0.000 0.128 0.028
#> GSM648692     3  0.0000      0.834 0.000 0.000 1.000 0.000 0.000
#> GSM648694     3  0.0000      0.834 0.000 0.000 1.000 0.000 0.000
#> GSM648699     2  0.3304      0.723 0.004 0.840 0.000 0.128 0.028
#> GSM648701     2  0.3304      0.723 0.004 0.840 0.000 0.128 0.028
#> GSM648673     4  0.2439      1.000 0.000 0.004 0.000 0.876 0.120
#> GSM648677     2  0.2103      0.775 0.004 0.920 0.000 0.056 0.020
#> GSM648687     3  0.4933      0.630 0.000 0.000 0.692 0.228 0.080
#> GSM648688     3  0.4933      0.630 0.000 0.000 0.692 0.228 0.080

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM648605     2  0.2053      0.794 0.108 0.888 0.000 0.000 0.000 0.004
#> GSM648618     1  0.4861      0.333 0.604 0.024 0.000 0.000 0.032 0.340
#> GSM648620     2  0.2053      0.794 0.108 0.888 0.000 0.000 0.000 0.004
#> GSM648646     2  0.1801      0.736 0.004 0.924 0.000 0.000 0.016 0.056
#> GSM648649     1  0.1152      0.893 0.952 0.044 0.000 0.000 0.000 0.004
#> GSM648675     1  0.4861      0.333 0.604 0.024 0.000 0.000 0.032 0.340
#> GSM648682     2  0.3052      0.637 0.216 0.780 0.000 0.000 0.000 0.004
#> GSM648698     2  0.2053      0.794 0.108 0.888 0.000 0.000 0.000 0.004
#> GSM648708     2  0.2053      0.794 0.108 0.888 0.000 0.000 0.000 0.004
#> GSM648628     1  0.2302      0.870 0.900 0.000 0.008 0.000 0.060 0.032
#> GSM648595     1  0.3130      0.770 0.824 0.028 0.000 0.000 0.004 0.144
#> GSM648635     1  0.0291      0.915 0.992 0.004 0.000 0.000 0.000 0.004
#> GSM648645     1  0.0146      0.914 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM648647     2  0.1910      0.794 0.108 0.892 0.000 0.000 0.000 0.000
#> GSM648667     2  0.1910      0.794 0.108 0.892 0.000 0.000 0.000 0.000
#> GSM648695     2  0.2053      0.794 0.108 0.888 0.000 0.000 0.000 0.004
#> GSM648704     2  0.1801      0.736 0.004 0.924 0.000 0.000 0.016 0.056
#> GSM648706     2  0.2053      0.794 0.108 0.888 0.000 0.000 0.000 0.004
#> GSM648593     1  0.0858      0.906 0.968 0.028 0.000 0.000 0.000 0.004
#> GSM648594     1  0.3852      0.304 0.612 0.000 0.000 0.004 0.000 0.384
#> GSM648600     1  0.0146      0.914 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM648621     1  0.1285      0.894 0.944 0.000 0.000 0.000 0.004 0.052
#> GSM648622     1  0.0146      0.914 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM648623     1  0.1124      0.901 0.956 0.000 0.000 0.000 0.036 0.008
#> GSM648636     1  0.0291      0.915 0.992 0.004 0.000 0.000 0.000 0.004
#> GSM648655     1  0.0858      0.906 0.968 0.028 0.000 0.000 0.000 0.004
#> GSM648661     1  0.0692      0.909 0.976 0.020 0.000 0.000 0.000 0.004
#> GSM648664     1  0.0260      0.914 0.992 0.008 0.000 0.000 0.000 0.000
#> GSM648683     1  0.0291      0.915 0.992 0.004 0.000 0.000 0.000 0.004
#> GSM648685     1  0.0260      0.914 0.992 0.008 0.000 0.000 0.000 0.000
#> GSM648702     1  0.0291      0.915 0.992 0.004 0.000 0.000 0.000 0.004
#> GSM648597     1  0.3852      0.304 0.612 0.000 0.000 0.004 0.000 0.384
#> GSM648603     1  0.2221      0.863 0.896 0.000 0.000 0.000 0.072 0.032
#> GSM648606     1  0.1841      0.887 0.920 0.008 0.000 0.000 0.064 0.008
#> GSM648613     1  0.1841      0.887 0.920 0.008 0.000 0.000 0.064 0.008
#> GSM648619     1  0.1349      0.894 0.940 0.000 0.000 0.000 0.056 0.004
#> GSM648654     1  0.1285      0.888 0.944 0.052 0.000 0.000 0.000 0.004
#> GSM648663     1  0.1938      0.888 0.920 0.020 0.000 0.000 0.052 0.008
#> GSM648670     1  0.5200     -0.055 0.504 0.036 0.000 0.008 0.016 0.436
#> GSM648707     6  0.4792      0.452 0.148 0.000 0.000 0.000 0.180 0.672
#> GSM648615     2  0.1910      0.794 0.108 0.892 0.000 0.000 0.000 0.000
#> GSM648643     2  0.2271      0.761 0.032 0.908 0.000 0.000 0.024 0.036
#> GSM648650     1  0.3081      0.662 0.776 0.220 0.000 0.000 0.000 0.004
#> GSM648656     2  0.1777      0.764 0.032 0.932 0.000 0.000 0.012 0.024
#> GSM648715     2  0.1910      0.794 0.108 0.892 0.000 0.000 0.000 0.000
#> GSM648598     1  0.0146      0.914 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM648601     1  0.0291      0.914 0.992 0.000 0.000 0.000 0.004 0.004
#> GSM648602     1  0.0291      0.915 0.992 0.004 0.000 0.000 0.000 0.004
#> GSM648604     1  0.0260      0.914 0.992 0.008 0.000 0.000 0.000 0.000
#> GSM648614     1  0.3858      0.590 0.724 0.248 0.000 0.000 0.024 0.004
#> GSM648624     1  0.0146      0.914 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM648625     1  0.0405      0.915 0.988 0.008 0.000 0.000 0.004 0.000
#> GSM648629     1  0.0260      0.914 0.992 0.008 0.000 0.000 0.000 0.000
#> GSM648634     1  0.0291      0.915 0.992 0.004 0.000 0.000 0.000 0.004
#> GSM648648     1  0.0291      0.915 0.992 0.004 0.000 0.000 0.000 0.004
#> GSM648651     1  0.0291      0.914 0.992 0.000 0.000 0.000 0.004 0.004
#> GSM648657     1  0.0291      0.914 0.992 0.000 0.000 0.000 0.004 0.004
#> GSM648660     1  0.0146      0.914 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM648697     1  0.0291      0.915 0.992 0.004 0.000 0.000 0.000 0.004
#> GSM648710     1  0.0260      0.914 0.992 0.008 0.000 0.000 0.000 0.000
#> GSM648591     6  0.5070      0.372 0.328 0.000 0.000 0.000 0.096 0.576
#> GSM648592     1  0.4433      0.334 0.616 0.000 0.000 0.000 0.040 0.344
#> GSM648607     1  0.1349      0.894 0.940 0.000 0.000 0.000 0.056 0.004
#> GSM648611     1  0.2420      0.865 0.892 0.000 0.008 0.000 0.068 0.032
#> GSM648612     1  0.1349      0.894 0.940 0.000 0.000 0.000 0.056 0.004
#> GSM648616     6  0.3229      0.465 0.048 0.000 0.000 0.004 0.120 0.828
#> GSM648617     1  0.0146      0.914 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM648626     1  0.2221      0.863 0.896 0.000 0.000 0.000 0.072 0.032
#> GSM648711     1  0.1349      0.894 0.940 0.000 0.000 0.000 0.056 0.004
#> GSM648712     1  0.1563      0.891 0.932 0.000 0.000 0.000 0.056 0.012
#> GSM648713     1  0.1349      0.894 0.940 0.000 0.000 0.000 0.056 0.004
#> GSM648714     1  0.3858      0.590 0.724 0.248 0.000 0.000 0.024 0.004
#> GSM648716     1  0.1349      0.894 0.940 0.000 0.000 0.000 0.056 0.004
#> GSM648717     1  0.2006      0.864 0.892 0.000 0.000 0.000 0.104 0.004
#> GSM648590     1  0.2442      0.782 0.852 0.144 0.000 0.000 0.000 0.004
#> GSM648596     2  0.1910      0.794 0.108 0.892 0.000 0.000 0.000 0.000
#> GSM648642     2  0.2053      0.794 0.108 0.888 0.000 0.000 0.000 0.004
#> GSM648696     1  0.1082      0.896 0.956 0.040 0.000 0.000 0.000 0.004
#> GSM648705     1  0.0291      0.915 0.992 0.004 0.000 0.000 0.000 0.004
#> GSM648718     2  0.2003      0.787 0.116 0.884 0.000 0.000 0.000 0.000
#> GSM648599     1  0.0146      0.914 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM648608     1  0.0291      0.915 0.992 0.004 0.000 0.000 0.000 0.004
#> GSM648609     1  0.0260      0.914 0.992 0.008 0.000 0.000 0.000 0.000
#> GSM648610     1  0.0291      0.915 0.992 0.004 0.000 0.000 0.000 0.004
#> GSM648633     1  0.0146      0.914 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM648644     2  0.1801      0.736 0.004 0.924 0.000 0.000 0.016 0.056
#> GSM648652     1  0.0291      0.915 0.992 0.004 0.000 0.000 0.000 0.004
#> GSM648653     1  0.0291      0.915 0.992 0.004 0.000 0.000 0.000 0.004
#> GSM648658     1  0.0858      0.906 0.968 0.028 0.000 0.000 0.000 0.004
#> GSM648659     2  0.3850      0.392 0.340 0.652 0.000 0.000 0.004 0.004
#> GSM648662     1  0.1082      0.897 0.956 0.040 0.000 0.000 0.000 0.004
#> GSM648665     1  0.1082      0.897 0.956 0.040 0.000 0.000 0.000 0.004
#> GSM648666     1  0.0291      0.915 0.992 0.004 0.000 0.000 0.000 0.004
#> GSM648680     1  0.0291      0.915 0.992 0.004 0.000 0.000 0.000 0.004
#> GSM648684     1  0.0291      0.915 0.992 0.004 0.000 0.000 0.000 0.004
#> GSM648709     2  0.2053      0.794 0.108 0.888 0.000 0.000 0.000 0.004
#> GSM648719     1  0.0146      0.914 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM648627     1  0.1976      0.882 0.916 0.000 0.008 0.000 0.060 0.016
#> GSM648637     6  0.3218      0.606 0.044 0.112 0.000 0.004 0.004 0.836
#> GSM648638     6  0.3218      0.606 0.044 0.112 0.000 0.004 0.004 0.836
#> GSM648641     3  0.4215      0.394 0.196 0.000 0.724 0.000 0.080 0.000
#> GSM648672     2  0.4951      0.594 0.000 0.712 0.000 0.112 0.040 0.136
#> GSM648674     6  0.3121      0.604 0.044 0.116 0.000 0.004 0.000 0.836
#> GSM648703     2  0.6274      0.489 0.004 0.596 0.000 0.092 0.172 0.136
#> GSM648631     3  0.0000      0.856 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648669     4  0.0632      1.000 0.000 0.000 0.000 0.976 0.000 0.024
#> GSM648671     4  0.0632      1.000 0.000 0.000 0.000 0.976 0.000 0.024
#> GSM648678     2  0.2821      0.705 0.000 0.860 0.000 0.004 0.040 0.096
#> GSM648679     6  0.4624      0.421 0.024 0.044 0.000 0.244 0.000 0.688
#> GSM648681     6  0.4361      0.512 0.236 0.060 0.000 0.004 0.000 0.700
#> GSM648686     3  0.0146      0.854 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM648689     3  0.2558      0.642 0.104 0.000 0.868 0.000 0.028 0.000
#> GSM648690     3  0.0146      0.854 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM648691     3  0.0000      0.856 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648693     3  0.0000      0.856 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648700     2  0.6301      0.484 0.004 0.592 0.000 0.092 0.176 0.136
#> GSM648630     3  0.0000      0.856 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648632     3  0.0000      0.856 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648639     5  0.4030      1.000 0.000 0.000 0.104 0.000 0.756 0.140
#> GSM648640     5  0.4030      1.000 0.000 0.000 0.104 0.000 0.756 0.140
#> GSM648668     2  0.4951      0.594 0.000 0.712 0.000 0.112 0.040 0.136
#> GSM648676     2  0.6301      0.484 0.004 0.592 0.000 0.092 0.176 0.136
#> GSM648692     3  0.0000      0.856 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648694     3  0.0000      0.856 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648699     2  0.6301      0.484 0.004 0.592 0.000 0.092 0.176 0.136
#> GSM648701     2  0.6301      0.484 0.004 0.592 0.000 0.092 0.176 0.136
#> GSM648673     4  0.0632      1.000 0.000 0.000 0.000 0.976 0.000 0.024
#> GSM648677     2  0.4742      0.634 0.004 0.744 0.000 0.044 0.096 0.112
#> GSM648687     3  0.5136      0.452 0.000 0.000 0.640 0.160 0.196 0.004
#> GSM648688     3  0.5136      0.452 0.000 0.000 0.640 0.160 0.196 0.004

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-CV-hclust-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-CV-hclust-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-CV-hclust-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-CV-hclust-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-CV-hclust-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-CV-hclust-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-CV-hclust-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-CV-hclust-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-CV-hclust-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-CV-hclust-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-CV-hclust-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-CV-hclust-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-CV-hclust-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-CV-hclust-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-CV-hclust-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-CV-hclust-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-CV-hclust-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-CV-hclust-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-CV-hclust-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-CV-hclust-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk CV-hclust-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-CV-hclust-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-CV-hclust-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-CV-hclust-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-CV-hclust-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-CV-hclust-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk CV-hclust-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>             n disease.state(p) development.stage(p) other(p) k
#> CV:hclust 109         5.94e-24             0.612640 1.80e-23 2
#> CV:hclust 116         7.81e-18             0.136327 3.96e-23 3
#> CV:hclust 122         9.49e-18             0.013655 7.46e-23 4
#> CV:hclust 118         1.58e-16             0.003419 2.26e-21 5
#> CV:hclust 111         4.77e-18             0.000109 1.58e-22 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


CV:kmeans

The object with results only for a single top-value method and a single partition method can be extracted as:

res = res_list["CV", "kmeans"]
# you can also extract it by
# res = res_list["CV:kmeans"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 130 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#>   Subgroups are detected by 'kmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 3.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk CV-kmeans-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk CV-kmeans-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.297           0.583       0.786         0.4332 0.565   0.565
#> 3 3 0.634           0.777       0.898         0.3877 0.598   0.412
#> 4 4 0.623           0.731       0.829         0.1340 0.853   0.674
#> 5 5 0.658           0.730       0.833         0.0943 0.856   0.612
#> 6 6 0.698           0.650       0.808         0.0545 0.942   0.777

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 3

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM648605     2  0.0938     0.7582 0.012 0.988
#> GSM648618     2  0.9909     0.1365 0.444 0.556
#> GSM648620     2  0.0376     0.7595 0.004 0.996
#> GSM648646     2  0.0938     0.7582 0.012 0.988
#> GSM648649     2  0.2043     0.7621 0.032 0.968
#> GSM648675     2  0.2236     0.7622 0.036 0.964
#> GSM648682     2  0.0376     0.7592 0.004 0.996
#> GSM648698     2  0.0938     0.7582 0.012 0.988
#> GSM648708     2  0.0000     0.7597 0.000 1.000
#> GSM648628     1  0.7745     0.6718 0.772 0.228
#> GSM648595     2  0.2043     0.7621 0.032 0.968
#> GSM648635     2  0.2043     0.7621 0.032 0.968
#> GSM648645     2  0.6148     0.6960 0.152 0.848
#> GSM648647     2  0.0938     0.7582 0.012 0.988
#> GSM648667     2  0.0000     0.7597 0.000 1.000
#> GSM648695     2  0.0000     0.7597 0.000 1.000
#> GSM648704     2  0.2423     0.7444 0.040 0.960
#> GSM648706     2  0.2423     0.7444 0.040 0.960
#> GSM648593     2  0.2043     0.7621 0.032 0.968
#> GSM648594     2  0.2043     0.7621 0.032 0.968
#> GSM648600     2  0.6247     0.6925 0.156 0.844
#> GSM648621     2  0.9970     0.0479 0.468 0.532
#> GSM648622     2  0.9881     0.1635 0.436 0.564
#> GSM648623     1  0.8909     0.6206 0.692 0.308
#> GSM648636     2  0.2043     0.7621 0.032 0.968
#> GSM648655     2  0.1414     0.7624 0.020 0.980
#> GSM648661     1  0.9491     0.5062 0.632 0.368
#> GSM648664     2  0.9970     0.0473 0.468 0.532
#> GSM648683     2  0.9881     0.1635 0.436 0.564
#> GSM648685     2  0.9754     0.2402 0.408 0.592
#> GSM648702     2  0.2043     0.7621 0.032 0.968
#> GSM648597     2  0.6247     0.6925 0.156 0.844
#> GSM648603     2  0.9970     0.0479 0.468 0.532
#> GSM648606     1  0.8955     0.6312 0.688 0.312
#> GSM648613     1  0.8861     0.6386 0.696 0.304
#> GSM648619     1  0.8763     0.6359 0.704 0.296
#> GSM648654     1  0.9427     0.5422 0.640 0.360
#> GSM648663     1  0.9087     0.6169 0.676 0.324
#> GSM648670     2  0.2236     0.7622 0.036 0.964
#> GSM648707     1  0.2778     0.7165 0.952 0.048
#> GSM648615     2  0.0938     0.7582 0.012 0.988
#> GSM648643     2  0.0938     0.7582 0.012 0.988
#> GSM648650     2  0.0000     0.7597 0.000 1.000
#> GSM648656     2  0.2423     0.7444 0.040 0.960
#> GSM648715     2  0.0938     0.7582 0.012 0.988
#> GSM648598     2  0.6247     0.6925 0.156 0.844
#> GSM648601     2  0.6148     0.6960 0.152 0.848
#> GSM648602     2  0.9881     0.1635 0.436 0.564
#> GSM648604     2  0.9970     0.0479 0.468 0.532
#> GSM648614     2  0.9732     0.2011 0.404 0.596
#> GSM648624     2  0.9881     0.1635 0.436 0.564
#> GSM648625     2  0.4298     0.7335 0.088 0.912
#> GSM648629     1  0.9998     0.1002 0.508 0.492
#> GSM648634     2  0.6048     0.6995 0.148 0.852
#> GSM648648     2  0.2043     0.7621 0.032 0.968
#> GSM648651     2  0.9881     0.1635 0.436 0.564
#> GSM648657     2  0.4939     0.7276 0.108 0.892
#> GSM648660     2  0.6148     0.6960 0.152 0.848
#> GSM648697     2  0.6247     0.6925 0.156 0.844
#> GSM648710     1  0.9732     0.4151 0.596 0.404
#> GSM648591     1  0.8713     0.6394 0.708 0.292
#> GSM648592     2  0.1843     0.7619 0.028 0.972
#> GSM648607     1  0.9661     0.4477 0.608 0.392
#> GSM648611     1  0.2236     0.7176 0.964 0.036
#> GSM648612     1  0.8763     0.6359 0.704 0.296
#> GSM648616     1  0.2423     0.7164 0.960 0.040
#> GSM648617     2  0.6247     0.6925 0.156 0.844
#> GSM648626     1  0.9896     0.3021 0.560 0.440
#> GSM648711     1  0.8909     0.6206 0.692 0.308
#> GSM648712     1  0.8763     0.6359 0.704 0.296
#> GSM648713     1  0.8909     0.6206 0.692 0.308
#> GSM648714     2  0.9866     0.1080 0.432 0.568
#> GSM648716     1  0.8661     0.6425 0.712 0.288
#> GSM648717     1  0.8144     0.6616 0.748 0.252
#> GSM648590     2  0.2043     0.7622 0.032 0.968
#> GSM648596     2  0.0938     0.7582 0.012 0.988
#> GSM648642     2  0.0672     0.7589 0.008 0.992
#> GSM648696     2  0.1414     0.7624 0.020 0.980
#> GSM648705     2  0.2043     0.7621 0.032 0.968
#> GSM648718     2  0.0672     0.7589 0.008 0.992
#> GSM648599     2  0.9881     0.1635 0.436 0.564
#> GSM648608     2  0.9977     0.0305 0.472 0.528
#> GSM648609     2  0.9963     0.0635 0.464 0.536
#> GSM648610     2  0.9970     0.0479 0.468 0.532
#> GSM648633     2  0.4939     0.7276 0.108 0.892
#> GSM648644     2  0.2423     0.7444 0.040 0.960
#> GSM648652     2  0.2043     0.7621 0.032 0.968
#> GSM648653     2  0.6247     0.6925 0.156 0.844
#> GSM648658     2  0.2043     0.7621 0.032 0.968
#> GSM648659     2  0.0938     0.7582 0.012 0.988
#> GSM648662     2  0.9922     0.0609 0.448 0.552
#> GSM648665     2  0.9732     0.2011 0.404 0.596
#> GSM648666     2  0.9732     0.2505 0.404 0.596
#> GSM648680     2  0.2043     0.7621 0.032 0.968
#> GSM648684     2  0.9881     0.1635 0.436 0.564
#> GSM648709     2  0.0672     0.7591 0.008 0.992
#> GSM648719     2  0.6148     0.6960 0.152 0.848
#> GSM648627     1  0.8763     0.6359 0.704 0.296
#> GSM648637     2  0.6887     0.6369 0.184 0.816
#> GSM648638     2  0.9209     0.4225 0.336 0.664
#> GSM648641     1  0.0376     0.7191 0.996 0.004
#> GSM648672     2  0.6438     0.6328 0.164 0.836
#> GSM648674     2  0.6887     0.6369 0.184 0.816
#> GSM648703     2  0.6623     0.6350 0.172 0.828
#> GSM648631     1  0.0376     0.7191 0.996 0.004
#> GSM648669     1  0.9909     0.0626 0.556 0.444
#> GSM648671     1  0.9909     0.0626 0.556 0.444
#> GSM648678     2  0.6438     0.6328 0.164 0.836
#> GSM648679     2  0.9129     0.4189 0.328 0.672
#> GSM648681     2  0.0938     0.7582 0.012 0.988
#> GSM648686     1  0.0672     0.7126 0.992 0.008
#> GSM648689     1  0.2043     0.6975 0.968 0.032
#> GSM648690     1  0.0000     0.7180 1.000 0.000
#> GSM648691     1  0.0000     0.7180 1.000 0.000
#> GSM648693     1  0.0376     0.7191 0.996 0.004
#> GSM648700     2  0.6973     0.6371 0.188 0.812
#> GSM648630     1  0.0000     0.7180 1.000 0.000
#> GSM648632     1  0.0376     0.7191 0.996 0.004
#> GSM648639     1  0.0000     0.7180 1.000 0.000
#> GSM648640     1  0.0000     0.7180 1.000 0.000
#> GSM648668     2  0.6801     0.6366 0.180 0.820
#> GSM648676     2  0.6801     0.6366 0.180 0.820
#> GSM648692     1  0.0000     0.7180 1.000 0.000
#> GSM648694     1  0.0376     0.7191 0.996 0.004
#> GSM648699     2  0.6623     0.6350 0.172 0.828
#> GSM648701     2  0.6623     0.6350 0.172 0.828
#> GSM648673     1  0.9909     0.0626 0.556 0.444
#> GSM648677     2  0.6531     0.6395 0.168 0.832
#> GSM648687     1  0.0000     0.7180 1.000 0.000
#> GSM648688     1  0.0376     0.7191 0.996 0.004

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM648605     2  0.1989      0.848 0.048 0.948 0.004
#> GSM648618     1  0.0237      0.894 0.996 0.000 0.004
#> GSM648620     2  0.6033      0.546 0.336 0.660 0.004
#> GSM648646     2  0.1647      0.852 0.036 0.960 0.004
#> GSM648649     1  0.3816      0.769 0.852 0.148 0.000
#> GSM648675     2  0.6111      0.415 0.396 0.604 0.000
#> GSM648682     2  0.1643      0.851 0.044 0.956 0.000
#> GSM648698     2  0.1647      0.852 0.036 0.960 0.004
#> GSM648708     2  0.5835      0.541 0.340 0.660 0.000
#> GSM648628     1  0.6299      0.126 0.524 0.000 0.476
#> GSM648595     1  0.5882      0.373 0.652 0.348 0.000
#> GSM648635     1  0.1031      0.884 0.976 0.024 0.000
#> GSM648645     1  0.0237      0.894 0.996 0.000 0.004
#> GSM648647     2  0.1647      0.852 0.036 0.960 0.004
#> GSM648667     2  0.5835      0.541 0.340 0.660 0.000
#> GSM648695     2  0.5810      0.549 0.336 0.664 0.000
#> GSM648704     2  0.1129      0.845 0.020 0.976 0.004
#> GSM648706     2  0.1647      0.852 0.036 0.960 0.004
#> GSM648593     1  0.3941      0.758 0.844 0.156 0.000
#> GSM648594     1  0.0237      0.894 0.996 0.000 0.004
#> GSM648600     1  0.0237      0.894 0.996 0.004 0.000
#> GSM648621     1  0.0000      0.895 1.000 0.000 0.000
#> GSM648622     1  0.0000      0.895 1.000 0.000 0.000
#> GSM648623     1  0.0237      0.894 0.996 0.000 0.004
#> GSM648636     1  0.4062      0.748 0.836 0.164 0.000
#> GSM648655     1  0.4062      0.748 0.836 0.164 0.000
#> GSM648661     1  0.0000      0.895 1.000 0.000 0.000
#> GSM648664     1  0.0000      0.895 1.000 0.000 0.000
#> GSM648683     1  0.0000      0.895 1.000 0.000 0.000
#> GSM648685     1  0.0000      0.895 1.000 0.000 0.000
#> GSM648702     1  0.3482      0.791 0.872 0.128 0.000
#> GSM648597     1  0.0237      0.894 0.996 0.000 0.004
#> GSM648603     1  0.0237      0.894 0.996 0.000 0.004
#> GSM648606     1  0.8941      0.350 0.544 0.156 0.300
#> GSM648613     1  0.9017      0.270 0.516 0.148 0.336
#> GSM648619     1  0.4504      0.719 0.804 0.000 0.196
#> GSM648654     1  0.6410      0.716 0.764 0.092 0.144
#> GSM648663     1  0.8607      0.458 0.592 0.152 0.256
#> GSM648670     2  0.6169      0.486 0.360 0.636 0.004
#> GSM648707     3  0.6215      0.172 0.428 0.000 0.572
#> GSM648615     2  0.1647      0.852 0.036 0.960 0.004
#> GSM648643     2  0.1529      0.852 0.040 0.960 0.000
#> GSM648650     2  0.5835      0.541 0.340 0.660 0.000
#> GSM648656     2  0.1399      0.849 0.028 0.968 0.004
#> GSM648715     2  0.1647      0.852 0.036 0.960 0.004
#> GSM648598     1  0.0237      0.894 0.996 0.004 0.000
#> GSM648601     1  0.0237      0.894 0.996 0.004 0.000
#> GSM648602     1  0.0000      0.895 1.000 0.000 0.000
#> GSM648604     1  0.0000      0.895 1.000 0.000 0.000
#> GSM648614     1  0.5754      0.530 0.700 0.296 0.004
#> GSM648624     1  0.0000      0.895 1.000 0.000 0.000
#> GSM648625     1  0.2356      0.852 0.928 0.072 0.000
#> GSM648629     1  0.0000      0.895 1.000 0.000 0.000
#> GSM648634     1  0.0237      0.894 0.996 0.004 0.000
#> GSM648648     1  0.1163      0.881 0.972 0.028 0.000
#> GSM648651     1  0.0000      0.895 1.000 0.000 0.000
#> GSM648657     1  0.0237      0.894 0.996 0.000 0.004
#> GSM648660     1  0.0237      0.894 0.996 0.000 0.004
#> GSM648697     1  0.0237      0.894 0.996 0.004 0.000
#> GSM648710     1  0.0000      0.895 1.000 0.000 0.000
#> GSM648591     1  0.0237      0.894 0.996 0.000 0.004
#> GSM648592     1  0.1525      0.878 0.964 0.032 0.004
#> GSM648607     1  0.0000      0.895 1.000 0.000 0.000
#> GSM648611     3  0.3879      0.735 0.152 0.000 0.848
#> GSM648612     1  0.5178      0.636 0.744 0.000 0.256
#> GSM648616     3  0.6973      0.208 0.416 0.020 0.564
#> GSM648617     1  0.0237      0.894 0.996 0.004 0.000
#> GSM648626     1  0.0237      0.894 0.996 0.000 0.004
#> GSM648711     1  0.1411      0.873 0.964 0.000 0.036
#> GSM648712     1  0.5178      0.636 0.744 0.000 0.256
#> GSM648713     1  0.0000      0.895 1.000 0.000 0.000
#> GSM648714     1  0.5929      0.479 0.676 0.320 0.004
#> GSM648716     1  0.5178      0.636 0.744 0.000 0.256
#> GSM648717     1  0.7353      0.202 0.532 0.032 0.436
#> GSM648590     2  0.5254      0.668 0.264 0.736 0.000
#> GSM648596     2  0.1647      0.852 0.036 0.960 0.004
#> GSM648642     2  0.1860      0.847 0.052 0.948 0.000
#> GSM648696     1  0.3941      0.759 0.844 0.156 0.000
#> GSM648705     1  0.4121      0.742 0.832 0.168 0.000
#> GSM648718     2  0.1529      0.852 0.040 0.960 0.000
#> GSM648599     1  0.0000      0.895 1.000 0.000 0.000
#> GSM648608     1  0.0000      0.895 1.000 0.000 0.000
#> GSM648609     1  0.0000      0.895 1.000 0.000 0.000
#> GSM648610     1  0.0000      0.895 1.000 0.000 0.000
#> GSM648633     1  0.0237      0.894 0.996 0.004 0.000
#> GSM648644     2  0.0829      0.840 0.012 0.984 0.004
#> GSM648652     1  0.1031      0.884 0.976 0.024 0.000
#> GSM648653     1  0.0237      0.894 0.996 0.004 0.000
#> GSM648658     1  0.0237      0.894 0.996 0.004 0.000
#> GSM648659     2  0.1525      0.851 0.032 0.964 0.004
#> GSM648662     1  0.4047      0.773 0.848 0.148 0.004
#> GSM648665     1  0.4172      0.764 0.840 0.156 0.004
#> GSM648666     1  0.0000      0.895 1.000 0.000 0.000
#> GSM648680     1  0.0237      0.894 0.996 0.004 0.000
#> GSM648684     1  0.0000      0.895 1.000 0.000 0.000
#> GSM648709     2  0.5785      0.608 0.300 0.696 0.004
#> GSM648719     1  0.0237      0.894 0.996 0.004 0.000
#> GSM648627     1  0.5178      0.636 0.744 0.000 0.256
#> GSM648637     2  0.3028      0.824 0.032 0.920 0.048
#> GSM648638     2  0.3237      0.824 0.032 0.912 0.056
#> GSM648641     3  0.0237      0.871 0.004 0.000 0.996
#> GSM648672     2  0.1643      0.819 0.000 0.956 0.044
#> GSM648674     2  0.3028      0.824 0.032 0.920 0.048
#> GSM648703     2  0.2918      0.825 0.032 0.924 0.044
#> GSM648631     3  0.0237      0.871 0.004 0.000 0.996
#> GSM648669     3  0.6045      0.409 0.000 0.380 0.620
#> GSM648671     3  0.6045      0.409 0.000 0.380 0.620
#> GSM648678     2  0.0000      0.831 0.000 1.000 0.000
#> GSM648679     2  0.3028      0.824 0.032 0.920 0.048
#> GSM648681     2  0.1765      0.852 0.040 0.956 0.004
#> GSM648686     3  0.0237      0.871 0.004 0.000 0.996
#> GSM648689     3  0.0237      0.871 0.004 0.000 0.996
#> GSM648690     3  0.0237      0.871 0.004 0.000 0.996
#> GSM648691     3  0.0237      0.871 0.004 0.000 0.996
#> GSM648693     3  0.0237      0.871 0.004 0.000 0.996
#> GSM648700     2  0.3481      0.814 0.052 0.904 0.044
#> GSM648630     3  0.0237      0.871 0.004 0.000 0.996
#> GSM648632     3  0.0237      0.871 0.004 0.000 0.996
#> GSM648639     3  0.0000      0.868 0.000 0.000 1.000
#> GSM648640     3  0.0237      0.871 0.004 0.000 0.996
#> GSM648668     2  0.2918      0.825 0.032 0.924 0.044
#> GSM648676     2  0.2918      0.825 0.032 0.924 0.044
#> GSM648692     3  0.0237      0.871 0.004 0.000 0.996
#> GSM648694     3  0.0237      0.871 0.004 0.000 0.996
#> GSM648699     2  0.2918      0.825 0.032 0.924 0.044
#> GSM648701     2  0.2793      0.826 0.028 0.928 0.044
#> GSM648673     3  0.6126      0.362 0.000 0.400 0.600
#> GSM648677     2  0.2918      0.825 0.032 0.924 0.044
#> GSM648687     3  0.0475      0.868 0.004 0.004 0.992
#> GSM648688     3  0.0237      0.871 0.004 0.000 0.996

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM648605     2  0.4423     0.8114 0.036 0.788 0.000 0.176
#> GSM648618     1  0.3142     0.7905 0.860 0.132 0.000 0.008
#> GSM648620     2  0.4638     0.7993 0.060 0.788 0.000 0.152
#> GSM648646     2  0.3907     0.7883 0.000 0.768 0.000 0.232
#> GSM648649     1  0.3668     0.7138 0.808 0.188 0.000 0.004
#> GSM648675     1  0.7196     0.3673 0.552 0.236 0.000 0.212
#> GSM648682     2  0.4011     0.8079 0.008 0.784 0.000 0.208
#> GSM648698     2  0.4011     0.8079 0.008 0.784 0.000 0.208
#> GSM648708     2  0.4638     0.7993 0.060 0.788 0.000 0.152
#> GSM648628     1  0.8158     0.3915 0.504 0.208 0.256 0.032
#> GSM648595     1  0.3893     0.7047 0.796 0.196 0.000 0.008
#> GSM648635     1  0.1978     0.8075 0.928 0.068 0.000 0.004
#> GSM648645     1  0.0817     0.8281 0.976 0.024 0.000 0.000
#> GSM648647     2  0.4423     0.8114 0.036 0.788 0.000 0.176
#> GSM648667     2  0.4711     0.6980 0.152 0.784 0.000 0.064
#> GSM648695     2  0.4638     0.7993 0.060 0.788 0.000 0.152
#> GSM648704     2  0.3907     0.7883 0.000 0.768 0.000 0.232
#> GSM648706     2  0.3907     0.7883 0.000 0.768 0.000 0.232
#> GSM648593     1  0.3257     0.7476 0.844 0.152 0.000 0.004
#> GSM648594     1  0.2521     0.8136 0.912 0.024 0.000 0.064
#> GSM648600     1  0.0895     0.8275 0.976 0.020 0.000 0.004
#> GSM648621     1  0.1305     0.8269 0.960 0.036 0.000 0.004
#> GSM648622     1  0.0000     0.8290 1.000 0.000 0.000 0.000
#> GSM648623     1  0.3708     0.7756 0.832 0.148 0.000 0.020
#> GSM648636     1  0.3498     0.7393 0.832 0.160 0.000 0.008
#> GSM648655     1  0.3450     0.7429 0.836 0.156 0.000 0.008
#> GSM648661     1  0.1792     0.8217 0.932 0.068 0.000 0.000
#> GSM648664     1  0.1792     0.8217 0.932 0.068 0.000 0.000
#> GSM648683     1  0.1978     0.8216 0.928 0.068 0.000 0.004
#> GSM648685     1  0.1792     0.8257 0.932 0.068 0.000 0.000
#> GSM648702     1  0.3401     0.7465 0.840 0.152 0.000 0.008
#> GSM648597     1  0.5092     0.7403 0.764 0.140 0.000 0.096
#> GSM648603     1  0.3597     0.7778 0.836 0.148 0.000 0.016
#> GSM648606     2  0.7791     0.0258 0.240 0.544 0.192 0.024
#> GSM648613     2  0.8468    -0.1995 0.336 0.400 0.236 0.028
#> GSM648619     1  0.6714     0.6483 0.660 0.208 0.108 0.024
#> GSM648654     1  0.7016     0.4716 0.516 0.380 0.096 0.008
#> GSM648663     1  0.7673     0.3776 0.456 0.404 0.116 0.024
#> GSM648670     4  0.5970     0.3194 0.348 0.052 0.000 0.600
#> GSM648707     1  0.8779     0.3654 0.508 0.144 0.224 0.124
#> GSM648615     2  0.3972     0.8083 0.008 0.788 0.000 0.204
#> GSM648643     2  0.3907     0.7883 0.000 0.768 0.000 0.232
#> GSM648650     2  0.4669     0.6780 0.168 0.780 0.000 0.052
#> GSM648656     2  0.3907     0.7883 0.000 0.768 0.000 0.232
#> GSM648715     2  0.4423     0.8114 0.036 0.788 0.000 0.176
#> GSM648598     1  0.0707     0.8275 0.980 0.020 0.000 0.000
#> GSM648601     1  0.0707     0.8275 0.980 0.020 0.000 0.000
#> GSM648602     1  0.0376     0.8292 0.992 0.004 0.000 0.004
#> GSM648604     1  0.1792     0.8217 0.932 0.068 0.000 0.000
#> GSM648614     2  0.4158     0.5357 0.224 0.768 0.000 0.008
#> GSM648624     1  0.0000     0.8290 1.000 0.000 0.000 0.000
#> GSM648625     1  0.4072     0.6304 0.748 0.252 0.000 0.000
#> GSM648629     1  0.1792     0.8217 0.932 0.068 0.000 0.000
#> GSM648634     1  0.0895     0.8275 0.976 0.020 0.000 0.004
#> GSM648648     1  0.2831     0.7736 0.876 0.120 0.000 0.004
#> GSM648651     1  0.0000     0.8290 1.000 0.000 0.000 0.000
#> GSM648657     1  0.0817     0.8281 0.976 0.024 0.000 0.000
#> GSM648660     1  0.0707     0.8275 0.980 0.020 0.000 0.000
#> GSM648697     1  0.1042     0.8269 0.972 0.020 0.000 0.008
#> GSM648710     1  0.1792     0.8217 0.932 0.068 0.000 0.000
#> GSM648591     1  0.5369     0.7275 0.744 0.144 0.000 0.112
#> GSM648592     1  0.4610     0.7460 0.744 0.236 0.000 0.020
#> GSM648607     1  0.4098     0.7585 0.784 0.204 0.000 0.012
#> GSM648611     3  0.5612     0.6904 0.032 0.208 0.728 0.032
#> GSM648612     1  0.6858     0.6391 0.652 0.208 0.112 0.028
#> GSM648616     1  0.9354     0.0695 0.364 0.144 0.148 0.344
#> GSM648617     1  0.2222     0.8259 0.924 0.060 0.000 0.016
#> GSM648626     1  0.3757     0.7734 0.828 0.152 0.000 0.020
#> GSM648711     1  0.4279     0.7558 0.780 0.204 0.004 0.012
#> GSM648712     1  0.6947     0.6383 0.648 0.208 0.112 0.032
#> GSM648713     1  0.4542     0.7479 0.768 0.208 0.004 0.020
#> GSM648714     2  0.2401     0.5249 0.092 0.904 0.000 0.004
#> GSM648716     1  0.6765     0.6434 0.656 0.208 0.112 0.024
#> GSM648717     3  0.8289     0.1931 0.312 0.208 0.452 0.028
#> GSM648590     1  0.6949     0.2221 0.528 0.348 0.000 0.124
#> GSM648596     2  0.3764     0.8010 0.000 0.784 0.000 0.216
#> GSM648642     2  0.4423     0.8114 0.036 0.788 0.000 0.176
#> GSM648696     1  0.4632     0.5498 0.688 0.308 0.000 0.004
#> GSM648705     1  0.3710     0.7096 0.804 0.192 0.000 0.004
#> GSM648718     2  0.4011     0.8079 0.008 0.784 0.000 0.208
#> GSM648599     1  0.0188     0.8292 0.996 0.000 0.000 0.004
#> GSM648608     1  0.1978     0.8216 0.928 0.068 0.000 0.004
#> GSM648609     1  0.1792     0.8217 0.932 0.068 0.000 0.000
#> GSM648610     1  0.1978     0.8216 0.928 0.068 0.000 0.004
#> GSM648633     1  0.0707     0.8275 0.980 0.020 0.000 0.000
#> GSM648644     2  0.3907     0.7883 0.000 0.768 0.000 0.232
#> GSM648652     1  0.2773     0.7764 0.880 0.116 0.000 0.004
#> GSM648653     1  0.0895     0.8275 0.976 0.020 0.000 0.004
#> GSM648658     1  0.1042     0.8269 0.972 0.020 0.000 0.008
#> GSM648659     2  0.4011     0.8085 0.008 0.784 0.000 0.208
#> GSM648662     1  0.4567     0.6309 0.716 0.276 0.000 0.008
#> GSM648665     1  0.4941     0.2615 0.564 0.436 0.000 0.000
#> GSM648666     1  0.0336     0.8289 0.992 0.008 0.000 0.000
#> GSM648680     1  0.0895     0.8269 0.976 0.020 0.000 0.004
#> GSM648684     1  0.1902     0.8227 0.932 0.064 0.000 0.004
#> GSM648709     2  0.4609     0.8016 0.056 0.788 0.000 0.156
#> GSM648719     1  0.0707     0.8275 0.980 0.020 0.000 0.000
#> GSM648627     1  0.6858     0.6427 0.652 0.208 0.112 0.028
#> GSM648637     4  0.2973     0.7848 0.000 0.144 0.000 0.856
#> GSM648638     4  0.3249     0.7834 0.000 0.140 0.008 0.852
#> GSM648641     3  0.3913     0.7737 0.000 0.148 0.824 0.028
#> GSM648672     4  0.2408     0.8204 0.000 0.104 0.000 0.896
#> GSM648674     4  0.0921     0.8127 0.000 0.028 0.000 0.972
#> GSM648703     4  0.2654     0.8186 0.004 0.108 0.000 0.888
#> GSM648631     3  0.0000     0.8975 0.000 0.000 1.000 0.000
#> GSM648669     4  0.3486     0.6421 0.000 0.000 0.188 0.812
#> GSM648671     4  0.3486     0.6421 0.000 0.000 0.188 0.812
#> GSM648678     4  0.3444     0.7427 0.000 0.184 0.000 0.816
#> GSM648679     4  0.0707     0.8089 0.000 0.020 0.000 0.980
#> GSM648681     4  0.5596     0.3300 0.036 0.332 0.000 0.632
#> GSM648686     3  0.0000     0.8975 0.000 0.000 1.000 0.000
#> GSM648689     3  0.0000     0.8975 0.000 0.000 1.000 0.000
#> GSM648690     3  0.0000     0.8975 0.000 0.000 1.000 0.000
#> GSM648691     3  0.0000     0.8975 0.000 0.000 1.000 0.000
#> GSM648693     3  0.0000     0.8975 0.000 0.000 1.000 0.000
#> GSM648700     4  0.1767     0.8192 0.012 0.044 0.000 0.944
#> GSM648630     3  0.0000     0.8975 0.000 0.000 1.000 0.000
#> GSM648632     3  0.0000     0.8975 0.000 0.000 1.000 0.000
#> GSM648639     3  0.6492     0.6106 0.000 0.144 0.636 0.220
#> GSM648640     3  0.1629     0.8706 0.000 0.024 0.952 0.024
#> GSM648668     4  0.2888     0.8102 0.004 0.124 0.000 0.872
#> GSM648676     4  0.2593     0.8206 0.004 0.104 0.000 0.892
#> GSM648692     3  0.0000     0.8975 0.000 0.000 1.000 0.000
#> GSM648694     3  0.0000     0.8975 0.000 0.000 1.000 0.000
#> GSM648699     4  0.1576     0.8192 0.004 0.048 0.000 0.948
#> GSM648701     4  0.2593     0.8206 0.004 0.104 0.000 0.892
#> GSM648673     4  0.3356     0.6592 0.000 0.000 0.176 0.824
#> GSM648677     4  0.2944     0.8067 0.004 0.128 0.000 0.868
#> GSM648687     3  0.1118     0.8703 0.000 0.000 0.964 0.036
#> GSM648688     3  0.0000     0.8975 0.000 0.000 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM648605     2  0.0162     0.9447 0.004 0.996 0.000 0.000 0.000
#> GSM648618     1  0.4565    -0.0574 0.580 0.000 0.000 0.012 0.408
#> GSM648620     2  0.0609     0.9358 0.020 0.980 0.000 0.000 0.000
#> GSM648646     2  0.0451     0.9410 0.000 0.988 0.000 0.004 0.008
#> GSM648649     1  0.1731     0.7831 0.932 0.060 0.000 0.004 0.004
#> GSM648675     1  0.6253     0.4799 0.656 0.088 0.000 0.164 0.092
#> GSM648682     2  0.0000     0.9447 0.000 1.000 0.000 0.000 0.000
#> GSM648698     2  0.0000     0.9447 0.000 1.000 0.000 0.000 0.000
#> GSM648708     2  0.0510     0.9395 0.016 0.984 0.000 0.000 0.000
#> GSM648628     5  0.5072     0.7109 0.188 0.000 0.116 0.000 0.696
#> GSM648595     1  0.2674     0.7700 0.896 0.060 0.000 0.012 0.032
#> GSM648635     1  0.0880     0.7980 0.968 0.032 0.000 0.000 0.000
#> GSM648645     1  0.0613     0.8008 0.984 0.004 0.000 0.008 0.004
#> GSM648647     2  0.0162     0.9447 0.004 0.996 0.000 0.000 0.000
#> GSM648667     2  0.1965     0.8442 0.096 0.904 0.000 0.000 0.000
#> GSM648695     2  0.0510     0.9395 0.016 0.984 0.000 0.000 0.000
#> GSM648704     2  0.0579     0.9385 0.000 0.984 0.000 0.008 0.008
#> GSM648706     2  0.0162     0.9431 0.000 0.996 0.000 0.004 0.000
#> GSM648593     1  0.1444     0.7907 0.948 0.040 0.000 0.012 0.000
#> GSM648594     1  0.4412     0.5777 0.756 0.012 0.000 0.040 0.192
#> GSM648600     1  0.1243     0.8006 0.960 0.004 0.000 0.008 0.028
#> GSM648621     1  0.1597     0.7961 0.940 0.000 0.000 0.012 0.048
#> GSM648622     1  0.0880     0.7970 0.968 0.000 0.000 0.032 0.000
#> GSM648623     5  0.4897     0.5062 0.460 0.000 0.000 0.024 0.516
#> GSM648636     1  0.2591     0.7766 0.904 0.044 0.000 0.020 0.032
#> GSM648655     1  0.2515     0.7796 0.908 0.040 0.000 0.020 0.032
#> GSM648661     1  0.3909     0.5869 0.760 0.000 0.000 0.024 0.216
#> GSM648664     1  0.3779     0.6111 0.776 0.000 0.000 0.024 0.200
#> GSM648683     1  0.3687     0.6735 0.792 0.000 0.000 0.028 0.180
#> GSM648685     1  0.2362     0.7513 0.900 0.000 0.000 0.024 0.076
#> GSM648702     1  0.2313     0.7842 0.916 0.040 0.000 0.012 0.032
#> GSM648597     5  0.5735     0.4735 0.376 0.000 0.000 0.092 0.532
#> GSM648603     5  0.4517     0.5541 0.436 0.000 0.000 0.008 0.556
#> GSM648606     5  0.6729     0.5850 0.116 0.212 0.076 0.000 0.596
#> GSM648613     5  0.5692     0.6261 0.088 0.096 0.104 0.000 0.712
#> GSM648619     5  0.4967     0.7104 0.280 0.000 0.060 0.000 0.660
#> GSM648654     5  0.7726     0.6153 0.204 0.196 0.060 0.024 0.516
#> GSM648663     5  0.6811     0.6338 0.164 0.192 0.060 0.000 0.584
#> GSM648670     1  0.7322    -0.1643 0.368 0.028 0.000 0.364 0.240
#> GSM648707     5  0.4677     0.4936 0.132 0.000 0.008 0.104 0.756
#> GSM648615     2  0.0000     0.9447 0.000 1.000 0.000 0.000 0.000
#> GSM648643     2  0.0579     0.9385 0.000 0.984 0.000 0.008 0.008
#> GSM648650     2  0.2773     0.7476 0.164 0.836 0.000 0.000 0.000
#> GSM648656     2  0.0579     0.9385 0.000 0.984 0.000 0.008 0.008
#> GSM648715     2  0.0290     0.9439 0.008 0.992 0.000 0.000 0.000
#> GSM648598     1  0.0000     0.8017 1.000 0.000 0.000 0.000 0.000
#> GSM648601     1  0.0162     0.8013 0.996 0.000 0.000 0.004 0.000
#> GSM648602     1  0.1082     0.8007 0.964 0.000 0.000 0.008 0.028
#> GSM648604     1  0.3779     0.6111 0.776 0.000 0.000 0.024 0.200
#> GSM648614     2  0.4552     0.6714 0.040 0.760 0.000 0.024 0.176
#> GSM648624     1  0.0955     0.7965 0.968 0.000 0.000 0.028 0.004
#> GSM648625     1  0.3511     0.6182 0.800 0.184 0.000 0.004 0.012
#> GSM648629     1  0.3909     0.5869 0.760 0.000 0.000 0.024 0.216
#> GSM648634     1  0.1116     0.8005 0.964 0.004 0.000 0.004 0.028
#> GSM648648     1  0.1043     0.7947 0.960 0.040 0.000 0.000 0.000
#> GSM648651     1  0.0703     0.7990 0.976 0.000 0.000 0.024 0.000
#> GSM648657     1  0.0740     0.8000 0.980 0.004 0.000 0.008 0.008
#> GSM648660     1  0.0290     0.8006 0.992 0.000 0.000 0.008 0.000
#> GSM648697     1  0.0992     0.8019 0.968 0.000 0.000 0.024 0.008
#> GSM648710     1  0.3909     0.5869 0.760 0.000 0.000 0.024 0.216
#> GSM648591     5  0.4944     0.6107 0.208 0.000 0.000 0.092 0.700
#> GSM648592     5  0.5894     0.4177 0.432 0.068 0.000 0.012 0.488
#> GSM648607     5  0.4757     0.5920 0.380 0.000 0.000 0.024 0.596
#> GSM648611     5  0.4147     0.3769 0.008 0.000 0.316 0.000 0.676
#> GSM648612     5  0.4946     0.7121 0.276 0.000 0.060 0.000 0.664
#> GSM648616     5  0.4863     0.4404 0.116 0.000 0.008 0.136 0.740
#> GSM648617     1  0.3675     0.4962 0.772 0.004 0.000 0.008 0.216
#> GSM648626     5  0.4489     0.5748 0.420 0.000 0.000 0.008 0.572
#> GSM648711     5  0.4895     0.5982 0.376 0.000 0.004 0.024 0.596
#> GSM648712     5  0.4806     0.7100 0.252 0.000 0.060 0.000 0.688
#> GSM648713     5  0.4270     0.6616 0.336 0.000 0.004 0.004 0.656
#> GSM648714     2  0.3282     0.7338 0.008 0.804 0.000 0.000 0.188
#> GSM648716     5  0.4967     0.7104 0.280 0.000 0.060 0.000 0.660
#> GSM648717     5  0.5500     0.6457 0.144 0.008 0.172 0.000 0.676
#> GSM648590     1  0.5145     0.4806 0.664 0.280 0.000 0.024 0.032
#> GSM648596     2  0.0290     0.9431 0.000 0.992 0.000 0.000 0.008
#> GSM648642     2  0.0290     0.9439 0.008 0.992 0.000 0.000 0.000
#> GSM648696     1  0.3916     0.6387 0.780 0.188 0.000 0.004 0.028
#> GSM648705     1  0.1478     0.7814 0.936 0.064 0.000 0.000 0.000
#> GSM648718     2  0.0290     0.9431 0.000 0.992 0.000 0.000 0.008
#> GSM648599     1  0.1195     0.8003 0.960 0.000 0.000 0.012 0.028
#> GSM648608     1  0.4083     0.6078 0.744 0.000 0.000 0.028 0.228
#> GSM648609     1  0.3745     0.6174 0.780 0.000 0.000 0.024 0.196
#> GSM648610     1  0.4024     0.6208 0.752 0.000 0.000 0.028 0.220
#> GSM648633     1  0.0324     0.8013 0.992 0.004 0.000 0.004 0.000
#> GSM648644     2  0.0579     0.9385 0.000 0.984 0.000 0.008 0.008
#> GSM648652     1  0.1043     0.7947 0.960 0.040 0.000 0.000 0.000
#> GSM648653     1  0.0955     0.8005 0.968 0.000 0.000 0.004 0.028
#> GSM648658     1  0.1701     0.7976 0.944 0.012 0.000 0.016 0.028
#> GSM648659     2  0.0932     0.9324 0.004 0.972 0.000 0.020 0.004
#> GSM648662     1  0.6984    -0.0210 0.480 0.200 0.000 0.024 0.296
#> GSM648665     1  0.7165    -0.0676 0.412 0.348 0.000 0.024 0.216
#> GSM648666     1  0.0898     0.8015 0.972 0.000 0.000 0.020 0.008
#> GSM648680     1  0.0404     0.8019 0.988 0.012 0.000 0.000 0.000
#> GSM648684     1  0.3002     0.7401 0.856 0.000 0.000 0.028 0.116
#> GSM648709     2  0.0404     0.9421 0.012 0.988 0.000 0.000 0.000
#> GSM648719     1  0.0162     0.8013 0.996 0.000 0.000 0.004 0.000
#> GSM648627     5  0.4806     0.7100 0.252 0.000 0.060 0.000 0.688
#> GSM648637     4  0.5900     0.7543 0.000 0.212 0.000 0.600 0.188
#> GSM648638     4  0.6519     0.6288 0.000 0.204 0.000 0.456 0.340
#> GSM648641     3  0.4341     0.2946 0.000 0.000 0.592 0.004 0.404
#> GSM648672     4  0.3975     0.8315 0.000 0.144 0.000 0.792 0.064
#> GSM648674     4  0.4204     0.7801 0.000 0.048 0.000 0.756 0.196
#> GSM648703     4  0.2583     0.8268 0.000 0.132 0.000 0.864 0.004
#> GSM648631     3  0.0000     0.9505 0.000 0.000 1.000 0.000 0.000
#> GSM648669     4  0.4046     0.7613 0.000 0.008 0.032 0.780 0.180
#> GSM648671     4  0.4046     0.7613 0.000 0.008 0.032 0.780 0.180
#> GSM648678     4  0.3756     0.7535 0.000 0.248 0.000 0.744 0.008
#> GSM648679     4  0.4644     0.7491 0.000 0.040 0.000 0.680 0.280
#> GSM648681     4  0.7762     0.3175 0.068 0.352 0.000 0.364 0.216
#> GSM648686     3  0.0162     0.9492 0.000 0.000 0.996 0.004 0.000
#> GSM648689     3  0.0162     0.9492 0.000 0.000 0.996 0.004 0.000
#> GSM648690     3  0.0162     0.9492 0.000 0.000 0.996 0.004 0.000
#> GSM648691     3  0.0000     0.9505 0.000 0.000 1.000 0.000 0.000
#> GSM648693     3  0.0000     0.9505 0.000 0.000 1.000 0.000 0.000
#> GSM648700     4  0.2170     0.8241 0.004 0.088 0.000 0.904 0.004
#> GSM648630     3  0.0000     0.9505 0.000 0.000 1.000 0.000 0.000
#> GSM648632     3  0.0000     0.9505 0.000 0.000 1.000 0.000 0.000
#> GSM648639     5  0.5233     0.2106 0.000 0.000 0.192 0.128 0.680
#> GSM648640     3  0.1908     0.8729 0.000 0.000 0.908 0.000 0.092
#> GSM648668     4  0.4215     0.8248 0.000 0.168 0.000 0.768 0.064
#> GSM648676     4  0.2424     0.8270 0.000 0.132 0.000 0.868 0.000
#> GSM648692     3  0.0000     0.9505 0.000 0.000 1.000 0.000 0.000
#> GSM648694     3  0.0000     0.9505 0.000 0.000 1.000 0.000 0.000
#> GSM648699     4  0.1851     0.8244 0.000 0.088 0.000 0.912 0.000
#> GSM648701     4  0.2424     0.8270 0.000 0.132 0.000 0.868 0.000
#> GSM648673     4  0.3934     0.7638 0.000 0.008 0.032 0.792 0.168
#> GSM648677     4  0.3053     0.8186 0.000 0.164 0.000 0.828 0.008
#> GSM648687     3  0.1251     0.9134 0.000 0.000 0.956 0.008 0.036
#> GSM648688     3  0.0000     0.9505 0.000 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM648605     2  0.0436     0.9324 0.004 0.988 0.000 0.004 0.004 0.000
#> GSM648618     1  0.5410     0.3418 0.576 0.000 0.000 0.000 0.248 0.176
#> GSM648620     2  0.0551     0.9300 0.008 0.984 0.000 0.004 0.004 0.000
#> GSM648646     2  0.0622     0.9291 0.000 0.980 0.000 0.000 0.008 0.012
#> GSM648649     1  0.0717     0.7819 0.976 0.016 0.000 0.000 0.000 0.008
#> GSM648675     1  0.4836     0.6111 0.736 0.024 0.000 0.056 0.028 0.156
#> GSM648682     2  0.0146     0.9329 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM648698     2  0.0146     0.9331 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM648708     2  0.0291     0.9335 0.004 0.992 0.000 0.000 0.004 0.000
#> GSM648628     5  0.4600     0.6511 0.056 0.000 0.024 0.000 0.708 0.212
#> GSM648595     1  0.2314     0.7690 0.908 0.012 0.000 0.008 0.024 0.048
#> GSM648635     1  0.0405     0.7844 0.988 0.008 0.000 0.000 0.000 0.004
#> GSM648645     1  0.0692     0.7825 0.976 0.000 0.000 0.000 0.004 0.020
#> GSM648647     2  0.0291     0.9335 0.004 0.992 0.000 0.000 0.004 0.000
#> GSM648667     2  0.1349     0.8824 0.056 0.940 0.000 0.000 0.004 0.000
#> GSM648695     2  0.0291     0.9335 0.004 0.992 0.000 0.000 0.004 0.000
#> GSM648704     2  0.0717     0.9272 0.000 0.976 0.000 0.000 0.008 0.016
#> GSM648706     2  0.0405     0.9311 0.000 0.988 0.000 0.000 0.008 0.004
#> GSM648593     1  0.0405     0.7845 0.988 0.008 0.000 0.004 0.000 0.000
#> GSM648594     1  0.4460     0.3358 0.644 0.000 0.000 0.000 0.052 0.304
#> GSM648600     1  0.1700     0.7759 0.928 0.000 0.000 0.000 0.024 0.048
#> GSM648621     1  0.2852     0.7583 0.856 0.000 0.000 0.000 0.064 0.080
#> GSM648622     1  0.2755     0.7198 0.844 0.000 0.000 0.012 0.140 0.004
#> GSM648623     5  0.5424     0.4543 0.288 0.000 0.000 0.008 0.580 0.124
#> GSM648636     1  0.2034     0.7729 0.920 0.008 0.000 0.004 0.024 0.044
#> GSM648655     1  0.2146     0.7714 0.916 0.008 0.000 0.008 0.024 0.044
#> GSM648661     5  0.4262    -0.0719 0.476 0.000 0.000 0.016 0.508 0.000
#> GSM648664     1  0.4192     0.2993 0.572 0.000 0.000 0.016 0.412 0.000
#> GSM648683     1  0.5017     0.3955 0.552 0.000 0.000 0.016 0.388 0.044
#> GSM648685     1  0.3534     0.6038 0.740 0.000 0.000 0.016 0.244 0.000
#> GSM648702     1  0.2034     0.7729 0.920 0.008 0.000 0.004 0.024 0.044
#> GSM648597     6  0.5919     0.2726 0.364 0.000 0.000 0.000 0.212 0.424
#> GSM648603     5  0.5805     0.4079 0.276 0.000 0.000 0.000 0.496 0.228
#> GSM648606     5  0.5317     0.5709 0.012 0.104 0.024 0.008 0.700 0.152
#> GSM648613     5  0.4744     0.5917 0.012 0.044 0.024 0.008 0.736 0.176
#> GSM648619     5  0.4543     0.6813 0.108 0.000 0.016 0.000 0.732 0.144
#> GSM648654     5  0.4106     0.5754 0.060 0.116 0.016 0.016 0.792 0.000
#> GSM648663     5  0.5391     0.5927 0.028 0.096 0.016 0.008 0.700 0.152
#> GSM648670     6  0.5821     0.2793 0.372 0.004 0.000 0.068 0.040 0.516
#> GSM648707     6  0.4023     0.4065 0.036 0.000 0.000 0.004 0.240 0.720
#> GSM648615     2  0.0551     0.9332 0.004 0.984 0.000 0.004 0.000 0.008
#> GSM648643     2  0.0508     0.9292 0.000 0.984 0.000 0.000 0.004 0.012
#> GSM648650     2  0.3380     0.5711 0.244 0.748 0.000 0.000 0.004 0.004
#> GSM648656     2  0.0603     0.9280 0.000 0.980 0.000 0.000 0.004 0.016
#> GSM648715     2  0.0405     0.9333 0.004 0.988 0.000 0.000 0.008 0.000
#> GSM648598     1  0.0405     0.7852 0.988 0.000 0.000 0.000 0.008 0.004
#> GSM648601     1  0.0520     0.7850 0.984 0.000 0.000 0.000 0.008 0.008
#> GSM648602     1  0.2001     0.7781 0.912 0.000 0.000 0.000 0.040 0.048
#> GSM648604     1  0.4192     0.2993 0.572 0.000 0.000 0.016 0.412 0.000
#> GSM648614     2  0.4274     0.4670 0.008 0.640 0.000 0.012 0.336 0.004
#> GSM648624     1  0.2886     0.7140 0.836 0.000 0.000 0.016 0.144 0.004
#> GSM648625     1  0.3465     0.6784 0.828 0.084 0.000 0.004 0.076 0.008
#> GSM648629     1  0.4258     0.1368 0.516 0.000 0.000 0.016 0.468 0.000
#> GSM648634     1  0.1633     0.7765 0.932 0.000 0.000 0.000 0.024 0.044
#> GSM648648     1  0.0363     0.7844 0.988 0.012 0.000 0.000 0.000 0.000
#> GSM648651     1  0.2213     0.7489 0.888 0.000 0.000 0.008 0.100 0.004
#> GSM648657     1  0.0858     0.7803 0.968 0.000 0.000 0.000 0.004 0.028
#> GSM648660     1  0.0508     0.7842 0.984 0.000 0.000 0.000 0.004 0.012
#> GSM648697     1  0.2939     0.7393 0.848 0.000 0.000 0.016 0.120 0.016
#> GSM648710     1  0.4264     0.0807 0.500 0.000 0.000 0.016 0.484 0.000
#> GSM648591     6  0.5183     0.2944 0.140 0.000 0.000 0.000 0.256 0.604
#> GSM648592     1  0.6764    -0.3217 0.400 0.032 0.000 0.004 0.268 0.296
#> GSM648607     5  0.3247     0.6358 0.156 0.000 0.000 0.000 0.808 0.036
#> GSM648611     5  0.4574     0.6012 0.008 0.000 0.092 0.000 0.708 0.192
#> GSM648612     5  0.4723     0.6726 0.096 0.000 0.016 0.004 0.720 0.164
#> GSM648616     6  0.3460     0.4742 0.036 0.000 0.000 0.004 0.164 0.796
#> GSM648617     1  0.3698     0.6117 0.788 0.004 0.000 0.004 0.160 0.044
#> GSM648626     5  0.5901     0.3572 0.272 0.000 0.000 0.000 0.472 0.256
#> GSM648711     5  0.3631     0.6262 0.160 0.000 0.000 0.012 0.792 0.036
#> GSM648712     5  0.4349     0.6664 0.064 0.000 0.016 0.000 0.736 0.184
#> GSM648713     5  0.4204     0.6774 0.132 0.000 0.000 0.000 0.740 0.128
#> GSM648714     2  0.4549     0.5089 0.008 0.656 0.000 0.008 0.300 0.028
#> GSM648716     5  0.4455     0.6809 0.100 0.000 0.016 0.000 0.740 0.144
#> GSM648717     5  0.4415     0.6295 0.040 0.000 0.040 0.008 0.760 0.152
#> GSM648590     1  0.4028     0.6741 0.792 0.128 0.000 0.008 0.024 0.048
#> GSM648596     2  0.0767     0.9310 0.004 0.976 0.000 0.000 0.008 0.012
#> GSM648642     2  0.0291     0.9335 0.004 0.992 0.000 0.000 0.004 0.000
#> GSM648696     1  0.2880     0.7460 0.872 0.056 0.000 0.000 0.024 0.048
#> GSM648705     1  0.0692     0.7818 0.976 0.020 0.000 0.000 0.000 0.004
#> GSM648718     2  0.0405     0.9331 0.004 0.988 0.000 0.000 0.000 0.008
#> GSM648599     1  0.1995     0.7779 0.912 0.000 0.000 0.000 0.036 0.052
#> GSM648608     1  0.5084     0.2909 0.504 0.000 0.000 0.016 0.436 0.044
#> GSM648609     1  0.4205     0.2796 0.564 0.000 0.000 0.016 0.420 0.000
#> GSM648610     1  0.5052     0.3510 0.532 0.000 0.000 0.016 0.408 0.044
#> GSM648633     1  0.0260     0.7851 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM648644     2  0.0717     0.9272 0.000 0.976 0.000 0.000 0.008 0.016
#> GSM648652     1  0.0508     0.7835 0.984 0.012 0.000 0.000 0.000 0.004
#> GSM648653     1  0.1789     0.7778 0.924 0.000 0.000 0.000 0.032 0.044
#> GSM648658     1  0.1852     0.7759 0.928 0.004 0.000 0.004 0.024 0.040
#> GSM648659     2  0.1067     0.9230 0.004 0.964 0.000 0.024 0.004 0.004
#> GSM648662     5  0.5221     0.4689 0.200 0.116 0.000 0.024 0.660 0.000
#> GSM648665     5  0.6129     0.2870 0.224 0.260 0.000 0.016 0.500 0.000
#> GSM648666     1  0.2806     0.7238 0.844 0.000 0.000 0.016 0.136 0.004
#> GSM648680     1  0.0260     0.7851 0.992 0.008 0.000 0.000 0.000 0.000
#> GSM648684     1  0.4656     0.5827 0.660 0.000 0.000 0.016 0.280 0.044
#> GSM648709     2  0.0436     0.9324 0.004 0.988 0.000 0.004 0.004 0.000
#> GSM648719     1  0.0405     0.7846 0.988 0.000 0.000 0.000 0.004 0.008
#> GSM648627     5  0.4349     0.6692 0.064 0.000 0.016 0.000 0.736 0.184
#> GSM648637     6  0.5981    -0.3017 0.000 0.156 0.000 0.396 0.012 0.436
#> GSM648638     6  0.6109     0.1591 0.000 0.140 0.000 0.204 0.068 0.588
#> GSM648641     3  0.6141     0.0314 0.000 0.000 0.432 0.012 0.364 0.192
#> GSM648672     4  0.4556     0.6981 0.000 0.120 0.000 0.732 0.016 0.132
#> GSM648674     4  0.3997     0.2562 0.000 0.004 0.000 0.508 0.000 0.488
#> GSM648703     4  0.0937     0.7497 0.000 0.040 0.000 0.960 0.000 0.000
#> GSM648631     3  0.0146     0.9154 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM648669     4  0.4743     0.5654 0.000 0.000 0.004 0.584 0.048 0.364
#> GSM648671     4  0.4743     0.5654 0.000 0.000 0.004 0.584 0.048 0.364
#> GSM648678     4  0.4228     0.4869 0.000 0.316 0.000 0.656 0.008 0.020
#> GSM648679     6  0.4343    -0.2762 0.000 0.004 0.000 0.384 0.020 0.592
#> GSM648681     6  0.6999     0.2716 0.192 0.272 0.000 0.080 0.004 0.452
#> GSM648686     3  0.0717     0.9097 0.000 0.000 0.976 0.008 0.000 0.016
#> GSM648689     3  0.0717     0.9097 0.000 0.000 0.976 0.008 0.000 0.016
#> GSM648690     3  0.0717     0.9097 0.000 0.000 0.976 0.008 0.000 0.016
#> GSM648691     3  0.0000     0.9158 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648693     3  0.0000     0.9158 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648700     4  0.1003     0.7437 0.000 0.020 0.000 0.964 0.000 0.016
#> GSM648630     3  0.0000     0.9158 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648632     3  0.0146     0.9154 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM648639     6  0.3595     0.4501 0.000 0.000 0.056 0.004 0.144 0.796
#> GSM648640     3  0.4332     0.6000 0.000 0.000 0.688 0.008 0.040 0.264
#> GSM648668     4  0.4747     0.6835 0.000 0.140 0.000 0.712 0.016 0.132
#> GSM648676     4  0.0937     0.7497 0.000 0.040 0.000 0.960 0.000 0.000
#> GSM648692     3  0.0000     0.9158 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648694     3  0.0146     0.9154 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM648699     4  0.1003     0.7437 0.000 0.020 0.000 0.964 0.000 0.016
#> GSM648701     4  0.0937     0.7497 0.000 0.040 0.000 0.960 0.000 0.000
#> GSM648673     4  0.4697     0.5782 0.000 0.000 0.004 0.600 0.048 0.348
#> GSM648677     4  0.2678     0.7112 0.000 0.116 0.000 0.860 0.004 0.020
#> GSM648687     3  0.1716     0.8727 0.000 0.000 0.932 0.004 0.028 0.036
#> GSM648688     3  0.0405     0.9127 0.000 0.000 0.988 0.004 0.000 0.008

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-CV-kmeans-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-CV-kmeans-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-CV-kmeans-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-CV-kmeans-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-CV-kmeans-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-CV-kmeans-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-CV-kmeans-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-CV-kmeans-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-CV-kmeans-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-CV-kmeans-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-CV-kmeans-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-CV-kmeans-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-CV-kmeans-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-CV-kmeans-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-CV-kmeans-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-CV-kmeans-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-CV-kmeans-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)
#> Error in mat[ceiling(1:nr/h_ratio), ceiling(1:nc/w_ratio), drop = FALSE]: subscript out of bounds

plot of chunk tab-CV-kmeans-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)
#> Error in mat[ceiling(1:nr/h_ratio), ceiling(1:nc/w_ratio), drop = FALSE]: subscript out of bounds

plot of chunk tab-CV-kmeans-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-CV-kmeans-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk CV-kmeans-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-CV-kmeans-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-CV-kmeans-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-CV-kmeans-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-CV-kmeans-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-CV-kmeans-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk CV-kmeans-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>             n disease.state(p) development.stage(p) other(p) k
#> CV:kmeans 100         1.14e-02              0.04972 2.51e-10 2
#> CV:kmeans 116         9.45e-15              0.00629 1.05e-21 3
#> CV:kmeans 117         3.71e-24              0.05082 1.36e-30 4
#> CV:kmeans 115         6.24e-24              0.02024 7.94e-50 5
#> CV:kmeans  99         1.61e-20              0.22161 1.80e-40 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


CV:skmeans

The object with results only for a single top-value method and a single partition method can be extracted as:

res = res_list["CV", "skmeans"]
# you can also extract it by
# res = res_list["CV:skmeans"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 130 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#>   Subgroups are detected by 'skmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 4.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk CV-skmeans-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk CV-skmeans-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.511           0.852       0.903         0.5023 0.498   0.498
#> 3 3 0.674           0.799       0.901         0.3231 0.696   0.463
#> 4 4 0.840           0.799       0.909         0.1126 0.866   0.631
#> 5 5 0.759           0.595       0.798         0.0758 0.874   0.569
#> 6 6 0.833           0.765       0.875         0.0472 0.914   0.615

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 4

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM648605     2  0.0000      0.878 0.000 1.000
#> GSM648618     1  0.0376      0.891 0.996 0.004
#> GSM648620     2  0.0000      0.878 0.000 1.000
#> GSM648646     2  0.0000      0.878 0.000 1.000
#> GSM648649     2  0.7139      0.850 0.196 0.804
#> GSM648675     2  0.7139      0.850 0.196 0.804
#> GSM648682     2  0.0938      0.878 0.012 0.988
#> GSM648698     2  0.0000      0.878 0.000 1.000
#> GSM648708     2  0.1184      0.878 0.016 0.984
#> GSM648628     1  0.0000      0.890 1.000 0.000
#> GSM648595     2  0.7139      0.850 0.196 0.804
#> GSM648635     2  0.7139      0.850 0.196 0.804
#> GSM648645     2  0.7528      0.838 0.216 0.784
#> GSM648647     2  0.0000      0.878 0.000 1.000
#> GSM648667     2  0.6887      0.854 0.184 0.816
#> GSM648695     2  0.0376      0.879 0.004 0.996
#> GSM648704     2  0.0000      0.878 0.000 1.000
#> GSM648706     2  0.0000      0.878 0.000 1.000
#> GSM648593     2  0.7139      0.850 0.196 0.804
#> GSM648594     2  0.7139      0.850 0.196 0.804
#> GSM648600     2  0.9686      0.589 0.396 0.604
#> GSM648621     1  0.0000      0.890 1.000 0.000
#> GSM648622     1  0.0376      0.891 0.996 0.004
#> GSM648623     1  0.0000      0.890 1.000 0.000
#> GSM648636     2  0.7139      0.850 0.196 0.804
#> GSM648655     2  0.7139      0.850 0.196 0.804
#> GSM648661     1  0.0376      0.891 0.996 0.004
#> GSM648664     1  0.0376      0.891 0.996 0.004
#> GSM648683     1  0.0376      0.891 0.996 0.004
#> GSM648685     1  0.0376      0.891 0.996 0.004
#> GSM648702     2  0.7139      0.850 0.196 0.804
#> GSM648597     1  0.9983     -0.265 0.524 0.476
#> GSM648603     1  0.0376      0.891 0.996 0.004
#> GSM648606     1  0.7139      0.838 0.804 0.196
#> GSM648613     1  0.7139      0.838 0.804 0.196
#> GSM648619     1  0.0376      0.891 0.996 0.004
#> GSM648654     1  0.7219      0.838 0.800 0.200
#> GSM648663     1  0.7139      0.838 0.804 0.196
#> GSM648670     2  0.7219      0.850 0.200 0.800
#> GSM648707     1  0.0000      0.890 1.000 0.000
#> GSM648615     2  0.0000      0.878 0.000 1.000
#> GSM648643     2  0.0000      0.878 0.000 1.000
#> GSM648650     2  0.6712      0.855 0.176 0.824
#> GSM648656     2  0.0000      0.878 0.000 1.000
#> GSM648715     2  0.0000      0.878 0.000 1.000
#> GSM648598     2  0.8016      0.813 0.244 0.756
#> GSM648601     2  0.8327      0.793 0.264 0.736
#> GSM648602     1  0.0376      0.891 0.996 0.004
#> GSM648604     1  0.0376      0.891 0.996 0.004
#> GSM648614     1  0.7528      0.825 0.784 0.216
#> GSM648624     1  0.0376      0.891 0.996 0.004
#> GSM648625     2  0.7139      0.850 0.196 0.804
#> GSM648629     1  0.0376      0.891 0.996 0.004
#> GSM648634     2  0.7602      0.834 0.220 0.780
#> GSM648648     2  0.7139      0.850 0.196 0.804
#> GSM648651     1  0.0376      0.891 0.996 0.004
#> GSM648657     2  0.7376      0.843 0.208 0.792
#> GSM648660     2  0.7528      0.838 0.216 0.784
#> GSM648697     2  0.8763      0.755 0.296 0.704
#> GSM648710     1  0.0376      0.891 0.996 0.004
#> GSM648591     1  0.0000      0.890 1.000 0.000
#> GSM648592     2  0.7139      0.850 0.196 0.804
#> GSM648607     1  0.0376      0.891 0.996 0.004
#> GSM648611     1  0.1184      0.888 0.984 0.016
#> GSM648612     1  0.0000      0.890 1.000 0.000
#> GSM648616     1  0.1843      0.885 0.972 0.028
#> GSM648617     2  0.9710      0.581 0.400 0.600
#> GSM648626     1  0.0376      0.891 0.996 0.004
#> GSM648711     1  0.0376      0.891 0.996 0.004
#> GSM648712     1  0.0000      0.890 1.000 0.000
#> GSM648713     1  0.0376      0.891 0.996 0.004
#> GSM648714     1  0.7528      0.825 0.784 0.216
#> GSM648716     1  0.0000      0.890 1.000 0.000
#> GSM648717     1  0.7139      0.838 0.804 0.196
#> GSM648590     2  0.7139      0.850 0.196 0.804
#> GSM648596     2  0.0000      0.878 0.000 1.000
#> GSM648642     2  0.0000      0.878 0.000 1.000
#> GSM648696     2  0.7139      0.850 0.196 0.804
#> GSM648705     2  0.7139      0.850 0.196 0.804
#> GSM648718     2  0.0000      0.878 0.000 1.000
#> GSM648599     1  0.0376      0.891 0.996 0.004
#> GSM648608     1  0.0376      0.891 0.996 0.004
#> GSM648609     1  0.0376      0.891 0.996 0.004
#> GSM648610     1  0.0376      0.891 0.996 0.004
#> GSM648633     2  0.7219      0.848 0.200 0.800
#> GSM648644     2  0.0000      0.878 0.000 1.000
#> GSM648652     2  0.7139      0.850 0.196 0.804
#> GSM648653     1  0.0376      0.891 0.996 0.004
#> GSM648658     2  0.7139      0.850 0.196 0.804
#> GSM648659     2  0.0000      0.878 0.000 1.000
#> GSM648662     1  0.7219      0.838 0.800 0.200
#> GSM648665     1  0.7219      0.838 0.800 0.200
#> GSM648666     1  0.0376      0.891 0.996 0.004
#> GSM648680     2  0.7139      0.850 0.196 0.804
#> GSM648684     1  0.0376      0.891 0.996 0.004
#> GSM648709     2  0.0000      0.878 0.000 1.000
#> GSM648719     2  0.7528      0.838 0.216 0.784
#> GSM648627     1  0.0000      0.890 1.000 0.000
#> GSM648637     2  0.0376      0.877 0.004 0.996
#> GSM648638     2  0.4161      0.811 0.084 0.916
#> GSM648641     1  0.7139      0.838 0.804 0.196
#> GSM648672     2  0.0376      0.877 0.004 0.996
#> GSM648674     2  0.0376      0.877 0.004 0.996
#> GSM648703     2  0.0376      0.877 0.004 0.996
#> GSM648631     1  0.7139      0.838 0.804 0.196
#> GSM648669     2  0.0376      0.877 0.004 0.996
#> GSM648671     2  0.0376      0.877 0.004 0.996
#> GSM648678     2  0.0376      0.877 0.004 0.996
#> GSM648679     2  0.0376      0.877 0.004 0.996
#> GSM648681     2  0.0000      0.878 0.000 1.000
#> GSM648686     1  0.7139      0.838 0.804 0.196
#> GSM648689     1  0.7139      0.838 0.804 0.196
#> GSM648690     1  0.7139      0.838 0.804 0.196
#> GSM648691     1  0.7139      0.838 0.804 0.196
#> GSM648693     1  0.7139      0.838 0.804 0.196
#> GSM648700     2  0.1184      0.878 0.016 0.984
#> GSM648630     1  0.7139      0.838 0.804 0.196
#> GSM648632     1  0.7139      0.838 0.804 0.196
#> GSM648639     1  0.7139      0.838 0.804 0.196
#> GSM648640     1  0.7139      0.838 0.804 0.196
#> GSM648668     2  0.0376      0.877 0.004 0.996
#> GSM648676     2  0.0376      0.877 0.004 0.996
#> GSM648692     1  0.7139      0.838 0.804 0.196
#> GSM648694     1  0.7139      0.838 0.804 0.196
#> GSM648699     2  0.0376      0.877 0.004 0.996
#> GSM648701     2  0.0376      0.877 0.004 0.996
#> GSM648673     2  0.0376      0.877 0.004 0.996
#> GSM648677     2  0.0376      0.877 0.004 0.996
#> GSM648687     1  0.7139      0.838 0.804 0.196
#> GSM648688     1  0.7139      0.838 0.804 0.196

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM648605     2  0.0000    0.89156 0.000 1.000 0.000
#> GSM648618     3  0.6252    0.33318 0.444 0.000 0.556
#> GSM648620     2  0.0000    0.89156 0.000 1.000 0.000
#> GSM648646     2  0.0000    0.89156 0.000 1.000 0.000
#> GSM648649     1  0.5016    0.67213 0.760 0.240 0.000
#> GSM648675     2  0.4605    0.71390 0.204 0.796 0.000
#> GSM648682     2  0.0000    0.89156 0.000 1.000 0.000
#> GSM648698     2  0.0000    0.89156 0.000 1.000 0.000
#> GSM648708     2  0.0000    0.89156 0.000 1.000 0.000
#> GSM648628     3  0.4121    0.76308 0.168 0.000 0.832
#> GSM648595     1  0.6309   -0.00082 0.504 0.496 0.000
#> GSM648635     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648645     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648647     2  0.0000    0.89156 0.000 1.000 0.000
#> GSM648667     2  0.0000    0.89156 0.000 1.000 0.000
#> GSM648695     2  0.0000    0.89156 0.000 1.000 0.000
#> GSM648704     2  0.0000    0.89156 0.000 1.000 0.000
#> GSM648706     2  0.0000    0.89156 0.000 1.000 0.000
#> GSM648593     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648594     1  0.2796    0.84287 0.908 0.092 0.000
#> GSM648600     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648621     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648622     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648623     1  0.6225    0.05313 0.568 0.000 0.432
#> GSM648636     1  0.0237    0.92336 0.996 0.004 0.000
#> GSM648655     1  0.1163    0.90321 0.972 0.028 0.000
#> GSM648661     3  0.6126    0.45546 0.400 0.000 0.600
#> GSM648664     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648683     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648685     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648702     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648597     1  0.3816    0.75988 0.852 0.000 0.148
#> GSM648603     1  0.6309   -0.20056 0.500 0.000 0.500
#> GSM648606     3  0.4555    0.72967 0.000 0.200 0.800
#> GSM648613     3  0.4555    0.72967 0.000 0.200 0.800
#> GSM648619     3  0.4555    0.73928 0.200 0.000 0.800
#> GSM648654     3  0.4555    0.72967 0.000 0.200 0.800
#> GSM648663     3  0.4555    0.72967 0.000 0.200 0.800
#> GSM648670     2  0.5020    0.82430 0.012 0.796 0.192
#> GSM648707     3  0.0000    0.82213 0.000 0.000 1.000
#> GSM648615     2  0.0000    0.89156 0.000 1.000 0.000
#> GSM648643     2  0.0000    0.89156 0.000 1.000 0.000
#> GSM648650     2  0.0000    0.89156 0.000 1.000 0.000
#> GSM648656     2  0.0000    0.89156 0.000 1.000 0.000
#> GSM648715     2  0.0000    0.89156 0.000 1.000 0.000
#> GSM648598     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648601     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648602     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648604     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648614     3  0.7395    0.47134 0.040 0.380 0.580
#> GSM648624     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648625     1  0.4555    0.70211 0.800 0.200 0.000
#> GSM648629     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648634     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648648     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648651     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648657     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648660     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648697     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648710     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648591     3  0.0592    0.82086 0.012 0.000 0.988
#> GSM648592     2  0.1031    0.87474 0.024 0.976 0.000
#> GSM648607     3  0.6225    0.36786 0.432 0.000 0.568
#> GSM648611     3  0.0000    0.82213 0.000 0.000 1.000
#> GSM648612     3  0.4555    0.73928 0.200 0.000 0.800
#> GSM648616     3  0.0000    0.82213 0.000 0.000 1.000
#> GSM648617     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648626     3  0.6309    0.17597 0.496 0.000 0.504
#> GSM648711     3  0.6215    0.37749 0.428 0.000 0.572
#> GSM648712     3  0.4555    0.73928 0.200 0.000 0.800
#> GSM648713     3  0.4842    0.71627 0.224 0.000 0.776
#> GSM648714     3  0.6008    0.51562 0.000 0.372 0.628
#> GSM648716     3  0.4555    0.73928 0.200 0.000 0.800
#> GSM648717     3  0.3686    0.76640 0.000 0.140 0.860
#> GSM648590     2  0.4605    0.71390 0.204 0.796 0.000
#> GSM648596     2  0.0000    0.89156 0.000 1.000 0.000
#> GSM648642     2  0.0000    0.89156 0.000 1.000 0.000
#> GSM648696     1  0.4796    0.70489 0.780 0.220 0.000
#> GSM648705     1  0.4555    0.72244 0.800 0.200 0.000
#> GSM648718     2  0.0000    0.89156 0.000 1.000 0.000
#> GSM648599     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648608     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648609     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648610     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648633     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648644     2  0.0000    0.89156 0.000 1.000 0.000
#> GSM648652     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648653     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648658     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648659     2  0.0000    0.89156 0.000 1.000 0.000
#> GSM648662     3  0.9425    0.42083 0.312 0.200 0.488
#> GSM648665     1  0.6767    0.60749 0.720 0.216 0.064
#> GSM648666     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648680     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648684     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648709     2  0.0000    0.89156 0.000 1.000 0.000
#> GSM648719     1  0.0000    0.92656 1.000 0.000 0.000
#> GSM648627     3  0.4504    0.74263 0.196 0.000 0.804
#> GSM648637     2  0.4555    0.82654 0.000 0.800 0.200
#> GSM648638     2  0.6215    0.51225 0.000 0.572 0.428
#> GSM648641     3  0.0000    0.82213 0.000 0.000 1.000
#> GSM648672     2  0.4555    0.82654 0.000 0.800 0.200
#> GSM648674     2  0.4555    0.82654 0.000 0.800 0.200
#> GSM648703     2  0.4555    0.82654 0.000 0.800 0.200
#> GSM648631     3  0.0000    0.82213 0.000 0.000 1.000
#> GSM648669     2  0.5988    0.62119 0.000 0.632 0.368
#> GSM648671     2  0.5988    0.62119 0.000 0.632 0.368
#> GSM648678     2  0.0000    0.89156 0.000 1.000 0.000
#> GSM648679     2  0.4555    0.82654 0.000 0.800 0.200
#> GSM648681     2  0.0000    0.89156 0.000 1.000 0.000
#> GSM648686     3  0.0000    0.82213 0.000 0.000 1.000
#> GSM648689     3  0.0000    0.82213 0.000 0.000 1.000
#> GSM648690     3  0.0000    0.82213 0.000 0.000 1.000
#> GSM648691     3  0.0000    0.82213 0.000 0.000 1.000
#> GSM648693     3  0.0000    0.82213 0.000 0.000 1.000
#> GSM648700     2  0.4555    0.82654 0.000 0.800 0.200
#> GSM648630     3  0.0000    0.82213 0.000 0.000 1.000
#> GSM648632     3  0.0000    0.82213 0.000 0.000 1.000
#> GSM648639     3  0.0000    0.82213 0.000 0.000 1.000
#> GSM648640     3  0.0000    0.82213 0.000 0.000 1.000
#> GSM648668     2  0.4555    0.82654 0.000 0.800 0.200
#> GSM648676     2  0.4555    0.82654 0.000 0.800 0.200
#> GSM648692     3  0.0000    0.82213 0.000 0.000 1.000
#> GSM648694     3  0.0000    0.82213 0.000 0.000 1.000
#> GSM648699     2  0.4555    0.82654 0.000 0.800 0.200
#> GSM648701     2  0.4555    0.82654 0.000 0.800 0.200
#> GSM648673     2  0.4702    0.81698 0.000 0.788 0.212
#> GSM648677     2  0.4555    0.82654 0.000 0.800 0.200
#> GSM648687     3  0.0000    0.82213 0.000 0.000 1.000
#> GSM648688     3  0.0000    0.82213 0.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM648605     2  0.0000   0.932104 0.000 1.000 0.000 0.000
#> GSM648618     3  0.5971   0.192502 0.428 0.000 0.532 0.040
#> GSM648620     2  0.0000   0.932104 0.000 1.000 0.000 0.000
#> GSM648646     2  0.0000   0.932104 0.000 1.000 0.000 0.000
#> GSM648649     1  0.4998   0.063096 0.512 0.488 0.000 0.000
#> GSM648675     4  0.1545   0.905451 0.008 0.040 0.000 0.952
#> GSM648682     2  0.0000   0.932104 0.000 1.000 0.000 0.000
#> GSM648698     2  0.0000   0.932104 0.000 1.000 0.000 0.000
#> GSM648708     2  0.0000   0.932104 0.000 1.000 0.000 0.000
#> GSM648628     3  0.0707   0.875783 0.000 0.000 0.980 0.020
#> GSM648595     4  0.3286   0.849612 0.044 0.080 0.000 0.876
#> GSM648635     1  0.0000   0.895328 1.000 0.000 0.000 0.000
#> GSM648645     1  0.0000   0.895328 1.000 0.000 0.000 0.000
#> GSM648647     2  0.0000   0.932104 0.000 1.000 0.000 0.000
#> GSM648667     2  0.0000   0.932104 0.000 1.000 0.000 0.000
#> GSM648695     2  0.0000   0.932104 0.000 1.000 0.000 0.000
#> GSM648704     2  0.0000   0.932104 0.000 1.000 0.000 0.000
#> GSM648706     2  0.0000   0.932104 0.000 1.000 0.000 0.000
#> GSM648593     1  0.0000   0.895328 1.000 0.000 0.000 0.000
#> GSM648594     4  0.4543   0.524322 0.324 0.000 0.000 0.676
#> GSM648600     1  0.0707   0.892610 0.980 0.000 0.000 0.020
#> GSM648621     1  0.0707   0.892610 0.980 0.000 0.000 0.020
#> GSM648622     1  0.0000   0.895328 1.000 0.000 0.000 0.000
#> GSM648623     1  0.5203   0.197638 0.576 0.000 0.416 0.008
#> GSM648636     1  0.0707   0.892610 0.980 0.000 0.000 0.020
#> GSM648655     1  0.0895   0.891443 0.976 0.004 0.000 0.020
#> GSM648661     1  0.5858  -0.000402 0.500 0.000 0.468 0.032
#> GSM648664     1  0.1209   0.883679 0.964 0.000 0.004 0.032
#> GSM648683     1  0.1661   0.881410 0.944 0.000 0.004 0.052
#> GSM648685     1  0.0921   0.887040 0.972 0.000 0.000 0.028
#> GSM648702     1  0.0707   0.892610 0.980 0.000 0.000 0.020
#> GSM648597     4  0.4655   0.545204 0.312 0.000 0.004 0.684
#> GSM648603     1  0.5472   0.100321 0.544 0.000 0.440 0.016
#> GSM648606     3  0.2722   0.844246 0.000 0.064 0.904 0.032
#> GSM648613     3  0.1629   0.869317 0.000 0.024 0.952 0.024
#> GSM648619     3  0.4332   0.735916 0.176 0.000 0.792 0.032
#> GSM648654     3  0.4579   0.714299 0.000 0.200 0.768 0.032
#> GSM648663     3  0.3342   0.817349 0.000 0.100 0.868 0.032
#> GSM648670     4  0.1356   0.905366 0.008 0.032 0.000 0.960
#> GSM648707     3  0.2408   0.816390 0.000 0.000 0.896 0.104
#> GSM648615     2  0.0000   0.932104 0.000 1.000 0.000 0.000
#> GSM648643     2  0.0000   0.932104 0.000 1.000 0.000 0.000
#> GSM648650     2  0.0000   0.932104 0.000 1.000 0.000 0.000
#> GSM648656     2  0.0000   0.932104 0.000 1.000 0.000 0.000
#> GSM648715     2  0.0000   0.932104 0.000 1.000 0.000 0.000
#> GSM648598     1  0.0000   0.895328 1.000 0.000 0.000 0.000
#> GSM648601     1  0.0000   0.895328 1.000 0.000 0.000 0.000
#> GSM648602     1  0.0707   0.892610 0.980 0.000 0.000 0.020
#> GSM648604     1  0.1209   0.883679 0.964 0.000 0.004 0.032
#> GSM648614     2  0.1488   0.897163 0.000 0.956 0.012 0.032
#> GSM648624     1  0.0000   0.895328 1.000 0.000 0.000 0.000
#> GSM648625     2  0.3764   0.700768 0.216 0.784 0.000 0.000
#> GSM648629     1  0.1209   0.883679 0.964 0.000 0.004 0.032
#> GSM648634     1  0.0707   0.892610 0.980 0.000 0.000 0.020
#> GSM648648     1  0.0000   0.895328 1.000 0.000 0.000 0.000
#> GSM648651     1  0.0000   0.895328 1.000 0.000 0.000 0.000
#> GSM648657     1  0.0000   0.895328 1.000 0.000 0.000 0.000
#> GSM648660     1  0.0000   0.895328 1.000 0.000 0.000 0.000
#> GSM648697     1  0.0188   0.895126 0.996 0.000 0.000 0.004
#> GSM648710     1  0.1209   0.883679 0.964 0.000 0.004 0.032
#> GSM648591     3  0.4776   0.466644 0.000 0.000 0.624 0.376
#> GSM648592     2  0.2924   0.860823 0.036 0.900 0.004 0.060
#> GSM648607     3  0.5821   0.211415 0.432 0.000 0.536 0.032
#> GSM648611     3  0.0921   0.875239 0.000 0.000 0.972 0.028
#> GSM648612     3  0.1724   0.868082 0.020 0.000 0.948 0.032
#> GSM648616     3  0.4713   0.429029 0.000 0.000 0.640 0.360
#> GSM648617     1  0.3591   0.733894 0.824 0.168 0.008 0.000
#> GSM648626     1  0.5581   0.063282 0.532 0.000 0.448 0.020
#> GSM648711     3  0.5792   0.258664 0.416 0.000 0.552 0.032
#> GSM648712     3  0.1474   0.869734 0.000 0.000 0.948 0.052
#> GSM648713     3  0.3279   0.816832 0.096 0.000 0.872 0.032
#> GSM648714     2  0.1488   0.897163 0.000 0.956 0.012 0.032
#> GSM648716     3  0.1724   0.868082 0.020 0.000 0.948 0.032
#> GSM648717     3  0.1209   0.873075 0.000 0.004 0.964 0.032
#> GSM648590     2  0.6621   0.088207 0.084 0.508 0.000 0.408
#> GSM648596     2  0.0000   0.932104 0.000 1.000 0.000 0.000
#> GSM648642     2  0.0000   0.932104 0.000 1.000 0.000 0.000
#> GSM648696     2  0.4204   0.695848 0.192 0.788 0.000 0.020
#> GSM648705     1  0.4996   0.075893 0.516 0.484 0.000 0.000
#> GSM648718     2  0.0000   0.932104 0.000 1.000 0.000 0.000
#> GSM648599     1  0.0707   0.892610 0.980 0.000 0.000 0.020
#> GSM648608     1  0.1661   0.881410 0.944 0.000 0.004 0.052
#> GSM648609     1  0.1209   0.883679 0.964 0.000 0.004 0.032
#> GSM648610     1  0.1661   0.881410 0.944 0.000 0.004 0.052
#> GSM648633     1  0.0000   0.895328 1.000 0.000 0.000 0.000
#> GSM648644     2  0.0000   0.932104 0.000 1.000 0.000 0.000
#> GSM648652     1  0.0000   0.895328 1.000 0.000 0.000 0.000
#> GSM648653     1  0.0707   0.892610 0.980 0.000 0.000 0.020
#> GSM648658     1  0.0707   0.892610 0.980 0.000 0.000 0.020
#> GSM648659     2  0.0469   0.922619 0.000 0.988 0.000 0.012
#> GSM648662     2  0.7717   0.085719 0.412 0.452 0.104 0.032
#> GSM648665     1  0.5861  -0.037927 0.488 0.480 0.000 0.032
#> GSM648666     1  0.0592   0.893498 0.984 0.000 0.000 0.016
#> GSM648680     1  0.0000   0.895328 1.000 0.000 0.000 0.000
#> GSM648684     1  0.1389   0.884678 0.952 0.000 0.000 0.048
#> GSM648709     2  0.0000   0.932104 0.000 1.000 0.000 0.000
#> GSM648719     1  0.0000   0.895328 1.000 0.000 0.000 0.000
#> GSM648627     3  0.1474   0.869734 0.000 0.000 0.948 0.052
#> GSM648637     4  0.2174   0.914064 0.000 0.052 0.020 0.928
#> GSM648638     4  0.3037   0.886067 0.000 0.036 0.076 0.888
#> GSM648641     3  0.0336   0.880151 0.000 0.000 0.992 0.008
#> GSM648672     4  0.2174   0.914064 0.000 0.052 0.020 0.928
#> GSM648674     4  0.1820   0.913569 0.000 0.036 0.020 0.944
#> GSM648703     4  0.2174   0.914064 0.000 0.052 0.020 0.928
#> GSM648631     3  0.0336   0.880151 0.000 0.000 0.992 0.008
#> GSM648669     4  0.1474   0.895894 0.000 0.000 0.052 0.948
#> GSM648671     4  0.1474   0.895894 0.000 0.000 0.052 0.948
#> GSM648678     4  0.4877   0.372625 0.000 0.408 0.000 0.592
#> GSM648679     4  0.1724   0.908514 0.000 0.020 0.032 0.948
#> GSM648681     4  0.2814   0.843312 0.000 0.132 0.000 0.868
#> GSM648686     3  0.0336   0.880151 0.000 0.000 0.992 0.008
#> GSM648689     3  0.0336   0.880151 0.000 0.000 0.992 0.008
#> GSM648690     3  0.0336   0.880151 0.000 0.000 0.992 0.008
#> GSM648691     3  0.0336   0.880151 0.000 0.000 0.992 0.008
#> GSM648693     3  0.0336   0.880151 0.000 0.000 0.992 0.008
#> GSM648700     4  0.1913   0.914492 0.000 0.040 0.020 0.940
#> GSM648630     3  0.0336   0.880151 0.000 0.000 0.992 0.008
#> GSM648632     3  0.0336   0.880151 0.000 0.000 0.992 0.008
#> GSM648639     3  0.2814   0.788394 0.000 0.000 0.868 0.132
#> GSM648640     3  0.0336   0.880151 0.000 0.000 0.992 0.008
#> GSM648668     4  0.2256   0.912382 0.000 0.056 0.020 0.924
#> GSM648676     4  0.2089   0.914780 0.000 0.048 0.020 0.932
#> GSM648692     3  0.0336   0.880151 0.000 0.000 0.992 0.008
#> GSM648694     3  0.0336   0.880151 0.000 0.000 0.992 0.008
#> GSM648699     4  0.1913   0.914492 0.000 0.040 0.020 0.940
#> GSM648701     4  0.2089   0.914780 0.000 0.048 0.020 0.932
#> GSM648673     4  0.1474   0.895894 0.000 0.000 0.052 0.948
#> GSM648677     4  0.2335   0.910183 0.000 0.060 0.020 0.920
#> GSM648687     3  0.1637   0.855964 0.000 0.000 0.940 0.060
#> GSM648688     3  0.0336   0.880151 0.000 0.000 0.992 0.008

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM648605     2  0.0000     0.9267 0.000 1.000 0.000 0.000 0.000
#> GSM648618     5  0.5431    -0.1678 0.016 0.000 0.304 0.052 0.628
#> GSM648620     2  0.0000     0.9267 0.000 1.000 0.000 0.000 0.000
#> GSM648646     2  0.0000     0.9267 0.000 1.000 0.000 0.000 0.000
#> GSM648649     5  0.5715     0.4181 0.388 0.088 0.000 0.000 0.524
#> GSM648675     4  0.3169     0.8363 0.004 0.016 0.000 0.840 0.140
#> GSM648682     2  0.0000     0.9267 0.000 1.000 0.000 0.000 0.000
#> GSM648698     2  0.0000     0.9267 0.000 1.000 0.000 0.000 0.000
#> GSM648708     2  0.0000     0.9267 0.000 1.000 0.000 0.000 0.000
#> GSM648628     3  0.3816     0.6960 0.000 0.000 0.696 0.000 0.304
#> GSM648595     5  0.4182     0.1902 0.000 0.000 0.000 0.400 0.600
#> GSM648635     5  0.4305     0.4022 0.488 0.000 0.000 0.000 0.512
#> GSM648645     5  0.4242     0.4303 0.428 0.000 0.000 0.000 0.572
#> GSM648647     2  0.0000     0.9267 0.000 1.000 0.000 0.000 0.000
#> GSM648667     2  0.0963     0.8969 0.000 0.964 0.000 0.000 0.036
#> GSM648695     2  0.0000     0.9267 0.000 1.000 0.000 0.000 0.000
#> GSM648704     2  0.0000     0.9267 0.000 1.000 0.000 0.000 0.000
#> GSM648706     2  0.0000     0.9267 0.000 1.000 0.000 0.000 0.000
#> GSM648593     1  0.4306    -0.4190 0.508 0.000 0.000 0.000 0.492
#> GSM648594     5  0.4503     0.3726 0.120 0.000 0.000 0.124 0.756
#> GSM648600     5  0.4088     0.4415 0.368 0.000 0.000 0.000 0.632
#> GSM648621     5  0.1792     0.3945 0.084 0.000 0.000 0.000 0.916
#> GSM648622     1  0.3177     0.2164 0.792 0.000 0.000 0.000 0.208
#> GSM648623     5  0.4640     0.0168 0.400 0.000 0.000 0.016 0.584
#> GSM648636     5  0.4161     0.4299 0.392 0.000 0.000 0.000 0.608
#> GSM648655     5  0.4161     0.4299 0.392 0.000 0.000 0.000 0.608
#> GSM648661     1  0.3550     0.3935 0.760 0.000 0.236 0.000 0.004
#> GSM648664     1  0.0000     0.5257 1.000 0.000 0.000 0.000 0.000
#> GSM648683     1  0.2280     0.4943 0.880 0.000 0.000 0.000 0.120
#> GSM648685     1  0.0000     0.5257 1.000 0.000 0.000 0.000 0.000
#> GSM648702     5  0.4161     0.4299 0.392 0.000 0.000 0.000 0.608
#> GSM648597     5  0.4111     0.3760 0.120 0.000 0.000 0.092 0.788
#> GSM648603     5  0.4124     0.3492 0.180 0.000 0.008 0.036 0.776
#> GSM648606     3  0.1168     0.8505 0.000 0.032 0.960 0.000 0.008
#> GSM648613     3  0.1195     0.8582 0.000 0.012 0.960 0.000 0.028
#> GSM648619     3  0.6503     0.4299 0.204 0.000 0.464 0.000 0.332
#> GSM648654     1  0.6444     0.1269 0.484 0.200 0.316 0.000 0.000
#> GSM648663     3  0.2199     0.8245 0.016 0.060 0.916 0.000 0.008
#> GSM648670     4  0.2280     0.8530 0.000 0.000 0.000 0.880 0.120
#> GSM648707     3  0.5360     0.5810 0.000 0.000 0.556 0.060 0.384
#> GSM648615     2  0.0000     0.9267 0.000 1.000 0.000 0.000 0.000
#> GSM648643     2  0.0000     0.9267 0.000 1.000 0.000 0.000 0.000
#> GSM648650     2  0.1341     0.8771 0.000 0.944 0.000 0.000 0.056
#> GSM648656     2  0.0000     0.9267 0.000 1.000 0.000 0.000 0.000
#> GSM648715     2  0.0000     0.9267 0.000 1.000 0.000 0.000 0.000
#> GSM648598     1  0.4306    -0.4190 0.508 0.000 0.000 0.000 0.492
#> GSM648601     5  0.4306     0.3927 0.492 0.000 0.000 0.000 0.508
#> GSM648602     5  0.4171     0.4262 0.396 0.000 0.000 0.000 0.604
#> GSM648604     1  0.0000     0.5257 1.000 0.000 0.000 0.000 0.000
#> GSM648614     2  0.0771     0.9088 0.020 0.976 0.000 0.000 0.004
#> GSM648624     1  0.0510     0.5147 0.984 0.000 0.000 0.000 0.016
#> GSM648625     2  0.5359     0.1220 0.056 0.532 0.000 0.000 0.412
#> GSM648629     1  0.0000     0.5257 1.000 0.000 0.000 0.000 0.000
#> GSM648634     5  0.4161     0.4299 0.392 0.000 0.000 0.000 0.608
#> GSM648648     1  0.4306    -0.4190 0.508 0.000 0.000 0.000 0.492
#> GSM648651     1  0.4287    -0.2573 0.540 0.000 0.000 0.000 0.460
#> GSM648657     5  0.2516     0.4155 0.140 0.000 0.000 0.000 0.860
#> GSM648660     5  0.4304     0.4063 0.484 0.000 0.000 0.000 0.516
#> GSM648697     1  0.2966     0.4284 0.816 0.000 0.000 0.000 0.184
#> GSM648710     1  0.0000     0.5257 1.000 0.000 0.000 0.000 0.000
#> GSM648591     5  0.5538    -0.4582 0.000 0.000 0.428 0.068 0.504
#> GSM648592     5  0.4866     0.3348 0.072 0.112 0.000 0.048 0.768
#> GSM648607     1  0.5037     0.2592 0.616 0.000 0.048 0.000 0.336
#> GSM648611     3  0.0000     0.8677 0.000 0.000 1.000 0.000 0.000
#> GSM648612     3  0.5145     0.6364 0.056 0.000 0.612 0.000 0.332
#> GSM648616     3  0.6356     0.4859 0.000 0.000 0.452 0.164 0.384
#> GSM648617     5  0.2377     0.4058 0.128 0.000 0.000 0.000 0.872
#> GSM648626     5  0.4500     0.3386 0.180 0.000 0.020 0.040 0.760
#> GSM648711     1  0.5037     0.2592 0.616 0.000 0.048 0.000 0.336
#> GSM648712     3  0.5284     0.5977 0.056 0.000 0.568 0.000 0.376
#> GSM648713     1  0.5203     0.2549 0.608 0.000 0.060 0.000 0.332
#> GSM648714     2  0.0566     0.9148 0.000 0.984 0.012 0.000 0.004
#> GSM648716     3  0.5145     0.6364 0.056 0.000 0.612 0.000 0.332
#> GSM648717     3  0.0290     0.8658 0.000 0.000 0.992 0.000 0.008
#> GSM648590     2  0.8116     0.0193 0.216 0.412 0.000 0.132 0.240
#> GSM648596     2  0.0000     0.9267 0.000 1.000 0.000 0.000 0.000
#> GSM648642     2  0.0000     0.9267 0.000 1.000 0.000 0.000 0.000
#> GSM648696     2  0.6483     0.0790 0.216 0.484 0.000 0.000 0.300
#> GSM648705     5  0.5867     0.4040 0.404 0.100 0.000 0.000 0.496
#> GSM648718     2  0.0000     0.9267 0.000 1.000 0.000 0.000 0.000
#> GSM648599     5  0.3983     0.4465 0.340 0.000 0.000 0.000 0.660
#> GSM648608     1  0.2280     0.4943 0.880 0.000 0.000 0.000 0.120
#> GSM648609     1  0.0000     0.5257 1.000 0.000 0.000 0.000 0.000
#> GSM648610     1  0.2280     0.4943 0.880 0.000 0.000 0.000 0.120
#> GSM648633     5  0.4304     0.4063 0.484 0.000 0.000 0.000 0.516
#> GSM648644     2  0.0000     0.9267 0.000 1.000 0.000 0.000 0.000
#> GSM648652     1  0.4307    -0.4232 0.504 0.000 0.000 0.000 0.496
#> GSM648653     5  0.4161     0.4299 0.392 0.000 0.000 0.000 0.608
#> GSM648658     5  0.4161     0.4299 0.392 0.000 0.000 0.000 0.608
#> GSM648659     2  0.0000     0.9267 0.000 1.000 0.000 0.000 0.000
#> GSM648662     1  0.5167     0.1168 0.564 0.396 0.036 0.000 0.004
#> GSM648665     1  0.4219     0.1114 0.584 0.416 0.000 0.000 0.000
#> GSM648666     1  0.2966     0.4423 0.816 0.000 0.000 0.000 0.184
#> GSM648680     1  0.4306    -0.4190 0.508 0.000 0.000 0.000 0.492
#> GSM648684     1  0.2280     0.4943 0.880 0.000 0.000 0.000 0.120
#> GSM648709     2  0.0000     0.9267 0.000 1.000 0.000 0.000 0.000
#> GSM648719     5  0.4304     0.4063 0.484 0.000 0.000 0.000 0.516
#> GSM648627     3  0.4290     0.6873 0.016 0.000 0.680 0.000 0.304
#> GSM648637     4  0.1270     0.9434 0.000 0.052 0.000 0.948 0.000
#> GSM648638     4  0.1628     0.9396 0.000 0.056 0.008 0.936 0.000
#> GSM648641     3  0.0000     0.8677 0.000 0.000 1.000 0.000 0.000
#> GSM648672     4  0.1270     0.9434 0.000 0.052 0.000 0.948 0.000
#> GSM648674     4  0.0000     0.9363 0.000 0.000 0.000 1.000 0.000
#> GSM648703     4  0.1043     0.9464 0.000 0.040 0.000 0.960 0.000
#> GSM648631     3  0.0000     0.8677 0.000 0.000 1.000 0.000 0.000
#> GSM648669     4  0.0000     0.9363 0.000 0.000 0.000 1.000 0.000
#> GSM648671     4  0.0000     0.9363 0.000 0.000 0.000 1.000 0.000
#> GSM648678     4  0.3336     0.7547 0.000 0.228 0.000 0.772 0.000
#> GSM648679     4  0.0000     0.9363 0.000 0.000 0.000 1.000 0.000
#> GSM648681     4  0.2280     0.8615 0.000 0.120 0.000 0.880 0.000
#> GSM648686     3  0.0000     0.8677 0.000 0.000 1.000 0.000 0.000
#> GSM648689     3  0.0000     0.8677 0.000 0.000 1.000 0.000 0.000
#> GSM648690     3  0.0000     0.8677 0.000 0.000 1.000 0.000 0.000
#> GSM648691     3  0.0000     0.8677 0.000 0.000 1.000 0.000 0.000
#> GSM648693     3  0.0000     0.8677 0.000 0.000 1.000 0.000 0.000
#> GSM648700     4  0.0794     0.9455 0.000 0.028 0.000 0.972 0.000
#> GSM648630     3  0.0000     0.8677 0.000 0.000 1.000 0.000 0.000
#> GSM648632     3  0.0000     0.8677 0.000 0.000 1.000 0.000 0.000
#> GSM648639     3  0.2378     0.8259 0.000 0.000 0.904 0.048 0.048
#> GSM648640     3  0.0000     0.8677 0.000 0.000 1.000 0.000 0.000
#> GSM648668     4  0.1270     0.9434 0.000 0.052 0.000 0.948 0.000
#> GSM648676     4  0.1043     0.9464 0.000 0.040 0.000 0.960 0.000
#> GSM648692     3  0.0000     0.8677 0.000 0.000 1.000 0.000 0.000
#> GSM648694     3  0.0000     0.8677 0.000 0.000 1.000 0.000 0.000
#> GSM648699     4  0.0794     0.9455 0.000 0.028 0.000 0.972 0.000
#> GSM648701     4  0.1043     0.9464 0.000 0.040 0.000 0.960 0.000
#> GSM648673     4  0.0000     0.9363 0.000 0.000 0.000 1.000 0.000
#> GSM648677     4  0.1341     0.9411 0.000 0.056 0.000 0.944 0.000
#> GSM648687     3  0.1908     0.8077 0.000 0.000 0.908 0.092 0.000
#> GSM648688     3  0.0000     0.8677 0.000 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM648605     2  0.0000     0.9662 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648618     5  0.3010     0.7054 0.000 0.000 0.020 0.004 0.828 0.148
#> GSM648620     2  0.0000     0.9662 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648646     2  0.0000     0.9662 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648649     6  0.4176     0.8080 0.200 0.004 0.000 0.000 0.064 0.732
#> GSM648675     4  0.3351     0.6481 0.000 0.000 0.000 0.712 0.000 0.288
#> GSM648682     2  0.0000     0.9662 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648698     2  0.0000     0.9662 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648708     2  0.0000     0.9662 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648628     3  0.4466    -0.0832 0.004 0.000 0.500 0.000 0.476 0.020
#> GSM648595     6  0.0858     0.7806 0.000 0.000 0.000 0.028 0.004 0.968
#> GSM648635     6  0.3738     0.8106 0.208 0.000 0.000 0.000 0.040 0.752
#> GSM648645     6  0.4518     0.7851 0.200 0.000 0.000 0.000 0.104 0.696
#> GSM648647     2  0.0000     0.9662 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648667     2  0.0865     0.9357 0.000 0.964 0.000 0.000 0.000 0.036
#> GSM648695     2  0.0000     0.9662 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648704     2  0.0000     0.9662 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648706     2  0.0000     0.9662 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648593     6  0.4187     0.8054 0.208 0.000 0.000 0.020 0.036 0.736
#> GSM648594     5  0.5626     0.2735 0.052 0.000 0.000 0.072 0.596 0.280
#> GSM648600     6  0.0520     0.7881 0.008 0.000 0.000 0.000 0.008 0.984
#> GSM648621     5  0.4246     0.3499 0.016 0.000 0.000 0.000 0.532 0.452
#> GSM648622     1  0.3381     0.6073 0.800 0.000 0.000 0.000 0.044 0.156
#> GSM648623     5  0.1471     0.7456 0.064 0.000 0.000 0.000 0.932 0.004
#> GSM648636     6  0.0547     0.7855 0.000 0.000 0.000 0.020 0.000 0.980
#> GSM648655     6  0.0547     0.7855 0.000 0.000 0.000 0.020 0.000 0.980
#> GSM648661     1  0.1232     0.7277 0.956 0.000 0.024 0.000 0.016 0.004
#> GSM648664     1  0.0547     0.7439 0.980 0.000 0.000 0.000 0.000 0.020
#> GSM648683     1  0.3198     0.6626 0.740 0.000 0.000 0.000 0.000 0.260
#> GSM648685     1  0.0891     0.7424 0.968 0.000 0.000 0.000 0.008 0.024
#> GSM648702     6  0.0146     0.7891 0.000 0.000 0.000 0.004 0.000 0.996
#> GSM648597     5  0.0964     0.7493 0.016 0.000 0.000 0.012 0.968 0.004
#> GSM648603     5  0.1297     0.7498 0.040 0.000 0.000 0.000 0.948 0.012
#> GSM648606     3  0.2811     0.8085 0.020 0.032 0.872 0.000 0.076 0.000
#> GSM648613     3  0.4245     0.5373 0.020 0.016 0.684 0.000 0.280 0.000
#> GSM648619     5  0.4789     0.5614 0.092 0.000 0.268 0.000 0.640 0.000
#> GSM648654     1  0.5111     0.5491 0.672 0.184 0.124 0.000 0.020 0.000
#> GSM648663     3  0.3259     0.7841 0.024 0.044 0.844 0.000 0.088 0.000
#> GSM648670     4  0.3539     0.7287 0.000 0.000 0.000 0.756 0.024 0.220
#> GSM648707     5  0.1866     0.7426 0.000 0.000 0.084 0.008 0.908 0.000
#> GSM648615     2  0.0000     0.9662 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648643     2  0.0000     0.9662 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648650     2  0.1610     0.8832 0.000 0.916 0.000 0.000 0.000 0.084
#> GSM648656     2  0.0000     0.9662 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648715     2  0.0000     0.9662 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648598     6  0.3892     0.8075 0.212 0.000 0.000 0.000 0.048 0.740
#> GSM648601     6  0.4037     0.8091 0.200 0.000 0.000 0.000 0.064 0.736
#> GSM648602     6  0.1245     0.7758 0.032 0.000 0.000 0.000 0.016 0.952
#> GSM648604     1  0.0547     0.7439 0.980 0.000 0.000 0.000 0.000 0.020
#> GSM648614     2  0.1088     0.9371 0.016 0.960 0.000 0.000 0.024 0.000
#> GSM648624     1  0.1398     0.7332 0.940 0.000 0.000 0.000 0.008 0.052
#> GSM648625     2  0.5343     0.0169 0.028 0.492 0.000 0.000 0.048 0.432
#> GSM648629     1  0.0363     0.7421 0.988 0.000 0.000 0.000 0.000 0.012
#> GSM648634     6  0.0405     0.7880 0.008 0.000 0.000 0.000 0.004 0.988
#> GSM648648     6  0.3671     0.8102 0.208 0.000 0.000 0.000 0.036 0.756
#> GSM648651     1  0.5492     0.2048 0.536 0.000 0.000 0.000 0.152 0.312
#> GSM648657     6  0.4487     0.6616 0.068 0.000 0.000 0.000 0.264 0.668
#> GSM648660     6  0.4251     0.7994 0.208 0.000 0.000 0.000 0.076 0.716
#> GSM648697     1  0.3565     0.4197 0.692 0.000 0.000 0.000 0.004 0.304
#> GSM648710     1  0.0363     0.7421 0.988 0.000 0.000 0.000 0.000 0.012
#> GSM648591     5  0.2652     0.7279 0.000 0.000 0.020 0.008 0.868 0.104
#> GSM648592     5  0.0692     0.7494 0.000 0.020 0.000 0.004 0.976 0.000
#> GSM648607     1  0.3866    -0.0486 0.516 0.000 0.000 0.000 0.484 0.000
#> GSM648611     3  0.0363     0.8820 0.000 0.000 0.988 0.000 0.012 0.000
#> GSM648612     5  0.4291     0.5620 0.052 0.000 0.268 0.000 0.680 0.000
#> GSM648616     5  0.2070     0.7460 0.000 0.000 0.044 0.048 0.908 0.000
#> GSM648617     5  0.3686     0.6086 0.032 0.000 0.000 0.000 0.748 0.220
#> GSM648626     5  0.1333     0.7496 0.048 0.000 0.000 0.000 0.944 0.008
#> GSM648711     1  0.3869    -0.1155 0.500 0.000 0.000 0.000 0.500 0.000
#> GSM648712     5  0.4934     0.5712 0.048 0.000 0.264 0.000 0.656 0.032
#> GSM648713     5  0.3727     0.3173 0.388 0.000 0.000 0.000 0.612 0.000
#> GSM648714     2  0.1168     0.9341 0.016 0.956 0.000 0.000 0.028 0.000
#> GSM648716     5  0.4621     0.5106 0.064 0.000 0.304 0.000 0.632 0.000
#> GSM648717     3  0.1644     0.8515 0.028 0.000 0.932 0.000 0.040 0.000
#> GSM648590     6  0.2605     0.6914 0.000 0.108 0.000 0.028 0.000 0.864
#> GSM648596     2  0.0000     0.9662 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648642     2  0.0000     0.9662 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648696     6  0.2003     0.7019 0.000 0.116 0.000 0.000 0.000 0.884
#> GSM648705     6  0.3956     0.8105 0.204 0.008 0.000 0.000 0.040 0.748
#> GSM648718     2  0.0000     0.9662 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648599     6  0.2389     0.6895 0.008 0.000 0.000 0.000 0.128 0.864
#> GSM648608     1  0.3126     0.6660 0.752 0.000 0.000 0.000 0.000 0.248
#> GSM648609     1  0.0547     0.7439 0.980 0.000 0.000 0.000 0.000 0.020
#> GSM648610     1  0.3244     0.6573 0.732 0.000 0.000 0.000 0.000 0.268
#> GSM648633     6  0.3983     0.8077 0.208 0.000 0.000 0.000 0.056 0.736
#> GSM648644     2  0.0000     0.9662 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648652     6  0.3709     0.8112 0.204 0.000 0.000 0.000 0.040 0.756
#> GSM648653     6  0.0692     0.7840 0.020 0.000 0.000 0.000 0.004 0.976
#> GSM648658     6  0.0909     0.7909 0.012 0.000 0.000 0.020 0.000 0.968
#> GSM648659     2  0.0547     0.9516 0.000 0.980 0.000 0.020 0.000 0.000
#> GSM648662     1  0.3614     0.5959 0.752 0.220 0.000 0.000 0.028 0.000
#> GSM648665     1  0.3617     0.5823 0.736 0.244 0.000 0.000 0.020 0.000
#> GSM648666     1  0.3789     0.6484 0.716 0.000 0.000 0.000 0.024 0.260
#> GSM648680     6  0.3671     0.8102 0.208 0.000 0.000 0.000 0.036 0.756
#> GSM648684     1  0.3198     0.6626 0.740 0.000 0.000 0.000 0.000 0.260
#> GSM648709     2  0.0000     0.9662 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648719     6  0.4200     0.8015 0.208 0.000 0.000 0.000 0.072 0.720
#> GSM648627     3  0.5063    -0.0654 0.032 0.000 0.496 0.000 0.448 0.024
#> GSM648637     4  0.0717     0.9425 0.000 0.016 0.000 0.976 0.008 0.000
#> GSM648638     4  0.0984     0.9397 0.000 0.012 0.012 0.968 0.008 0.000
#> GSM648641     3  0.0000     0.8870 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648672     4  0.0717     0.9425 0.000 0.016 0.000 0.976 0.008 0.000
#> GSM648674     4  0.0547     0.9422 0.000 0.000 0.000 0.980 0.020 0.000
#> GSM648703     4  0.0146     0.9431 0.000 0.004 0.000 0.996 0.000 0.000
#> GSM648631     3  0.0000     0.8870 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648669     4  0.0547     0.9422 0.000 0.000 0.000 0.980 0.020 0.000
#> GSM648671     4  0.0547     0.9422 0.000 0.000 0.000 0.980 0.020 0.000
#> GSM648678     4  0.1957     0.8606 0.000 0.112 0.000 0.888 0.000 0.000
#> GSM648679     4  0.0547     0.9422 0.000 0.000 0.000 0.980 0.020 0.000
#> GSM648681     4  0.2350     0.8610 0.000 0.100 0.000 0.880 0.020 0.000
#> GSM648686     3  0.0000     0.8870 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648689     3  0.0000     0.8870 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648690     3  0.0000     0.8870 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648691     3  0.0000     0.8870 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648693     3  0.0000     0.8870 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648700     4  0.0000     0.9428 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648630     3  0.0000     0.8870 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648632     3  0.0000     0.8870 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648639     3  0.3714     0.4490 0.000 0.000 0.656 0.004 0.340 0.000
#> GSM648640     3  0.0000     0.8870 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648668     4  0.0717     0.9425 0.000 0.016 0.000 0.976 0.008 0.000
#> GSM648676     4  0.0146     0.9431 0.000 0.004 0.000 0.996 0.000 0.000
#> GSM648692     3  0.0000     0.8870 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648694     3  0.0000     0.8870 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648699     4  0.0000     0.9428 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648701     4  0.0146     0.9431 0.000 0.004 0.000 0.996 0.000 0.000
#> GSM648673     4  0.0547     0.9422 0.000 0.000 0.000 0.980 0.020 0.000
#> GSM648677     4  0.0260     0.9419 0.000 0.008 0.000 0.992 0.000 0.000
#> GSM648687     3  0.1075     0.8507 0.000 0.000 0.952 0.048 0.000 0.000
#> GSM648688     3  0.0000     0.8870 0.000 0.000 1.000 0.000 0.000 0.000

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-CV-skmeans-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-CV-skmeans-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-CV-skmeans-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-CV-skmeans-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-CV-skmeans-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-CV-skmeans-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-CV-skmeans-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-CV-skmeans-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-CV-skmeans-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-CV-skmeans-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-CV-skmeans-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-CV-skmeans-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-CV-skmeans-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-CV-skmeans-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-CV-skmeans-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-CV-skmeans-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-CV-skmeans-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-CV-skmeans-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-CV-skmeans-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-CV-skmeans-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk CV-skmeans-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-CV-skmeans-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-CV-skmeans-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-CV-skmeans-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-CV-skmeans-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-CV-skmeans-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk CV-skmeans-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>              n disease.state(p) development.stage(p) other(p) k
#> CV:skmeans 129         1.00e+00              0.06968 3.89e-08 2
#> CV:skmeans 120         1.60e-06              0.00154 2.48e-25 3
#> CV:skmeans 115         1.02e-12              0.00788 1.88e-31 4
#> CV:skmeans  76         2.96e-09              0.25166 2.39e-21 5
#> CV:skmeans 119         5.06e-18              0.00854 2.26e-36 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


CV:pam

The object with results only for a single top-value method and a single partition method can be extracted as:

res = res_list["CV", "pam"]
# you can also extract it by
# res = res_list["CV:pam"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 130 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#>   Subgroups are detected by 'pam' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 3.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk CV-pam-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk CV-pam-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.588           0.897       0.939         0.2757 0.771   0.771
#> 3 3 0.527           0.820       0.902         0.9965 0.685   0.592
#> 4 4 0.578           0.700       0.833         0.3139 0.737   0.470
#> 5 5 0.618           0.680       0.829         0.0569 0.898   0.662
#> 6 6 0.626           0.654       0.805         0.0464 0.836   0.434

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 3

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM648605     2  0.0000      0.926 0.000 1.000
#> GSM648618     2  0.6801      0.846 0.180 0.820
#> GSM648620     2  0.0000      0.926 0.000 1.000
#> GSM648646     2  0.0000      0.926 0.000 1.000
#> GSM648649     2  0.0000      0.926 0.000 1.000
#> GSM648675     2  0.0000      0.926 0.000 1.000
#> GSM648682     2  0.0000      0.926 0.000 1.000
#> GSM648698     2  0.0000      0.926 0.000 1.000
#> GSM648708     2  0.0000      0.926 0.000 1.000
#> GSM648628     2  0.9815      0.423 0.420 0.580
#> GSM648595     2  0.0000      0.926 0.000 1.000
#> GSM648635     2  0.0000      0.926 0.000 1.000
#> GSM648645     2  0.6801      0.846 0.180 0.820
#> GSM648647     2  0.0000      0.926 0.000 1.000
#> GSM648667     2  0.0000      0.926 0.000 1.000
#> GSM648695     2  0.0000      0.926 0.000 1.000
#> GSM648704     2  0.0000      0.926 0.000 1.000
#> GSM648706     2  0.0000      0.926 0.000 1.000
#> GSM648593     2  0.0000      0.926 0.000 1.000
#> GSM648594     2  0.6623      0.849 0.172 0.828
#> GSM648600     2  0.0000      0.926 0.000 1.000
#> GSM648621     2  0.1633      0.919 0.024 0.976
#> GSM648622     2  0.6801      0.846 0.180 0.820
#> GSM648623     2  0.6801      0.846 0.180 0.820
#> GSM648636     2  0.0000      0.926 0.000 1.000
#> GSM648655     2  0.0000      0.926 0.000 1.000
#> GSM648661     2  0.6801      0.846 0.180 0.820
#> GSM648664     2  0.6801      0.846 0.180 0.820
#> GSM648683     2  0.0672      0.925 0.008 0.992
#> GSM648685     2  0.6801      0.846 0.180 0.820
#> GSM648702     2  0.0000      0.926 0.000 1.000
#> GSM648597     2  0.6801      0.846 0.180 0.820
#> GSM648603     2  0.6801      0.846 0.180 0.820
#> GSM648606     2  0.6801      0.846 0.180 0.820
#> GSM648613     2  0.6801      0.846 0.180 0.820
#> GSM648619     2  0.6801      0.846 0.180 0.820
#> GSM648654     2  0.6801      0.846 0.180 0.820
#> GSM648663     2  0.6801      0.846 0.180 0.820
#> GSM648670     2  0.0000      0.926 0.000 1.000
#> GSM648707     2  0.6801      0.846 0.180 0.820
#> GSM648615     2  0.0000      0.926 0.000 1.000
#> GSM648643     2  0.0000      0.926 0.000 1.000
#> GSM648650     2  0.0000      0.926 0.000 1.000
#> GSM648656     2  0.0000      0.926 0.000 1.000
#> GSM648715     2  0.0000      0.926 0.000 1.000
#> GSM648598     2  0.0376      0.926 0.004 0.996
#> GSM648601     2  0.0376      0.926 0.004 0.996
#> GSM648602     2  0.0672      0.925 0.008 0.992
#> GSM648604     2  0.6801      0.846 0.180 0.820
#> GSM648614     2  0.0376      0.926 0.004 0.996
#> GSM648624     2  0.6801      0.846 0.180 0.820
#> GSM648625     2  0.0000      0.926 0.000 1.000
#> GSM648629     2  0.6801      0.846 0.180 0.820
#> GSM648634     2  0.0000      0.926 0.000 1.000
#> GSM648648     2  0.0000      0.926 0.000 1.000
#> GSM648651     2  0.6801      0.846 0.180 0.820
#> GSM648657     2  0.0000      0.926 0.000 1.000
#> GSM648660     2  0.0376      0.926 0.004 0.996
#> GSM648697     2  0.0672      0.925 0.008 0.992
#> GSM648710     2  0.6801      0.846 0.180 0.820
#> GSM648591     2  0.6801      0.846 0.180 0.820
#> GSM648592     2  0.0000      0.926 0.000 1.000
#> GSM648607     2  0.6801      0.846 0.180 0.820
#> GSM648611     1  0.3879      0.894 0.924 0.076
#> GSM648612     2  0.6801      0.846 0.180 0.820
#> GSM648616     2  0.6801      0.846 0.180 0.820
#> GSM648617     2  0.0000      0.926 0.000 1.000
#> GSM648626     2  0.6801      0.846 0.180 0.820
#> GSM648711     2  0.6801      0.846 0.180 0.820
#> GSM648712     2  0.6801      0.846 0.180 0.820
#> GSM648713     2  0.6801      0.846 0.180 0.820
#> GSM648714     2  0.0000      0.926 0.000 1.000
#> GSM648716     2  0.6801      0.846 0.180 0.820
#> GSM648717     2  0.7883      0.784 0.236 0.764
#> GSM648590     2  0.0000      0.926 0.000 1.000
#> GSM648596     2  0.0000      0.926 0.000 1.000
#> GSM648642     2  0.0000      0.926 0.000 1.000
#> GSM648696     2  0.0000      0.926 0.000 1.000
#> GSM648705     2  0.0000      0.926 0.000 1.000
#> GSM648718     2  0.0000      0.926 0.000 1.000
#> GSM648599     2  0.0672      0.925 0.008 0.992
#> GSM648608     2  0.6801      0.846 0.180 0.820
#> GSM648609     2  0.6801      0.846 0.180 0.820
#> GSM648610     2  0.0672      0.925 0.008 0.992
#> GSM648633     2  0.0000      0.926 0.000 1.000
#> GSM648644     2  0.0000      0.926 0.000 1.000
#> GSM648652     2  0.0000      0.926 0.000 1.000
#> GSM648653     2  0.0672      0.925 0.008 0.992
#> GSM648658     2  0.0000      0.926 0.000 1.000
#> GSM648659     2  0.0000      0.926 0.000 1.000
#> GSM648662     2  0.0672      0.925 0.008 0.992
#> GSM648665     2  0.6623      0.850 0.172 0.828
#> GSM648666     2  0.6801      0.846 0.180 0.820
#> GSM648680     2  0.0376      0.926 0.004 0.996
#> GSM648684     2  0.0672      0.925 0.008 0.992
#> GSM648709     2  0.0000      0.926 0.000 1.000
#> GSM648719     2  0.0376      0.926 0.004 0.996
#> GSM648627     2  0.6801      0.846 0.180 0.820
#> GSM648637     2  0.0000      0.926 0.000 1.000
#> GSM648638     2  0.0000      0.926 0.000 1.000
#> GSM648641     1  0.0000      0.963 1.000 0.000
#> GSM648672     2  0.0000      0.926 0.000 1.000
#> GSM648674     2  0.0000      0.926 0.000 1.000
#> GSM648703     2  0.0000      0.926 0.000 1.000
#> GSM648631     1  0.0000      0.963 1.000 0.000
#> GSM648669     1  0.3114      0.924 0.944 0.056
#> GSM648671     1  0.9460      0.324 0.636 0.364
#> GSM648678     2  0.0000      0.926 0.000 1.000
#> GSM648679     2  0.0000      0.926 0.000 1.000
#> GSM648681     2  0.0000      0.926 0.000 1.000
#> GSM648686     1  0.0000      0.963 1.000 0.000
#> GSM648689     1  0.0000      0.963 1.000 0.000
#> GSM648690     1  0.0000      0.963 1.000 0.000
#> GSM648691     1  0.0000      0.963 1.000 0.000
#> GSM648693     1  0.0000      0.963 1.000 0.000
#> GSM648700     2  0.0000      0.926 0.000 1.000
#> GSM648630     1  0.0000      0.963 1.000 0.000
#> GSM648632     1  0.0000      0.963 1.000 0.000
#> GSM648639     2  0.6247      0.828 0.156 0.844
#> GSM648640     1  0.0000      0.963 1.000 0.000
#> GSM648668     2  0.0000      0.926 0.000 1.000
#> GSM648676     2  0.0000      0.926 0.000 1.000
#> GSM648692     1  0.0000      0.963 1.000 0.000
#> GSM648694     1  0.0000      0.963 1.000 0.000
#> GSM648699     2  0.0000      0.926 0.000 1.000
#> GSM648701     2  0.0000      0.926 0.000 1.000
#> GSM648673     2  0.6531      0.851 0.168 0.832
#> GSM648677     2  0.0000      0.926 0.000 1.000
#> GSM648687     1  0.1843      0.943 0.972 0.028
#> GSM648688     1  0.0000      0.963 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM648605     2  0.0000      0.812 0.000 1.000 0.000
#> GSM648618     1  0.2878      0.878 0.904 0.000 0.096
#> GSM648620     2  0.2959      0.775 0.100 0.900 0.000
#> GSM648646     2  0.0000      0.812 0.000 1.000 0.000
#> GSM648649     1  0.1163      0.886 0.972 0.028 0.000
#> GSM648675     1  0.1163      0.886 0.972 0.028 0.000
#> GSM648682     2  0.5098      0.665 0.248 0.752 0.000
#> GSM648698     2  0.0000      0.812 0.000 1.000 0.000
#> GSM648708     2  0.3116      0.773 0.108 0.892 0.000
#> GSM648628     1  0.6095      0.494 0.608 0.000 0.392
#> GSM648595     1  0.3686      0.775 0.860 0.140 0.000
#> GSM648635     1  0.1163      0.886 0.972 0.028 0.000
#> GSM648645     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648647     2  0.0000      0.812 0.000 1.000 0.000
#> GSM648667     2  0.4796      0.695 0.220 0.780 0.000
#> GSM648695     2  0.4235      0.736 0.176 0.824 0.000
#> GSM648704     2  0.0000      0.812 0.000 1.000 0.000
#> GSM648706     2  0.0000      0.812 0.000 1.000 0.000
#> GSM648593     1  0.1289      0.884 0.968 0.032 0.000
#> GSM648594     1  0.4483      0.870 0.848 0.024 0.128
#> GSM648600     1  0.1163      0.886 0.972 0.028 0.000
#> GSM648621     1  0.0237      0.891 0.996 0.004 0.000
#> GSM648622     1  0.3752      0.862 0.856 0.000 0.144
#> GSM648623     1  0.3752      0.862 0.856 0.000 0.144
#> GSM648636     1  0.1163      0.886 0.972 0.028 0.000
#> GSM648655     1  0.1289      0.886 0.968 0.032 0.000
#> GSM648661     1  0.3752      0.862 0.856 0.000 0.144
#> GSM648664     1  0.3752      0.862 0.856 0.000 0.144
#> GSM648683     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648685     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648702     1  0.1163      0.886 0.972 0.028 0.000
#> GSM648597     1  0.3752      0.862 0.856 0.000 0.144
#> GSM648603     1  0.2625      0.882 0.916 0.000 0.084
#> GSM648606     1  0.7988      0.633 0.656 0.200 0.144
#> GSM648613     1  0.4164      0.859 0.848 0.008 0.144
#> GSM648619     1  0.3752      0.862 0.856 0.000 0.144
#> GSM648654     1  0.8030      0.626 0.652 0.204 0.144
#> GSM648663     1  0.4164      0.859 0.848 0.008 0.144
#> GSM648670     1  0.1163      0.886 0.972 0.028 0.000
#> GSM648707     1  0.3752      0.862 0.856 0.000 0.144
#> GSM648615     1  0.5835      0.552 0.660 0.340 0.000
#> GSM648643     2  0.0000      0.812 0.000 1.000 0.000
#> GSM648650     2  0.6026      0.541 0.376 0.624 0.000
#> GSM648656     2  0.0000      0.812 0.000 1.000 0.000
#> GSM648715     2  0.0000      0.812 0.000 1.000 0.000
#> GSM648598     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648601     1  0.0237      0.891 0.996 0.004 0.000
#> GSM648602     1  0.0237      0.891 0.996 0.004 0.000
#> GSM648604     1  0.3752      0.862 0.856 0.000 0.144
#> GSM648614     2  0.5016      0.681 0.240 0.760 0.000
#> GSM648624     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648625     1  0.2625      0.862 0.916 0.084 0.000
#> GSM648629     1  0.3752      0.862 0.856 0.000 0.144
#> GSM648634     1  0.1031      0.887 0.976 0.024 0.000
#> GSM648648     1  0.1163      0.886 0.972 0.028 0.000
#> GSM648651     1  0.3752      0.862 0.856 0.000 0.144
#> GSM648657     1  0.1163      0.886 0.972 0.028 0.000
#> GSM648660     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648697     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648710     1  0.3752      0.862 0.856 0.000 0.144
#> GSM648591     1  0.3752      0.862 0.856 0.000 0.144
#> GSM648592     1  0.1163      0.886 0.972 0.028 0.000
#> GSM648607     1  0.3752      0.862 0.856 0.000 0.144
#> GSM648611     3  0.3116      0.826 0.108 0.000 0.892
#> GSM648612     1  0.3752      0.862 0.856 0.000 0.144
#> GSM648616     1  0.3851      0.866 0.860 0.004 0.136
#> GSM648617     1  0.1163      0.886 0.972 0.028 0.000
#> GSM648626     1  0.3752      0.862 0.856 0.000 0.144
#> GSM648711     1  0.3752      0.862 0.856 0.000 0.144
#> GSM648712     1  0.3752      0.862 0.856 0.000 0.144
#> GSM648713     1  0.3752      0.862 0.856 0.000 0.144
#> GSM648714     2  0.0000      0.812 0.000 1.000 0.000
#> GSM648716     1  0.3752      0.862 0.856 0.000 0.144
#> GSM648717     1  0.4605      0.813 0.796 0.000 0.204
#> GSM648590     1  0.1289      0.884 0.968 0.032 0.000
#> GSM648596     2  0.0000      0.812 0.000 1.000 0.000
#> GSM648642     2  0.0000      0.812 0.000 1.000 0.000
#> GSM648696     1  0.1163      0.886 0.972 0.028 0.000
#> GSM648705     1  0.1163      0.886 0.972 0.028 0.000
#> GSM648718     2  0.4504      0.708 0.196 0.804 0.000
#> GSM648599     1  0.0237      0.891 0.996 0.004 0.000
#> GSM648608     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648609     1  0.3752      0.862 0.856 0.000 0.144
#> GSM648610     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648633     1  0.1163      0.886 0.972 0.028 0.000
#> GSM648644     2  0.0000      0.812 0.000 1.000 0.000
#> GSM648652     1  0.1163      0.886 0.972 0.028 0.000
#> GSM648653     1  0.0237      0.891 0.996 0.004 0.000
#> GSM648658     1  0.1031      0.887 0.976 0.024 0.000
#> GSM648659     2  0.3816      0.755 0.148 0.852 0.000
#> GSM648662     1  0.1289      0.880 0.968 0.032 0.000
#> GSM648665     2  0.8604      0.345 0.348 0.540 0.112
#> GSM648666     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648680     1  0.0237      0.891 0.996 0.004 0.000
#> GSM648684     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648709     2  0.3116      0.770 0.108 0.892 0.000
#> GSM648719     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648627     1  0.3752      0.862 0.856 0.000 0.144
#> GSM648637     2  0.6286      0.184 0.464 0.536 0.000
#> GSM648638     1  0.5291      0.653 0.732 0.268 0.000
#> GSM648641     3  0.0000      0.943 0.000 0.000 1.000
#> GSM648672     2  0.0000      0.812 0.000 1.000 0.000
#> GSM648674     1  0.5138      0.685 0.748 0.252 0.000
#> GSM648703     2  0.4555      0.704 0.200 0.800 0.000
#> GSM648631     3  0.0000      0.943 0.000 0.000 1.000
#> GSM648669     3  0.3484      0.870 0.048 0.048 0.904
#> GSM648671     3  0.8900      0.273 0.356 0.132 0.512
#> GSM648678     2  0.0000      0.812 0.000 1.000 0.000
#> GSM648679     1  0.5178      0.676 0.744 0.256 0.000
#> GSM648681     1  0.4702      0.771 0.788 0.212 0.000
#> GSM648686     3  0.0000      0.943 0.000 0.000 1.000
#> GSM648689     3  0.0000      0.943 0.000 0.000 1.000
#> GSM648690     3  0.0000      0.943 0.000 0.000 1.000
#> GSM648691     3  0.0000      0.943 0.000 0.000 1.000
#> GSM648693     3  0.0000      0.943 0.000 0.000 1.000
#> GSM648700     1  0.1163      0.886 0.972 0.028 0.000
#> GSM648630     3  0.0000      0.943 0.000 0.000 1.000
#> GSM648632     3  0.0000      0.943 0.000 0.000 1.000
#> GSM648639     1  0.5588      0.741 0.720 0.004 0.276
#> GSM648640     3  0.0000      0.943 0.000 0.000 1.000
#> GSM648668     2  0.5178      0.645 0.256 0.744 0.000
#> GSM648676     2  0.6274      0.224 0.456 0.544 0.000
#> GSM648692     3  0.0000      0.943 0.000 0.000 1.000
#> GSM648694     3  0.0000      0.943 0.000 0.000 1.000
#> GSM648699     2  0.3551      0.755 0.132 0.868 0.000
#> GSM648701     2  0.0000      0.812 0.000 1.000 0.000
#> GSM648673     1  0.6662      0.673 0.704 0.252 0.044
#> GSM648677     2  0.4504      0.707 0.196 0.804 0.000
#> GSM648687     3  0.2066      0.891 0.060 0.000 0.940
#> GSM648688     3  0.0000      0.943 0.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM648605     2  0.0000     0.8466 0.000 1.000 0.000 0.000
#> GSM648618     4  0.2281     0.7015 0.096 0.000 0.000 0.904
#> GSM648620     2  0.3266     0.7611 0.000 0.832 0.000 0.168
#> GSM648646     2  0.0000     0.8466 0.000 1.000 0.000 0.000
#> GSM648649     4  0.3311     0.7538 0.172 0.000 0.000 0.828
#> GSM648675     4  0.0000     0.7141 0.000 0.000 0.000 1.000
#> GSM648682     2  0.4134     0.6612 0.000 0.740 0.000 0.260
#> GSM648698     2  0.0000     0.8466 0.000 1.000 0.000 0.000
#> GSM648708     2  0.3356     0.7556 0.000 0.824 0.000 0.176
#> GSM648628     1  0.3569     0.7199 0.804 0.000 0.000 0.196
#> GSM648595     4  0.0000     0.7141 0.000 0.000 0.000 1.000
#> GSM648635     4  0.0000     0.7141 0.000 0.000 0.000 1.000
#> GSM648645     4  0.4661     0.6189 0.348 0.000 0.000 0.652
#> GSM648647     2  0.0000     0.8466 0.000 1.000 0.000 0.000
#> GSM648667     2  0.3873     0.7044 0.000 0.772 0.000 0.228
#> GSM648695     2  0.3688     0.7274 0.000 0.792 0.000 0.208
#> GSM648704     2  0.0000     0.8466 0.000 1.000 0.000 0.000
#> GSM648706     2  0.0000     0.8466 0.000 1.000 0.000 0.000
#> GSM648593     4  0.1792     0.7479 0.068 0.000 0.000 0.932
#> GSM648594     4  0.3610     0.7444 0.200 0.000 0.000 0.800
#> GSM648600     4  0.4804    -0.1913 0.384 0.000 0.000 0.616
#> GSM648621     1  0.4933     0.5944 0.568 0.000 0.000 0.432
#> GSM648622     1  0.2973     0.6787 0.856 0.000 0.000 0.144
#> GSM648623     4  0.4933     0.5228 0.432 0.000 0.000 0.568
#> GSM648636     1  0.4989     0.5343 0.528 0.000 0.000 0.472
#> GSM648655     4  0.6148    -0.2320 0.048 0.468 0.000 0.484
#> GSM648661     1  0.0000     0.7614 1.000 0.000 0.000 0.000
#> GSM648664     1  0.0000     0.7614 1.000 0.000 0.000 0.000
#> GSM648683     1  0.4933     0.5944 0.568 0.000 0.000 0.432
#> GSM648685     1  0.2408     0.7314 0.896 0.000 0.000 0.104
#> GSM648702     1  0.4967     0.5665 0.548 0.000 0.000 0.452
#> GSM648597     4  0.2011     0.7516 0.080 0.000 0.000 0.920
#> GSM648603     4  0.4933     0.5228 0.432 0.000 0.000 0.568
#> GSM648606     1  0.3610     0.6539 0.800 0.200 0.000 0.000
#> GSM648613     1  0.0000     0.7614 1.000 0.000 0.000 0.000
#> GSM648619     1  0.0000     0.7614 1.000 0.000 0.000 0.000
#> GSM648654     1  0.1637     0.7413 0.940 0.060 0.000 0.000
#> GSM648663     1  0.0707     0.7492 0.980 0.000 0.000 0.020
#> GSM648670     4  0.0000     0.7141 0.000 0.000 0.000 1.000
#> GSM648707     4  0.4477     0.6688 0.312 0.000 0.000 0.688
#> GSM648615     2  0.1389     0.8322 0.048 0.952 0.000 0.000
#> GSM648643     2  0.0000     0.8466 0.000 1.000 0.000 0.000
#> GSM648650     2  0.4833     0.6806 0.032 0.740 0.000 0.228
#> GSM648656     2  0.0000     0.8466 0.000 1.000 0.000 0.000
#> GSM648715     2  0.0000     0.8466 0.000 1.000 0.000 0.000
#> GSM648598     4  0.3837     0.7324 0.224 0.000 0.000 0.776
#> GSM648601     4  0.3610     0.7444 0.200 0.000 0.000 0.800
#> GSM648602     1  0.4933     0.5944 0.568 0.000 0.000 0.432
#> GSM648604     1  0.0000     0.7614 1.000 0.000 0.000 0.000
#> GSM648614     2  0.4820     0.7098 0.168 0.772 0.000 0.060
#> GSM648624     1  0.1867     0.7528 0.928 0.000 0.000 0.072
#> GSM648625     2  0.7363     0.3123 0.200 0.516 0.000 0.284
#> GSM648629     1  0.0000     0.7614 1.000 0.000 0.000 0.000
#> GSM648634     1  0.4933     0.5944 0.568 0.000 0.000 0.432
#> GSM648648     4  0.3610     0.7444 0.200 0.000 0.000 0.800
#> GSM648651     4  0.3528     0.7504 0.192 0.000 0.000 0.808
#> GSM648657     4  0.1637     0.7447 0.060 0.000 0.000 0.940
#> GSM648660     4  0.3610     0.7444 0.200 0.000 0.000 0.800
#> GSM648697     1  0.4933     0.5944 0.568 0.000 0.000 0.432
#> GSM648710     1  0.0000     0.7614 1.000 0.000 0.000 0.000
#> GSM648591     4  0.3024     0.7291 0.148 0.000 0.000 0.852
#> GSM648592     4  0.4008     0.7245 0.244 0.000 0.000 0.756
#> GSM648607     1  0.0336     0.7572 0.992 0.000 0.000 0.008
#> GSM648611     1  0.5839     0.6783 0.696 0.000 0.104 0.200
#> GSM648612     1  0.0336     0.7572 0.992 0.000 0.000 0.008
#> GSM648616     4  0.3528     0.7502 0.192 0.000 0.000 0.808
#> GSM648617     4  0.1637     0.7447 0.060 0.000 0.000 0.940
#> GSM648626     4  0.4933     0.5228 0.432 0.000 0.000 0.568
#> GSM648711     1  0.0000     0.7614 1.000 0.000 0.000 0.000
#> GSM648712     1  0.3610     0.7181 0.800 0.000 0.000 0.200
#> GSM648713     1  0.0000     0.7614 1.000 0.000 0.000 0.000
#> GSM648714     2  0.2011     0.8067 0.080 0.920 0.000 0.000
#> GSM648716     1  0.0000     0.7614 1.000 0.000 0.000 0.000
#> GSM648717     1  0.0000     0.7614 1.000 0.000 0.000 0.000
#> GSM648590     4  0.4353     0.4431 0.012 0.232 0.000 0.756
#> GSM648596     2  0.0000     0.8466 0.000 1.000 0.000 0.000
#> GSM648642     2  0.0000     0.8466 0.000 1.000 0.000 0.000
#> GSM648696     4  0.7429     0.0092 0.192 0.316 0.000 0.492
#> GSM648705     4  0.3569     0.7463 0.196 0.000 0.000 0.804
#> GSM648718     2  0.1824     0.8255 0.060 0.936 0.000 0.004
#> GSM648599     1  0.4999     0.5004 0.508 0.000 0.000 0.492
#> GSM648608     1  0.4277     0.6981 0.720 0.000 0.000 0.280
#> GSM648609     1  0.0000     0.7614 1.000 0.000 0.000 0.000
#> GSM648610     1  0.4933     0.5944 0.568 0.000 0.000 0.432
#> GSM648633     4  0.2814     0.7576 0.132 0.000 0.000 0.868
#> GSM648644     2  0.0000     0.8466 0.000 1.000 0.000 0.000
#> GSM648652     4  0.2345     0.7554 0.100 0.000 0.000 0.900
#> GSM648653     1  0.4933     0.5944 0.568 0.000 0.000 0.432
#> GSM648658     4  0.0921     0.7306 0.028 0.000 0.000 0.972
#> GSM648659     2  0.3569     0.7426 0.000 0.804 0.000 0.196
#> GSM648662     1  0.0779     0.7580 0.980 0.016 0.000 0.004
#> GSM648665     1  0.4991     0.3154 0.608 0.388 0.000 0.004
#> GSM648666     1  0.4817     0.6315 0.612 0.000 0.000 0.388
#> GSM648680     4  0.3311     0.7537 0.172 0.000 0.000 0.828
#> GSM648684     1  0.4933     0.5944 0.568 0.000 0.000 0.432
#> GSM648709     2  0.1389     0.8358 0.000 0.952 0.000 0.048
#> GSM648719     4  0.3649     0.7427 0.204 0.000 0.000 0.796
#> GSM648627     1  0.3610     0.7181 0.800 0.000 0.000 0.200
#> GSM648637     4  0.5343     0.5912 0.052 0.240 0.000 0.708
#> GSM648638     4  0.6374     0.6171 0.128 0.228 0.000 0.644
#> GSM648641     3  0.2281     0.8567 0.096 0.000 0.904 0.000
#> GSM648672     2  0.1211     0.8369 0.000 0.960 0.000 0.040
#> GSM648674     4  0.5327     0.6179 0.060 0.220 0.000 0.720
#> GSM648703     2  0.3610     0.7297 0.000 0.800 0.000 0.200
#> GSM648631     3  0.0000     0.9504 0.000 0.000 1.000 0.000
#> GSM648669     4  0.6198     0.2886 0.020 0.024 0.396 0.560
#> GSM648671     4  0.8584     0.4701 0.168 0.080 0.244 0.508
#> GSM648678     2  0.0000     0.8466 0.000 1.000 0.000 0.000
#> GSM648679     4  0.5123     0.5972 0.044 0.232 0.000 0.724
#> GSM648681     2  0.5148     0.6308 0.056 0.736 0.000 0.208
#> GSM648686     3  0.0000     0.9504 0.000 0.000 1.000 0.000
#> GSM648689     3  0.0000     0.9504 0.000 0.000 1.000 0.000
#> GSM648690     3  0.0000     0.9504 0.000 0.000 1.000 0.000
#> GSM648691     3  0.0000     0.9504 0.000 0.000 1.000 0.000
#> GSM648693     3  0.0000     0.9504 0.000 0.000 1.000 0.000
#> GSM648700     4  0.0000     0.7141 0.000 0.000 0.000 1.000
#> GSM648630     3  0.0000     0.9504 0.000 0.000 1.000 0.000
#> GSM648632     3  0.0000     0.9504 0.000 0.000 1.000 0.000
#> GSM648639     3  0.8835     0.0667 0.240 0.060 0.436 0.264
#> GSM648640     3  0.0000     0.9504 0.000 0.000 1.000 0.000
#> GSM648668     2  0.5913     0.3970 0.048 0.600 0.000 0.352
#> GSM648676     2  0.5767     0.5753 0.060 0.660 0.000 0.280
#> GSM648692     3  0.0000     0.9504 0.000 0.000 1.000 0.000
#> GSM648694     3  0.0000     0.9504 0.000 0.000 1.000 0.000
#> GSM648699     2  0.3610     0.7297 0.000 0.800 0.000 0.200
#> GSM648701     2  0.0000     0.8466 0.000 1.000 0.000 0.000
#> GSM648673     4  0.5938     0.5346 0.016 0.236 0.056 0.692
#> GSM648677     2  0.4916     0.6971 0.056 0.760 0.000 0.184
#> GSM648687     1  0.4304     0.5498 0.716 0.000 0.284 0.000
#> GSM648688     3  0.0000     0.9504 0.000 0.000 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM648605     2  0.0000     0.8021 0.000 1.000 0.000 0.000 0.000
#> GSM648618     5  0.2929     0.6710 0.152 0.000 0.000 0.008 0.840
#> GSM648620     2  0.2732     0.7102 0.000 0.840 0.000 0.000 0.160
#> GSM648646     2  0.0000     0.8021 0.000 1.000 0.000 0.000 0.000
#> GSM648649     5  0.2970     0.7686 0.168 0.004 0.000 0.000 0.828
#> GSM648675     5  0.0162     0.7474 0.000 0.000 0.000 0.004 0.996
#> GSM648682     2  0.3816     0.4174 0.000 0.696 0.000 0.000 0.304
#> GSM648698     2  0.0000     0.8021 0.000 1.000 0.000 0.000 0.000
#> GSM648708     2  0.2773     0.7079 0.000 0.836 0.000 0.000 0.164
#> GSM648628     1  0.3745     0.6951 0.780 0.000 0.000 0.024 0.196
#> GSM648595     5  0.1544     0.7153 0.000 0.068 0.000 0.000 0.932
#> GSM648635     5  0.0162     0.7475 0.000 0.004 0.000 0.000 0.996
#> GSM648645     5  0.4015     0.6259 0.348 0.000 0.000 0.000 0.652
#> GSM648647     2  0.0000     0.8021 0.000 1.000 0.000 0.000 0.000
#> GSM648667     2  0.3143     0.6715 0.000 0.796 0.000 0.000 0.204
#> GSM648695     2  0.3003     0.6888 0.000 0.812 0.000 0.000 0.188
#> GSM648704     2  0.0000     0.8021 0.000 1.000 0.000 0.000 0.000
#> GSM648706     2  0.0000     0.8021 0.000 1.000 0.000 0.000 0.000
#> GSM648593     5  0.0771     0.7583 0.020 0.004 0.000 0.000 0.976
#> GSM648594     5  0.3779     0.7523 0.200 0.000 0.000 0.024 0.776
#> GSM648600     5  0.3074     0.4928 0.196 0.000 0.000 0.000 0.804
#> GSM648621     1  0.4283     0.5133 0.544 0.000 0.000 0.000 0.456
#> GSM648622     5  0.4192     0.5578 0.404 0.000 0.000 0.000 0.596
#> GSM648623     5  0.5065     0.4942 0.420 0.000 0.000 0.036 0.544
#> GSM648636     5  0.4201    -0.2011 0.408 0.000 0.000 0.000 0.592
#> GSM648655     5  0.1597     0.7436 0.012 0.048 0.000 0.000 0.940
#> GSM648661     1  0.0000     0.7448 1.000 0.000 0.000 0.000 0.000
#> GSM648664     1  0.0000     0.7448 1.000 0.000 0.000 0.000 0.000
#> GSM648683     1  0.4283     0.5133 0.544 0.000 0.000 0.000 0.456
#> GSM648685     1  0.2074     0.6957 0.896 0.000 0.000 0.000 0.104
#> GSM648702     1  0.4446     0.4703 0.520 0.004 0.000 0.000 0.476
#> GSM648597     5  0.1661     0.7667 0.036 0.000 0.000 0.024 0.940
#> GSM648603     5  0.4867     0.4828 0.432 0.000 0.000 0.024 0.544
#> GSM648606     1  0.3779     0.6146 0.776 0.200 0.000 0.024 0.000
#> GSM648613     1  0.1211     0.7342 0.960 0.000 0.000 0.024 0.016
#> GSM648619     1  0.0703     0.7417 0.976 0.000 0.000 0.024 0.000
#> GSM648654     1  0.0404     0.7436 0.988 0.012 0.000 0.000 0.000
#> GSM648663     1  0.4696    -0.0303 0.616 0.000 0.000 0.024 0.360
#> GSM648670     5  0.0162     0.7475 0.000 0.004 0.000 0.000 0.996
#> GSM648707     5  0.5002     0.6338 0.312 0.000 0.000 0.052 0.636
#> GSM648615     2  0.4641     0.0430 0.012 0.532 0.000 0.000 0.456
#> GSM648643     2  0.0000     0.8021 0.000 1.000 0.000 0.000 0.000
#> GSM648650     2  0.4397     0.2750 0.004 0.564 0.000 0.000 0.432
#> GSM648656     2  0.0000     0.8021 0.000 1.000 0.000 0.000 0.000
#> GSM648715     2  0.0000     0.8021 0.000 1.000 0.000 0.000 0.000
#> GSM648598     5  0.3143     0.7568 0.204 0.000 0.000 0.000 0.796
#> GSM648601     5  0.3109     0.7577 0.200 0.000 0.000 0.000 0.800
#> GSM648602     1  0.4283     0.5133 0.544 0.000 0.000 0.000 0.456
#> GSM648604     1  0.0000     0.7448 1.000 0.000 0.000 0.000 0.000
#> GSM648614     2  0.4101     0.6269 0.184 0.768 0.000 0.000 0.048
#> GSM648624     1  0.1478     0.7253 0.936 0.000 0.000 0.000 0.064
#> GSM648625     5  0.5396     0.6761 0.220 0.124 0.000 0.000 0.656
#> GSM648629     1  0.0000     0.7448 1.000 0.000 0.000 0.000 0.000
#> GSM648634     1  0.4283     0.5133 0.544 0.000 0.000 0.000 0.456
#> GSM648648     5  0.3305     0.7482 0.224 0.000 0.000 0.000 0.776
#> GSM648651     5  0.3177     0.7586 0.208 0.000 0.000 0.000 0.792
#> GSM648657     5  0.0693     0.7561 0.012 0.000 0.000 0.008 0.980
#> GSM648660     5  0.3109     0.7577 0.200 0.000 0.000 0.000 0.800
#> GSM648697     1  0.4278     0.5169 0.548 0.000 0.000 0.000 0.452
#> GSM648710     1  0.0000     0.7448 1.000 0.000 0.000 0.000 0.000
#> GSM648591     5  0.3085     0.7125 0.116 0.000 0.000 0.032 0.852
#> GSM648592     5  0.4167     0.7198 0.252 0.000 0.000 0.024 0.724
#> GSM648607     1  0.0609     0.7351 0.980 0.000 0.000 0.000 0.020
#> GSM648611     1  0.5029     0.6754 0.720 0.000 0.056 0.024 0.200
#> GSM648612     1  0.2236     0.6863 0.908 0.000 0.000 0.024 0.068
#> GSM648616     5  0.5272     0.4913 0.072 0.000 0.000 0.308 0.620
#> GSM648617     5  0.1012     0.7571 0.012 0.000 0.000 0.020 0.968
#> GSM648626     5  0.5236     0.5043 0.408 0.000 0.000 0.048 0.544
#> GSM648711     1  0.0000     0.7448 1.000 0.000 0.000 0.000 0.000
#> GSM648712     1  0.3779     0.6932 0.776 0.000 0.000 0.024 0.200
#> GSM648713     1  0.0703     0.7417 0.976 0.000 0.000 0.024 0.000
#> GSM648714     2  0.2351     0.7282 0.088 0.896 0.000 0.016 0.000
#> GSM648716     1  0.0703     0.7417 0.976 0.000 0.000 0.024 0.000
#> GSM648717     1  0.0703     0.7417 0.976 0.000 0.000 0.024 0.000
#> GSM648590     5  0.0963     0.7388 0.000 0.036 0.000 0.000 0.964
#> GSM648596     2  0.0000     0.8021 0.000 1.000 0.000 0.000 0.000
#> GSM648642     2  0.0000     0.8021 0.000 1.000 0.000 0.000 0.000
#> GSM648696     5  0.1251     0.7355 0.008 0.036 0.000 0.000 0.956
#> GSM648705     5  0.3231     0.7599 0.196 0.004 0.000 0.000 0.800
#> GSM648718     2  0.1597     0.7691 0.012 0.940 0.000 0.000 0.048
#> GSM648599     5  0.1043     0.7288 0.040 0.000 0.000 0.000 0.960
#> GSM648608     1  0.3752     0.6562 0.708 0.000 0.000 0.000 0.292
#> GSM648609     1  0.0000     0.7448 1.000 0.000 0.000 0.000 0.000
#> GSM648610     1  0.4283     0.5133 0.544 0.000 0.000 0.000 0.456
#> GSM648633     5  0.2127     0.7736 0.108 0.000 0.000 0.000 0.892
#> GSM648644     2  0.0000     0.8021 0.000 1.000 0.000 0.000 0.000
#> GSM648652     5  0.1638     0.7705 0.064 0.004 0.000 0.000 0.932
#> GSM648653     1  0.4283     0.5133 0.544 0.000 0.000 0.000 0.456
#> GSM648658     5  0.0290     0.7522 0.008 0.000 0.000 0.000 0.992
#> GSM648659     2  0.3209     0.6928 0.000 0.812 0.000 0.008 0.180
#> GSM648662     1  0.0671     0.7391 0.980 0.004 0.000 0.000 0.016
#> GSM648665     1  0.4182     0.2535 0.600 0.400 0.000 0.000 0.000
#> GSM648666     1  0.4161     0.5748 0.608 0.000 0.000 0.000 0.392
#> GSM648680     5  0.2773     0.7688 0.164 0.000 0.000 0.000 0.836
#> GSM648684     1  0.4249     0.5329 0.568 0.000 0.000 0.000 0.432
#> GSM648709     2  0.1121     0.7852 0.000 0.956 0.000 0.000 0.044
#> GSM648719     5  0.3143     0.7564 0.204 0.000 0.000 0.000 0.796
#> GSM648627     1  0.3779     0.6932 0.776 0.000 0.000 0.024 0.200
#> GSM648637     4  0.5466     0.7135 0.000 0.244 0.000 0.640 0.116
#> GSM648638     4  0.5500     0.7101 0.000 0.212 0.000 0.648 0.140
#> GSM648641     3  0.2813     0.7950 0.108 0.000 0.868 0.024 0.000
#> GSM648672     4  0.4030     0.6457 0.000 0.352 0.000 0.648 0.000
#> GSM648674     4  0.5210     0.7304 0.000 0.200 0.000 0.680 0.120
#> GSM648703     4  0.4803     0.6601 0.000 0.096 0.000 0.720 0.184
#> GSM648631     3  0.0000     0.9409 0.000 0.000 1.000 0.000 0.000
#> GSM648669     4  0.2654     0.6928 0.000 0.000 0.084 0.884 0.032
#> GSM648671     4  0.1668     0.7165 0.000 0.000 0.028 0.940 0.032
#> GSM648678     2  0.4060     0.0882 0.000 0.640 0.000 0.360 0.000
#> GSM648679     4  0.4676     0.7391 0.000 0.208 0.000 0.720 0.072
#> GSM648681     5  0.5225     0.1882 0.012 0.432 0.000 0.024 0.532
#> GSM648686     3  0.0000     0.9409 0.000 0.000 1.000 0.000 0.000
#> GSM648689     3  0.0000     0.9409 0.000 0.000 1.000 0.000 0.000
#> GSM648690     3  0.0000     0.9409 0.000 0.000 1.000 0.000 0.000
#> GSM648691     3  0.0000     0.9409 0.000 0.000 1.000 0.000 0.000
#> GSM648693     3  0.0000     0.9409 0.000 0.000 1.000 0.000 0.000
#> GSM648700     4  0.4074     0.4787 0.000 0.000 0.000 0.636 0.364
#> GSM648630     3  0.0000     0.9409 0.000 0.000 1.000 0.000 0.000
#> GSM648632     3  0.0000     0.9409 0.000 0.000 1.000 0.000 0.000
#> GSM648639     3  0.7887     0.2125 0.116 0.036 0.472 0.308 0.068
#> GSM648640     3  0.1671     0.8827 0.000 0.000 0.924 0.076 0.000
#> GSM648668     4  0.4225     0.6307 0.000 0.364 0.000 0.632 0.004
#> GSM648676     4  0.2074     0.7492 0.000 0.104 0.000 0.896 0.000
#> GSM648692     3  0.0000     0.9409 0.000 0.000 1.000 0.000 0.000
#> GSM648694     3  0.0000     0.9409 0.000 0.000 1.000 0.000 0.000
#> GSM648699     4  0.3641     0.7025 0.000 0.060 0.000 0.820 0.120
#> GSM648701     4  0.2471     0.7401 0.000 0.136 0.000 0.864 0.000
#> GSM648673     4  0.0798     0.7231 0.000 0.016 0.008 0.976 0.000
#> GSM648677     4  0.3999     0.6544 0.000 0.344 0.000 0.656 0.000
#> GSM648687     1  0.3835     0.5651 0.732 0.000 0.260 0.008 0.000
#> GSM648688     3  0.0000     0.9409 0.000 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM648605     2  0.0000     0.7862 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648618     6  0.1391     0.7591 0.040 0.000 0.000 0.000 0.016 0.944
#> GSM648620     2  0.2793     0.6600 0.000 0.800 0.000 0.000 0.000 0.200
#> GSM648646     2  0.0000     0.7862 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648649     6  0.3293     0.7201 0.140 0.000 0.000 0.000 0.048 0.812
#> GSM648675     6  0.0000     0.7687 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648682     6  0.3756     0.2722 0.000 0.400 0.000 0.000 0.000 0.600
#> GSM648698     2  0.0000     0.7862 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648708     2  0.2823     0.6564 0.000 0.796 0.000 0.000 0.000 0.204
#> GSM648628     5  0.5348     0.5966 0.216 0.000 0.000 0.000 0.592 0.192
#> GSM648595     6  0.0146     0.7681 0.000 0.004 0.000 0.000 0.000 0.996
#> GSM648635     6  0.0000     0.7687 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648645     6  0.3752     0.6922 0.164 0.000 0.000 0.000 0.064 0.772
#> GSM648647     2  0.0000     0.7862 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648667     2  0.2823     0.6564 0.000 0.796 0.000 0.000 0.000 0.204
#> GSM648695     2  0.2823     0.6564 0.000 0.796 0.000 0.000 0.000 0.204
#> GSM648704     2  0.0000     0.7862 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648706     2  0.0000     0.7862 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648593     6  0.1863     0.7640 0.036 0.000 0.000 0.000 0.044 0.920
#> GSM648594     6  0.3752     0.6922 0.164 0.000 0.000 0.000 0.064 0.772
#> GSM648600     6  0.2454     0.6907 0.160 0.000 0.000 0.000 0.000 0.840
#> GSM648621     6  0.2823     0.6519 0.204 0.000 0.000 0.000 0.000 0.796
#> GSM648622     1  0.3773     0.5263 0.752 0.000 0.000 0.000 0.044 0.204
#> GSM648623     5  0.4996     0.5890 0.156 0.000 0.000 0.000 0.644 0.200
#> GSM648636     6  0.2762     0.6596 0.196 0.000 0.000 0.000 0.000 0.804
#> GSM648655     6  0.1693     0.7671 0.020 0.012 0.000 0.000 0.032 0.936
#> GSM648661     1  0.0000     0.7523 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648664     1  0.0000     0.7523 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648683     6  0.3266     0.5686 0.272 0.000 0.000 0.000 0.000 0.728
#> GSM648685     1  0.0146     0.7511 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM648702     6  0.2823     0.6519 0.204 0.000 0.000 0.000 0.000 0.796
#> GSM648597     6  0.2384     0.7593 0.048 0.000 0.000 0.000 0.064 0.888
#> GSM648603     5  0.5352     0.5981 0.204 0.000 0.000 0.000 0.592 0.204
#> GSM648606     5  0.5186     0.5857 0.216 0.168 0.000 0.000 0.616 0.000
#> GSM648613     5  0.3887     0.6576 0.360 0.000 0.000 0.000 0.632 0.008
#> GSM648619     5  0.3684     0.6508 0.372 0.000 0.000 0.000 0.628 0.000
#> GSM648654     1  0.0713     0.7348 0.972 0.028 0.000 0.000 0.000 0.000
#> GSM648663     5  0.5319     0.6193 0.220 0.000 0.000 0.000 0.596 0.184
#> GSM648670     6  0.0000     0.7687 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648707     5  0.4680     0.6131 0.120 0.000 0.000 0.000 0.680 0.200
#> GSM648615     2  0.4303     0.5211 0.024 0.732 0.000 0.000 0.040 0.204
#> GSM648643     2  0.0000     0.7862 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648650     2  0.4464     0.4609 0.008 0.624 0.000 0.000 0.028 0.340
#> GSM648656     2  0.0000     0.7862 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648715     2  0.0000     0.7862 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648598     6  0.4552     0.4019 0.364 0.000 0.000 0.000 0.044 0.592
#> GSM648601     6  0.3672     0.6936 0.168 0.000 0.000 0.000 0.056 0.776
#> GSM648602     6  0.2823     0.6519 0.204 0.000 0.000 0.000 0.000 0.796
#> GSM648604     1  0.0000     0.7523 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648614     1  0.3828     0.1895 0.560 0.440 0.000 0.000 0.000 0.000
#> GSM648624     1  0.0146     0.7511 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM648625     1  0.5449     0.3882 0.604 0.064 0.000 0.000 0.044 0.288
#> GSM648629     1  0.0000     0.7523 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648634     6  0.2823     0.6519 0.204 0.000 0.000 0.000 0.000 0.796
#> GSM648648     1  0.4433     0.3296 0.616 0.000 0.000 0.000 0.040 0.344
#> GSM648651     1  0.3938     0.5251 0.728 0.000 0.000 0.000 0.044 0.228
#> GSM648657     6  0.2030     0.7621 0.028 0.000 0.000 0.000 0.064 0.908
#> GSM648660     6  0.3487     0.6990 0.168 0.000 0.000 0.000 0.044 0.788
#> GSM648697     6  0.3390     0.5318 0.296 0.000 0.000 0.000 0.000 0.704
#> GSM648710     1  0.0000     0.7523 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648591     6  0.3279     0.6719 0.028 0.000 0.000 0.000 0.176 0.796
#> GSM648592     6  0.5108     0.5006 0.164 0.000 0.000 0.000 0.208 0.628
#> GSM648607     1  0.0622     0.7435 0.980 0.000 0.000 0.000 0.008 0.012
#> GSM648611     5  0.5487     0.6016 0.208 0.000 0.008 0.000 0.600 0.184
#> GSM648612     5  0.4548     0.6677 0.312 0.000 0.000 0.000 0.632 0.056
#> GSM648616     5  0.2706     0.5385 0.000 0.000 0.000 0.024 0.852 0.124
#> GSM648617     6  0.3854    -0.0174 0.000 0.000 0.000 0.000 0.464 0.536
#> GSM648626     5  0.5253     0.6119 0.200 0.000 0.000 0.000 0.608 0.192
#> GSM648711     1  0.0713     0.7278 0.972 0.000 0.000 0.000 0.028 0.000
#> GSM648712     5  0.5113     0.6188 0.204 0.000 0.000 0.000 0.628 0.168
#> GSM648713     5  0.3706     0.6446 0.380 0.000 0.000 0.000 0.620 0.000
#> GSM648714     2  0.3371     0.4912 0.000 0.708 0.000 0.000 0.292 0.000
#> GSM648716     5  0.3672     0.6527 0.368 0.000 0.000 0.000 0.632 0.000
#> GSM648717     5  0.3727     0.6372 0.388 0.000 0.000 0.000 0.612 0.000
#> GSM648590     6  0.0000     0.7687 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648596     2  0.0000     0.7862 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648642     2  0.0000     0.7862 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648696     6  0.0000     0.7687 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648705     6  0.3248     0.7090 0.164 0.000 0.000 0.000 0.032 0.804
#> GSM648718     2  0.2421     0.7217 0.028 0.900 0.000 0.000 0.040 0.032
#> GSM648599     6  0.0000     0.7687 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648608     1  0.2793     0.5774 0.800 0.000 0.000 0.000 0.000 0.200
#> GSM648609     1  0.0000     0.7523 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648610     6  0.2823     0.6519 0.204 0.000 0.000 0.000 0.000 0.796
#> GSM648633     6  0.2795     0.7454 0.100 0.000 0.000 0.000 0.044 0.856
#> GSM648644     2  0.0000     0.7862 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648652     6  0.2433     0.7568 0.072 0.000 0.000 0.000 0.044 0.884
#> GSM648653     6  0.2823     0.6519 0.204 0.000 0.000 0.000 0.000 0.796
#> GSM648658     6  0.0909     0.7690 0.012 0.000 0.000 0.000 0.020 0.968
#> GSM648659     2  0.3073     0.6520 0.000 0.788 0.000 0.008 0.000 0.204
#> GSM648662     1  0.0291     0.7514 0.992 0.004 0.000 0.000 0.000 0.004
#> GSM648665     1  0.3659     0.3718 0.636 0.364 0.000 0.000 0.000 0.000
#> GSM648666     1  0.3076     0.5464 0.760 0.000 0.000 0.000 0.000 0.240
#> GSM648680     6  0.3229     0.7226 0.140 0.000 0.000 0.000 0.044 0.816
#> GSM648684     1  0.3756     0.2885 0.600 0.000 0.000 0.000 0.000 0.400
#> GSM648709     2  0.0000     0.7862 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648719     6  0.4453     0.4700 0.332 0.000 0.000 0.000 0.044 0.624
#> GSM648627     5  0.5509     0.5690 0.220 0.000 0.000 0.000 0.564 0.216
#> GSM648637     4  0.7465     0.5264 0.000 0.204 0.000 0.392 0.200 0.204
#> GSM648638     5  0.5684    -0.2419 0.000 0.164 0.000 0.276 0.552 0.008
#> GSM648641     5  0.3727     0.3127 0.000 0.000 0.388 0.000 0.612 0.000
#> GSM648672     4  0.5837     0.5142 0.000 0.340 0.000 0.460 0.200 0.000
#> GSM648674     4  0.7066     0.5958 0.000 0.204 0.000 0.464 0.208 0.124
#> GSM648703     4  0.2706     0.6986 0.000 0.124 0.000 0.852 0.000 0.024
#> GSM648631     3  0.0000     0.9828 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648669     4  0.4594     0.6196 0.000 0.000 0.092 0.676 0.232 0.000
#> GSM648671     4  0.3151     0.6752 0.000 0.000 0.000 0.748 0.252 0.000
#> GSM648678     2  0.3695     0.1179 0.000 0.624 0.000 0.376 0.000 0.000
#> GSM648679     4  0.6052     0.6142 0.000 0.204 0.000 0.464 0.324 0.008
#> GSM648681     2  0.4303     0.5212 0.024 0.732 0.000 0.000 0.040 0.204
#> GSM648686     3  0.0000     0.9828 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648689     3  0.0000     0.9828 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648690     3  0.0000     0.9828 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648691     3  0.0000     0.9828 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648693     3  0.0000     0.9828 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648700     4  0.2491     0.6377 0.000 0.000 0.000 0.836 0.000 0.164
#> GSM648630     3  0.0000     0.9828 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648632     3  0.0000     0.9828 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648639     5  0.3334     0.4893 0.004 0.000 0.120 0.024 0.832 0.020
#> GSM648640     3  0.2743     0.7918 0.000 0.000 0.828 0.008 0.164 0.000
#> GSM648668     2  0.5887    -0.4491 0.000 0.408 0.000 0.392 0.200 0.000
#> GSM648676     4  0.2219     0.6965 0.000 0.136 0.000 0.864 0.000 0.000
#> GSM648692     3  0.0000     0.9828 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648694     3  0.0000     0.9828 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648699     4  0.0363     0.6920 0.000 0.000 0.000 0.988 0.000 0.012
#> GSM648701     4  0.2092     0.7032 0.000 0.124 0.000 0.876 0.000 0.000
#> GSM648673     4  0.2092     0.6620 0.000 0.000 0.000 0.876 0.124 0.000
#> GSM648677     4  0.5837     0.5142 0.000 0.340 0.000 0.460 0.200 0.000
#> GSM648687     1  0.3456     0.6051 0.788 0.000 0.172 0.000 0.040 0.000
#> GSM648688     3  0.0000     0.9828 0.000 0.000 1.000 0.000 0.000 0.000

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-CV-pam-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-CV-pam-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-CV-pam-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-CV-pam-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-CV-pam-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-CV-pam-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-CV-pam-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-CV-pam-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-CV-pam-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-CV-pam-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-CV-pam-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-CV-pam-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-CV-pam-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-CV-pam-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-CV-pam-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-CV-pam-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-CV-pam-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-CV-pam-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-CV-pam-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-CV-pam-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk CV-pam-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-CV-pam-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-CV-pam-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-CV-pam-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-CV-pam-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-CV-pam-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk CV-pam-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>          n disease.state(p) development.stage(p) other(p) k
#> CV:pam 128         3.39e-11               0.5647 1.70e-10 2
#> CV:pam 125         2.06e-12               0.0708 2.22e-17 3
#> CV:pam 120         1.78e-11               0.2607 4.32e-18 4
#> CV:pam 115         8.31e-23               0.1543 6.90e-28 5
#> CV:pam 114         9.55e-21               0.1128 5.82e-37 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


CV:mclust

The object with results only for a single top-value method and a single partition method can be extracted as:

res = res_list["CV", "mclust"]
# you can also extract it by
# res = res_list["CV:mclust"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 130 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#>   Subgroups are detected by 'mclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk CV-mclust-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk CV-mclust-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.573           0.884       0.928         0.4894 0.497   0.497
#> 3 3 0.454           0.489       0.755         0.2538 0.814   0.653
#> 4 4 0.481           0.443       0.703         0.1230 0.749   0.483
#> 5 5 0.647           0.715       0.799         0.1119 0.767   0.409
#> 6 6 0.677           0.676       0.771         0.0423 0.958   0.825

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 2

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM648605     2  0.4815     0.8910 0.104 0.896
#> GSM648618     1  0.0672     0.9482 0.992 0.008
#> GSM648620     2  0.6048     0.8925 0.148 0.852
#> GSM648646     2  0.5946     0.8946 0.144 0.856
#> GSM648649     1  0.0000     0.9532 1.000 0.000
#> GSM648675     2  0.9393     0.6031 0.356 0.644
#> GSM648682     2  0.5946     0.8946 0.144 0.856
#> GSM648698     2  0.5946     0.8946 0.144 0.856
#> GSM648708     2  0.6343     0.8841 0.160 0.840
#> GSM648628     2  0.9815     0.3510 0.420 0.580
#> GSM648595     1  0.3274     0.9013 0.940 0.060
#> GSM648635     1  0.0000     0.9532 1.000 0.000
#> GSM648645     1  0.0000     0.9532 1.000 0.000
#> GSM648647     2  0.5946     0.8946 0.144 0.856
#> GSM648667     2  0.9933     0.3825 0.452 0.548
#> GSM648695     2  0.6048     0.8925 0.148 0.852
#> GSM648704     2  0.5946     0.8946 0.144 0.856
#> GSM648706     2  0.4815     0.8910 0.104 0.896
#> GSM648593     1  0.0000     0.9532 1.000 0.000
#> GSM648594     1  0.8016     0.6203 0.756 0.244
#> GSM648600     1  0.0000     0.9532 1.000 0.000
#> GSM648621     1  0.0000     0.9532 1.000 0.000
#> GSM648622     1  0.0000     0.9532 1.000 0.000
#> GSM648623     1  0.0000     0.9532 1.000 0.000
#> GSM648636     1  0.0000     0.9532 1.000 0.000
#> GSM648655     1  0.0000     0.9532 1.000 0.000
#> GSM648661     1  0.2423     0.9395 0.960 0.040
#> GSM648664     1  0.2423     0.9395 0.960 0.040
#> GSM648683     1  0.2423     0.9395 0.960 0.040
#> GSM648685     1  0.2423     0.9395 0.960 0.040
#> GSM648702     1  0.0000     0.9532 1.000 0.000
#> GSM648597     1  0.7815     0.6438 0.768 0.232
#> GSM648603     1  0.0000     0.9532 1.000 0.000
#> GSM648606     2  0.4815     0.8910 0.104 0.896
#> GSM648613     2  0.4815     0.8910 0.104 0.896
#> GSM648619     1  0.2423     0.9395 0.960 0.040
#> GSM648654     2  0.9209     0.5742 0.336 0.664
#> GSM648663     2  0.5294     0.8820 0.120 0.880
#> GSM648670     2  0.6438     0.8779 0.164 0.836
#> GSM648707     2  0.6148     0.8682 0.152 0.848
#> GSM648615     2  0.5946     0.8946 0.144 0.856
#> GSM648643     2  0.5946     0.8946 0.144 0.856
#> GSM648650     1  0.7815     0.6383 0.768 0.232
#> GSM648656     2  0.5946     0.8946 0.144 0.856
#> GSM648715     2  0.5946     0.8946 0.144 0.856
#> GSM648598     1  0.0000     0.9532 1.000 0.000
#> GSM648601     1  0.0000     0.9532 1.000 0.000
#> GSM648602     1  0.0000     0.9532 1.000 0.000
#> GSM648604     1  0.2423     0.9395 0.960 0.040
#> GSM648614     2  0.4815     0.8910 0.104 0.896
#> GSM648624     1  0.0000     0.9532 1.000 0.000
#> GSM648625     1  0.3879     0.8832 0.924 0.076
#> GSM648629     1  0.2423     0.9395 0.960 0.040
#> GSM648634     1  0.0000     0.9532 1.000 0.000
#> GSM648648     1  0.0000     0.9532 1.000 0.000
#> GSM648651     1  0.0000     0.9532 1.000 0.000
#> GSM648657     1  0.0000     0.9532 1.000 0.000
#> GSM648660     1  0.0000     0.9532 1.000 0.000
#> GSM648697     1  0.0000     0.9532 1.000 0.000
#> GSM648710     1  0.2423     0.9395 0.960 0.040
#> GSM648591     1  0.8713     0.5153 0.708 0.292
#> GSM648592     1  0.3114     0.9071 0.944 0.056
#> GSM648607     1  0.2423     0.9395 0.960 0.040
#> GSM648611     2  0.1414     0.8942 0.020 0.980
#> GSM648612     1  0.2423     0.9395 0.960 0.040
#> GSM648616     2  0.2423     0.9038 0.040 0.960
#> GSM648617     1  0.0000     0.9532 1.000 0.000
#> GSM648626     1  0.0000     0.9532 1.000 0.000
#> GSM648711     1  0.2423     0.9395 0.960 0.040
#> GSM648712     1  0.2423     0.9395 0.960 0.040
#> GSM648713     1  0.2423     0.9395 0.960 0.040
#> GSM648714     2  0.4815     0.8910 0.104 0.896
#> GSM648716     1  0.2423     0.9395 0.960 0.040
#> GSM648717     2  0.4815     0.8910 0.104 0.896
#> GSM648590     1  0.9850     0.0781 0.572 0.428
#> GSM648596     2  0.5946     0.8946 0.144 0.856
#> GSM648642     2  0.5946     0.8946 0.144 0.856
#> GSM648696     1  0.0000     0.9532 1.000 0.000
#> GSM648705     1  0.0000     0.9532 1.000 0.000
#> GSM648718     2  0.5946     0.8946 0.144 0.856
#> GSM648599     1  0.0000     0.9532 1.000 0.000
#> GSM648608     1  0.2423     0.9395 0.960 0.040
#> GSM648609     1  0.2423     0.9395 0.960 0.040
#> GSM648610     1  0.2423     0.9395 0.960 0.040
#> GSM648633     1  0.0000     0.9532 1.000 0.000
#> GSM648644     2  0.5946     0.8946 0.144 0.856
#> GSM648652     1  0.0000     0.9532 1.000 0.000
#> GSM648653     1  0.0000     0.9532 1.000 0.000
#> GSM648658     1  0.0000     0.9532 1.000 0.000
#> GSM648659     2  0.5946     0.8946 0.144 0.856
#> GSM648662     2  0.9323     0.5494 0.348 0.652
#> GSM648665     2  0.9286     0.5583 0.344 0.656
#> GSM648666     1  0.0000     0.9532 1.000 0.000
#> GSM648680     1  0.0000     0.9532 1.000 0.000
#> GSM648684     1  0.2423     0.9395 0.960 0.040
#> GSM648709     2  0.6048     0.8925 0.148 0.852
#> GSM648719     1  0.0000     0.9532 1.000 0.000
#> GSM648627     1  0.2423     0.9395 0.960 0.040
#> GSM648637     2  0.2423     0.9038 0.040 0.960
#> GSM648638     2  0.2423     0.9038 0.040 0.960
#> GSM648641     2  0.0000     0.8945 0.000 1.000
#> GSM648672     2  0.2423     0.9038 0.040 0.960
#> GSM648674     2  0.2423     0.9038 0.040 0.960
#> GSM648703     2  0.2423     0.9038 0.040 0.960
#> GSM648631     2  0.0000     0.8945 0.000 1.000
#> GSM648669     2  0.2423     0.9038 0.040 0.960
#> GSM648671     2  0.2423     0.9038 0.040 0.960
#> GSM648678     2  0.2423     0.9038 0.040 0.960
#> GSM648679     2  0.2423     0.9038 0.040 0.960
#> GSM648681     2  0.5946     0.8946 0.144 0.856
#> GSM648686     2  0.0000     0.8945 0.000 1.000
#> GSM648689     2  0.0000     0.8945 0.000 1.000
#> GSM648690     2  0.0000     0.8945 0.000 1.000
#> GSM648691     2  0.0000     0.8945 0.000 1.000
#> GSM648693     2  0.0000     0.8945 0.000 1.000
#> GSM648700     2  0.2423     0.9038 0.040 0.960
#> GSM648630     2  0.0000     0.8945 0.000 1.000
#> GSM648632     2  0.0000     0.8945 0.000 1.000
#> GSM648639     2  0.2423     0.9038 0.040 0.960
#> GSM648640     2  0.0000     0.8945 0.000 1.000
#> GSM648668     2  0.2423     0.9038 0.040 0.960
#> GSM648676     2  0.2423     0.9038 0.040 0.960
#> GSM648692     2  0.0000     0.8945 0.000 1.000
#> GSM648694     2  0.0000     0.8945 0.000 1.000
#> GSM648699     2  0.2423     0.9038 0.040 0.960
#> GSM648701     2  0.2423     0.9038 0.040 0.960
#> GSM648673     2  0.2423     0.9038 0.040 0.960
#> GSM648677     2  0.2423     0.9038 0.040 0.960
#> GSM648687     2  0.2423     0.9038 0.040 0.960
#> GSM648688     2  0.0000     0.8945 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM648605     2  0.6669     0.0936 0.468 0.524 0.008
#> GSM648618     1  0.1525     0.7873 0.964 0.032 0.004
#> GSM648620     1  0.6309    -0.0845 0.504 0.496 0.000
#> GSM648646     2  0.5325     0.4578 0.248 0.748 0.004
#> GSM648649     1  0.0424     0.8021 0.992 0.008 0.000
#> GSM648675     1  0.8137     0.1962 0.592 0.316 0.092
#> GSM648682     2  0.5325     0.4578 0.248 0.748 0.004
#> GSM648698     2  0.5982     0.3735 0.328 0.668 0.004
#> GSM648708     1  0.6309    -0.0845 0.504 0.496 0.000
#> GSM648628     3  0.6252     0.4009 0.268 0.024 0.708
#> GSM648595     1  0.6019     0.4062 0.700 0.288 0.012
#> GSM648635     1  0.0424     0.8021 0.992 0.008 0.000
#> GSM648645     1  0.0000     0.8035 1.000 0.000 0.000
#> GSM648647     2  0.5178     0.4494 0.256 0.744 0.000
#> GSM648667     2  0.6308     0.0847 0.492 0.508 0.000
#> GSM648695     1  0.6309    -0.0845 0.504 0.496 0.000
#> GSM648704     2  0.5502     0.4585 0.248 0.744 0.008
#> GSM648706     2  0.6659     0.1161 0.460 0.532 0.008
#> GSM648593     1  0.0424     0.8021 0.992 0.008 0.000
#> GSM648594     1  0.5845     0.3927 0.688 0.308 0.004
#> GSM648600     1  0.0424     0.8021 0.992 0.008 0.000
#> GSM648621     1  0.0592     0.7999 0.988 0.012 0.000
#> GSM648622     1  0.0000     0.8035 1.000 0.000 0.000
#> GSM648623     1  0.1529     0.7865 0.960 0.040 0.000
#> GSM648636     1  0.0424     0.8021 0.992 0.008 0.000
#> GSM648655     1  0.0424     0.8021 0.992 0.008 0.000
#> GSM648661     1  0.5363     0.6432 0.724 0.000 0.276
#> GSM648664     1  0.4974     0.6746 0.764 0.000 0.236
#> GSM648683     1  0.4796     0.6865 0.780 0.000 0.220
#> GSM648685     1  0.2537     0.7728 0.920 0.000 0.080
#> GSM648702     1  0.0424     0.8021 0.992 0.008 0.000
#> GSM648597     1  0.9573    -0.1321 0.460 0.328 0.212
#> GSM648603     1  0.0237     0.8025 0.996 0.004 0.000
#> GSM648606     2  0.9560     0.2280 0.256 0.484 0.260
#> GSM648613     2  0.9560     0.2280 0.256 0.484 0.260
#> GSM648619     1  0.5363     0.6432 0.724 0.000 0.276
#> GSM648654     2  0.9559     0.2171 0.264 0.484 0.252
#> GSM648663     2  0.9560     0.2280 0.256 0.484 0.260
#> GSM648670     2  0.7489    -0.1844 0.036 0.496 0.468
#> GSM648707     3  0.5553     0.6471 0.004 0.272 0.724
#> GSM648615     2  0.6468     0.1873 0.444 0.552 0.004
#> GSM648643     2  0.5325     0.4578 0.248 0.748 0.004
#> GSM648650     1  0.5291     0.4680 0.732 0.268 0.000
#> GSM648656     2  0.5502     0.4585 0.248 0.744 0.008
#> GSM648715     2  0.5178     0.4494 0.256 0.744 0.000
#> GSM648598     1  0.0000     0.8035 1.000 0.000 0.000
#> GSM648601     1  0.0000     0.8035 1.000 0.000 0.000
#> GSM648602     1  0.0000     0.8035 1.000 0.000 0.000
#> GSM648604     1  0.5058     0.6682 0.756 0.000 0.244
#> GSM648614     2  0.9528     0.2110 0.288 0.484 0.228
#> GSM648624     1  0.0000     0.8035 1.000 0.000 0.000
#> GSM648625     1  0.4887     0.5419 0.772 0.228 0.000
#> GSM648629     1  0.5058     0.6682 0.756 0.000 0.244
#> GSM648634     1  0.0237     0.8031 0.996 0.004 0.000
#> GSM648648     1  0.0424     0.8021 0.992 0.008 0.000
#> GSM648651     1  0.0000     0.8035 1.000 0.000 0.000
#> GSM648657     1  0.0237     0.8031 0.996 0.004 0.000
#> GSM648660     1  0.0000     0.8035 1.000 0.000 0.000
#> GSM648697     1  0.0000     0.8035 1.000 0.000 0.000
#> GSM648710     1  0.5327     0.6465 0.728 0.000 0.272
#> GSM648591     3  0.6443     0.6211 0.040 0.240 0.720
#> GSM648592     1  0.1411     0.7861 0.964 0.036 0.000
#> GSM648607     1  0.5363     0.6432 0.724 0.000 0.276
#> GSM648611     3  0.6066     0.4026 0.248 0.024 0.728
#> GSM648612     1  0.5363     0.6432 0.724 0.000 0.276
#> GSM648616     3  0.5553     0.6471 0.004 0.272 0.724
#> GSM648617     1  0.0592     0.8009 0.988 0.012 0.000
#> GSM648626     1  0.1163     0.7911 0.972 0.028 0.000
#> GSM648711     1  0.5363     0.6432 0.724 0.000 0.276
#> GSM648712     1  0.5363     0.6432 0.724 0.000 0.276
#> GSM648713     1  0.5363     0.6432 0.724 0.000 0.276
#> GSM648714     2  0.9528     0.2110 0.288 0.484 0.228
#> GSM648716     1  0.5363     0.6432 0.724 0.000 0.276
#> GSM648717     2  0.9560     0.2280 0.256 0.484 0.260
#> GSM648590     1  0.5465     0.4254 0.712 0.288 0.000
#> GSM648596     2  0.5098     0.4553 0.248 0.752 0.000
#> GSM648642     2  0.6309     0.0690 0.496 0.504 0.000
#> GSM648696     1  0.1163     0.7909 0.972 0.028 0.000
#> GSM648705     1  0.0424     0.8021 0.992 0.008 0.000
#> GSM648718     2  0.5325     0.4578 0.248 0.748 0.004
#> GSM648599     1  0.0000     0.8035 1.000 0.000 0.000
#> GSM648608     1  0.5098     0.6654 0.752 0.000 0.248
#> GSM648609     1  0.5058     0.6682 0.756 0.000 0.244
#> GSM648610     1  0.3752     0.7379 0.856 0.000 0.144
#> GSM648633     1  0.0424     0.8021 0.992 0.008 0.000
#> GSM648644     2  0.5938     0.4591 0.248 0.732 0.020
#> GSM648652     1  0.0424     0.8021 0.992 0.008 0.000
#> GSM648653     1  0.0000     0.8035 1.000 0.000 0.000
#> GSM648658     1  0.0237     0.8031 0.996 0.004 0.000
#> GSM648659     2  0.5098     0.4553 0.248 0.752 0.000
#> GSM648662     2  0.9528     0.2110 0.288 0.484 0.228
#> GSM648665     2  0.9509     0.1990 0.296 0.484 0.220
#> GSM648666     1  0.0000     0.8035 1.000 0.000 0.000
#> GSM648680     1  0.0237     0.8031 0.996 0.004 0.000
#> GSM648684     1  0.3619     0.7428 0.864 0.000 0.136
#> GSM648709     1  0.6309    -0.0845 0.504 0.496 0.000
#> GSM648719     1  0.0000     0.8035 1.000 0.000 0.000
#> GSM648627     1  0.5363     0.6432 0.724 0.000 0.276
#> GSM648637     2  0.7489    -0.1844 0.036 0.496 0.468
#> GSM648638     3  0.5588     0.6459 0.004 0.276 0.720
#> GSM648641     3  0.1031     0.8338 0.000 0.024 0.976
#> GSM648672     2  0.7392    -0.1894 0.032 0.500 0.468
#> GSM648674     2  0.7489    -0.1844 0.036 0.496 0.468
#> GSM648703     2  0.7489    -0.1844 0.036 0.496 0.468
#> GSM648631     3  0.1031     0.8338 0.000 0.024 0.976
#> GSM648669     2  0.6299    -0.2516 0.000 0.524 0.476
#> GSM648671     2  0.6299    -0.2516 0.000 0.524 0.476
#> GSM648678     2  0.7489    -0.1844 0.036 0.496 0.468
#> GSM648679     2  0.6291    -0.2365 0.000 0.532 0.468
#> GSM648681     2  0.6962    -0.0298 0.036 0.648 0.316
#> GSM648686     3  0.1031     0.8338 0.000 0.024 0.976
#> GSM648689     3  0.1031     0.8338 0.000 0.024 0.976
#> GSM648690     3  0.1031     0.8338 0.000 0.024 0.976
#> GSM648691     3  0.1031     0.8338 0.000 0.024 0.976
#> GSM648693     3  0.1031     0.8338 0.000 0.024 0.976
#> GSM648700     2  0.7489    -0.1844 0.036 0.496 0.468
#> GSM648630     3  0.1031     0.8338 0.000 0.024 0.976
#> GSM648632     3  0.1031     0.8338 0.000 0.024 0.976
#> GSM648639     3  0.5327     0.6514 0.000 0.272 0.728
#> GSM648640     3  0.1031     0.8338 0.000 0.024 0.976
#> GSM648668     2  0.7489    -0.1844 0.036 0.496 0.468
#> GSM648676     2  0.7489    -0.1844 0.036 0.496 0.468
#> GSM648692     3  0.1031     0.8338 0.000 0.024 0.976
#> GSM648694     3  0.1031     0.8338 0.000 0.024 0.976
#> GSM648699     2  0.6291    -0.2365 0.000 0.532 0.468
#> GSM648701     2  0.7392    -0.1894 0.032 0.500 0.468
#> GSM648673     2  0.6291    -0.2365 0.000 0.532 0.468
#> GSM648677     2  0.7489    -0.1844 0.036 0.496 0.468
#> GSM648687     3  0.5363     0.6476 0.000 0.276 0.724
#> GSM648688     3  0.1031     0.8338 0.000 0.024 0.976

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM648605     2  0.6757     0.1556 0.360 0.556 0.012 0.072
#> GSM648618     1  0.7713    -0.0320 0.488 0.068 0.060 0.384
#> GSM648620     2  0.5417     0.1686 0.412 0.572 0.000 0.016
#> GSM648646     2  0.1109     0.5077 0.028 0.968 0.004 0.000
#> GSM648649     1  0.2319     0.6582 0.924 0.040 0.000 0.036
#> GSM648675     2  0.8064     0.1285 0.284 0.492 0.024 0.200
#> GSM648682     2  0.3024     0.4802 0.148 0.852 0.000 0.000
#> GSM648698     2  0.5093     0.2981 0.348 0.640 0.000 0.012
#> GSM648708     2  0.5256     0.2215 0.392 0.596 0.000 0.012
#> GSM648628     4  0.7889     0.1612 0.352 0.016 0.172 0.460
#> GSM648595     2  0.8153     0.1002 0.340 0.448 0.024 0.188
#> GSM648635     1  0.0524     0.6892 0.988 0.004 0.000 0.008
#> GSM648645     1  0.3528     0.5487 0.808 0.000 0.000 0.192
#> GSM648647     2  0.5038     0.3247 0.336 0.652 0.000 0.012
#> GSM648667     1  0.5792     0.1432 0.552 0.416 0.000 0.032
#> GSM648695     2  0.5231     0.2414 0.384 0.604 0.000 0.012
#> GSM648704     2  0.1109     0.5077 0.028 0.968 0.004 0.000
#> GSM648706     2  0.5464     0.2985 0.344 0.632 0.004 0.020
#> GSM648593     1  0.1174     0.6855 0.968 0.012 0.000 0.020
#> GSM648594     2  0.8590    -0.0727 0.340 0.352 0.028 0.280
#> GSM648600     1  0.0000     0.6890 1.000 0.000 0.000 0.000
#> GSM648621     1  0.6968     0.0883 0.540 0.048 0.036 0.376
#> GSM648622     1  0.0592     0.6869 0.984 0.000 0.000 0.016
#> GSM648623     1  0.7370     0.0477 0.524 0.052 0.056 0.368
#> GSM648636     1  0.2739     0.6655 0.904 0.060 0.000 0.036
#> GSM648655     1  0.3081     0.6566 0.888 0.064 0.000 0.048
#> GSM648661     1  0.6823     0.4011 0.576 0.016 0.076 0.332
#> GSM648664     1  0.5648     0.5324 0.684 0.000 0.064 0.252
#> GSM648683     1  0.4758     0.6135 0.780 0.000 0.064 0.156
#> GSM648685     1  0.3840     0.6500 0.844 0.000 0.052 0.104
#> GSM648702     1  0.1388     0.6814 0.960 0.012 0.000 0.028
#> GSM648597     4  0.7629     0.2913 0.300 0.076 0.064 0.560
#> GSM648603     1  0.4868     0.4897 0.748 0.040 0.000 0.212
#> GSM648606     1  0.8713     0.4097 0.496 0.256 0.096 0.152
#> GSM648613     1  0.8713     0.4120 0.496 0.256 0.096 0.152
#> GSM648619     4  0.7051    -0.0206 0.428 0.016 0.076 0.480
#> GSM648654     1  0.9305     0.2635 0.364 0.256 0.088 0.292
#> GSM648663     1  0.8747     0.4090 0.492 0.256 0.096 0.156
#> GSM648670     2  0.7928     0.2364 0.104 0.488 0.048 0.360
#> GSM648707     4  0.7835    -0.1071 0.096 0.056 0.316 0.532
#> GSM648615     2  0.4837     0.3049 0.348 0.648 0.000 0.004
#> GSM648643     2  0.1109     0.5077 0.028 0.968 0.004 0.000
#> GSM648650     1  0.5894     0.1594 0.568 0.392 0.000 0.040
#> GSM648656     2  0.0967     0.5045 0.016 0.976 0.004 0.004
#> GSM648715     2  0.4353     0.4503 0.232 0.756 0.000 0.012
#> GSM648598     1  0.0000     0.6890 1.000 0.000 0.000 0.000
#> GSM648601     1  0.0336     0.6895 0.992 0.000 0.000 0.008
#> GSM648602     1  0.0817     0.6848 0.976 0.000 0.000 0.024
#> GSM648604     1  0.6277     0.3594 0.572 0.000 0.068 0.360
#> GSM648614     1  0.8496     0.4005 0.508 0.264 0.076 0.152
#> GSM648624     1  0.1022     0.6877 0.968 0.000 0.000 0.032
#> GSM648625     1  0.4630     0.5131 0.732 0.252 0.000 0.016
#> GSM648629     1  0.6058     0.4523 0.624 0.000 0.068 0.308
#> GSM648634     1  0.0000     0.6890 1.000 0.000 0.000 0.000
#> GSM648648     1  0.0779     0.6871 0.980 0.004 0.000 0.016
#> GSM648651     1  0.3486     0.5639 0.812 0.000 0.000 0.188
#> GSM648657     1  0.3852     0.5319 0.800 0.008 0.000 0.192
#> GSM648660     1  0.0817     0.6855 0.976 0.000 0.000 0.024
#> GSM648697     1  0.1637     0.6688 0.940 0.000 0.000 0.060
#> GSM648710     1  0.6367     0.4465 0.616 0.008 0.068 0.308
#> GSM648591     4  0.6839     0.2043 0.124 0.060 0.128 0.688
#> GSM648592     1  0.4069     0.6337 0.840 0.116 0.020 0.024
#> GSM648607     1  0.6460     0.4136 0.596 0.008 0.068 0.328
#> GSM648611     4  0.7356     0.3092 0.200 0.016 0.196 0.588
#> GSM648612     4  0.7029     0.0277 0.408 0.016 0.076 0.500
#> GSM648616     3  0.7947     0.2497 0.088 0.056 0.428 0.428
#> GSM648617     1  0.3000     0.6622 0.900 0.052 0.008 0.040
#> GSM648626     1  0.6966     0.1203 0.560 0.052 0.036 0.352
#> GSM648711     1  0.6952     0.3248 0.552 0.016 0.080 0.352
#> GSM648712     4  0.7029     0.0277 0.408 0.016 0.076 0.500
#> GSM648713     1  0.6853     0.3698 0.568 0.016 0.076 0.340
#> GSM648714     1  0.8496     0.4089 0.508 0.264 0.076 0.152
#> GSM648716     4  0.7029     0.0277 0.408 0.016 0.076 0.500
#> GSM648717     1  0.8741     0.4117 0.496 0.252 0.100 0.152
#> GSM648590     2  0.7179     0.2068 0.276 0.544 0.000 0.180
#> GSM648596     2  0.1118     0.5068 0.036 0.964 0.000 0.000
#> GSM648642     2  0.5143     0.2855 0.360 0.628 0.000 0.012
#> GSM648696     1  0.2662     0.6658 0.900 0.084 0.000 0.016
#> GSM648705     1  0.2300     0.6636 0.924 0.028 0.000 0.048
#> GSM648718     2  0.3128     0.4971 0.032 0.888 0.004 0.076
#> GSM648599     1  0.0469     0.6878 0.988 0.000 0.000 0.012
#> GSM648608     1  0.6234     0.3828 0.584 0.000 0.068 0.348
#> GSM648609     1  0.6367     0.4465 0.616 0.008 0.068 0.308
#> GSM648610     1  0.4663     0.6144 0.788 0.000 0.064 0.148
#> GSM648633     1  0.0188     0.6889 0.996 0.000 0.000 0.004
#> GSM648644     2  0.1004     0.5070 0.024 0.972 0.004 0.000
#> GSM648652     1  0.0657     0.6879 0.984 0.004 0.000 0.012
#> GSM648653     1  0.0336     0.6881 0.992 0.000 0.000 0.008
#> GSM648658     1  0.0336     0.6890 0.992 0.000 0.000 0.008
#> GSM648659     2  0.1837     0.5056 0.028 0.944 0.000 0.028
#> GSM648662     1  0.8488     0.4271 0.520 0.248 0.084 0.148
#> GSM648665     1  0.8434     0.4298 0.524 0.248 0.080 0.148
#> GSM648666     1  0.3448     0.5787 0.828 0.004 0.000 0.168
#> GSM648680     1  0.0657     0.6888 0.984 0.012 0.000 0.004
#> GSM648684     1  0.4227     0.6341 0.820 0.000 0.060 0.120
#> GSM648709     2  0.5204     0.2532 0.376 0.612 0.000 0.012
#> GSM648719     1  0.0000     0.6890 1.000 0.000 0.000 0.000
#> GSM648627     4  0.7016     0.0433 0.400 0.016 0.076 0.508
#> GSM648637     2  0.6360     0.2916 0.000 0.516 0.064 0.420
#> GSM648638     3  0.6756     0.5666 0.012 0.108 0.624 0.256
#> GSM648641     3  0.1211     0.8659 0.000 0.000 0.960 0.040
#> GSM648672     2  0.6376     0.2865 0.000 0.504 0.064 0.432
#> GSM648674     2  0.6484     0.2873 0.004 0.504 0.060 0.432
#> GSM648703     2  0.6319     0.2881 0.000 0.504 0.060 0.436
#> GSM648631     3  0.0336     0.8870 0.000 0.000 0.992 0.008
#> GSM648669     4  0.7265    -0.2246 0.004 0.400 0.128 0.468
#> GSM648671     4  0.7265    -0.2246 0.004 0.400 0.128 0.468
#> GSM648678     2  0.4925     0.4053 0.004 0.752 0.036 0.208
#> GSM648679     4  0.7009    -0.2785 0.004 0.440 0.100 0.456
#> GSM648681     2  0.6434     0.3812 0.056 0.652 0.028 0.264
#> GSM648686     3  0.0921     0.8703 0.000 0.000 0.972 0.028
#> GSM648689     3  0.1211     0.8659 0.000 0.000 0.960 0.040
#> GSM648690     3  0.0000     0.8883 0.000 0.000 1.000 0.000
#> GSM648691     3  0.0000     0.8883 0.000 0.000 1.000 0.000
#> GSM648693     3  0.0336     0.8870 0.000 0.000 0.992 0.008
#> GSM648700     2  0.7422     0.2672 0.044 0.492 0.064 0.400
#> GSM648630     3  0.0000     0.8883 0.000 0.000 1.000 0.000
#> GSM648632     3  0.0336     0.8870 0.000 0.000 0.992 0.008
#> GSM648639     3  0.4181     0.7549 0.000 0.052 0.820 0.128
#> GSM648640     3  0.0000     0.8883 0.000 0.000 1.000 0.000
#> GSM648668     2  0.6319     0.2881 0.000 0.504 0.060 0.436
#> GSM648676     2  0.6488     0.2866 0.004 0.500 0.060 0.436
#> GSM648692     3  0.0000     0.8883 0.000 0.000 1.000 0.000
#> GSM648694     3  0.0000     0.8883 0.000 0.000 1.000 0.000
#> GSM648699     2  0.6449     0.2598 0.000 0.480 0.068 0.452
#> GSM648701     2  0.6319     0.2881 0.000 0.504 0.060 0.436
#> GSM648673     4  0.7265    -0.2246 0.004 0.400 0.128 0.468
#> GSM648677     2  0.6055     0.3000 0.000 0.520 0.044 0.436
#> GSM648687     3  0.6844     0.4532 0.028 0.048 0.532 0.392
#> GSM648688     3  0.0336     0.8870 0.000 0.000 0.992 0.008

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM648605     2  0.3355     0.8409 0.036 0.832 0.000 0.000 0.132
#> GSM648618     1  0.5956     0.6110 0.644 0.020 0.000 0.148 0.188
#> GSM648620     2  0.2230     0.9041 0.044 0.912 0.000 0.000 0.044
#> GSM648646     2  0.0000     0.9063 0.000 1.000 0.000 0.000 0.000
#> GSM648649     1  0.1792     0.7663 0.916 0.084 0.000 0.000 0.000
#> GSM648675     1  0.7393     0.2428 0.468 0.092 0.000 0.324 0.116
#> GSM648682     2  0.2270     0.8360 0.020 0.904 0.000 0.000 0.076
#> GSM648698     2  0.0794     0.9016 0.000 0.972 0.000 0.000 0.028
#> GSM648708     2  0.2153     0.9056 0.044 0.916 0.000 0.000 0.040
#> GSM648628     5  0.3248     0.7770 0.088 0.052 0.004 0.000 0.856
#> GSM648595     1  0.6847     0.5821 0.596 0.096 0.000 0.188 0.120
#> GSM648635     1  0.0703     0.7962 0.976 0.024 0.000 0.000 0.000
#> GSM648645     1  0.0000     0.7985 1.000 0.000 0.000 0.000 0.000
#> GSM648647     2  0.1626     0.9112 0.044 0.940 0.000 0.000 0.016
#> GSM648667     2  0.2964     0.8199 0.120 0.856 0.000 0.000 0.024
#> GSM648695     2  0.1818     0.9106 0.044 0.932 0.000 0.000 0.024
#> GSM648704     2  0.0000     0.9063 0.000 1.000 0.000 0.000 0.000
#> GSM648706     2  0.1197     0.8931 0.000 0.952 0.000 0.000 0.048
#> GSM648593     1  0.1043     0.7923 0.960 0.040 0.000 0.000 0.000
#> GSM648594     1  0.6180     0.5491 0.612 0.028 0.000 0.244 0.116
#> GSM648600     1  0.0955     0.7955 0.968 0.028 0.000 0.000 0.004
#> GSM648621     1  0.5942     0.6071 0.644 0.020 0.000 0.140 0.196
#> GSM648622     1  0.1121     0.7868 0.956 0.000 0.000 0.000 0.044
#> GSM648623     1  0.6045     0.5946 0.632 0.020 0.000 0.148 0.200
#> GSM648636     1  0.2074     0.7558 0.896 0.104 0.000 0.000 0.000
#> GSM648655     1  0.3527     0.7547 0.828 0.116 0.000 0.000 0.056
#> GSM648661     5  0.2448     0.7822 0.088 0.020 0.000 0.000 0.892
#> GSM648664     5  0.3210     0.7504 0.212 0.000 0.000 0.000 0.788
#> GSM648683     5  0.3452     0.7096 0.244 0.000 0.000 0.000 0.756
#> GSM648685     1  0.4549    -0.0234 0.528 0.008 0.000 0.000 0.464
#> GSM648702     1  0.1544     0.7766 0.932 0.068 0.000 0.000 0.000
#> GSM648597     1  0.6241     0.4811 0.576 0.020 0.000 0.288 0.116
#> GSM648603     1  0.5286     0.6408 0.696 0.016 0.000 0.084 0.204
#> GSM648606     5  0.3333     0.6425 0.000 0.208 0.004 0.000 0.788
#> GSM648613     5  0.3333     0.6425 0.000 0.208 0.004 0.000 0.788
#> GSM648619     5  0.3586     0.7707 0.188 0.020 0.000 0.000 0.792
#> GSM648654     5  0.3929     0.6628 0.028 0.208 0.000 0.000 0.764
#> GSM648663     5  0.3333     0.6425 0.000 0.208 0.004 0.000 0.788
#> GSM648670     4  0.5841     0.1053 0.428 0.064 0.000 0.496 0.012
#> GSM648707     4  0.7116     0.0927 0.392 0.000 0.160 0.412 0.036
#> GSM648615     2  0.0579     0.9079 0.008 0.984 0.000 0.000 0.008
#> GSM648643     2  0.0000     0.9063 0.000 1.000 0.000 0.000 0.000
#> GSM648650     2  0.4883     0.4806 0.300 0.652 0.000 0.000 0.048
#> GSM648656     2  0.0000     0.9063 0.000 1.000 0.000 0.000 0.000
#> GSM648715     2  0.1121     0.9099 0.044 0.956 0.000 0.000 0.000
#> GSM648598     1  0.0000     0.7985 1.000 0.000 0.000 0.000 0.000
#> GSM648601     1  0.2915     0.7650 0.860 0.024 0.000 0.000 0.116
#> GSM648602     1  0.0609     0.7959 0.980 0.000 0.000 0.000 0.020
#> GSM648604     5  0.3143     0.7580 0.204 0.000 0.000 0.000 0.796
#> GSM648614     5  0.3989     0.5676 0.008 0.260 0.004 0.000 0.728
#> GSM648624     1  0.2516     0.7416 0.860 0.000 0.000 0.000 0.140
#> GSM648625     1  0.6081     0.1767 0.476 0.400 0.000 0.000 0.124
#> GSM648629     5  0.3109     0.7598 0.200 0.000 0.000 0.000 0.800
#> GSM648634     1  0.0794     0.7962 0.972 0.028 0.000 0.000 0.000
#> GSM648648     1  0.1410     0.7814 0.940 0.060 0.000 0.000 0.000
#> GSM648651     1  0.2516     0.7443 0.860 0.000 0.000 0.000 0.140
#> GSM648657     1  0.0000     0.7985 1.000 0.000 0.000 0.000 0.000
#> GSM648660     1  0.0000     0.7985 1.000 0.000 0.000 0.000 0.000
#> GSM648697     1  0.0000     0.7985 1.000 0.000 0.000 0.000 0.000
#> GSM648710     5  0.2852     0.7710 0.172 0.000 0.000 0.000 0.828
#> GSM648591     1  0.6936     0.1012 0.480 0.020 0.084 0.384 0.032
#> GSM648592     1  0.6406     0.6665 0.648 0.104 0.000 0.104 0.144
#> GSM648607     5  0.3039     0.7647 0.192 0.000 0.000 0.000 0.808
#> GSM648611     5  0.5828     0.6691 0.076 0.052 0.028 0.120 0.724
#> GSM648612     5  0.2616     0.7832 0.100 0.020 0.000 0.000 0.880
#> GSM648616     4  0.7278     0.0975 0.388 0.004 0.164 0.408 0.036
#> GSM648617     1  0.5843     0.6900 0.688 0.056 0.000 0.104 0.152
#> GSM648626     1  0.6045     0.5946 0.632 0.020 0.000 0.148 0.200
#> GSM648711     5  0.3690     0.7626 0.200 0.020 0.000 0.000 0.780
#> GSM648712     5  0.3586     0.7705 0.188 0.020 0.000 0.000 0.792
#> GSM648713     5  0.3586     0.7700 0.188 0.020 0.000 0.000 0.792
#> GSM648714     5  0.3790     0.5521 0.000 0.272 0.004 0.000 0.724
#> GSM648716     5  0.2722     0.7832 0.108 0.020 0.000 0.000 0.872
#> GSM648717     5  0.3621     0.6477 0.000 0.192 0.020 0.000 0.788
#> GSM648590     1  0.7850     0.2626 0.392 0.348 0.000 0.144 0.116
#> GSM648596     2  0.1121     0.9099 0.044 0.956 0.000 0.000 0.000
#> GSM648642     2  0.1818     0.9101 0.044 0.932 0.000 0.000 0.024
#> GSM648696     1  0.6095     0.1987 0.460 0.416 0.000 0.000 0.124
#> GSM648705     1  0.1792     0.7663 0.916 0.084 0.000 0.000 0.000
#> GSM648718     2  0.1569     0.8775 0.008 0.944 0.000 0.004 0.044
#> GSM648599     1  0.0703     0.7945 0.976 0.000 0.000 0.000 0.024
#> GSM648608     5  0.3143     0.7580 0.204 0.000 0.000 0.000 0.796
#> GSM648609     5  0.3003     0.7667 0.188 0.000 0.000 0.000 0.812
#> GSM648610     5  0.4060     0.5003 0.360 0.000 0.000 0.000 0.640
#> GSM648633     1  0.0794     0.7962 0.972 0.028 0.000 0.000 0.000
#> GSM648644     2  0.0000     0.9063 0.000 1.000 0.000 0.000 0.000
#> GSM648652     1  0.0880     0.7951 0.968 0.032 0.000 0.000 0.000
#> GSM648653     1  0.0162     0.7983 0.996 0.000 0.000 0.000 0.004
#> GSM648658     1  0.0000     0.7985 1.000 0.000 0.000 0.000 0.000
#> GSM648659     2  0.1121     0.9099 0.044 0.956 0.000 0.000 0.000
#> GSM648662     5  0.3305     0.6382 0.000 0.224 0.000 0.000 0.776
#> GSM648665     5  0.3970     0.6382 0.024 0.224 0.000 0.000 0.752
#> GSM648666     1  0.2074     0.7637 0.896 0.000 0.000 0.000 0.104
#> GSM648680     1  0.0290     0.7990 0.992 0.008 0.000 0.000 0.000
#> GSM648684     5  0.4297     0.2520 0.472 0.000 0.000 0.000 0.528
#> GSM648709     2  0.2153     0.9056 0.044 0.916 0.000 0.000 0.040
#> GSM648719     1  0.0000     0.7985 1.000 0.000 0.000 0.000 0.000
#> GSM648627     5  0.2616     0.7830 0.100 0.020 0.000 0.000 0.880
#> GSM648637     4  0.3403     0.7280 0.000 0.160 0.012 0.820 0.008
#> GSM648638     3  0.7131     0.2286 0.008 0.140 0.492 0.324 0.036
#> GSM648641     3  0.2648     0.7973 0.000 0.000 0.848 0.000 0.152
#> GSM648672     4  0.1851     0.7718 0.000 0.088 0.000 0.912 0.000
#> GSM648674     4  0.1197     0.7808 0.000 0.048 0.000 0.952 0.000
#> GSM648703     4  0.1270     0.7806 0.000 0.052 0.000 0.948 0.000
#> GSM648631     3  0.0000     0.9158 0.000 0.000 1.000 0.000 0.000
#> GSM648669     4  0.0000     0.7796 0.000 0.000 0.000 1.000 0.000
#> GSM648671     4  0.0000     0.7796 0.000 0.000 0.000 1.000 0.000
#> GSM648678     2  0.3636     0.5372 0.000 0.728 0.000 0.272 0.000
#> GSM648679     4  0.0000     0.7796 0.000 0.000 0.000 1.000 0.000
#> GSM648681     4  0.6612     0.5405 0.156 0.208 0.000 0.592 0.044
#> GSM648686     3  0.0000     0.9158 0.000 0.000 1.000 0.000 0.000
#> GSM648689     3  0.3003     0.7566 0.000 0.000 0.812 0.000 0.188
#> GSM648690     3  0.0000     0.9158 0.000 0.000 1.000 0.000 0.000
#> GSM648691     3  0.0000     0.9158 0.000 0.000 1.000 0.000 0.000
#> GSM648693     3  0.0000     0.9158 0.000 0.000 1.000 0.000 0.000
#> GSM648700     4  0.3317     0.7297 0.116 0.044 0.000 0.840 0.000
#> GSM648630     3  0.0000     0.9158 0.000 0.000 1.000 0.000 0.000
#> GSM648632     3  0.0404     0.9075 0.000 0.000 0.988 0.000 0.012
#> GSM648639     3  0.3480     0.6428 0.000 0.000 0.752 0.248 0.000
#> GSM648640     3  0.0000     0.9158 0.000 0.000 1.000 0.000 0.000
#> GSM648668     4  0.2179     0.7624 0.000 0.112 0.000 0.888 0.000
#> GSM648676     4  0.1981     0.7800 0.028 0.048 0.000 0.924 0.000
#> GSM648692     3  0.0000     0.9158 0.000 0.000 1.000 0.000 0.000
#> GSM648694     3  0.0000     0.9158 0.000 0.000 1.000 0.000 0.000
#> GSM648699     4  0.0000     0.7796 0.000 0.000 0.000 1.000 0.000
#> GSM648701     4  0.1197     0.7808 0.000 0.048 0.000 0.952 0.000
#> GSM648673     4  0.0000     0.7796 0.000 0.000 0.000 1.000 0.000
#> GSM648677     4  0.2732     0.7313 0.000 0.160 0.000 0.840 0.000
#> GSM648687     4  0.4774     0.0621 0.020 0.000 0.424 0.556 0.000
#> GSM648688     3  0.0000     0.9158 0.000 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4 p5    p6
#> GSM648605     2  0.6157     0.4061 0.236 0.488 0.000 0.004 NA 0.008
#> GSM648618     6  0.5822     0.4538 0.248 0.000 0.000 0.068 NA 0.600
#> GSM648620     2  0.3264     0.8017 0.136 0.820 0.000 0.000 NA 0.040
#> GSM648646     2  0.0146     0.8417 0.000 0.996 0.000 0.004 NA 0.000
#> GSM648649     6  0.4503     0.6979 0.000 0.080 0.000 0.000 NA 0.680
#> GSM648675     4  0.6965     0.4809 0.004 0.152 0.000 0.492 NA 0.236
#> GSM648682     2  0.0862     0.8386 0.000 0.972 0.000 0.004 NA 0.016
#> GSM648698     2  0.1700     0.8294 0.080 0.916 0.000 0.004 NA 0.000
#> GSM648708     2  0.2928     0.8263 0.084 0.856 0.000 0.000 NA 0.056
#> GSM648628     1  0.3751     0.6740 0.792 0.000 0.000 0.004 NA 0.096
#> GSM648595     6  0.7053     0.4471 0.004 0.228 0.000 0.092 NA 0.464
#> GSM648635     6  0.3109     0.7363 0.000 0.004 0.000 0.000 NA 0.772
#> GSM648645     6  0.1644     0.7620 0.000 0.000 0.000 0.004 NA 0.920
#> GSM648647     2  0.3044     0.8304 0.052 0.864 0.000 0.000 NA 0.048
#> GSM648667     2  0.4663     0.4763 0.000 0.660 0.000 0.000 NA 0.252
#> GSM648695     2  0.2696     0.8317 0.076 0.872 0.000 0.000 NA 0.048
#> GSM648704     2  0.0405     0.8415 0.000 0.988 0.000 0.004 NA 0.000
#> GSM648706     2  0.4411     0.7188 0.120 0.728 0.000 0.004 NA 0.000
#> GSM648593     6  0.3215     0.7310 0.000 0.004 0.000 0.000 NA 0.756
#> GSM648594     4  0.6412     0.2033 0.008 0.044 0.000 0.444 NA 0.392
#> GSM648600     6  0.0146     0.7615 0.000 0.004 0.000 0.000 NA 0.996
#> GSM648621     6  0.5826     0.4908 0.220 0.000 0.000 0.052 NA 0.608
#> GSM648622     6  0.1908     0.7103 0.096 0.000 0.000 0.000 NA 0.900
#> GSM648623     6  0.5986     0.3470 0.308 0.000 0.000 0.052 NA 0.544
#> GSM648636     6  0.4686     0.6859 0.000 0.092 0.000 0.000 NA 0.660
#> GSM648655     6  0.5187     0.6333 0.000 0.136 0.000 0.000 NA 0.600
#> GSM648661     1  0.2743     0.6938 0.828 0.000 0.000 0.000 NA 0.164
#> GSM648664     1  0.3888     0.5699 0.672 0.000 0.000 0.000 NA 0.312
#> GSM648683     1  0.3912     0.5253 0.648 0.000 0.000 0.000 NA 0.340
#> GSM648685     6  0.4037     0.1727 0.380 0.000 0.000 0.000 NA 0.608
#> GSM648702     6  0.4832     0.6773 0.000 0.108 0.000 0.000 NA 0.648
#> GSM648597     4  0.6280     0.4968 0.024 0.016 0.000 0.540 NA 0.272
#> GSM648603     6  0.4012     0.5494 0.232 0.000 0.000 0.008 NA 0.728
#> GSM648606     1  0.4435     0.5021 0.604 0.028 0.000 0.004 NA 0.000
#> GSM648613     1  0.4423     0.5051 0.608 0.028 0.000 0.004 NA 0.000
#> GSM648619     1  0.2454     0.6914 0.840 0.000 0.000 0.000 NA 0.160
#> GSM648654     1  0.4270     0.5301 0.652 0.028 0.000 0.004 NA 0.000
#> GSM648663     1  0.4423     0.5051 0.608 0.028 0.000 0.004 NA 0.000
#> GSM648670     4  0.5823     0.6560 0.004 0.024 0.000 0.588 NA 0.140
#> GSM648707     4  0.6009     0.6246 0.052 0.000 0.060 0.536 NA 0.012
#> GSM648615     2  0.1938     0.8385 0.036 0.920 0.000 0.004 NA 0.000
#> GSM648643     2  0.0146     0.8417 0.000 0.996 0.000 0.004 NA 0.000
#> GSM648650     2  0.5515     0.0202 0.000 0.492 0.000 0.000 NA 0.372
#> GSM648656     2  0.0603     0.8375 0.000 0.980 0.000 0.016 NA 0.000
#> GSM648715     2  0.2287     0.8283 0.012 0.904 0.000 0.000 NA 0.048
#> GSM648598     6  0.0405     0.7587 0.008 0.000 0.000 0.000 NA 0.988
#> GSM648601     6  0.0146     0.7600 0.004 0.000 0.000 0.000 NA 0.996
#> GSM648602     6  0.1700     0.7217 0.080 0.000 0.000 0.000 NA 0.916
#> GSM648604     1  0.3717     0.6202 0.708 0.000 0.000 0.000 NA 0.276
#> GSM648614     1  0.6169     0.2010 0.432 0.188 0.000 0.004 NA 0.008
#> GSM648624     6  0.1957     0.7016 0.112 0.000 0.000 0.000 NA 0.888
#> GSM648625     6  0.5456     0.4473 0.152 0.244 0.000 0.000 NA 0.596
#> GSM648629     1  0.3652     0.6308 0.720 0.000 0.000 0.000 NA 0.264
#> GSM648634     6  0.0146     0.7615 0.000 0.004 0.000 0.000 NA 0.996
#> GSM648648     6  0.3770     0.7216 0.000 0.028 0.000 0.000 NA 0.728
#> GSM648651     6  0.2100     0.7004 0.112 0.000 0.000 0.000 NA 0.884
#> GSM648657     6  0.1753     0.7614 0.000 0.000 0.000 0.004 NA 0.912
#> GSM648660     6  0.1588     0.7623 0.000 0.000 0.000 0.004 NA 0.924
#> GSM648697     6  0.0000     0.7605 0.000 0.000 0.000 0.000 NA 1.000
#> GSM648710     1  0.3050     0.6569 0.764 0.000 0.000 0.000 NA 0.236
#> GSM648591     4  0.6113     0.6422 0.056 0.000 0.020 0.548 NA 0.056
#> GSM648592     6  0.6388     0.6040 0.060 0.196 0.000 0.052 NA 0.612
#> GSM648607     1  0.3240     0.6513 0.752 0.000 0.000 0.000 NA 0.244
#> GSM648611     1  0.4798     0.6057 0.712 0.000 0.060 0.004 NA 0.032
#> GSM648612     1  0.2362     0.6934 0.860 0.000 0.000 0.000 NA 0.136
#> GSM648616     4  0.5870     0.6241 0.044 0.000 0.064 0.540 NA 0.008
#> GSM648617     6  0.4580     0.6968 0.064 0.072 0.000 0.056 NA 0.780
#> GSM648626     6  0.5638     0.4282 0.272 0.000 0.000 0.052 NA 0.600
#> GSM648711     1  0.2838     0.6830 0.808 0.000 0.000 0.000 NA 0.188
#> GSM648712     1  0.2482     0.6924 0.848 0.000 0.000 0.000 NA 0.148
#> GSM648713     1  0.2631     0.6871 0.820 0.000 0.000 0.000 NA 0.180
#> GSM648714     1  0.5968     0.1884 0.432 0.192 0.000 0.004 NA 0.000
#> GSM648716     1  0.2431     0.6929 0.860 0.000 0.000 0.000 NA 0.132
#> GSM648717     1  0.4423     0.5051 0.608 0.028 0.000 0.004 NA 0.000
#> GSM648590     6  0.6388     0.3964 0.004 0.336 0.000 0.044 NA 0.484
#> GSM648596     2  0.0508     0.8425 0.000 0.984 0.000 0.000 NA 0.012
#> GSM648642     2  0.2176     0.8337 0.080 0.896 0.000 0.000 NA 0.024
#> GSM648696     6  0.3965     0.4281 0.000 0.388 0.000 0.000 NA 0.604
#> GSM648705     6  0.4750     0.6827 0.000 0.100 0.000 0.000 NA 0.656
#> GSM648718     2  0.0436     0.8419 0.000 0.988 0.000 0.004 NA 0.004
#> GSM648599     6  0.1958     0.7083 0.100 0.000 0.000 0.000 NA 0.896
#> GSM648608     1  0.3695     0.6237 0.712 0.000 0.000 0.000 NA 0.272
#> GSM648609     1  0.3483     0.6473 0.748 0.000 0.000 0.000 NA 0.236
#> GSM648610     1  0.4150     0.3947 0.592 0.000 0.000 0.000 NA 0.392
#> GSM648633     6  0.1644     0.7626 0.000 0.004 0.000 0.000 NA 0.920
#> GSM648644     2  0.0405     0.8415 0.000 0.988 0.000 0.004 NA 0.000
#> GSM648652     6  0.3349     0.7283 0.000 0.008 0.000 0.000 NA 0.748
#> GSM648653     6  0.0000     0.7605 0.000 0.000 0.000 0.000 NA 1.000
#> GSM648658     6  0.3149     0.7484 0.000 0.044 0.000 0.000 NA 0.824
#> GSM648659     2  0.0508     0.8424 0.000 0.984 0.000 0.000 NA 0.012
#> GSM648662     1  0.4595     0.5126 0.608 0.028 0.000 0.000 NA 0.012
#> GSM648665     1  0.4709     0.5312 0.632 0.028 0.000 0.000 NA 0.024
#> GSM648666     6  0.1245     0.7482 0.032 0.000 0.000 0.000 NA 0.952
#> GSM648680     6  0.2146     0.7584 0.000 0.004 0.000 0.000 NA 0.880
#> GSM648684     1  0.4129     0.3295 0.564 0.000 0.000 0.000 NA 0.424
#> GSM648709     2  0.2926     0.8103 0.124 0.844 0.000 0.000 NA 0.028
#> GSM648719     6  0.0000     0.7605 0.000 0.000 0.000 0.000 NA 1.000
#> GSM648627     1  0.2362     0.6934 0.860 0.000 0.000 0.000 NA 0.136
#> GSM648637     4  0.4053     0.7002 0.000 0.140 0.020 0.776 NA 0.000
#> GSM648638     2  0.7819     0.0851 0.016 0.368 0.252 0.172 NA 0.000
#> GSM648641     3  0.2173     0.9035 0.064 0.000 0.904 0.004 NA 0.000
#> GSM648672     4  0.0777     0.7788 0.000 0.024 0.000 0.972 NA 0.000
#> GSM648674     4  0.0260     0.7793 0.000 0.008 0.000 0.992 NA 0.000
#> GSM648703     4  0.0458     0.7791 0.000 0.016 0.000 0.984 NA 0.000
#> GSM648631     3  0.0000     0.9771 0.000 0.000 1.000 0.000 NA 0.000
#> GSM648669     4  0.0937     0.7774 0.000 0.000 0.000 0.960 NA 0.000
#> GSM648671     4  0.0937     0.7774 0.000 0.000 0.000 0.960 NA 0.000
#> GSM648678     4  0.4157     0.3058 0.000 0.444 0.000 0.544 NA 0.000
#> GSM648679     4  0.0363     0.7797 0.000 0.000 0.000 0.988 NA 0.000
#> GSM648681     4  0.5306     0.6446 0.000 0.196 0.000 0.668 NA 0.084
#> GSM648686     3  0.1141     0.9469 0.000 0.000 0.948 0.000 NA 0.000
#> GSM648689     3  0.1701     0.9117 0.072 0.000 0.920 0.000 NA 0.000
#> GSM648690     3  0.0000     0.9771 0.000 0.000 1.000 0.000 NA 0.000
#> GSM648691     3  0.0000     0.9771 0.000 0.000 1.000 0.000 NA 0.000
#> GSM648693     3  0.0000     0.9771 0.000 0.000 1.000 0.000 NA 0.000
#> GSM648700     4  0.0551     0.7805 0.000 0.008 0.000 0.984 NA 0.004
#> GSM648630     3  0.0000     0.9771 0.000 0.000 1.000 0.000 NA 0.000
#> GSM648632     3  0.0291     0.9739 0.004 0.000 0.992 0.000 NA 0.000
#> GSM648639     4  0.5611     0.3546 0.000 0.000 0.364 0.484 NA 0.000
#> GSM648640     3  0.0000     0.9771 0.000 0.000 1.000 0.000 NA 0.000
#> GSM648668     4  0.1610     0.7511 0.000 0.084 0.000 0.916 NA 0.000
#> GSM648676     4  0.0405     0.7800 0.000 0.008 0.000 0.988 NA 0.004
#> GSM648692     3  0.0000     0.9771 0.000 0.000 1.000 0.000 NA 0.000
#> GSM648694     3  0.0000     0.9771 0.000 0.000 1.000 0.000 NA 0.000
#> GSM648699     4  0.0458     0.7796 0.000 0.000 0.000 0.984 NA 0.000
#> GSM648701     4  0.0363     0.7795 0.000 0.012 0.000 0.988 NA 0.000
#> GSM648673     4  0.0937     0.7774 0.000 0.000 0.000 0.960 NA 0.000
#> GSM648677     4  0.2219     0.7057 0.000 0.136 0.000 0.864 NA 0.000
#> GSM648687     4  0.6119     0.5234 0.020 0.000 0.216 0.516 NA 0.000
#> GSM648688     3  0.0790     0.9597 0.000 0.000 0.968 0.000 NA 0.000

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-CV-mclust-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-CV-mclust-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-CV-mclust-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-CV-mclust-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-CV-mclust-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-CV-mclust-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-CV-mclust-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-CV-mclust-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-CV-mclust-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-CV-mclust-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-CV-mclust-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-CV-mclust-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-CV-mclust-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-CV-mclust-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-CV-mclust-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-CV-mclust-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-CV-mclust-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-CV-mclust-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-CV-mclust-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-CV-mclust-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk CV-mclust-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-CV-mclust-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-CV-mclust-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-CV-mclust-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-CV-mclust-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-CV-mclust-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk CV-mclust-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>             n disease.state(p) development.stage(p) other(p) k
#> CV:mclust 127         1.18e-09               0.0261 4.35e-13 2
#> CV:mclust  75         1.18e-13               0.3531 1.88e-13 3
#> CV:mclust  59         1.54e-13               0.3197 5.75e-14 4
#> CV:mclust 116         4.41e-23               0.1580 1.08e-35 5
#> CV:mclust 108         5.71e-19               0.2329 3.44e-32 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


CV:NMF

The object with results only for a single top-value method and a single partition method can be extracted as:

res = res_list["CV", "NMF"]
# you can also extract it by
# res = res_list["CV:NMF"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 130 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#>   Subgroups are detected by 'NMF' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 3.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk CV-NMF-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk CV-NMF-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.703           0.885       0.947         0.4390 0.571   0.571
#> 3 3 0.846           0.893       0.955         0.4432 0.693   0.508
#> 4 4 0.859           0.869       0.932         0.1180 0.874   0.682
#> 5 5 0.798           0.841       0.913         0.0794 0.908   0.703
#> 6 6 0.740           0.630       0.806         0.0465 0.927   0.719

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 3

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM648605     2   0.000      0.946 0.000 1.000
#> GSM648618     2   0.671      0.765 0.176 0.824
#> GSM648620     2   0.000      0.946 0.000 1.000
#> GSM648646     2   0.000      0.946 0.000 1.000
#> GSM648649     2   0.000      0.946 0.000 1.000
#> GSM648675     2   0.000      0.946 0.000 1.000
#> GSM648682     2   0.000      0.946 0.000 1.000
#> GSM648698     2   0.000      0.946 0.000 1.000
#> GSM648708     2   0.000      0.946 0.000 1.000
#> GSM648628     1   0.000      0.928 1.000 0.000
#> GSM648595     2   0.000      0.946 0.000 1.000
#> GSM648635     2   0.000      0.946 0.000 1.000
#> GSM648645     2   0.000      0.946 0.000 1.000
#> GSM648647     2   0.000      0.946 0.000 1.000
#> GSM648667     2   0.000      0.946 0.000 1.000
#> GSM648695     2   0.000      0.946 0.000 1.000
#> GSM648704     2   0.000      0.946 0.000 1.000
#> GSM648706     2   0.000      0.946 0.000 1.000
#> GSM648593     2   0.000      0.946 0.000 1.000
#> GSM648594     2   0.000      0.946 0.000 1.000
#> GSM648600     2   0.000      0.946 0.000 1.000
#> GSM648621     2   0.552      0.832 0.128 0.872
#> GSM648622     2   0.000      0.946 0.000 1.000
#> GSM648623     1   0.634      0.821 0.840 0.160
#> GSM648636     2   0.000      0.946 0.000 1.000
#> GSM648655     2   0.000      0.946 0.000 1.000
#> GSM648661     1   0.781      0.740 0.768 0.232
#> GSM648664     2   0.706      0.742 0.192 0.808
#> GSM648683     2   0.000      0.946 0.000 1.000
#> GSM648685     2   0.000      0.946 0.000 1.000
#> GSM648702     2   0.000      0.946 0.000 1.000
#> GSM648597     2   0.000      0.946 0.000 1.000
#> GSM648603     2   0.000      0.946 0.000 1.000
#> GSM648606     1   0.456      0.876 0.904 0.096
#> GSM648613     1   0.662      0.809 0.828 0.172
#> GSM648619     1   0.722      0.778 0.800 0.200
#> GSM648654     1   0.949      0.492 0.632 0.368
#> GSM648663     1   0.738      0.770 0.792 0.208
#> GSM648670     2   0.625      0.807 0.156 0.844
#> GSM648707     1   0.000      0.928 1.000 0.000
#> GSM648615     2   0.000      0.946 0.000 1.000
#> GSM648643     2   0.000      0.946 0.000 1.000
#> GSM648650     2   0.000      0.946 0.000 1.000
#> GSM648656     2   0.000      0.946 0.000 1.000
#> GSM648715     2   0.000      0.946 0.000 1.000
#> GSM648598     2   0.000      0.946 0.000 1.000
#> GSM648601     2   0.000      0.946 0.000 1.000
#> GSM648602     2   0.000      0.946 0.000 1.000
#> GSM648604     2   0.242      0.913 0.040 0.960
#> GSM648614     2   0.000      0.946 0.000 1.000
#> GSM648624     2   0.000      0.946 0.000 1.000
#> GSM648625     2   0.000      0.946 0.000 1.000
#> GSM648629     2   0.745      0.711 0.212 0.788
#> GSM648634     2   0.000      0.946 0.000 1.000
#> GSM648648     2   0.000      0.946 0.000 1.000
#> GSM648651     2   0.000      0.946 0.000 1.000
#> GSM648657     2   0.000      0.946 0.000 1.000
#> GSM648660     2   0.000      0.946 0.000 1.000
#> GSM648697     2   0.000      0.946 0.000 1.000
#> GSM648710     2   0.958      0.343 0.380 0.620
#> GSM648591     1   0.000      0.928 1.000 0.000
#> GSM648592     2   0.000      0.946 0.000 1.000
#> GSM648607     2   0.981      0.215 0.420 0.580
#> GSM648611     1   0.000      0.928 1.000 0.000
#> GSM648612     1   0.000      0.928 1.000 0.000
#> GSM648616     1   0.000      0.928 1.000 0.000
#> GSM648617     2   0.000      0.946 0.000 1.000
#> GSM648626     2   0.949      0.376 0.368 0.632
#> GSM648711     1   0.738      0.770 0.792 0.208
#> GSM648712     1   0.456      0.876 0.904 0.096
#> GSM648713     1   0.925      0.555 0.660 0.340
#> GSM648714     2   0.000      0.946 0.000 1.000
#> GSM648716     1   0.311      0.901 0.944 0.056
#> GSM648717     1   0.000      0.928 1.000 0.000
#> GSM648590     2   0.000      0.946 0.000 1.000
#> GSM648596     2   0.000      0.946 0.000 1.000
#> GSM648642     2   0.000      0.946 0.000 1.000
#> GSM648696     2   0.000      0.946 0.000 1.000
#> GSM648705     2   0.000      0.946 0.000 1.000
#> GSM648718     2   0.000      0.946 0.000 1.000
#> GSM648599     2   0.000      0.946 0.000 1.000
#> GSM648608     2   0.680      0.759 0.180 0.820
#> GSM648609     2   0.000      0.946 0.000 1.000
#> GSM648610     2   0.000      0.946 0.000 1.000
#> GSM648633     2   0.000      0.946 0.000 1.000
#> GSM648644     2   0.000      0.946 0.000 1.000
#> GSM648652     2   0.000      0.946 0.000 1.000
#> GSM648653     2   0.000      0.946 0.000 1.000
#> GSM648658     2   0.000      0.946 0.000 1.000
#> GSM648659     2   0.000      0.946 0.000 1.000
#> GSM648662     2   0.000      0.946 0.000 1.000
#> GSM648665     2   0.000      0.946 0.000 1.000
#> GSM648666     2   0.000      0.946 0.000 1.000
#> GSM648680     2   0.000      0.946 0.000 1.000
#> GSM648684     2   0.000      0.946 0.000 1.000
#> GSM648709     2   0.000      0.946 0.000 1.000
#> GSM648719     2   0.000      0.946 0.000 1.000
#> GSM648627     1   0.373      0.892 0.928 0.072
#> GSM648637     2   0.788      0.709 0.236 0.764
#> GSM648638     1   0.000      0.928 1.000 0.000
#> GSM648641     1   0.000      0.928 1.000 0.000
#> GSM648672     2   0.730      0.752 0.204 0.796
#> GSM648674     2   0.730      0.752 0.204 0.796
#> GSM648703     2   0.722      0.757 0.200 0.800
#> GSM648631     1   0.000      0.928 1.000 0.000
#> GSM648669     1   0.000      0.928 1.000 0.000
#> GSM648671     1   0.000      0.928 1.000 0.000
#> GSM648678     2   0.722      0.757 0.200 0.800
#> GSM648679     1   0.402      0.871 0.920 0.080
#> GSM648681     2   0.000      0.946 0.000 1.000
#> GSM648686     1   0.000      0.928 1.000 0.000
#> GSM648689     1   0.000      0.928 1.000 0.000
#> GSM648690     1   0.000      0.928 1.000 0.000
#> GSM648691     1   0.000      0.928 1.000 0.000
#> GSM648693     1   0.000      0.928 1.000 0.000
#> GSM648700     2   0.730      0.752 0.204 0.796
#> GSM648630     1   0.000      0.928 1.000 0.000
#> GSM648632     1   0.000      0.928 1.000 0.000
#> GSM648639     1   0.000      0.928 1.000 0.000
#> GSM648640     1   0.000      0.928 1.000 0.000
#> GSM648668     2   0.722      0.757 0.200 0.800
#> GSM648676     2   0.722      0.757 0.200 0.800
#> GSM648692     1   0.000      0.928 1.000 0.000
#> GSM648694     1   0.000      0.928 1.000 0.000
#> GSM648699     1   0.839      0.617 0.732 0.268
#> GSM648701     2   0.753      0.737 0.216 0.784
#> GSM648673     1   0.000      0.928 1.000 0.000
#> GSM648677     2   0.722      0.757 0.200 0.800
#> GSM648687     1   0.000      0.928 1.000 0.000
#> GSM648688     1   0.000      0.928 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM648605     2  0.0747    0.92726 0.016 0.984 0.000
#> GSM648618     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648620     1  0.6225    0.26642 0.568 0.432 0.000
#> GSM648646     2  0.0000    0.93812 0.000 1.000 0.000
#> GSM648649     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648675     1  0.6291    0.13209 0.532 0.468 0.000
#> GSM648682     2  0.4121    0.76953 0.168 0.832 0.000
#> GSM648698     2  0.0000    0.93812 0.000 1.000 0.000
#> GSM648708     1  0.5291    0.65164 0.732 0.268 0.000
#> GSM648628     3  0.0000    0.96252 0.000 0.000 1.000
#> GSM648595     1  0.5650    0.55495 0.688 0.312 0.000
#> GSM648635     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648645     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648647     2  0.0000    0.93812 0.000 1.000 0.000
#> GSM648667     1  0.4062    0.79747 0.836 0.164 0.000
#> GSM648695     2  0.4452    0.73785 0.192 0.808 0.000
#> GSM648704     2  0.0000    0.93812 0.000 1.000 0.000
#> GSM648706     2  0.0000    0.93812 0.000 1.000 0.000
#> GSM648593     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648594     1  0.2796    0.87139 0.908 0.092 0.000
#> GSM648600     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648621     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648622     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648623     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648636     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648655     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648661     1  0.3816    0.80934 0.852 0.000 0.148
#> GSM648664     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648683     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648685     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648702     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648597     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648603     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648606     3  0.2796    0.88116 0.000 0.092 0.908
#> GSM648613     3  0.0000    0.96252 0.000 0.000 1.000
#> GSM648619     1  0.2796    0.86994 0.908 0.000 0.092
#> GSM648654     3  0.6026    0.39309 0.376 0.000 0.624
#> GSM648663     3  0.3989    0.83920 0.012 0.124 0.864
#> GSM648670     2  0.5254    0.62685 0.264 0.736 0.000
#> GSM648707     3  0.0000    0.96252 0.000 0.000 1.000
#> GSM648615     2  0.0000    0.93812 0.000 1.000 0.000
#> GSM648643     2  0.0000    0.93812 0.000 1.000 0.000
#> GSM648650     1  0.4121    0.79238 0.832 0.168 0.000
#> GSM648656     2  0.0000    0.93812 0.000 1.000 0.000
#> GSM648715     2  0.0000    0.93812 0.000 1.000 0.000
#> GSM648598     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648601     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648602     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648604     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648614     1  0.5760    0.51607 0.672 0.328 0.000
#> GSM648624     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648625     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648629     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648634     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648648     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648651     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648657     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648660     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648697     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648710     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648591     3  0.2066    0.90855 0.060 0.000 0.940
#> GSM648592     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648607     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648611     3  0.0000    0.96252 0.000 0.000 1.000
#> GSM648612     3  0.3038    0.86052 0.104 0.000 0.896
#> GSM648616     3  0.0000    0.96252 0.000 0.000 1.000
#> GSM648617     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648626     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648711     1  0.0424    0.94216 0.992 0.000 0.008
#> GSM648712     1  0.3816    0.80881 0.852 0.000 0.148
#> GSM648713     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648714     2  0.7395    0.00542 0.476 0.492 0.032
#> GSM648716     3  0.3941    0.80069 0.156 0.000 0.844
#> GSM648717     3  0.0000    0.96252 0.000 0.000 1.000
#> GSM648590     1  0.5591    0.56981 0.696 0.304 0.000
#> GSM648596     2  0.0000    0.93812 0.000 1.000 0.000
#> GSM648642     2  0.0592    0.93026 0.012 0.988 0.000
#> GSM648696     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648705     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648718     2  0.0000    0.93812 0.000 1.000 0.000
#> GSM648599     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648608     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648609     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648610     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648633     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648644     2  0.0000    0.93812 0.000 1.000 0.000
#> GSM648652     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648653     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648658     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648659     2  0.0000    0.93812 0.000 1.000 0.000
#> GSM648662     1  0.1031    0.92992 0.976 0.024 0.000
#> GSM648665     1  0.4452    0.75067 0.808 0.192 0.000
#> GSM648666     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648680     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648684     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648709     2  0.1031    0.92051 0.024 0.976 0.000
#> GSM648719     1  0.0000    0.94790 1.000 0.000 0.000
#> GSM648627     3  0.0892    0.94673 0.020 0.000 0.980
#> GSM648637     2  0.1964    0.89811 0.000 0.944 0.056
#> GSM648638     3  0.0000    0.96252 0.000 0.000 1.000
#> GSM648641     3  0.0000    0.96252 0.000 0.000 1.000
#> GSM648672     2  0.0000    0.93812 0.000 1.000 0.000
#> GSM648674     2  0.0237    0.93584 0.000 0.996 0.004
#> GSM648703     2  0.0000    0.93812 0.000 1.000 0.000
#> GSM648631     3  0.0000    0.96252 0.000 0.000 1.000
#> GSM648669     3  0.0000    0.96252 0.000 0.000 1.000
#> GSM648671     3  0.0000    0.96252 0.000 0.000 1.000
#> GSM648678     2  0.0000    0.93812 0.000 1.000 0.000
#> GSM648679     2  0.3686    0.81356 0.000 0.860 0.140
#> GSM648681     2  0.0000    0.93812 0.000 1.000 0.000
#> GSM648686     3  0.0000    0.96252 0.000 0.000 1.000
#> GSM648689     3  0.0000    0.96252 0.000 0.000 1.000
#> GSM648690     3  0.0000    0.96252 0.000 0.000 1.000
#> GSM648691     3  0.0000    0.96252 0.000 0.000 1.000
#> GSM648693     3  0.0000    0.96252 0.000 0.000 1.000
#> GSM648700     2  0.1860    0.90148 0.000 0.948 0.052
#> GSM648630     3  0.0000    0.96252 0.000 0.000 1.000
#> GSM648632     3  0.0000    0.96252 0.000 0.000 1.000
#> GSM648639     3  0.0000    0.96252 0.000 0.000 1.000
#> GSM648640     3  0.0000    0.96252 0.000 0.000 1.000
#> GSM648668     2  0.0000    0.93812 0.000 1.000 0.000
#> GSM648676     2  0.0000    0.93812 0.000 1.000 0.000
#> GSM648692     3  0.0000    0.96252 0.000 0.000 1.000
#> GSM648694     3  0.0000    0.96252 0.000 0.000 1.000
#> GSM648699     2  0.0000    0.93812 0.000 1.000 0.000
#> GSM648701     2  0.0000    0.93812 0.000 1.000 0.000
#> GSM648673     2  0.5678    0.54633 0.000 0.684 0.316
#> GSM648677     2  0.0000    0.93812 0.000 1.000 0.000
#> GSM648687     3  0.0000    0.96252 0.000 0.000 1.000
#> GSM648688     3  0.0000    0.96252 0.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM648605     2  0.0524     0.9415 0.008 0.988 0.004 0.000
#> GSM648618     1  0.0469     0.9377 0.988 0.000 0.000 0.012
#> GSM648620     2  0.0817     0.9309 0.024 0.976 0.000 0.000
#> GSM648646     2  0.0188     0.9447 0.000 0.996 0.000 0.004
#> GSM648649     1  0.0469     0.9377 0.988 0.000 0.000 0.012
#> GSM648675     4  0.4477     0.7943 0.108 0.084 0.000 0.808
#> GSM648682     2  0.3390     0.7689 0.132 0.852 0.000 0.016
#> GSM648698     2  0.0000     0.9443 0.000 1.000 0.000 0.000
#> GSM648708     2  0.1902     0.8917 0.064 0.932 0.000 0.004
#> GSM648628     3  0.1211     0.9239 0.000 0.000 0.960 0.040
#> GSM648595     4  0.3144     0.8403 0.072 0.044 0.000 0.884
#> GSM648635     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648645     1  0.0188     0.9419 0.996 0.000 0.000 0.004
#> GSM648647     2  0.0188     0.9447 0.000 0.996 0.000 0.004
#> GSM648667     1  0.5126     0.2178 0.552 0.444 0.000 0.004
#> GSM648695     2  0.0779     0.9393 0.016 0.980 0.000 0.004
#> GSM648704     2  0.0188     0.9447 0.000 0.996 0.000 0.004
#> GSM648706     2  0.0000     0.9443 0.000 1.000 0.000 0.000
#> GSM648593     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648594     4  0.4792     0.5355 0.312 0.008 0.000 0.680
#> GSM648600     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648621     1  0.0707     0.9334 0.980 0.000 0.000 0.020
#> GSM648622     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648623     1  0.2546     0.8747 0.900 0.000 0.008 0.092
#> GSM648636     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648655     1  0.0817     0.9279 0.976 0.024 0.000 0.000
#> GSM648661     1  0.4585     0.5123 0.668 0.000 0.332 0.000
#> GSM648664     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648683     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648685     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648702     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648597     4  0.5000    -0.0652 0.500 0.000 0.000 0.500
#> GSM648603     1  0.1716     0.9031 0.936 0.000 0.000 0.064
#> GSM648606     3  0.0921     0.9226 0.000 0.028 0.972 0.000
#> GSM648613     3  0.1706     0.9212 0.000 0.016 0.948 0.036
#> GSM648619     1  0.5284     0.3835 0.616 0.000 0.368 0.016
#> GSM648654     3  0.4485     0.6813 0.200 0.028 0.772 0.000
#> GSM648663     3  0.3688     0.7220 0.000 0.208 0.792 0.000
#> GSM648670     4  0.1211     0.8563 0.000 0.040 0.000 0.960
#> GSM648707     3  0.2921     0.8708 0.000 0.000 0.860 0.140
#> GSM648615     2  0.0336     0.9441 0.000 0.992 0.000 0.008
#> GSM648643     2  0.0707     0.9366 0.000 0.980 0.000 0.020
#> GSM648650     1  0.2773     0.8424 0.880 0.116 0.000 0.004
#> GSM648656     2  0.0592     0.9390 0.000 0.984 0.000 0.016
#> GSM648715     2  0.0188     0.9447 0.000 0.996 0.000 0.004
#> GSM648598     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648601     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648602     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648604     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648614     2  0.3873     0.8075 0.096 0.844 0.060 0.000
#> GSM648624     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648625     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648629     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648634     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648648     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648651     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648657     1  0.1302     0.9164 0.956 0.000 0.000 0.044
#> GSM648660     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648697     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648710     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648591     4  0.2926     0.7880 0.056 0.000 0.048 0.896
#> GSM648592     1  0.3463     0.8444 0.864 0.040 0.000 0.096
#> GSM648607     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648611     3  0.0000     0.9304 0.000 0.000 1.000 0.000
#> GSM648612     3  0.2174     0.9094 0.020 0.000 0.928 0.052
#> GSM648616     3  0.2647     0.8793 0.000 0.000 0.880 0.120
#> GSM648617     1  0.1398     0.9187 0.956 0.000 0.004 0.040
#> GSM648626     1  0.2466     0.8743 0.900 0.000 0.004 0.096
#> GSM648711     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648712     3  0.6016     0.2473 0.412 0.000 0.544 0.044
#> GSM648713     1  0.1637     0.8986 0.940 0.000 0.060 0.000
#> GSM648714     2  0.3556     0.8347 0.036 0.864 0.096 0.004
#> GSM648716     3  0.1398     0.9108 0.040 0.000 0.956 0.004
#> GSM648717     3  0.0469     0.9283 0.000 0.012 0.988 0.000
#> GSM648590     1  0.6394     0.4359 0.636 0.120 0.000 0.244
#> GSM648596     2  0.0707     0.9366 0.000 0.980 0.000 0.020
#> GSM648642     2  0.0336     0.9427 0.008 0.992 0.000 0.000
#> GSM648696     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648705     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648718     4  0.3528     0.8184 0.000 0.192 0.000 0.808
#> GSM648599     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648608     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648609     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648610     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648633     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648644     2  0.0188     0.9447 0.000 0.996 0.000 0.004
#> GSM648652     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648653     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648658     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648659     4  0.3444     0.8263 0.000 0.184 0.000 0.816
#> GSM648662     1  0.5472     0.5396 0.676 0.280 0.044 0.000
#> GSM648665     1  0.4936     0.3882 0.624 0.372 0.004 0.000
#> GSM648666     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648680     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648684     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648709     2  0.0188     0.9442 0.004 0.996 0.000 0.000
#> GSM648719     1  0.0000     0.9439 1.000 0.000 0.000 0.000
#> GSM648627     3  0.0469     0.9290 0.012 0.000 0.988 0.000
#> GSM648637     4  0.2408     0.8680 0.000 0.104 0.000 0.896
#> GSM648638     3  0.1824     0.9140 0.000 0.004 0.936 0.060
#> GSM648641     3  0.0000     0.9304 0.000 0.000 1.000 0.000
#> GSM648672     4  0.2814     0.8627 0.000 0.132 0.000 0.868
#> GSM648674     4  0.2081     0.8695 0.000 0.084 0.000 0.916
#> GSM648703     4  0.3024     0.8539 0.000 0.148 0.000 0.852
#> GSM648631     3  0.0921     0.9265 0.000 0.000 0.972 0.028
#> GSM648669     4  0.1557     0.8355 0.000 0.000 0.056 0.944
#> GSM648671     4  0.1302     0.8383 0.000 0.000 0.044 0.956
#> GSM648678     2  0.3801     0.6636 0.000 0.780 0.000 0.220
#> GSM648679     4  0.0817     0.8547 0.000 0.024 0.000 0.976
#> GSM648681     4  0.2281     0.8715 0.000 0.096 0.000 0.904
#> GSM648686     3  0.1474     0.9164 0.000 0.000 0.948 0.052
#> GSM648689     3  0.0000     0.9304 0.000 0.000 1.000 0.000
#> GSM648690     3  0.0707     0.9283 0.000 0.000 0.980 0.020
#> GSM648691     3  0.1302     0.9202 0.000 0.000 0.956 0.044
#> GSM648693     3  0.0469     0.9301 0.000 0.000 0.988 0.012
#> GSM648700     4  0.2281     0.8682 0.000 0.096 0.000 0.904
#> GSM648630     3  0.0188     0.9305 0.000 0.000 0.996 0.004
#> GSM648632     3  0.0188     0.9305 0.000 0.000 0.996 0.004
#> GSM648639     3  0.2345     0.8919 0.000 0.000 0.900 0.100
#> GSM648640     3  0.0592     0.9295 0.000 0.000 0.984 0.016
#> GSM648668     4  0.2760     0.8642 0.000 0.128 0.000 0.872
#> GSM648676     4  0.2345     0.8681 0.000 0.100 0.000 0.900
#> GSM648692     3  0.0000     0.9304 0.000 0.000 1.000 0.000
#> GSM648694     3  0.0000     0.9304 0.000 0.000 1.000 0.000
#> GSM648699     4  0.2401     0.8677 0.000 0.092 0.004 0.904
#> GSM648701     4  0.2345     0.8681 0.000 0.100 0.000 0.900
#> GSM648673     4  0.1929     0.8593 0.000 0.036 0.024 0.940
#> GSM648677     4  0.3123     0.8486 0.000 0.156 0.000 0.844
#> GSM648687     3  0.1637     0.9117 0.000 0.000 0.940 0.060
#> GSM648688     3  0.1389     0.9184 0.000 0.000 0.952 0.048

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM648605     2  0.0000     0.9071 0.000 1.000 0.000 0.000 0.000
#> GSM648618     1  0.0703     0.9315 0.976 0.000 0.000 0.000 0.024
#> GSM648620     2  0.0000     0.9071 0.000 1.000 0.000 0.000 0.000
#> GSM648646     2  0.0000     0.9071 0.000 1.000 0.000 0.000 0.000
#> GSM648649     1  0.2068     0.8660 0.904 0.000 0.000 0.004 0.092
#> GSM648675     4  0.4062     0.8237 0.040 0.000 0.000 0.764 0.196
#> GSM648682     2  0.2179     0.7804 0.112 0.888 0.000 0.000 0.000
#> GSM648698     2  0.0000     0.9071 0.000 1.000 0.000 0.000 0.000
#> GSM648708     2  0.3366     0.6036 0.232 0.768 0.000 0.000 0.000
#> GSM648628     3  0.2280     0.8444 0.000 0.000 0.880 0.000 0.120
#> GSM648595     4  0.3242     0.8544 0.012 0.000 0.000 0.816 0.172
#> GSM648635     1  0.0162     0.9378 0.996 0.000 0.000 0.000 0.004
#> GSM648645     1  0.0290     0.9366 0.992 0.000 0.000 0.000 0.008
#> GSM648647     2  0.0000     0.9071 0.000 1.000 0.000 0.000 0.000
#> GSM648667     1  0.4227     0.3092 0.580 0.420 0.000 0.000 0.000
#> GSM648695     2  0.0000     0.9071 0.000 1.000 0.000 0.000 0.000
#> GSM648704     2  0.0000     0.9071 0.000 1.000 0.000 0.000 0.000
#> GSM648706     2  0.0000     0.9071 0.000 1.000 0.000 0.000 0.000
#> GSM648593     1  0.0000     0.9386 1.000 0.000 0.000 0.000 0.000
#> GSM648594     4  0.5180     0.6138 0.196 0.000 0.000 0.684 0.120
#> GSM648600     1  0.0703     0.9288 0.976 0.000 0.000 0.000 0.024
#> GSM648621     1  0.3707     0.6707 0.716 0.000 0.000 0.000 0.284
#> GSM648622     1  0.0162     0.9378 0.996 0.000 0.000 0.000 0.004
#> GSM648623     5  0.2424     0.8238 0.132 0.000 0.000 0.000 0.868
#> GSM648636     1  0.1043     0.9175 0.960 0.000 0.000 0.000 0.040
#> GSM648655     1  0.2074     0.8649 0.896 0.000 0.000 0.000 0.104
#> GSM648661     3  0.3707     0.5285 0.284 0.000 0.716 0.000 0.000
#> GSM648664     1  0.0000     0.9386 1.000 0.000 0.000 0.000 0.000
#> GSM648683     1  0.0794     0.9244 0.972 0.000 0.000 0.000 0.028
#> GSM648685     1  0.0000     0.9386 1.000 0.000 0.000 0.000 0.000
#> GSM648702     1  0.1671     0.8887 0.924 0.000 0.000 0.000 0.076
#> GSM648597     5  0.3758     0.7878 0.096 0.000 0.000 0.088 0.816
#> GSM648603     5  0.2929     0.7834 0.180 0.000 0.000 0.000 0.820
#> GSM648606     2  0.6377     0.0823 0.000 0.452 0.380 0.000 0.168
#> GSM648613     5  0.5155     0.6814 0.000 0.140 0.168 0.000 0.692
#> GSM648619     5  0.4901     0.7581 0.168 0.000 0.116 0.000 0.716
#> GSM648654     3  0.3305     0.6116 0.224 0.000 0.776 0.000 0.000
#> GSM648663     2  0.6697    -0.1663 0.000 0.384 0.240 0.000 0.376
#> GSM648670     4  0.3143     0.8418 0.000 0.000 0.000 0.796 0.204
#> GSM648707     5  0.2230     0.8049 0.000 0.000 0.116 0.000 0.884
#> GSM648615     2  0.0000     0.9071 0.000 1.000 0.000 0.000 0.000
#> GSM648643     2  0.0162     0.9047 0.000 0.996 0.000 0.004 0.000
#> GSM648650     1  0.3684     0.6275 0.720 0.280 0.000 0.000 0.000
#> GSM648656     2  0.0000     0.9071 0.000 1.000 0.000 0.000 0.000
#> GSM648715     2  0.0000     0.9071 0.000 1.000 0.000 0.000 0.000
#> GSM648598     1  0.0000     0.9386 1.000 0.000 0.000 0.000 0.000
#> GSM648601     1  0.0162     0.9378 0.996 0.000 0.000 0.000 0.004
#> GSM648602     1  0.0162     0.9378 0.996 0.000 0.000 0.000 0.004
#> GSM648604     1  0.0000     0.9386 1.000 0.000 0.000 0.000 0.000
#> GSM648614     2  0.1851     0.8306 0.000 0.912 0.088 0.000 0.000
#> GSM648624     1  0.0000     0.9386 1.000 0.000 0.000 0.000 0.000
#> GSM648625     1  0.1430     0.9023 0.944 0.052 0.000 0.000 0.004
#> GSM648629     1  0.0000     0.9386 1.000 0.000 0.000 0.000 0.000
#> GSM648634     1  0.0162     0.9378 0.996 0.000 0.000 0.000 0.004
#> GSM648648     1  0.0000     0.9386 1.000 0.000 0.000 0.000 0.000
#> GSM648651     1  0.0000     0.9386 1.000 0.000 0.000 0.000 0.000
#> GSM648657     1  0.2377     0.8329 0.872 0.000 0.000 0.000 0.128
#> GSM648660     1  0.0290     0.9366 0.992 0.000 0.000 0.000 0.008
#> GSM648697     1  0.0000     0.9386 1.000 0.000 0.000 0.000 0.000
#> GSM648710     1  0.0000     0.9386 1.000 0.000 0.000 0.000 0.000
#> GSM648591     5  0.1671     0.7381 0.000 0.000 0.000 0.076 0.924
#> GSM648592     5  0.2574     0.8290 0.112 0.000 0.000 0.012 0.876
#> GSM648607     1  0.0324     0.9367 0.992 0.000 0.004 0.000 0.004
#> GSM648611     3  0.2127     0.8457 0.000 0.000 0.892 0.000 0.108
#> GSM648612     5  0.3177     0.7539 0.000 0.000 0.208 0.000 0.792
#> GSM648616     5  0.2411     0.8061 0.000 0.000 0.108 0.008 0.884
#> GSM648617     5  0.2424     0.8238 0.132 0.000 0.000 0.000 0.868
#> GSM648626     5  0.2280     0.8288 0.120 0.000 0.000 0.000 0.880
#> GSM648711     1  0.0000     0.9386 1.000 0.000 0.000 0.000 0.000
#> GSM648712     5  0.3562     0.7681 0.016 0.000 0.196 0.000 0.788
#> GSM648713     5  0.5037     0.7077 0.228 0.000 0.088 0.000 0.684
#> GSM648714     2  0.1851     0.8306 0.000 0.912 0.088 0.000 0.000
#> GSM648716     3  0.2351     0.8417 0.016 0.000 0.896 0.000 0.088
#> GSM648717     3  0.4047     0.4680 0.000 0.004 0.676 0.000 0.320
#> GSM648590     1  0.5684     0.6519 0.700 0.048 0.000 0.144 0.108
#> GSM648596     2  0.0162     0.9047 0.000 0.996 0.000 0.004 0.000
#> GSM648642     2  0.0000     0.9071 0.000 1.000 0.000 0.000 0.000
#> GSM648696     1  0.0290     0.9361 0.992 0.008 0.000 0.000 0.000
#> GSM648705     1  0.0000     0.9386 1.000 0.000 0.000 0.000 0.000
#> GSM648718     4  0.2864     0.8544 0.024 0.112 0.000 0.864 0.000
#> GSM648599     1  0.0880     0.9235 0.968 0.000 0.000 0.000 0.032
#> GSM648608     1  0.0000     0.9386 1.000 0.000 0.000 0.000 0.000
#> GSM648609     1  0.0000     0.9386 1.000 0.000 0.000 0.000 0.000
#> GSM648610     1  0.2074     0.8644 0.896 0.000 0.000 0.000 0.104
#> GSM648633     1  0.0290     0.9366 0.992 0.000 0.000 0.000 0.008
#> GSM648644     2  0.0000     0.9071 0.000 1.000 0.000 0.000 0.000
#> GSM648652     1  0.0000     0.9386 1.000 0.000 0.000 0.000 0.000
#> GSM648653     1  0.0000     0.9386 1.000 0.000 0.000 0.000 0.000
#> GSM648658     1  0.0162     0.9375 0.996 0.000 0.000 0.000 0.004
#> GSM648659     4  0.4473     0.8286 0.004 0.112 0.000 0.768 0.116
#> GSM648662     1  0.5325     0.5053 0.636 0.276 0.088 0.000 0.000
#> GSM648665     1  0.3274     0.7121 0.780 0.220 0.000 0.000 0.000
#> GSM648666     1  0.0000     0.9386 1.000 0.000 0.000 0.000 0.000
#> GSM648680     1  0.0000     0.9386 1.000 0.000 0.000 0.000 0.000
#> GSM648684     1  0.1341     0.9046 0.944 0.000 0.000 0.000 0.056
#> GSM648709     2  0.0000     0.9071 0.000 1.000 0.000 0.000 0.000
#> GSM648719     1  0.0162     0.9378 0.996 0.000 0.000 0.000 0.004
#> GSM648627     3  0.1444     0.8812 0.012 0.000 0.948 0.000 0.040
#> GSM648637     4  0.3487     0.7849 0.000 0.008 0.000 0.780 0.212
#> GSM648638     5  0.3300     0.7558 0.000 0.000 0.204 0.004 0.792
#> GSM648641     3  0.1121     0.8763 0.000 0.000 0.956 0.000 0.044
#> GSM648672     4  0.1851     0.8770 0.000 0.088 0.000 0.912 0.000
#> GSM648674     4  0.1965     0.8796 0.000 0.000 0.000 0.904 0.096
#> GSM648703     4  0.1282     0.8938 0.000 0.004 0.000 0.952 0.044
#> GSM648631     3  0.0000     0.8952 0.000 0.000 1.000 0.000 0.000
#> GSM648669     4  0.0963     0.8866 0.000 0.000 0.036 0.964 0.000
#> GSM648671     4  0.0880     0.8885 0.000 0.000 0.032 0.968 0.000
#> GSM648678     2  0.2127     0.8134 0.000 0.892 0.000 0.108 0.000
#> GSM648679     4  0.1965     0.8796 0.000 0.000 0.000 0.904 0.096
#> GSM648681     4  0.1952     0.8833 0.000 0.004 0.000 0.912 0.084
#> GSM648686     3  0.2136     0.8385 0.000 0.000 0.904 0.088 0.008
#> GSM648689     3  0.0000     0.8952 0.000 0.000 1.000 0.000 0.000
#> GSM648690     3  0.0000     0.8952 0.000 0.000 1.000 0.000 0.000
#> GSM648691     3  0.0000     0.8952 0.000 0.000 1.000 0.000 0.000
#> GSM648693     3  0.0000     0.8952 0.000 0.000 1.000 0.000 0.000
#> GSM648700     4  0.1082     0.8934 0.000 0.000 0.008 0.964 0.028
#> GSM648630     3  0.0000     0.8952 0.000 0.000 1.000 0.000 0.000
#> GSM648632     3  0.0000     0.8952 0.000 0.000 1.000 0.000 0.000
#> GSM648639     5  0.2329     0.8015 0.000 0.000 0.124 0.000 0.876
#> GSM648640     3  0.2561     0.7955 0.000 0.000 0.856 0.000 0.144
#> GSM648668     4  0.2110     0.8842 0.000 0.072 0.000 0.912 0.016
#> GSM648676     4  0.0671     0.8933 0.000 0.000 0.004 0.980 0.016
#> GSM648692     3  0.0162     0.8939 0.000 0.000 0.996 0.000 0.004
#> GSM648694     3  0.0000     0.8952 0.000 0.000 1.000 0.000 0.000
#> GSM648699     4  0.1211     0.8893 0.000 0.000 0.024 0.960 0.016
#> GSM648701     4  0.0912     0.8923 0.000 0.000 0.012 0.972 0.016
#> GSM648673     4  0.0609     0.8919 0.000 0.000 0.020 0.980 0.000
#> GSM648677     4  0.2011     0.8770 0.000 0.088 0.000 0.908 0.004
#> GSM648687     3  0.1851     0.8437 0.000 0.000 0.912 0.088 0.000
#> GSM648688     3  0.1732     0.8501 0.000 0.000 0.920 0.080 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM648605     2  0.0146    0.92917 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM648618     1  0.5583    0.10423 0.456 0.000 0.000 0.008 0.108 0.428
#> GSM648620     2  0.0547    0.92238 0.000 0.980 0.000 0.000 0.000 0.020
#> GSM648646     2  0.0000    0.93019 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648649     1  0.4809    0.53629 0.628 0.000 0.000 0.308 0.012 0.052
#> GSM648675     6  0.1196    0.48351 0.000 0.000 0.000 0.040 0.008 0.952
#> GSM648682     2  0.3276    0.70942 0.132 0.816 0.000 0.000 0.000 0.052
#> GSM648698     2  0.0000    0.93019 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648708     1  0.4584    0.31327 0.556 0.404 0.000 0.000 0.000 0.040
#> GSM648628     5  0.5108    0.08086 0.000 0.000 0.080 0.000 0.484 0.436
#> GSM648595     6  0.4115    0.07386 0.012 0.000 0.000 0.360 0.004 0.624
#> GSM648635     1  0.1398    0.85902 0.940 0.000 0.000 0.008 0.000 0.052
#> GSM648645     1  0.1219    0.86066 0.948 0.000 0.000 0.004 0.000 0.048
#> GSM648647     2  0.0000    0.93019 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648667     1  0.3820    0.69417 0.756 0.204 0.000 0.008 0.000 0.032
#> GSM648695     2  0.1411    0.86974 0.060 0.936 0.000 0.000 0.000 0.004
#> GSM648704     2  0.0000    0.93019 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648706     2  0.0000    0.93019 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648593     1  0.1863    0.82186 0.896 0.000 0.000 0.000 0.000 0.104
#> GSM648594     4  0.4135    0.17754 0.292 0.000 0.000 0.680 0.012 0.016
#> GSM648600     1  0.2812    0.82419 0.856 0.000 0.000 0.000 0.048 0.096
#> GSM648621     6  0.6106   -0.01120 0.156 0.000 0.000 0.020 0.368 0.456
#> GSM648622     1  0.0146    0.86580 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM648623     5  0.5454    0.44442 0.180 0.000 0.000 0.252 0.568 0.000
#> GSM648636     1  0.3774    0.46019 0.592 0.000 0.000 0.000 0.000 0.408
#> GSM648655     6  0.3163    0.36754 0.232 0.004 0.000 0.000 0.000 0.764
#> GSM648661     3  0.4057    0.23336 0.436 0.000 0.556 0.000 0.000 0.008
#> GSM648664     1  0.0603    0.86513 0.980 0.000 0.004 0.000 0.000 0.016
#> GSM648683     1  0.1757    0.84203 0.916 0.000 0.000 0.000 0.008 0.076
#> GSM648685     1  0.0547    0.86461 0.980 0.000 0.000 0.000 0.000 0.020
#> GSM648702     1  0.2219    0.82486 0.864 0.000 0.000 0.000 0.000 0.136
#> GSM648597     5  0.3823    0.43923 0.000 0.000 0.000 0.436 0.564 0.000
#> GSM648603     5  0.5008    0.52044 0.148 0.000 0.000 0.212 0.640 0.000
#> GSM648606     5  0.6259    0.18300 0.000 0.204 0.024 0.000 0.488 0.284
#> GSM648613     5  0.0806    0.62257 0.000 0.008 0.020 0.000 0.972 0.000
#> GSM648619     5  0.2402    0.56554 0.120 0.000 0.012 0.000 0.868 0.000
#> GSM648654     3  0.4100    0.31440 0.388 0.000 0.600 0.000 0.008 0.004
#> GSM648663     5  0.4691    0.42106 0.012 0.272 0.028 0.000 0.672 0.016
#> GSM648670     6  0.3470    0.38595 0.000 0.000 0.000 0.248 0.012 0.740
#> GSM648707     5  0.3175    0.60495 0.000 0.000 0.000 0.256 0.744 0.000
#> GSM648615     2  0.0146    0.92925 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM648643     2  0.0603    0.92066 0.000 0.980 0.000 0.004 0.000 0.016
#> GSM648650     1  0.4408    0.73022 0.764 0.120 0.000 0.064 0.000 0.052
#> GSM648656     2  0.0000    0.93019 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648715     2  0.0000    0.93019 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648598     1  0.0000    0.86567 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648601     1  0.0937    0.86271 0.960 0.000 0.000 0.000 0.000 0.040
#> GSM648602     1  0.2053    0.83693 0.888 0.000 0.000 0.000 0.004 0.108
#> GSM648604     1  0.0547    0.86461 0.980 0.000 0.000 0.000 0.000 0.020
#> GSM648614     2  0.1577    0.89018 0.000 0.940 0.008 0.000 0.036 0.016
#> GSM648624     1  0.0458    0.86393 0.984 0.000 0.000 0.000 0.000 0.016
#> GSM648625     1  0.0508    0.86699 0.984 0.012 0.000 0.000 0.000 0.004
#> GSM648629     1  0.0363    0.86566 0.988 0.000 0.000 0.000 0.000 0.012
#> GSM648634     1  0.1753    0.85046 0.912 0.000 0.000 0.000 0.004 0.084
#> GSM648648     1  0.0790    0.86418 0.968 0.000 0.000 0.000 0.000 0.032
#> GSM648651     1  0.0363    0.86487 0.988 0.000 0.000 0.000 0.000 0.012
#> GSM648657     1  0.5264    0.39036 0.548 0.000 0.000 0.376 0.028 0.048
#> GSM648660     1  0.0603    0.86595 0.980 0.000 0.000 0.000 0.004 0.016
#> GSM648697     1  0.0458    0.86393 0.984 0.000 0.000 0.000 0.000 0.016
#> GSM648710     1  0.0547    0.86461 0.980 0.000 0.000 0.000 0.000 0.020
#> GSM648591     5  0.5807    0.33106 0.000 0.000 0.000 0.200 0.476 0.324
#> GSM648592     5  0.3807    0.52527 0.004 0.000 0.000 0.368 0.628 0.000
#> GSM648607     1  0.2262    0.82491 0.896 0.000 0.008 0.000 0.080 0.016
#> GSM648611     6  0.5450   -0.13820 0.000 0.000 0.120 0.000 0.428 0.452
#> GSM648612     5  0.0508    0.62305 0.000 0.000 0.012 0.000 0.984 0.004
#> GSM648616     5  0.3390    0.58474 0.000 0.000 0.000 0.296 0.704 0.000
#> GSM648617     5  0.3314    0.61039 0.012 0.000 0.000 0.224 0.764 0.000
#> GSM648626     5  0.3126    0.60744 0.000 0.000 0.000 0.248 0.752 0.000
#> GSM648711     1  0.1003    0.86112 0.964 0.000 0.000 0.000 0.016 0.020
#> GSM648712     5  0.0820    0.62101 0.000 0.000 0.012 0.000 0.972 0.016
#> GSM648713     5  0.2094    0.60676 0.068 0.000 0.016 0.000 0.908 0.008
#> GSM648714     2  0.0891    0.90943 0.000 0.968 0.008 0.000 0.024 0.000
#> GSM648716     5  0.4375   -0.00206 0.012 0.000 0.432 0.000 0.548 0.008
#> GSM648717     5  0.2473    0.56516 0.000 0.000 0.136 0.000 0.856 0.008
#> GSM648590     6  0.1829    0.48346 0.028 0.008 0.000 0.036 0.000 0.928
#> GSM648596     2  0.0405    0.92706 0.000 0.988 0.000 0.004 0.000 0.008
#> GSM648642     2  0.0547    0.92204 0.000 0.980 0.000 0.000 0.000 0.020
#> GSM648696     1  0.1728    0.85456 0.924 0.008 0.000 0.000 0.004 0.064
#> GSM648705     1  0.1429    0.85874 0.940 0.004 0.000 0.004 0.000 0.052
#> GSM648718     2  0.6936   -0.05969 0.196 0.392 0.000 0.340 0.000 0.072
#> GSM648599     1  0.5450    0.40716 0.560 0.000 0.000 0.000 0.164 0.276
#> GSM648608     1  0.0790    0.86074 0.968 0.000 0.000 0.000 0.000 0.032
#> GSM648609     1  0.0458    0.86393 0.984 0.000 0.000 0.000 0.000 0.016
#> GSM648610     1  0.4256    0.23247 0.520 0.000 0.000 0.000 0.016 0.464
#> GSM648633     1  0.1049    0.86441 0.960 0.000 0.000 0.000 0.008 0.032
#> GSM648644     2  0.0000    0.93019 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648652     1  0.1141    0.85975 0.948 0.000 0.000 0.000 0.000 0.052
#> GSM648653     1  0.0937    0.86449 0.960 0.000 0.000 0.000 0.000 0.040
#> GSM648658     1  0.3390    0.59390 0.704 0.000 0.000 0.000 0.000 0.296
#> GSM648659     6  0.1866    0.45420 0.000 0.008 0.000 0.084 0.000 0.908
#> GSM648662     1  0.4761    0.62360 0.716 0.200 0.012 0.000 0.040 0.032
#> GSM648665     1  0.3312    0.70315 0.792 0.180 0.000 0.000 0.000 0.028
#> GSM648666     1  0.0458    0.86393 0.984 0.000 0.000 0.000 0.000 0.016
#> GSM648680     1  0.1007    0.86162 0.956 0.000 0.000 0.000 0.000 0.044
#> GSM648684     1  0.1610    0.84184 0.916 0.000 0.000 0.000 0.000 0.084
#> GSM648709     2  0.0146    0.92917 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM648719     1  0.0508    0.86618 0.984 0.000 0.000 0.000 0.004 0.012
#> GSM648627     5  0.6131    0.13019 0.004 0.000 0.276 0.000 0.432 0.288
#> GSM648637     4  0.1693    0.56217 0.000 0.004 0.000 0.932 0.020 0.044
#> GSM648638     5  0.1807    0.63166 0.000 0.000 0.020 0.060 0.920 0.000
#> GSM648641     5  0.3868   -0.15930 0.000 0.000 0.492 0.000 0.508 0.000
#> GSM648672     4  0.3168    0.59310 0.000 0.016 0.000 0.792 0.000 0.192
#> GSM648674     4  0.3448    0.55461 0.000 0.000 0.000 0.716 0.004 0.280
#> GSM648703     6  0.3999   -0.44187 0.000 0.004 0.000 0.496 0.000 0.500
#> GSM648631     3  0.1863    0.77991 0.000 0.000 0.896 0.000 0.104 0.000
#> GSM648669     4  0.3710    0.51348 0.000 0.000 0.292 0.696 0.000 0.012
#> GSM648671     4  0.3470    0.54532 0.000 0.000 0.248 0.740 0.000 0.012
#> GSM648678     2  0.3522    0.73102 0.000 0.800 0.000 0.128 0.000 0.072
#> GSM648679     4  0.0603    0.55446 0.000 0.000 0.000 0.980 0.004 0.016
#> GSM648681     4  0.1363    0.57374 0.004 0.004 0.012 0.952 0.000 0.028
#> GSM648686     3  0.0405    0.77372 0.000 0.000 0.988 0.008 0.000 0.004
#> GSM648689     3  0.2631    0.73752 0.000 0.000 0.820 0.000 0.180 0.000
#> GSM648690     3  0.0405    0.77617 0.000 0.000 0.988 0.008 0.004 0.000
#> GSM648691     3  0.0632    0.76825 0.000 0.000 0.976 0.024 0.000 0.000
#> GSM648693     3  0.2664    0.73357 0.000 0.000 0.816 0.000 0.184 0.000
#> GSM648700     6  0.3737   -0.18623 0.000 0.000 0.000 0.392 0.000 0.608
#> GSM648630     3  0.1610    0.78387 0.000 0.000 0.916 0.000 0.084 0.000
#> GSM648632     3  0.1531    0.78481 0.000 0.000 0.928 0.004 0.068 0.000
#> GSM648639     5  0.3244    0.60077 0.000 0.000 0.000 0.268 0.732 0.000
#> GSM648640     3  0.3998    0.13601 0.000 0.000 0.504 0.004 0.492 0.000
#> GSM648668     4  0.3245    0.58433 0.000 0.008 0.000 0.764 0.000 0.228
#> GSM648676     4  0.3867    0.36008 0.000 0.000 0.000 0.512 0.000 0.488
#> GSM648692     3  0.2178    0.76845 0.000 0.000 0.868 0.000 0.132 0.000
#> GSM648694     3  0.2491    0.74969 0.000 0.000 0.836 0.000 0.164 0.000
#> GSM648699     4  0.4962    0.40364 0.000 0.000 0.068 0.516 0.000 0.416
#> GSM648701     4  0.3867    0.36008 0.000 0.000 0.000 0.512 0.000 0.488
#> GSM648673     4  0.4239    0.54239 0.000 0.000 0.248 0.696 0.000 0.056
#> GSM648677     4  0.4083    0.38414 0.000 0.008 0.000 0.532 0.000 0.460
#> GSM648687     3  0.0777    0.76603 0.000 0.000 0.972 0.024 0.000 0.004
#> GSM648688     3  0.0547    0.77031 0.000 0.000 0.980 0.020 0.000 0.000

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-CV-NMF-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-CV-NMF-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-CV-NMF-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-CV-NMF-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-CV-NMF-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-CV-NMF-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-CV-NMF-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-CV-NMF-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-CV-NMF-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-CV-NMF-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-CV-NMF-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-CV-NMF-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-CV-NMF-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-CV-NMF-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-CV-NMF-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-CV-NMF-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-CV-NMF-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-CV-NMF-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)
#> Error in mat[ceiling(1:nr/h_ratio), ceiling(1:nc/w_ratio), drop = FALSE]: subscript out of bounds

plot of chunk tab-CV-NMF-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-CV-NMF-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk CV-NMF-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-CV-NMF-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-CV-NMF-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-CV-NMF-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-CV-NMF-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-CV-NMF-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk CV-NMF-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>          n disease.state(p) development.stage(p) other(p) k
#> CV:NMF 126         2.72e-06              0.06423 1.43e-13 2
#> CV:NMF 126         1.35e-10              0.05521 1.29e-18 3
#> CV:NMF 124         1.37e-12              0.09094 1.93e-24 4
#> CV:NMF 126         9.99e-14              0.02393 2.80e-31 5
#> CV:NMF  96         7.27e-17              0.00881 3.95e-32 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


MAD:hclust

The object with results only for a single top-value method and a single partition method can be extracted as:

res = res_list["MAD", "hclust"]
# you can also extract it by
# res = res_list["MAD:hclust"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 130 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#>   Subgroups are detected by 'hclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk MAD-hclust-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk MAD-hclust-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.533           0.776       0.886         0.3889 0.706   0.706
#> 3 3 0.625           0.749       0.872         0.3830 0.766   0.673
#> 4 4 0.522           0.685       0.778         0.2249 0.855   0.710
#> 5 5 0.514           0.578       0.730         0.0912 0.943   0.845
#> 6 6 0.551           0.505       0.705         0.0404 0.937   0.806

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 2

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM648605     1  0.9833      0.406 0.576 0.424
#> GSM648618     1  0.3584      0.839 0.932 0.068
#> GSM648620     1  0.9552      0.504 0.624 0.376
#> GSM648646     2  0.4690      0.875 0.100 0.900
#> GSM648649     1  0.3114      0.842 0.944 0.056
#> GSM648675     1  0.5842      0.797 0.860 0.140
#> GSM648682     2  0.5294      0.857 0.120 0.880
#> GSM648698     1  0.9833      0.406 0.576 0.424
#> GSM648708     1  0.9686      0.471 0.604 0.396
#> GSM648628     1  0.0376      0.857 0.996 0.004
#> GSM648595     1  0.3733      0.838 0.928 0.072
#> GSM648635     1  0.1843      0.851 0.972 0.028
#> GSM648645     1  0.0000      0.857 1.000 0.000
#> GSM648647     1  0.9635      0.486 0.612 0.388
#> GSM648667     1  0.8144      0.683 0.748 0.252
#> GSM648695     1  0.9129      0.580 0.672 0.328
#> GSM648704     2  0.0000      0.951 0.000 1.000
#> GSM648706     2  0.0938      0.953 0.012 0.988
#> GSM648593     1  0.4298      0.825 0.912 0.088
#> GSM648594     1  0.2603      0.850 0.956 0.044
#> GSM648600     1  0.1633      0.852 0.976 0.024
#> GSM648621     1  0.0000      0.857 1.000 0.000
#> GSM648622     1  0.0000      0.857 1.000 0.000
#> GSM648623     1  0.0000      0.857 1.000 0.000
#> GSM648636     1  0.2423      0.847 0.960 0.040
#> GSM648655     1  0.4298      0.825 0.912 0.088
#> GSM648661     1  0.0000      0.857 1.000 0.000
#> GSM648664     1  0.0000      0.857 1.000 0.000
#> GSM648683     1  0.0000      0.857 1.000 0.000
#> GSM648685     1  0.0000      0.857 1.000 0.000
#> GSM648702     1  0.2236      0.849 0.964 0.036
#> GSM648597     1  0.0938      0.856 0.988 0.012
#> GSM648603     1  0.0672      0.856 0.992 0.008
#> GSM648606     1  0.3584      0.836 0.932 0.068
#> GSM648613     1  0.3584      0.836 0.932 0.068
#> GSM648619     1  0.0000      0.857 1.000 0.000
#> GSM648654     1  0.1843      0.851 0.972 0.028
#> GSM648663     1  0.3584      0.836 0.932 0.068
#> GSM648670     1  0.9881      0.313 0.564 0.436
#> GSM648707     1  0.9635      0.487 0.612 0.388
#> GSM648615     1  0.9896      0.375 0.560 0.440
#> GSM648643     2  0.7602      0.685 0.220 0.780
#> GSM648650     1  0.4022      0.833 0.920 0.080
#> GSM648656     2  0.4690      0.875 0.100 0.900
#> GSM648715     1  0.8144      0.683 0.748 0.252
#> GSM648598     1  0.0000      0.857 1.000 0.000
#> GSM648601     1  0.0000      0.857 1.000 0.000
#> GSM648602     1  0.0000      0.857 1.000 0.000
#> GSM648604     1  0.0000      0.857 1.000 0.000
#> GSM648614     1  0.3584      0.836 0.932 0.068
#> GSM648624     1  0.0000      0.857 1.000 0.000
#> GSM648625     1  0.3114      0.840 0.944 0.056
#> GSM648629     1  0.0000      0.857 1.000 0.000
#> GSM648634     1  0.0000      0.857 1.000 0.000
#> GSM648648     1  0.1843      0.851 0.972 0.028
#> GSM648651     1  0.0000      0.857 1.000 0.000
#> GSM648657     1  0.0000      0.857 1.000 0.000
#> GSM648660     1  0.0000      0.857 1.000 0.000
#> GSM648697     1  0.0000      0.857 1.000 0.000
#> GSM648710     1  0.0000      0.857 1.000 0.000
#> GSM648591     1  0.0938      0.856 0.988 0.012
#> GSM648592     1  0.0938      0.856 0.988 0.012
#> GSM648607     1  0.0000      0.857 1.000 0.000
#> GSM648611     1  0.0000      0.857 1.000 0.000
#> GSM648612     1  0.0000      0.857 1.000 0.000
#> GSM648616     1  0.9661      0.479 0.608 0.392
#> GSM648617     1  0.2948      0.848 0.948 0.052
#> GSM648626     1  0.0672      0.856 0.992 0.008
#> GSM648711     1  0.0000      0.857 1.000 0.000
#> GSM648712     1  0.0000      0.857 1.000 0.000
#> GSM648713     1  0.0000      0.857 1.000 0.000
#> GSM648714     1  0.3584      0.836 0.932 0.068
#> GSM648716     1  0.0000      0.857 1.000 0.000
#> GSM648717     1  0.3274      0.840 0.940 0.060
#> GSM648590     1  0.7056      0.754 0.808 0.192
#> GSM648596     1  0.9044      0.610 0.680 0.320
#> GSM648642     1  0.9686      0.471 0.604 0.396
#> GSM648696     1  0.2236      0.851 0.964 0.036
#> GSM648705     1  0.2236      0.848 0.964 0.036
#> GSM648718     1  0.9896      0.375 0.560 0.440
#> GSM648599     1  0.0000      0.857 1.000 0.000
#> GSM648608     1  0.0000      0.857 1.000 0.000
#> GSM648609     1  0.0000      0.857 1.000 0.000
#> GSM648610     1  0.0000      0.857 1.000 0.000
#> GSM648633     1  0.0000      0.857 1.000 0.000
#> GSM648644     2  0.0000      0.951 0.000 1.000
#> GSM648652     1  0.1843      0.851 0.972 0.028
#> GSM648653     1  0.0000      0.857 1.000 0.000
#> GSM648658     1  0.4298      0.825 0.912 0.088
#> GSM648659     1  0.7602      0.733 0.780 0.220
#> GSM648662     1  0.0000      0.857 1.000 0.000
#> GSM648665     1  0.0000      0.857 1.000 0.000
#> GSM648666     1  0.0000      0.857 1.000 0.000
#> GSM648680     1  0.1843      0.851 0.972 0.028
#> GSM648684     1  0.0000      0.857 1.000 0.000
#> GSM648709     1  0.9170      0.575 0.668 0.332
#> GSM648719     1  0.0000      0.857 1.000 0.000
#> GSM648627     1  0.0000      0.857 1.000 0.000
#> GSM648637     2  0.1843      0.949 0.028 0.972
#> GSM648638     2  0.1843      0.949 0.028 0.972
#> GSM648641     1  0.7376      0.723 0.792 0.208
#> GSM648672     2  0.0000      0.951 0.000 1.000
#> GSM648674     2  0.2236      0.942 0.036 0.964
#> GSM648703     2  0.0672      0.954 0.008 0.992
#> GSM648631     1  0.9491      0.521 0.632 0.368
#> GSM648669     2  0.1414      0.951 0.020 0.980
#> GSM648671     2  0.1414      0.951 0.020 0.980
#> GSM648678     2  0.0000      0.951 0.000 1.000
#> GSM648679     2  0.2043      0.945 0.032 0.968
#> GSM648681     1  0.9881      0.353 0.564 0.436
#> GSM648686     1  0.9580      0.501 0.620 0.380
#> GSM648689     1  0.9427      0.534 0.640 0.360
#> GSM648690     1  0.9580      0.501 0.620 0.380
#> GSM648691     1  0.9580      0.501 0.620 0.380
#> GSM648693     1  0.9491      0.521 0.632 0.368
#> GSM648700     2  0.0672      0.954 0.008 0.992
#> GSM648630     1  0.9580      0.501 0.620 0.380
#> GSM648632     1  0.9491      0.521 0.632 0.368
#> GSM648639     1  0.9661      0.479 0.608 0.392
#> GSM648640     1  0.9661      0.479 0.608 0.392
#> GSM648668     2  0.3733      0.909 0.072 0.928
#> GSM648676     2  0.0672      0.954 0.008 0.992
#> GSM648692     1  0.9580      0.501 0.620 0.380
#> GSM648694     1  0.9491      0.521 0.632 0.368
#> GSM648699     2  0.0672      0.954 0.008 0.992
#> GSM648701     2  0.0672      0.954 0.008 0.992
#> GSM648673     2  0.1414      0.951 0.020 0.980
#> GSM648677     2  0.0000      0.951 0.000 1.000
#> GSM648687     1  0.9608      0.494 0.616 0.384
#> GSM648688     1  0.9608      0.494 0.616 0.384

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM648605     2  0.6955    -0.1525 0.488 0.496 0.016
#> GSM648618     1  0.3966     0.8410 0.876 0.100 0.024
#> GSM648620     1  0.6912     0.2831 0.540 0.444 0.016
#> GSM648646     2  0.2031     0.7371 0.016 0.952 0.032
#> GSM648649     1  0.2066     0.8648 0.940 0.060 0.000
#> GSM648675     1  0.4755     0.7688 0.808 0.184 0.008
#> GSM648682     2  0.3993     0.7323 0.052 0.884 0.064
#> GSM648698     2  0.6955    -0.1525 0.488 0.496 0.016
#> GSM648708     1  0.6944     0.2125 0.516 0.468 0.016
#> GSM648628     1  0.2918     0.8673 0.924 0.044 0.032
#> GSM648595     1  0.3682     0.8333 0.876 0.116 0.008
#> GSM648635     1  0.1289     0.8756 0.968 0.032 0.000
#> GSM648645     1  0.0475     0.8811 0.992 0.004 0.004
#> GSM648647     1  0.6799     0.2566 0.532 0.456 0.012
#> GSM648667     1  0.5397     0.6347 0.720 0.280 0.000
#> GSM648695     1  0.5988     0.4748 0.632 0.368 0.000
#> GSM648704     2  0.2959     0.7808 0.000 0.900 0.100
#> GSM648706     2  0.3539     0.7819 0.012 0.888 0.100
#> GSM648593     1  0.3116     0.8373 0.892 0.108 0.000
#> GSM648594     1  0.2261     0.8652 0.932 0.068 0.000
#> GSM648600     1  0.1585     0.8782 0.964 0.028 0.008
#> GSM648621     1  0.1905     0.8781 0.956 0.028 0.016
#> GSM648622     1  0.0424     0.8804 0.992 0.000 0.008
#> GSM648623     1  0.0424     0.8804 0.992 0.000 0.008
#> GSM648636     1  0.1753     0.8719 0.952 0.048 0.000
#> GSM648655     1  0.3116     0.8373 0.892 0.108 0.000
#> GSM648661     1  0.0237     0.8805 0.996 0.004 0.000
#> GSM648664     1  0.0424     0.8802 0.992 0.008 0.000
#> GSM648683     1  0.0424     0.8802 0.992 0.008 0.000
#> GSM648685     1  0.0424     0.8802 0.992 0.008 0.000
#> GSM648702     1  0.1643     0.8733 0.956 0.044 0.000
#> GSM648597     1  0.1919     0.8777 0.956 0.020 0.024
#> GSM648603     1  0.0892     0.8795 0.980 0.000 0.020
#> GSM648606     1  0.6209     0.4487 0.628 0.004 0.368
#> GSM648613     1  0.6209     0.4487 0.628 0.004 0.368
#> GSM648619     1  0.1289     0.8765 0.968 0.000 0.032
#> GSM648654     1  0.3445     0.8409 0.896 0.088 0.016
#> GSM648663     1  0.5815     0.5790 0.692 0.004 0.304
#> GSM648670     1  0.7395     0.1031 0.492 0.476 0.032
#> GSM648707     3  0.0237     0.8993 0.000 0.004 0.996
#> GSM648615     2  0.7069    -0.1037 0.472 0.508 0.020
#> GSM648643     2  0.5618     0.6203 0.156 0.796 0.048
#> GSM648650     1  0.4345     0.8101 0.848 0.136 0.016
#> GSM648656     2  0.2031     0.7371 0.016 0.952 0.032
#> GSM648715     1  0.5397     0.6347 0.720 0.280 0.000
#> GSM648598     1  0.0424     0.8804 0.992 0.000 0.008
#> GSM648601     1  0.0424     0.8804 0.992 0.000 0.008
#> GSM648602     1  0.0424     0.8804 0.992 0.000 0.008
#> GSM648604     1  0.0237     0.8805 0.996 0.000 0.004
#> GSM648614     1  0.5929     0.5459 0.676 0.004 0.320
#> GSM648624     1  0.0424     0.8804 0.992 0.000 0.008
#> GSM648625     1  0.2200     0.8675 0.940 0.056 0.004
#> GSM648629     1  0.0237     0.8805 0.996 0.000 0.004
#> GSM648634     1  0.1182     0.8808 0.976 0.012 0.012
#> GSM648648     1  0.1411     0.8746 0.964 0.036 0.000
#> GSM648651     1  0.0424     0.8804 0.992 0.000 0.008
#> GSM648657     1  0.0000     0.8803 1.000 0.000 0.000
#> GSM648660     1  0.0424     0.8804 0.992 0.000 0.008
#> GSM648697     1  0.0424     0.8802 0.992 0.008 0.000
#> GSM648710     1  0.0237     0.8805 0.996 0.000 0.004
#> GSM648591     1  0.2313     0.8742 0.944 0.032 0.024
#> GSM648592     1  0.1919     0.8781 0.956 0.024 0.020
#> GSM648607     1  0.0424     0.8804 0.992 0.000 0.008
#> GSM648611     1  0.2689     0.8703 0.932 0.032 0.036
#> GSM648612     1  0.1289     0.8765 0.968 0.000 0.032
#> GSM648616     3  0.0424     0.8974 0.000 0.008 0.992
#> GSM648617     1  0.2414     0.8708 0.940 0.020 0.040
#> GSM648626     1  0.0892     0.8795 0.980 0.000 0.020
#> GSM648711     1  0.0424     0.8804 0.992 0.000 0.008
#> GSM648712     1  0.1289     0.8765 0.968 0.000 0.032
#> GSM648713     1  0.1289     0.8765 0.968 0.000 0.032
#> GSM648714     1  0.6209     0.4487 0.628 0.004 0.368
#> GSM648716     1  0.1289     0.8765 0.968 0.000 0.032
#> GSM648717     1  0.5650     0.5660 0.688 0.000 0.312
#> GSM648590     1  0.5247     0.7156 0.768 0.224 0.008
#> GSM648596     1  0.6879     0.4876 0.616 0.360 0.024
#> GSM648642     1  0.6944     0.2125 0.516 0.468 0.016
#> GSM648696     1  0.2173     0.8721 0.944 0.048 0.008
#> GSM648705     1  0.1753     0.8709 0.952 0.048 0.000
#> GSM648718     2  0.7069    -0.1037 0.472 0.508 0.020
#> GSM648599     1  0.1337     0.8805 0.972 0.012 0.016
#> GSM648608     1  0.0237     0.8805 0.996 0.000 0.004
#> GSM648609     1  0.0237     0.8805 0.996 0.000 0.004
#> GSM648610     1  0.1015     0.8807 0.980 0.008 0.012
#> GSM648633     1  0.0237     0.8805 0.996 0.000 0.004
#> GSM648644     2  0.3038     0.7803 0.000 0.896 0.104
#> GSM648652     1  0.1289     0.8756 0.968 0.032 0.000
#> GSM648653     1  0.0424     0.8804 0.992 0.000 0.008
#> GSM648658     1  0.3116     0.8373 0.892 0.108 0.000
#> GSM648659     1  0.5363     0.6648 0.724 0.276 0.000
#> GSM648662     1  0.2301     0.8621 0.936 0.004 0.060
#> GSM648665     1  0.0237     0.8805 0.996 0.004 0.000
#> GSM648666     1  0.0424     0.8804 0.992 0.000 0.008
#> GSM648680     1  0.1411     0.8746 0.964 0.036 0.000
#> GSM648684     1  0.0424     0.8802 0.992 0.008 0.000
#> GSM648709     1  0.6062     0.4490 0.616 0.384 0.000
#> GSM648719     1  0.0424     0.8804 0.992 0.000 0.008
#> GSM648627     1  0.1289     0.8767 0.968 0.000 0.032
#> GSM648637     2  0.5138     0.6940 0.000 0.748 0.252
#> GSM648638     2  0.5138     0.6940 0.000 0.748 0.252
#> GSM648641     3  0.6513    -0.0459 0.476 0.004 0.520
#> GSM648672     2  0.3482     0.7726 0.000 0.872 0.128
#> GSM648674     2  0.5216     0.6896 0.000 0.740 0.260
#> GSM648703     2  0.2945     0.7824 0.004 0.908 0.088
#> GSM648631     3  0.0747     0.9043 0.016 0.000 0.984
#> GSM648669     2  0.4121     0.7531 0.000 0.832 0.168
#> GSM648671     2  0.4121     0.7531 0.000 0.832 0.168
#> GSM648678     2  0.2959     0.7804 0.000 0.900 0.100
#> GSM648679     2  0.4178     0.7495 0.000 0.828 0.172
#> GSM648681     1  0.6955     0.1235 0.496 0.488 0.016
#> GSM648686     3  0.0983     0.9041 0.004 0.016 0.980
#> GSM648689     3  0.1031     0.8967 0.024 0.000 0.976
#> GSM648690     3  0.0983     0.9041 0.004 0.016 0.980
#> GSM648691     3  0.0983     0.9041 0.004 0.016 0.980
#> GSM648693     3  0.0747     0.9043 0.016 0.000 0.984
#> GSM648700     2  0.2945     0.7824 0.004 0.908 0.088
#> GSM648630     3  0.0983     0.9041 0.004 0.016 0.980
#> GSM648632     3  0.0747     0.9043 0.016 0.000 0.984
#> GSM648639     3  0.0424     0.8974 0.000 0.008 0.992
#> GSM648640     3  0.0424     0.8974 0.000 0.008 0.992
#> GSM648668     2  0.5744     0.7351 0.072 0.800 0.128
#> GSM648676     2  0.2945     0.7824 0.004 0.908 0.088
#> GSM648692     3  0.0983     0.9041 0.004 0.016 0.980
#> GSM648694     3  0.0747     0.9043 0.016 0.000 0.984
#> GSM648699     2  0.2945     0.7824 0.004 0.908 0.088
#> GSM648701     2  0.2945     0.7824 0.004 0.908 0.088
#> GSM648673     2  0.4121     0.7531 0.000 0.832 0.168
#> GSM648677     2  0.3038     0.7805 0.000 0.896 0.104
#> GSM648687     3  0.5094     0.7345 0.136 0.040 0.824
#> GSM648688     3  0.5094     0.7345 0.136 0.040 0.824

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM648605     2  0.3858     0.6469 0.056 0.844 0.000 0.100
#> GSM648618     1  0.5476     0.3746 0.584 0.396 0.020 0.000
#> GSM648620     2  0.4022     0.7054 0.096 0.836 0.000 0.068
#> GSM648646     4  0.4594     0.7701 0.000 0.280 0.008 0.712
#> GSM648649     1  0.4661     0.4875 0.652 0.348 0.000 0.000
#> GSM648675     2  0.5605     0.2757 0.408 0.572 0.008 0.012
#> GSM648682     4  0.4579     0.7620 0.004 0.272 0.004 0.720
#> GSM648698     2  0.3858     0.6469 0.056 0.844 0.000 0.100
#> GSM648708     2  0.3471     0.6792 0.060 0.868 0.000 0.072
#> GSM648628     1  0.3598     0.7143 0.848 0.124 0.028 0.000
#> GSM648595     2  0.5155     0.0792 0.468 0.528 0.004 0.000
#> GSM648635     1  0.4477     0.5536 0.688 0.312 0.000 0.000
#> GSM648645     1  0.2011     0.7780 0.920 0.080 0.000 0.000
#> GSM648647     2  0.3828     0.6984 0.084 0.848 0.000 0.068
#> GSM648667     2  0.5359     0.6265 0.288 0.676 0.000 0.036
#> GSM648695     2  0.4959     0.7203 0.196 0.752 0.000 0.052
#> GSM648704     4  0.3052     0.8248 0.000 0.136 0.004 0.860
#> GSM648706     4  0.3355     0.8221 0.000 0.160 0.004 0.836
#> GSM648593     1  0.4877     0.3572 0.592 0.408 0.000 0.000
#> GSM648594     1  0.4483     0.6247 0.712 0.284 0.000 0.004
#> GSM648600     1  0.4837     0.4676 0.648 0.348 0.004 0.000
#> GSM648621     1  0.2796     0.7455 0.892 0.092 0.016 0.000
#> GSM648622     1  0.1302     0.7808 0.956 0.044 0.000 0.000
#> GSM648623     1  0.0895     0.7742 0.976 0.020 0.004 0.000
#> GSM648636     1  0.4250     0.6111 0.724 0.276 0.000 0.000
#> GSM648655     1  0.4898     0.3478 0.584 0.416 0.000 0.000
#> GSM648661     1  0.1902     0.7769 0.932 0.064 0.004 0.000
#> GSM648664     1  0.2704     0.7541 0.876 0.124 0.000 0.000
#> GSM648683     1  0.2704     0.7541 0.876 0.124 0.000 0.000
#> GSM648685     1  0.2704     0.7541 0.876 0.124 0.000 0.000
#> GSM648702     1  0.4222     0.6154 0.728 0.272 0.000 0.000
#> GSM648597     1  0.3881     0.7273 0.812 0.172 0.016 0.000
#> GSM648603     1  0.3047     0.7615 0.872 0.116 0.012 0.000
#> GSM648606     1  0.6439     0.3639 0.576 0.084 0.340 0.000
#> GSM648613     1  0.6439     0.3639 0.576 0.084 0.340 0.000
#> GSM648619     1  0.2124     0.7609 0.932 0.040 0.028 0.000
#> GSM648654     1  0.3831     0.6857 0.792 0.204 0.004 0.000
#> GSM648663     1  0.6238     0.4528 0.632 0.092 0.276 0.000
#> GSM648670     2  0.7933     0.3642 0.244 0.404 0.004 0.348
#> GSM648707     3  0.2411     0.8764 0.000 0.040 0.920 0.040
#> GSM648615     2  0.4220     0.6334 0.056 0.828 0.004 0.112
#> GSM648643     4  0.5971     0.5203 0.032 0.420 0.004 0.544
#> GSM648650     1  0.4994     0.1485 0.520 0.480 0.000 0.000
#> GSM648656     4  0.4594     0.7701 0.000 0.280 0.008 0.712
#> GSM648715     2  0.5359     0.6265 0.288 0.676 0.000 0.036
#> GSM648598     1  0.1302     0.7808 0.956 0.044 0.000 0.000
#> GSM648601     1  0.0921     0.7826 0.972 0.028 0.000 0.000
#> GSM648602     1  0.0895     0.7738 0.976 0.020 0.004 0.000
#> GSM648604     1  0.1489     0.7804 0.952 0.044 0.004 0.000
#> GSM648614     1  0.6329     0.4344 0.616 0.092 0.292 0.000
#> GSM648624     1  0.1302     0.7808 0.956 0.044 0.000 0.000
#> GSM648625     1  0.4699     0.5243 0.676 0.320 0.004 0.000
#> GSM648629     1  0.1489     0.7804 0.952 0.044 0.004 0.000
#> GSM648634     1  0.1722     0.7730 0.944 0.048 0.008 0.000
#> GSM648648     1  0.4477     0.5538 0.688 0.312 0.000 0.000
#> GSM648651     1  0.0921     0.7826 0.972 0.028 0.000 0.000
#> GSM648657     1  0.2868     0.7503 0.864 0.136 0.000 0.000
#> GSM648660     1  0.1302     0.7808 0.956 0.044 0.000 0.000
#> GSM648697     1  0.2704     0.7541 0.876 0.124 0.000 0.000
#> GSM648710     1  0.1489     0.7804 0.952 0.044 0.004 0.000
#> GSM648591     1  0.4035     0.7205 0.804 0.176 0.020 0.000
#> GSM648592     1  0.3852     0.7230 0.808 0.180 0.012 0.000
#> GSM648607     1  0.1209     0.7709 0.964 0.032 0.004 0.000
#> GSM648611     1  0.3435     0.7269 0.864 0.100 0.036 0.000
#> GSM648612     1  0.2399     0.7561 0.920 0.048 0.032 0.000
#> GSM648616     3  0.2500     0.8743 0.000 0.044 0.916 0.040
#> GSM648617     1  0.5435     0.3129 0.564 0.420 0.016 0.000
#> GSM648626     1  0.3047     0.7615 0.872 0.116 0.012 0.000
#> GSM648711     1  0.0895     0.7728 0.976 0.020 0.004 0.000
#> GSM648712     1  0.2399     0.7561 0.920 0.048 0.032 0.000
#> GSM648713     1  0.2124     0.7609 0.932 0.040 0.028 0.000
#> GSM648714     1  0.6439     0.3639 0.576 0.084 0.340 0.000
#> GSM648716     1  0.2124     0.7609 0.932 0.040 0.028 0.000
#> GSM648717     1  0.6172     0.4568 0.632 0.084 0.284 0.000
#> GSM648590     2  0.5660     0.3775 0.400 0.576 0.004 0.020
#> GSM648596     2  0.5567     0.7063 0.164 0.740 0.008 0.088
#> GSM648642     2  0.3471     0.6792 0.060 0.868 0.000 0.072
#> GSM648696     1  0.5016     0.3470 0.600 0.396 0.004 0.000
#> GSM648705     1  0.4585     0.5191 0.668 0.332 0.000 0.000
#> GSM648718     2  0.4220     0.6334 0.056 0.828 0.004 0.112
#> GSM648599     1  0.2101     0.7647 0.928 0.060 0.012 0.000
#> GSM648608     1  0.1489     0.7804 0.952 0.044 0.004 0.000
#> GSM648609     1  0.1489     0.7804 0.952 0.044 0.004 0.000
#> GSM648610     1  0.2101     0.7630 0.928 0.060 0.012 0.000
#> GSM648633     1  0.2589     0.7630 0.884 0.116 0.000 0.000
#> GSM648644     4  0.2999     0.8249 0.000 0.132 0.004 0.864
#> GSM648652     1  0.4477     0.5536 0.688 0.312 0.000 0.000
#> GSM648653     1  0.0895     0.7738 0.976 0.020 0.004 0.000
#> GSM648658     1  0.4877     0.3572 0.592 0.408 0.000 0.000
#> GSM648659     2  0.5816     0.3761 0.392 0.572 0.000 0.036
#> GSM648662     1  0.3088     0.7639 0.888 0.052 0.060 0.000
#> GSM648665     1  0.1902     0.7769 0.932 0.064 0.004 0.000
#> GSM648666     1  0.0921     0.7819 0.972 0.028 0.000 0.000
#> GSM648680     1  0.4477     0.5538 0.688 0.312 0.000 0.000
#> GSM648684     1  0.2704     0.7541 0.876 0.124 0.000 0.000
#> GSM648709     2  0.4669     0.7244 0.168 0.780 0.000 0.052
#> GSM648719     1  0.1302     0.7808 0.956 0.044 0.000 0.000
#> GSM648627     1  0.2032     0.7626 0.936 0.036 0.028 0.000
#> GSM648637     4  0.4617     0.6958 0.000 0.032 0.204 0.764
#> GSM648638     4  0.4617     0.6958 0.000 0.032 0.204 0.764
#> GSM648641     3  0.6542     0.0720 0.428 0.076 0.496 0.000
#> GSM648672     4  0.3697     0.8231 0.000 0.100 0.048 0.852
#> GSM648674     4  0.4098     0.6860 0.000 0.012 0.204 0.784
#> GSM648703     4  0.4406     0.7536 0.000 0.300 0.000 0.700
#> GSM648631     3  0.0336     0.9008 0.008 0.000 0.992 0.000
#> GSM648669     4  0.2256     0.7948 0.000 0.020 0.056 0.924
#> GSM648671     4  0.2256     0.7948 0.000 0.020 0.056 0.924
#> GSM648678     4  0.2469     0.8243 0.000 0.108 0.000 0.892
#> GSM648679     4  0.2222     0.7857 0.000 0.016 0.060 0.924
#> GSM648681     2  0.6351     0.6460 0.160 0.680 0.008 0.152
#> GSM648686     3  0.0779     0.8983 0.000 0.004 0.980 0.016
#> GSM648689     3  0.0592     0.8957 0.016 0.000 0.984 0.000
#> GSM648690     3  0.0779     0.8983 0.000 0.004 0.980 0.016
#> GSM648691     3  0.0779     0.8983 0.000 0.004 0.980 0.016
#> GSM648693     3  0.0336     0.9008 0.008 0.000 0.992 0.000
#> GSM648700     4  0.4406     0.7536 0.000 0.300 0.000 0.700
#> GSM648630     3  0.0779     0.8983 0.000 0.004 0.980 0.016
#> GSM648632     3  0.0336     0.9008 0.008 0.000 0.992 0.000
#> GSM648639     3  0.2500     0.8743 0.000 0.044 0.916 0.040
#> GSM648640     3  0.2500     0.8743 0.000 0.044 0.916 0.040
#> GSM648668     4  0.5325     0.8007 0.012 0.196 0.048 0.744
#> GSM648676     4  0.4406     0.7536 0.000 0.300 0.000 0.700
#> GSM648692     3  0.0779     0.8983 0.000 0.004 0.980 0.016
#> GSM648694     3  0.0336     0.9008 0.008 0.000 0.992 0.000
#> GSM648699     4  0.4406     0.7536 0.000 0.300 0.000 0.700
#> GSM648701     4  0.4406     0.7536 0.000 0.300 0.000 0.700
#> GSM648673     4  0.2256     0.7948 0.000 0.020 0.056 0.924
#> GSM648677     4  0.2773     0.8264 0.000 0.116 0.004 0.880
#> GSM648687     3  0.4786     0.7530 0.128 0.012 0.800 0.060
#> GSM648688     3  0.4786     0.7530 0.128 0.012 0.800 0.060

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM648605     2  0.1485     0.6614 0.020 0.948 0.000 0.032 0.000
#> GSM648618     1  0.6908     0.1156 0.392 0.316 0.004 0.000 0.288
#> GSM648620     2  0.2017     0.7030 0.080 0.912 0.000 0.008 0.000
#> GSM648646     4  0.4236     0.6535 0.000 0.328 0.004 0.664 0.004
#> GSM648649     1  0.4602     0.4362 0.656 0.316 0.000 0.000 0.028
#> GSM648675     2  0.6672     0.3680 0.216 0.496 0.000 0.008 0.280
#> GSM648682     4  0.4857     0.6437 0.000 0.324 0.000 0.636 0.040
#> GSM648698     2  0.1485     0.6614 0.020 0.948 0.000 0.032 0.000
#> GSM648708     2  0.1331     0.6849 0.040 0.952 0.000 0.008 0.000
#> GSM648628     1  0.5322     0.1032 0.580 0.036 0.012 0.000 0.372
#> GSM648595     2  0.6662     0.2281 0.280 0.444 0.000 0.000 0.276
#> GSM648635     1  0.4420     0.4922 0.692 0.280 0.000 0.000 0.028
#> GSM648645     1  0.1282     0.6734 0.952 0.044 0.000 0.000 0.004
#> GSM648647     2  0.1704     0.6996 0.068 0.928 0.000 0.004 0.000
#> GSM648667     2  0.4452     0.5991 0.272 0.696 0.000 0.000 0.032
#> GSM648695     2  0.3196     0.6908 0.192 0.804 0.000 0.000 0.004
#> GSM648704     4  0.3123     0.7284 0.000 0.184 0.004 0.812 0.000
#> GSM648706     4  0.3333     0.7217 0.000 0.208 0.004 0.788 0.000
#> GSM648593     1  0.5329     0.3257 0.596 0.336 0.000 0.000 0.068
#> GSM648594     1  0.4649     0.5677 0.720 0.212 0.000 0.000 0.068
#> GSM648600     1  0.6306     0.2994 0.500 0.328 0.000 0.000 0.172
#> GSM648621     1  0.4538     0.2577 0.636 0.012 0.004 0.000 0.348
#> GSM648622     1  0.0579     0.6701 0.984 0.008 0.000 0.000 0.008
#> GSM648623     1  0.1671     0.6413 0.924 0.000 0.000 0.000 0.076
#> GSM648636     1  0.4333     0.5672 0.740 0.212 0.000 0.000 0.048
#> GSM648655     1  0.5357     0.3112 0.588 0.344 0.000 0.000 0.068
#> GSM648661     1  0.1485     0.6679 0.948 0.032 0.000 0.000 0.020
#> GSM648664     1  0.2011     0.6620 0.908 0.088 0.000 0.000 0.004
#> GSM648683     1  0.2011     0.6620 0.908 0.088 0.000 0.000 0.004
#> GSM648685     1  0.2011     0.6620 0.908 0.088 0.000 0.000 0.004
#> GSM648702     1  0.4302     0.5711 0.744 0.208 0.000 0.000 0.048
#> GSM648597     1  0.5408     0.5127 0.668 0.116 0.004 0.000 0.212
#> GSM648603     1  0.4973     0.5547 0.712 0.092 0.004 0.000 0.192
#> GSM648606     5  0.6729     0.7749 0.304 0.004 0.236 0.000 0.456
#> GSM648613     5  0.6729     0.7749 0.304 0.004 0.236 0.000 0.456
#> GSM648619     1  0.4220     0.3571 0.688 0.004 0.008 0.000 0.300
#> GSM648654     1  0.3476     0.5856 0.804 0.176 0.000 0.000 0.020
#> GSM648663     5  0.6642     0.6864 0.372 0.008 0.172 0.000 0.448
#> GSM648670     5  0.7868    -0.2703 0.068 0.320 0.000 0.264 0.348
#> GSM648707     3  0.4118     0.7915 0.000 0.008 0.772 0.032 0.188
#> GSM648615     2  0.2120     0.6486 0.020 0.924 0.004 0.048 0.004
#> GSM648643     2  0.4559    -0.4013 0.008 0.512 0.000 0.480 0.000
#> GSM648650     1  0.4894     0.1249 0.520 0.456 0.000 0.000 0.024
#> GSM648656     4  0.4236     0.6535 0.000 0.328 0.004 0.664 0.004
#> GSM648715     2  0.4452     0.5991 0.272 0.696 0.000 0.000 0.032
#> GSM648598     1  0.0579     0.6701 0.984 0.008 0.000 0.000 0.008
#> GSM648601     1  0.1300     0.6644 0.956 0.016 0.000 0.000 0.028
#> GSM648602     1  0.2890     0.5716 0.836 0.004 0.000 0.000 0.160
#> GSM648604     1  0.1012     0.6664 0.968 0.012 0.000 0.000 0.020
#> GSM648614     5  0.6699     0.7387 0.336 0.008 0.192 0.000 0.464
#> GSM648624     1  0.0579     0.6701 0.984 0.008 0.000 0.000 0.008
#> GSM648625     1  0.4988     0.5164 0.656 0.284 0.000 0.000 0.060
#> GSM648629     1  0.1012     0.6664 0.968 0.012 0.000 0.000 0.020
#> GSM648634     1  0.3596     0.5343 0.784 0.016 0.000 0.000 0.200
#> GSM648648     1  0.4420     0.4928 0.692 0.280 0.000 0.000 0.028
#> GSM648651     1  0.1300     0.6644 0.956 0.016 0.000 0.000 0.028
#> GSM648657     1  0.2470     0.6621 0.884 0.104 0.000 0.000 0.012
#> GSM648660     1  0.0579     0.6701 0.984 0.008 0.000 0.000 0.008
#> GSM648697     1  0.2011     0.6620 0.908 0.088 0.000 0.000 0.004
#> GSM648710     1  0.1012     0.6664 0.968 0.012 0.000 0.000 0.020
#> GSM648591     1  0.5772     0.3581 0.592 0.104 0.004 0.000 0.300
#> GSM648592     1  0.5476     0.5101 0.664 0.128 0.004 0.000 0.204
#> GSM648607     1  0.3143     0.5338 0.796 0.000 0.000 0.000 0.204
#> GSM648611     1  0.4965     0.1080 0.588 0.016 0.012 0.000 0.384
#> GSM648612     1  0.4434     0.2400 0.640 0.004 0.008 0.000 0.348
#> GSM648616     3  0.4153     0.7903 0.000 0.008 0.768 0.032 0.192
#> GSM648617     1  0.6792     0.0193 0.372 0.340 0.000 0.000 0.288
#> GSM648626     1  0.4973     0.5547 0.712 0.092 0.004 0.000 0.192
#> GSM648711     1  0.2813     0.5663 0.832 0.000 0.000 0.000 0.168
#> GSM648712     1  0.4434     0.2400 0.640 0.004 0.008 0.000 0.348
#> GSM648713     1  0.4111     0.3993 0.708 0.004 0.008 0.000 0.280
#> GSM648714     5  0.6729     0.7749 0.304 0.004 0.236 0.000 0.456
#> GSM648716     1  0.4353     0.2920 0.660 0.004 0.008 0.000 0.328
#> GSM648717     5  0.6662     0.7211 0.340 0.008 0.184 0.000 0.468
#> GSM648590     2  0.6460     0.4400 0.284 0.548 0.000 0.016 0.152
#> GSM648596     2  0.5748     0.6573 0.092 0.704 0.004 0.052 0.148
#> GSM648642     2  0.1331     0.6849 0.040 0.952 0.000 0.008 0.000
#> GSM648696     1  0.6282     0.1811 0.476 0.368 0.000 0.000 0.156
#> GSM648705     1  0.4445     0.4714 0.676 0.300 0.000 0.000 0.024
#> GSM648718     2  0.2120     0.6486 0.020 0.924 0.004 0.048 0.004
#> GSM648599     1  0.4142     0.4543 0.728 0.016 0.004 0.000 0.252
#> GSM648608     1  0.1012     0.6664 0.968 0.012 0.000 0.000 0.020
#> GSM648609     1  0.1012     0.6664 0.968 0.012 0.000 0.000 0.020
#> GSM648610     1  0.4015     0.4382 0.724 0.008 0.004 0.000 0.264
#> GSM648633     1  0.2889     0.6637 0.872 0.084 0.000 0.000 0.044
#> GSM648644     4  0.3086     0.7291 0.000 0.180 0.004 0.816 0.000
#> GSM648652     1  0.4420     0.4922 0.692 0.280 0.000 0.000 0.028
#> GSM648653     1  0.2890     0.5716 0.836 0.004 0.000 0.000 0.160
#> GSM648658     1  0.5329     0.3257 0.596 0.336 0.000 0.000 0.068
#> GSM648659     2  0.6142     0.3370 0.380 0.512 0.000 0.012 0.096
#> GSM648662     1  0.4368     0.5917 0.796 0.032 0.056 0.000 0.116
#> GSM648665     1  0.1485     0.6679 0.948 0.032 0.000 0.000 0.020
#> GSM648666     1  0.1211     0.6657 0.960 0.016 0.000 0.000 0.024
#> GSM648680     1  0.4420     0.4928 0.692 0.280 0.000 0.000 0.028
#> GSM648684     1  0.2011     0.6620 0.908 0.088 0.000 0.000 0.004
#> GSM648709     2  0.3123     0.7047 0.160 0.828 0.000 0.000 0.012
#> GSM648719     1  0.0579     0.6701 0.984 0.008 0.000 0.000 0.008
#> GSM648627     1  0.4194     0.3935 0.708 0.004 0.012 0.000 0.276
#> GSM648637     4  0.5596     0.5882 0.000 0.016 0.160 0.680 0.144
#> GSM648638     4  0.5596     0.5882 0.000 0.016 0.160 0.680 0.144
#> GSM648641     5  0.6437     0.4483 0.156 0.004 0.376 0.000 0.464
#> GSM648672     4  0.3688     0.7363 0.000 0.124 0.028 0.828 0.020
#> GSM648674     4  0.5494     0.5518 0.000 0.004 0.172 0.668 0.156
#> GSM648703     4  0.6562     0.5600 0.000 0.264 0.004 0.504 0.228
#> GSM648631     3  0.0404     0.8953 0.000 0.000 0.988 0.000 0.012
#> GSM648669     4  0.3563     0.6794 0.000 0.008 0.028 0.824 0.140
#> GSM648671     4  0.3563     0.6794 0.000 0.008 0.028 0.824 0.140
#> GSM648678     4  0.2719     0.7350 0.000 0.144 0.004 0.852 0.000
#> GSM648679     4  0.3730     0.6705 0.000 0.004 0.036 0.808 0.152
#> GSM648681     2  0.6349     0.6036 0.120 0.660 0.004 0.076 0.140
#> GSM648686     3  0.0798     0.8941 0.000 0.000 0.976 0.016 0.008
#> GSM648689     3  0.0794     0.8902 0.000 0.000 0.972 0.000 0.028
#> GSM648690     3  0.0798     0.8941 0.000 0.000 0.976 0.016 0.008
#> GSM648691     3  0.0510     0.8947 0.000 0.000 0.984 0.016 0.000
#> GSM648693     3  0.0404     0.8953 0.000 0.000 0.988 0.000 0.012
#> GSM648700     4  0.6562     0.5600 0.000 0.264 0.004 0.504 0.228
#> GSM648630     3  0.0510     0.8947 0.000 0.000 0.984 0.016 0.000
#> GSM648632     3  0.0404     0.8953 0.000 0.000 0.988 0.000 0.012
#> GSM648639     3  0.4153     0.7903 0.000 0.008 0.768 0.032 0.192
#> GSM648640     3  0.4153     0.7903 0.000 0.008 0.768 0.032 0.192
#> GSM648668     4  0.4944     0.7084 0.000 0.204 0.028 0.724 0.044
#> GSM648676     4  0.6562     0.5600 0.000 0.264 0.004 0.504 0.228
#> GSM648692     3  0.0510     0.8947 0.000 0.000 0.984 0.016 0.000
#> GSM648694     3  0.0404     0.8953 0.000 0.000 0.988 0.000 0.012
#> GSM648699     4  0.6562     0.5600 0.000 0.264 0.004 0.504 0.228
#> GSM648701     4  0.6562     0.5600 0.000 0.264 0.004 0.504 0.228
#> GSM648673     4  0.3563     0.6794 0.000 0.008 0.028 0.824 0.140
#> GSM648677     4  0.3239     0.7358 0.000 0.156 0.004 0.828 0.012
#> GSM648687     3  0.3937     0.6872 0.132 0.000 0.804 0.060 0.004
#> GSM648688     3  0.3937     0.6872 0.132 0.000 0.804 0.060 0.004

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM648605     2  0.1124     0.6195 0.008 0.956 0.000 0.036 0.000 0.000
#> GSM648618     5  0.6861    -0.0331 0.324 0.296 0.000 0.000 0.336 0.044
#> GSM648620     2  0.1524     0.6545 0.060 0.932 0.000 0.008 0.000 0.000
#> GSM648646     4  0.4042     0.5299 0.000 0.316 0.004 0.664 0.000 0.016
#> GSM648649     1  0.4569     0.4409 0.636 0.320 0.000 0.000 0.028 0.016
#> GSM648675     2  0.6692     0.3785 0.160 0.480 0.000 0.008 0.300 0.052
#> GSM648682     4  0.4508     0.5318 0.000 0.316 0.000 0.632 0.000 0.052
#> GSM648698     2  0.1124     0.6195 0.008 0.956 0.000 0.036 0.000 0.000
#> GSM648708     2  0.0806     0.6367 0.020 0.972 0.000 0.008 0.000 0.000
#> GSM648628     5  0.4632     0.3636 0.436 0.016 0.000 0.000 0.532 0.016
#> GSM648595     2  0.6841     0.2624 0.232 0.432 0.000 0.000 0.276 0.060
#> GSM648635     1  0.4383     0.5005 0.680 0.276 0.000 0.000 0.024 0.020
#> GSM648645     1  0.1461     0.6399 0.940 0.044 0.000 0.000 0.016 0.000
#> GSM648647     2  0.1285     0.6520 0.052 0.944 0.000 0.004 0.000 0.000
#> GSM648667     2  0.4113     0.5718 0.244 0.712 0.000 0.000 0.040 0.004
#> GSM648695     2  0.2738     0.6490 0.176 0.820 0.000 0.000 0.004 0.000
#> GSM648704     4  0.2879     0.5895 0.000 0.176 0.004 0.816 0.000 0.004
#> GSM648706     4  0.3074     0.5799 0.000 0.200 0.004 0.792 0.000 0.004
#> GSM648593     1  0.5367     0.3577 0.584 0.320 0.000 0.000 0.028 0.068
#> GSM648594     1  0.4683     0.5295 0.704 0.204 0.000 0.000 0.072 0.020
#> GSM648600     1  0.6193     0.1982 0.456 0.332 0.000 0.000 0.196 0.016
#> GSM648621     1  0.4185    -0.2997 0.496 0.000 0.000 0.000 0.492 0.012
#> GSM648622     1  0.0806     0.6320 0.972 0.008 0.000 0.000 0.020 0.000
#> GSM648623     1  0.1765     0.5870 0.904 0.000 0.000 0.000 0.096 0.000
#> GSM648636     1  0.4179     0.5754 0.736 0.204 0.000 0.000 0.012 0.048
#> GSM648655     1  0.5393     0.3436 0.576 0.328 0.000 0.000 0.028 0.068
#> GSM648661     1  0.1565     0.6288 0.940 0.028 0.000 0.000 0.028 0.004
#> GSM648664     1  0.2009     0.6291 0.904 0.084 0.000 0.000 0.008 0.004
#> GSM648683     1  0.2009     0.6291 0.904 0.084 0.000 0.000 0.008 0.004
#> GSM648685     1  0.2009     0.6291 0.904 0.084 0.000 0.000 0.008 0.004
#> GSM648702     1  0.4117     0.5771 0.740 0.204 0.000 0.000 0.012 0.044
#> GSM648597     1  0.5598     0.2979 0.576 0.104 0.000 0.000 0.296 0.024
#> GSM648603     1  0.5327     0.3453 0.616 0.096 0.000 0.000 0.268 0.020
#> GSM648606     5  0.4200     0.6795 0.164 0.000 0.088 0.000 0.744 0.004
#> GSM648613     5  0.4200     0.6795 0.164 0.000 0.088 0.000 0.744 0.004
#> GSM648619     1  0.3847    -0.1785 0.544 0.000 0.000 0.000 0.456 0.000
#> GSM648654     1  0.3385     0.5317 0.796 0.172 0.000 0.000 0.028 0.004
#> GSM648663     5  0.4393     0.6631 0.228 0.004 0.056 0.000 0.708 0.004
#> GSM648670     2  0.8081     0.0911 0.028 0.300 0.000 0.252 0.268 0.152
#> GSM648707     3  0.6903     0.4390 0.000 0.016 0.392 0.028 0.336 0.228
#> GSM648615     2  0.1901     0.6065 0.008 0.924 0.004 0.052 0.000 0.012
#> GSM648643     2  0.4127    -0.3771 0.004 0.508 0.000 0.484 0.000 0.004
#> GSM648650     1  0.4797     0.1327 0.500 0.460 0.000 0.000 0.024 0.016
#> GSM648656     4  0.4042     0.5299 0.000 0.316 0.004 0.664 0.000 0.016
#> GSM648715     2  0.4113     0.5718 0.244 0.712 0.000 0.000 0.040 0.004
#> GSM648598     1  0.0806     0.6320 0.972 0.008 0.000 0.000 0.020 0.000
#> GSM648601     1  0.1461     0.6268 0.940 0.016 0.000 0.000 0.044 0.000
#> GSM648602     1  0.3330     0.3510 0.716 0.000 0.000 0.000 0.284 0.000
#> GSM648604     1  0.0972     0.6256 0.964 0.008 0.000 0.000 0.028 0.000
#> GSM648614     5  0.4226     0.6796 0.188 0.004 0.064 0.000 0.740 0.004
#> GSM648624     1  0.0806     0.6320 0.972 0.008 0.000 0.000 0.020 0.000
#> GSM648625     1  0.4814     0.4593 0.616 0.304 0.000 0.000 0.080 0.000
#> GSM648629     1  0.0972     0.6256 0.964 0.008 0.000 0.000 0.028 0.000
#> GSM648634     1  0.3805     0.2631 0.664 0.004 0.000 0.000 0.328 0.004
#> GSM648648     1  0.4383     0.5018 0.680 0.276 0.000 0.000 0.024 0.020
#> GSM648651     1  0.1461     0.6268 0.940 0.016 0.000 0.000 0.044 0.000
#> GSM648657     1  0.2405     0.6337 0.880 0.100 0.000 0.000 0.016 0.004
#> GSM648660     1  0.0806     0.6320 0.972 0.008 0.000 0.000 0.020 0.000
#> GSM648697     1  0.2009     0.6291 0.904 0.084 0.000 0.000 0.008 0.004
#> GSM648710     1  0.0972     0.6256 0.964 0.008 0.000 0.000 0.028 0.000
#> GSM648591     1  0.5858     0.0536 0.500 0.096 0.000 0.000 0.372 0.032
#> GSM648592     1  0.5732     0.3027 0.572 0.116 0.000 0.000 0.284 0.028
#> GSM648607     1  0.3531     0.2625 0.672 0.000 0.000 0.000 0.328 0.000
#> GSM648611     5  0.4157     0.3725 0.444 0.000 0.000 0.000 0.544 0.012
#> GSM648612     5  0.3868     0.2726 0.496 0.000 0.000 0.000 0.504 0.000
#> GSM648616     3  0.6903     0.4396 0.000 0.016 0.392 0.028 0.336 0.228
#> GSM648617     2  0.6481    -0.0468 0.328 0.352 0.000 0.000 0.304 0.016
#> GSM648626     1  0.5327     0.3453 0.616 0.096 0.000 0.000 0.268 0.020
#> GSM648711     1  0.3330     0.3494 0.716 0.000 0.000 0.000 0.284 0.000
#> GSM648712     5  0.3868     0.2726 0.496 0.000 0.000 0.000 0.504 0.000
#> GSM648713     1  0.3823    -0.0979 0.564 0.000 0.000 0.000 0.436 0.000
#> GSM648714     5  0.4200     0.6795 0.164 0.000 0.088 0.000 0.744 0.004
#> GSM648716     1  0.3866    -0.2776 0.516 0.000 0.000 0.000 0.484 0.000
#> GSM648717     5  0.4256     0.6745 0.192 0.004 0.064 0.000 0.736 0.004
#> GSM648590     2  0.6549     0.4506 0.248 0.536 0.000 0.016 0.156 0.044
#> GSM648596     2  0.5716     0.6070 0.060 0.692 0.004 0.052 0.144 0.048
#> GSM648642     2  0.0806     0.6367 0.020 0.972 0.000 0.008 0.000 0.000
#> GSM648696     1  0.6199     0.1070 0.436 0.372 0.000 0.000 0.172 0.020
#> GSM648705     1  0.4433     0.4747 0.656 0.304 0.000 0.000 0.024 0.016
#> GSM648718     2  0.1901     0.6065 0.008 0.924 0.004 0.052 0.000 0.012
#> GSM648599     1  0.4006     0.0647 0.600 0.004 0.000 0.000 0.392 0.004
#> GSM648608     1  0.0972     0.6256 0.964 0.008 0.000 0.000 0.028 0.000
#> GSM648609     1  0.0972     0.6256 0.964 0.008 0.000 0.000 0.028 0.000
#> GSM648610     1  0.4002     0.0110 0.588 0.000 0.000 0.000 0.404 0.008
#> GSM648633     1  0.2876     0.6215 0.860 0.080 0.000 0.000 0.056 0.004
#> GSM648644     4  0.2845     0.5890 0.000 0.172 0.004 0.820 0.000 0.004
#> GSM648652     1  0.4383     0.5005 0.680 0.276 0.000 0.000 0.024 0.020
#> GSM648653     1  0.3330     0.3510 0.716 0.000 0.000 0.000 0.284 0.000
#> GSM648658     1  0.5367     0.3577 0.584 0.320 0.000 0.000 0.028 0.068
#> GSM648659     2  0.6300     0.2606 0.364 0.476 0.000 0.012 0.028 0.120
#> GSM648662     1  0.4963     0.4233 0.672 0.032 0.048 0.000 0.244 0.004
#> GSM648665     1  0.1565     0.6288 0.940 0.028 0.000 0.000 0.028 0.004
#> GSM648666     1  0.1536     0.6309 0.940 0.016 0.000 0.000 0.040 0.004
#> GSM648680     1  0.4383     0.5018 0.680 0.276 0.000 0.000 0.024 0.020
#> GSM648684     1  0.2009     0.6291 0.904 0.084 0.000 0.000 0.008 0.004
#> GSM648709     2  0.2704     0.6593 0.140 0.844 0.000 0.000 0.016 0.000
#> GSM648719     1  0.0806     0.6320 0.972 0.008 0.000 0.000 0.020 0.000
#> GSM648627     1  0.3823    -0.1108 0.564 0.000 0.000 0.000 0.436 0.000
#> GSM648637     4  0.5387     0.5567 0.000 0.016 0.076 0.656 0.024 0.228
#> GSM648638     4  0.5387     0.5567 0.000 0.016 0.076 0.656 0.024 0.228
#> GSM648641     5  0.4256     0.3518 0.032 0.000 0.196 0.000 0.740 0.032
#> GSM648672     4  0.3150     0.6227 0.000 0.120 0.000 0.828 0.000 0.052
#> GSM648674     4  0.5129     0.5209 0.000 0.000 0.080 0.624 0.016 0.280
#> GSM648703     6  0.4964     1.0000 0.000 0.072 0.000 0.388 0.000 0.540
#> GSM648631     3  0.0363     0.8021 0.000 0.000 0.988 0.000 0.012 0.000
#> GSM648669     4  0.2969     0.5930 0.000 0.000 0.000 0.776 0.000 0.224
#> GSM648671     4  0.2941     0.5946 0.000 0.000 0.000 0.780 0.000 0.220
#> GSM648678     4  0.2362     0.5963 0.000 0.136 0.004 0.860 0.000 0.000
#> GSM648679     4  0.3050     0.5922 0.000 0.000 0.000 0.764 0.000 0.236
#> GSM648681     2  0.6417     0.5534 0.096 0.644 0.004 0.056 0.084 0.116
#> GSM648686     3  0.1262     0.7945 0.000 0.000 0.956 0.016 0.020 0.008
#> GSM648689     3  0.1196     0.7919 0.000 0.000 0.952 0.000 0.040 0.008
#> GSM648690     3  0.1262     0.7945 0.000 0.000 0.956 0.016 0.020 0.008
#> GSM648691     3  0.0458     0.7998 0.000 0.000 0.984 0.016 0.000 0.000
#> GSM648693     3  0.0363     0.8021 0.000 0.000 0.988 0.000 0.012 0.000
#> GSM648700     6  0.4964     1.0000 0.000 0.072 0.000 0.388 0.000 0.540
#> GSM648630     3  0.0458     0.7998 0.000 0.000 0.984 0.016 0.000 0.000
#> GSM648632     3  0.0363     0.8021 0.000 0.000 0.988 0.000 0.012 0.000
#> GSM648639     3  0.6903     0.4396 0.000 0.016 0.392 0.028 0.336 0.228
#> GSM648640     3  0.6903     0.4396 0.000 0.016 0.392 0.028 0.336 0.228
#> GSM648668     4  0.4680     0.5531 0.000 0.200 0.000 0.700 0.012 0.088
#> GSM648676     6  0.4964     1.0000 0.000 0.072 0.000 0.388 0.000 0.540
#> GSM648692     3  0.0458     0.7998 0.000 0.000 0.984 0.016 0.000 0.000
#> GSM648694     3  0.0363     0.8021 0.000 0.000 0.988 0.000 0.012 0.000
#> GSM648699     6  0.4964     1.0000 0.000 0.072 0.000 0.388 0.000 0.540
#> GSM648701     6  0.4964     1.0000 0.000 0.072 0.000 0.388 0.000 0.540
#> GSM648673     4  0.2941     0.5946 0.000 0.000 0.000 0.780 0.000 0.220
#> GSM648677     4  0.3332     0.5586 0.000 0.144 0.000 0.808 0.000 0.048
#> GSM648687     3  0.3871     0.6623 0.128 0.000 0.800 0.032 0.004 0.036
#> GSM648688     3  0.3871     0.6623 0.128 0.000 0.800 0.032 0.004 0.036

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-MAD-hclust-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-MAD-hclust-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-MAD-hclust-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-MAD-hclust-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-MAD-hclust-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-MAD-hclust-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-MAD-hclust-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-MAD-hclust-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-MAD-hclust-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-MAD-hclust-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-MAD-hclust-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-MAD-hclust-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-MAD-hclust-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-MAD-hclust-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-MAD-hclust-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-MAD-hclust-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)
#> Error in mat[ceiling(1:nr/h_ratio), ceiling(1:nc/w_ratio), drop = FALSE]: subscript out of bounds

plot of chunk tab-MAD-hclust-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-MAD-hclust-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-MAD-hclust-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-MAD-hclust-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk MAD-hclust-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-MAD-hclust-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-MAD-hclust-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-MAD-hclust-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-MAD-hclust-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-MAD-hclust-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk MAD-hclust-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>              n disease.state(p) development.stage(p) other(p) k
#> MAD:hclust 115         2.78e-08              0.01265 5.48e-09 2
#> MAD:hclust 113         6.82e-18              0.00946 4.92e-17 3
#> MAD:hclust 109         1.66e-15              0.00333 2.11e-24 4
#> MAD:hclust  97         3.10e-13              0.00817 5.49e-26 5
#> MAD:hclust  86         1.44e-12              0.02909 1.46e-28 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


MAD:kmeans

The object with results only for a single top-value method and a single partition method can be extracted as:

res = res_list["MAD", "kmeans"]
# you can also extract it by
# res = res_list["MAD:kmeans"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 130 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#>   Subgroups are detected by 'kmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk MAD-kmeans-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk MAD-kmeans-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.635           0.812       0.920         0.4682 0.527   0.527
#> 3 3 0.620           0.785       0.859         0.3242 0.792   0.629
#> 4 4 0.590           0.627       0.766         0.1512 0.808   0.554
#> 5 5 0.672           0.767       0.826         0.0816 0.816   0.458
#> 6 6 0.701           0.678       0.804         0.0475 0.995   0.979

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 2

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM648605     2  0.6712      0.717 0.176 0.824
#> GSM648618     1  0.0000      0.931 1.000 0.000
#> GSM648620     1  0.8661      0.585 0.712 0.288
#> GSM648646     2  0.0000      0.862 0.000 1.000
#> GSM648649     1  0.6343      0.766 0.840 0.160
#> GSM648675     2  0.0672      0.858 0.008 0.992
#> GSM648682     2  0.0000      0.862 0.000 1.000
#> GSM648698     2  0.0000      0.862 0.000 1.000
#> GSM648708     1  0.8661      0.585 0.712 0.288
#> GSM648628     1  0.0000      0.931 1.000 0.000
#> GSM648595     1  0.8661      0.585 0.712 0.288
#> GSM648635     1  0.0000      0.931 1.000 0.000
#> GSM648645     1  0.0000      0.931 1.000 0.000
#> GSM648647     2  0.9933      0.128 0.452 0.548
#> GSM648667     1  0.8661      0.585 0.712 0.288
#> GSM648695     1  0.9710      0.351 0.600 0.400
#> GSM648704     2  0.0000      0.862 0.000 1.000
#> GSM648706     2  0.0000      0.862 0.000 1.000
#> GSM648593     1  0.0000      0.931 1.000 0.000
#> GSM648594     1  0.0000      0.931 1.000 0.000
#> GSM648600     1  0.0000      0.931 1.000 0.000
#> GSM648621     1  0.0000      0.931 1.000 0.000
#> GSM648622     1  0.0000      0.931 1.000 0.000
#> GSM648623     1  0.0000      0.931 1.000 0.000
#> GSM648636     1  0.0000      0.931 1.000 0.000
#> GSM648655     1  0.0000      0.931 1.000 0.000
#> GSM648661     1  0.0000      0.931 1.000 0.000
#> GSM648664     1  0.0000      0.931 1.000 0.000
#> GSM648683     1  0.0000      0.931 1.000 0.000
#> GSM648685     1  0.0000      0.931 1.000 0.000
#> GSM648702     1  0.0000      0.931 1.000 0.000
#> GSM648597     1  0.0000      0.931 1.000 0.000
#> GSM648603     1  0.0000      0.931 1.000 0.000
#> GSM648606     1  0.0000      0.931 1.000 0.000
#> GSM648613     1  0.0000      0.931 1.000 0.000
#> GSM648619     1  0.0000      0.931 1.000 0.000
#> GSM648654     1  0.0000      0.931 1.000 0.000
#> GSM648663     1  0.0000      0.931 1.000 0.000
#> GSM648670     2  0.0000      0.862 0.000 1.000
#> GSM648707     2  0.9732      0.453 0.404 0.596
#> GSM648615     2  0.0000      0.862 0.000 1.000
#> GSM648643     2  0.0000      0.862 0.000 1.000
#> GSM648650     1  0.8661      0.585 0.712 0.288
#> GSM648656     2  0.0000      0.862 0.000 1.000
#> GSM648715     1  0.9732      0.341 0.596 0.404
#> GSM648598     1  0.0000      0.931 1.000 0.000
#> GSM648601     1  0.0000      0.931 1.000 0.000
#> GSM648602     1  0.0000      0.931 1.000 0.000
#> GSM648604     1  0.0000      0.931 1.000 0.000
#> GSM648614     1  0.0000      0.931 1.000 0.000
#> GSM648624     1  0.0000      0.931 1.000 0.000
#> GSM648625     1  0.0000      0.931 1.000 0.000
#> GSM648629     1  0.0000      0.931 1.000 0.000
#> GSM648634     1  0.0000      0.931 1.000 0.000
#> GSM648648     1  0.0000      0.931 1.000 0.000
#> GSM648651     1  0.0000      0.931 1.000 0.000
#> GSM648657     1  0.0000      0.931 1.000 0.000
#> GSM648660     1  0.0000      0.931 1.000 0.000
#> GSM648697     1  0.0000      0.931 1.000 0.000
#> GSM648710     1  0.0000      0.931 1.000 0.000
#> GSM648591     1  0.0000      0.931 1.000 0.000
#> GSM648592     1  0.0000      0.931 1.000 0.000
#> GSM648607     1  0.0000      0.931 1.000 0.000
#> GSM648611     1  0.0000      0.931 1.000 0.000
#> GSM648612     1  0.0000      0.931 1.000 0.000
#> GSM648616     2  0.0000      0.862 0.000 1.000
#> GSM648617     1  0.0000      0.931 1.000 0.000
#> GSM648626     1  0.0000      0.931 1.000 0.000
#> GSM648711     1  0.0000      0.931 1.000 0.000
#> GSM648712     1  0.0000      0.931 1.000 0.000
#> GSM648713     1  0.0000      0.931 1.000 0.000
#> GSM648714     2  0.9993      0.142 0.484 0.516
#> GSM648716     1  0.0000      0.931 1.000 0.000
#> GSM648717     1  0.0000      0.931 1.000 0.000
#> GSM648590     1  0.9775      0.319 0.588 0.412
#> GSM648596     2  0.7219      0.687 0.200 0.800
#> GSM648642     2  0.9933      0.128 0.452 0.548
#> GSM648696     1  0.7376      0.705 0.792 0.208
#> GSM648705     1  0.6343      0.766 0.840 0.160
#> GSM648718     2  0.1414      0.851 0.020 0.980
#> GSM648599     1  0.0000      0.931 1.000 0.000
#> GSM648608     1  0.0000      0.931 1.000 0.000
#> GSM648609     1  0.0000      0.931 1.000 0.000
#> GSM648610     1  0.0000      0.931 1.000 0.000
#> GSM648633     1  0.0000      0.931 1.000 0.000
#> GSM648644     2  0.0000      0.862 0.000 1.000
#> GSM648652     1  0.0000      0.931 1.000 0.000
#> GSM648653     1  0.0000      0.931 1.000 0.000
#> GSM648658     1  0.0000      0.931 1.000 0.000
#> GSM648659     1  0.9732      0.341 0.596 0.404
#> GSM648662     1  0.0000      0.931 1.000 0.000
#> GSM648665     1  0.0000      0.931 1.000 0.000
#> GSM648666     1  0.0000      0.931 1.000 0.000
#> GSM648680     1  0.0000      0.931 1.000 0.000
#> GSM648684     1  0.0000      0.931 1.000 0.000
#> GSM648709     1  0.9732      0.341 0.596 0.404
#> GSM648719     1  0.0000      0.931 1.000 0.000
#> GSM648627     1  0.0000      0.931 1.000 0.000
#> GSM648637     2  0.0000      0.862 0.000 1.000
#> GSM648638     2  0.0000      0.862 0.000 1.000
#> GSM648641     2  0.9732      0.453 0.404 0.596
#> GSM648672     2  0.0000      0.862 0.000 1.000
#> GSM648674     2  0.0000      0.862 0.000 1.000
#> GSM648703     2  0.0000      0.862 0.000 1.000
#> GSM648631     1  0.8386      0.535 0.732 0.268
#> GSM648669     2  0.0000      0.862 0.000 1.000
#> GSM648671     2  0.0000      0.862 0.000 1.000
#> GSM648678     2  0.0000      0.862 0.000 1.000
#> GSM648679     2  0.0000      0.862 0.000 1.000
#> GSM648681     2  0.4161      0.808 0.084 0.916
#> GSM648686     2  0.6343      0.767 0.160 0.840
#> GSM648689     2  0.9129      0.585 0.328 0.672
#> GSM648690     2  0.6343      0.767 0.160 0.840
#> GSM648691     2  0.9087      0.591 0.324 0.676
#> GSM648693     2  0.9732      0.453 0.404 0.596
#> GSM648700     2  0.0000      0.862 0.000 1.000
#> GSM648630     2  0.8909      0.612 0.308 0.692
#> GSM648632     1  0.8386      0.535 0.732 0.268
#> GSM648639     2  0.0000      0.862 0.000 1.000
#> GSM648640     2  0.6438      0.764 0.164 0.836
#> GSM648668     2  0.0000      0.862 0.000 1.000
#> GSM648676     2  0.0000      0.862 0.000 1.000
#> GSM648692     2  0.7219      0.732 0.200 0.800
#> GSM648694     2  0.9087      0.591 0.324 0.676
#> GSM648699     2  0.0000      0.862 0.000 1.000
#> GSM648701     2  0.0000      0.862 0.000 1.000
#> GSM648673     2  0.0000      0.862 0.000 1.000
#> GSM648677     2  0.0000      0.862 0.000 1.000
#> GSM648687     2  0.9661      0.477 0.392 0.608
#> GSM648688     2  0.9795      0.427 0.416 0.584

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM648605     2  0.3765      0.732 0.084 0.888 0.028
#> GSM648618     1  0.5731      0.793 0.804 0.088 0.108
#> GSM648620     1  0.6295      0.317 0.528 0.472 0.000
#> GSM648646     2  0.3879      0.805 0.000 0.848 0.152
#> GSM648649     1  0.4062      0.815 0.836 0.164 0.000
#> GSM648675     2  0.1860      0.746 0.000 0.948 0.052
#> GSM648682     2  0.3941      0.805 0.000 0.844 0.156
#> GSM648698     2  0.0829      0.770 0.004 0.984 0.012
#> GSM648708     1  0.6299      0.306 0.524 0.476 0.000
#> GSM648628     3  0.5560      0.641 0.300 0.000 0.700
#> GSM648595     1  0.6079      0.466 0.612 0.388 0.000
#> GSM648635     1  0.3879      0.824 0.848 0.152 0.000
#> GSM648645     1  0.0747      0.884 0.984 0.016 0.000
#> GSM648647     2  0.3619      0.671 0.136 0.864 0.000
#> GSM648667     1  0.6192      0.425 0.580 0.420 0.000
#> GSM648695     2  0.5882      0.301 0.348 0.652 0.000
#> GSM648704     2  0.4842      0.805 0.000 0.776 0.224
#> GSM648706     2  0.4750      0.807 0.000 0.784 0.216
#> GSM648593     1  0.3879      0.824 0.848 0.152 0.000
#> GSM648594     1  0.3879      0.824 0.848 0.152 0.000
#> GSM648600     1  0.2261      0.860 0.932 0.000 0.068
#> GSM648621     1  0.2261      0.860 0.932 0.000 0.068
#> GSM648622     1  0.0000      0.886 1.000 0.000 0.000
#> GSM648623     1  0.2261      0.860 0.932 0.000 0.068
#> GSM648636     1  0.3941      0.821 0.844 0.156 0.000
#> GSM648655     1  0.3879      0.824 0.848 0.152 0.000
#> GSM648661     1  0.1163      0.882 0.972 0.028 0.000
#> GSM648664     1  0.1163      0.882 0.972 0.028 0.000
#> GSM648683     1  0.1163      0.882 0.972 0.028 0.000
#> GSM648685     1  0.3192      0.846 0.888 0.112 0.000
#> GSM648702     1  0.3879      0.824 0.848 0.152 0.000
#> GSM648597     1  0.2261      0.860 0.932 0.000 0.068
#> GSM648603     1  0.2261      0.860 0.932 0.000 0.068
#> GSM648606     3  0.6437      0.710 0.220 0.048 0.732
#> GSM648613     3  0.6437      0.710 0.220 0.048 0.732
#> GSM648619     1  0.2261      0.860 0.932 0.000 0.068
#> GSM648654     1  0.2356      0.868 0.928 0.072 0.000
#> GSM648663     3  0.7306      0.526 0.340 0.044 0.616
#> GSM648670     2  0.4974      0.791 0.000 0.764 0.236
#> GSM648707     3  0.0592      0.805 0.012 0.000 0.988
#> GSM648615     2  0.4235      0.794 0.000 0.824 0.176
#> GSM648643     2  0.0829      0.770 0.004 0.984 0.012
#> GSM648650     1  0.6215      0.434 0.572 0.428 0.000
#> GSM648656     2  0.4605      0.809 0.000 0.796 0.204
#> GSM648715     2  0.5178      0.529 0.256 0.744 0.000
#> GSM648598     1  0.0237      0.886 0.996 0.004 0.000
#> GSM648601     1  0.0000      0.886 1.000 0.000 0.000
#> GSM648602     1  0.0000      0.886 1.000 0.000 0.000
#> GSM648604     1  0.0237      0.886 0.996 0.004 0.000
#> GSM648614     1  0.6798      0.571 0.696 0.048 0.256
#> GSM648624     1  0.0237      0.886 0.996 0.004 0.000
#> GSM648625     1  0.0000      0.886 1.000 0.000 0.000
#> GSM648629     1  0.0237      0.886 0.996 0.004 0.000
#> GSM648634     1  0.0237      0.886 0.996 0.004 0.000
#> GSM648648     1  0.3879      0.824 0.848 0.152 0.000
#> GSM648651     1  0.0000      0.886 1.000 0.000 0.000
#> GSM648657     1  0.0000      0.886 1.000 0.000 0.000
#> GSM648660     1  0.0237      0.886 0.996 0.004 0.000
#> GSM648697     1  0.3340      0.842 0.880 0.120 0.000
#> GSM648710     1  0.0237      0.886 0.996 0.004 0.000
#> GSM648591     1  0.2356      0.857 0.928 0.000 0.072
#> GSM648592     1  0.4087      0.836 0.880 0.052 0.068
#> GSM648607     1  0.2261      0.860 0.932 0.000 0.068
#> GSM648611     3  0.5560      0.641 0.300 0.000 0.700
#> GSM648612     1  0.4931      0.669 0.768 0.000 0.232
#> GSM648616     3  0.2356      0.791 0.000 0.072 0.928
#> GSM648617     1  0.2261      0.860 0.932 0.000 0.068
#> GSM648626     1  0.2261      0.860 0.932 0.000 0.068
#> GSM648711     1  0.1031      0.879 0.976 0.000 0.024
#> GSM648712     1  0.2261      0.860 0.932 0.000 0.068
#> GSM648713     1  0.2261      0.860 0.932 0.000 0.068
#> GSM648714     3  0.6138      0.729 0.172 0.060 0.768
#> GSM648716     1  0.2261      0.860 0.932 0.000 0.068
#> GSM648717     3  0.5327      0.681 0.272 0.000 0.728
#> GSM648590     2  0.4346      0.620 0.184 0.816 0.000
#> GSM648596     2  0.3805      0.755 0.024 0.884 0.092
#> GSM648642     2  0.3192      0.692 0.112 0.888 0.000
#> GSM648696     1  0.5948      0.548 0.640 0.360 0.000
#> GSM648705     1  0.4235      0.806 0.824 0.176 0.000
#> GSM648718     2  0.1643      0.744 0.044 0.956 0.000
#> GSM648599     1  0.2261      0.860 0.932 0.000 0.068
#> GSM648608     1  0.0237      0.886 0.996 0.004 0.000
#> GSM648609     1  0.0237      0.886 0.996 0.004 0.000
#> GSM648610     1  0.0592      0.883 0.988 0.000 0.012
#> GSM648633     1  0.0000      0.886 1.000 0.000 0.000
#> GSM648644     2  0.4887      0.804 0.000 0.772 0.228
#> GSM648652     1  0.3879      0.824 0.848 0.152 0.000
#> GSM648653     1  0.0237      0.886 0.996 0.004 0.000
#> GSM648658     1  0.3879      0.824 0.848 0.152 0.000
#> GSM648659     2  0.4682      0.609 0.192 0.804 0.004
#> GSM648662     1  0.0000      0.886 1.000 0.000 0.000
#> GSM648665     1  0.1163      0.882 0.972 0.028 0.000
#> GSM648666     1  0.1163      0.882 0.972 0.028 0.000
#> GSM648680     1  0.3879      0.824 0.848 0.152 0.000
#> GSM648684     1  0.0237      0.886 0.996 0.004 0.000
#> GSM648709     2  0.5216      0.523 0.260 0.740 0.000
#> GSM648719     1  0.0000      0.886 1.000 0.000 0.000
#> GSM648627     1  0.2261      0.860 0.932 0.000 0.068
#> GSM648637     2  0.5016      0.800 0.000 0.760 0.240
#> GSM648638     2  0.5098      0.794 0.000 0.752 0.248
#> GSM648641     3  0.2356      0.803 0.072 0.000 0.928
#> GSM648672     2  0.5016      0.800 0.000 0.760 0.240
#> GSM648674     2  0.5016      0.800 0.000 0.760 0.240
#> GSM648703     2  0.4796      0.806 0.000 0.780 0.220
#> GSM648631     3  0.3412      0.783 0.124 0.000 0.876
#> GSM648669     2  0.5058      0.798 0.000 0.756 0.244
#> GSM648671     2  0.5058      0.798 0.000 0.756 0.244
#> GSM648678     2  0.4887      0.804 0.000 0.772 0.228
#> GSM648679     2  0.5016      0.800 0.000 0.760 0.240
#> GSM648681     2  0.1643      0.744 0.044 0.956 0.000
#> GSM648686     3  0.2356      0.788 0.000 0.072 0.928
#> GSM648689     3  0.3406      0.808 0.028 0.068 0.904
#> GSM648690     3  0.2356      0.788 0.000 0.072 0.928
#> GSM648691     3  0.2845      0.802 0.012 0.068 0.920
#> GSM648693     3  0.3896      0.813 0.060 0.052 0.888
#> GSM648700     2  0.2878      0.793 0.000 0.904 0.096
#> GSM648630     3  0.2845      0.802 0.012 0.068 0.920
#> GSM648632     3  0.5000      0.796 0.124 0.044 0.832
#> GSM648639     3  0.2356      0.791 0.000 0.072 0.928
#> GSM648640     3  0.2496      0.795 0.004 0.068 0.928
#> GSM648668     2  0.5016      0.800 0.000 0.760 0.240
#> GSM648676     2  0.2878      0.793 0.000 0.904 0.096
#> GSM648692     3  0.2496      0.795 0.004 0.068 0.928
#> GSM648694     3  0.2845      0.802 0.012 0.068 0.920
#> GSM648699     2  0.4605      0.809 0.000 0.796 0.204
#> GSM648701     2  0.4605      0.809 0.000 0.796 0.204
#> GSM648673     2  0.5058      0.798 0.000 0.756 0.244
#> GSM648677     2  0.4931      0.803 0.000 0.768 0.232
#> GSM648687     3  0.3406      0.808 0.028 0.068 0.904
#> GSM648688     3  0.4658      0.811 0.076 0.068 0.856

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM648605     4  0.5277    -0.3319 0.000 0.460 0.008 0.532
#> GSM648618     1  0.4469     0.5782 0.808 0.000 0.112 0.080
#> GSM648620     4  0.1584     0.6585 0.012 0.036 0.000 0.952
#> GSM648646     2  0.3810     0.8129 0.000 0.804 0.008 0.188
#> GSM648649     4  0.3528     0.5944 0.192 0.000 0.000 0.808
#> GSM648675     4  0.5351     0.1435 0.008 0.280 0.024 0.688
#> GSM648682     2  0.3545     0.8303 0.000 0.828 0.008 0.164
#> GSM648698     2  0.5288     0.4450 0.000 0.520 0.008 0.472
#> GSM648708     4  0.1610     0.6610 0.016 0.032 0.000 0.952
#> GSM648628     1  0.4972    -0.1449 0.544 0.000 0.456 0.000
#> GSM648595     4  0.3932     0.6628 0.128 0.032 0.004 0.836
#> GSM648635     4  0.4679     0.4066 0.352 0.000 0.000 0.648
#> GSM648645     1  0.4277     0.6591 0.720 0.000 0.000 0.280
#> GSM648647     4  0.2408     0.5964 0.000 0.104 0.000 0.896
#> GSM648667     4  0.3523     0.6705 0.112 0.032 0.000 0.856
#> GSM648695     4  0.2271     0.6288 0.008 0.076 0.000 0.916
#> GSM648704     2  0.2412     0.8616 0.000 0.908 0.008 0.084
#> GSM648706     2  0.2412     0.8609 0.000 0.908 0.008 0.084
#> GSM648593     4  0.4605     0.4356 0.336 0.000 0.000 0.664
#> GSM648594     4  0.4697     0.3996 0.356 0.000 0.000 0.644
#> GSM648600     1  0.3198     0.6362 0.880 0.000 0.080 0.040
#> GSM648621     1  0.2197     0.6502 0.916 0.000 0.080 0.004
#> GSM648622     1  0.4008     0.6787 0.756 0.000 0.000 0.244
#> GSM648623     1  0.2011     0.6503 0.920 0.000 0.080 0.000
#> GSM648636     4  0.4585     0.4428 0.332 0.000 0.000 0.668
#> GSM648655     4  0.4679     0.4083 0.352 0.000 0.000 0.648
#> GSM648661     1  0.4331     0.6451 0.712 0.000 0.000 0.288
#> GSM648664     1  0.4382     0.6341 0.704 0.000 0.000 0.296
#> GSM648683     1  0.4331     0.6451 0.712 0.000 0.000 0.288
#> GSM648685     1  0.4972     0.2489 0.544 0.000 0.000 0.456
#> GSM648702     4  0.4624     0.4309 0.340 0.000 0.000 0.660
#> GSM648597     1  0.3263     0.6331 0.876 0.012 0.100 0.012
#> GSM648603     1  0.2266     0.6488 0.912 0.000 0.084 0.004
#> GSM648606     3  0.5560     0.5710 0.344 0.004 0.628 0.024
#> GSM648613     3  0.5543     0.5772 0.340 0.004 0.632 0.024
#> GSM648619     1  0.2149     0.6475 0.912 0.000 0.088 0.000
#> GSM648654     1  0.4564     0.6095 0.672 0.000 0.000 0.328
#> GSM648663     1  0.5691    -0.2284 0.508 0.000 0.468 0.024
#> GSM648670     2  0.6374     0.6736 0.040 0.704 0.080 0.176
#> GSM648707     3  0.5783     0.6739 0.220 0.088 0.692 0.000
#> GSM648615     2  0.5919     0.5740 0.008 0.584 0.028 0.380
#> GSM648643     2  0.5038     0.6678 0.000 0.652 0.012 0.336
#> GSM648650     4  0.2224     0.6721 0.040 0.032 0.000 0.928
#> GSM648656     2  0.3032     0.8506 0.000 0.868 0.008 0.124
#> GSM648715     4  0.2081     0.6199 0.000 0.084 0.000 0.916
#> GSM648598     1  0.4222     0.6650 0.728 0.000 0.000 0.272
#> GSM648601     1  0.4193     0.6681 0.732 0.000 0.000 0.268
#> GSM648602     1  0.4134     0.6708 0.740 0.000 0.000 0.260
#> GSM648604     1  0.4008     0.6787 0.756 0.000 0.000 0.244
#> GSM648614     1  0.4951     0.4579 0.744 0.000 0.212 0.044
#> GSM648624     1  0.4008     0.6787 0.756 0.000 0.000 0.244
#> GSM648625     1  0.4643     0.5717 0.656 0.000 0.000 0.344
#> GSM648629     1  0.4008     0.6787 0.756 0.000 0.000 0.244
#> GSM648634     1  0.4277     0.6590 0.720 0.000 0.000 0.280
#> GSM648648     4  0.4730     0.3806 0.364 0.000 0.000 0.636
#> GSM648651     1  0.4134     0.6708 0.740 0.000 0.000 0.260
#> GSM648657     1  0.4164     0.6584 0.736 0.000 0.000 0.264
#> GSM648660     1  0.4193     0.6681 0.732 0.000 0.000 0.268
#> GSM648697     1  0.4967     0.2608 0.548 0.000 0.000 0.452
#> GSM648710     1  0.4008     0.6787 0.756 0.000 0.000 0.244
#> GSM648591     1  0.3052     0.6326 0.880 0.012 0.104 0.004
#> GSM648592     1  0.6599     0.3394 0.640 0.012 0.100 0.248
#> GSM648607     1  0.0921     0.6617 0.972 0.000 0.028 0.000
#> GSM648611     1  0.4977    -0.1570 0.540 0.000 0.460 0.000
#> GSM648612     1  0.2589     0.6316 0.884 0.000 0.116 0.000
#> GSM648616     3  0.5142     0.7698 0.064 0.192 0.744 0.000
#> GSM648617     1  0.3858     0.6128 0.844 0.000 0.100 0.056
#> GSM648626     1  0.2266     0.6488 0.912 0.000 0.084 0.004
#> GSM648711     1  0.1211     0.6697 0.960 0.000 0.000 0.040
#> GSM648712     1  0.2216     0.6457 0.908 0.000 0.092 0.000
#> GSM648713     1  0.2149     0.6475 0.912 0.000 0.088 0.000
#> GSM648714     3  0.5660     0.5808 0.336 0.008 0.632 0.024
#> GSM648716     1  0.2149     0.6475 0.912 0.000 0.088 0.000
#> GSM648717     3  0.4761     0.5380 0.372 0.000 0.628 0.000
#> GSM648590     4  0.2469     0.5908 0.000 0.108 0.000 0.892
#> GSM648596     2  0.7793     0.5269 0.076 0.516 0.064 0.344
#> GSM648642     4  0.2408     0.5964 0.000 0.104 0.000 0.896
#> GSM648696     4  0.3694     0.6655 0.124 0.032 0.000 0.844
#> GSM648705     4  0.3400     0.6041 0.180 0.000 0.000 0.820
#> GSM648718     4  0.4792     0.0938 0.000 0.312 0.008 0.680
#> GSM648599     1  0.1824     0.6558 0.936 0.000 0.060 0.004
#> GSM648608     1  0.4008     0.6787 0.756 0.000 0.000 0.244
#> GSM648609     1  0.4193     0.6654 0.732 0.000 0.000 0.268
#> GSM648610     1  0.3024     0.6792 0.852 0.000 0.000 0.148
#> GSM648633     1  0.4406     0.6364 0.700 0.000 0.000 0.300
#> GSM648644     2  0.2542     0.8614 0.000 0.904 0.012 0.084
#> GSM648652     4  0.4730     0.3806 0.364 0.000 0.000 0.636
#> GSM648653     1  0.4164     0.6683 0.736 0.000 0.000 0.264
#> GSM648658     4  0.4804     0.3215 0.384 0.000 0.000 0.616
#> GSM648659     4  0.1557     0.6383 0.000 0.056 0.000 0.944
#> GSM648662     1  0.3873     0.6811 0.772 0.000 0.000 0.228
#> GSM648665     1  0.4406     0.6293 0.700 0.000 0.000 0.300
#> GSM648666     1  0.4356     0.6398 0.708 0.000 0.000 0.292
#> GSM648680     4  0.4790     0.3343 0.380 0.000 0.000 0.620
#> GSM648684     1  0.4250     0.6580 0.724 0.000 0.000 0.276
#> GSM648709     4  0.2412     0.6221 0.008 0.084 0.000 0.908
#> GSM648719     1  0.4193     0.6681 0.732 0.000 0.000 0.268
#> GSM648627     1  0.2149     0.6475 0.912 0.000 0.088 0.000
#> GSM648637     2  0.0779     0.8423 0.000 0.980 0.016 0.004
#> GSM648638     2  0.0779     0.8423 0.000 0.980 0.016 0.004
#> GSM648641     3  0.2011     0.7814 0.080 0.000 0.920 0.000
#> GSM648672     2  0.1182     0.8470 0.000 0.968 0.016 0.016
#> GSM648674     2  0.0779     0.8423 0.000 0.980 0.016 0.004
#> GSM648703     2  0.2611     0.8588 0.000 0.896 0.008 0.096
#> GSM648631     3  0.0469     0.8053 0.012 0.000 0.988 0.000
#> GSM648669     2  0.0779     0.8432 0.000 0.980 0.016 0.004
#> GSM648671     2  0.0779     0.8432 0.000 0.980 0.016 0.004
#> GSM648678     2  0.2662     0.8617 0.000 0.900 0.016 0.084
#> GSM648679     2  0.0779     0.8423 0.000 0.980 0.016 0.004
#> GSM648681     4  0.4456     0.2128 0.000 0.280 0.004 0.716
#> GSM648686     3  0.2530     0.8302 0.000 0.112 0.888 0.000
#> GSM648689     3  0.2466     0.8344 0.004 0.096 0.900 0.000
#> GSM648690     3  0.2530     0.8302 0.000 0.112 0.888 0.000
#> GSM648691     3  0.2469     0.8322 0.000 0.108 0.892 0.000
#> GSM648693     3  0.1743     0.8298 0.004 0.056 0.940 0.000
#> GSM648700     2  0.4955     0.5855 0.000 0.648 0.008 0.344
#> GSM648630     3  0.2469     0.8322 0.000 0.108 0.892 0.000
#> GSM648632     3  0.1576     0.8279 0.004 0.048 0.948 0.000
#> GSM648639     3  0.4399     0.7660 0.020 0.212 0.768 0.000
#> GSM648640     3  0.2647     0.8301 0.000 0.120 0.880 0.000
#> GSM648668     2  0.1182     0.8470 0.000 0.968 0.016 0.016
#> GSM648676     2  0.3933     0.7936 0.000 0.792 0.008 0.200
#> GSM648692     3  0.2469     0.8322 0.000 0.108 0.892 0.000
#> GSM648694     3  0.2408     0.8337 0.000 0.104 0.896 0.000
#> GSM648699     2  0.2737     0.8581 0.000 0.888 0.008 0.104
#> GSM648701     2  0.2737     0.8581 0.000 0.888 0.008 0.104
#> GSM648673     2  0.0779     0.8432 0.000 0.980 0.016 0.004
#> GSM648677     2  0.2593     0.8615 0.000 0.904 0.016 0.080
#> GSM648687     3  0.2593     0.8332 0.004 0.104 0.892 0.000
#> GSM648688     3  0.2530     0.8342 0.004 0.100 0.896 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM648605     2  0.3966      0.661 0.000 0.784 0.004 0.176 0.036
#> GSM648618     5  0.5086      0.811 0.200 0.096 0.004 0.000 0.700
#> GSM648620     2  0.2214      0.810 0.052 0.916 0.000 0.004 0.028
#> GSM648646     4  0.3846      0.739 0.000 0.200 0.004 0.776 0.020
#> GSM648649     2  0.4625      0.622 0.244 0.712 0.008 0.000 0.036
#> GSM648675     2  0.2914      0.756 0.000 0.872 0.000 0.052 0.076
#> GSM648682     4  0.4089      0.732 0.000 0.204 0.008 0.764 0.024
#> GSM648698     2  0.4085      0.625 0.000 0.760 0.004 0.208 0.028
#> GSM648708     2  0.1697      0.811 0.060 0.932 0.000 0.008 0.000
#> GSM648628     5  0.4886      0.779 0.124 0.012 0.120 0.000 0.744
#> GSM648595     2  0.5079      0.702 0.180 0.732 0.024 0.004 0.060
#> GSM648635     1  0.5170      0.588 0.648 0.296 0.012 0.000 0.044
#> GSM648645     1  0.1538      0.846 0.948 0.008 0.008 0.000 0.036
#> GSM648647     2  0.1934      0.811 0.040 0.932 0.000 0.020 0.008
#> GSM648667     2  0.4244      0.701 0.204 0.760 0.008 0.004 0.024
#> GSM648695     2  0.1956      0.813 0.052 0.928 0.000 0.012 0.008
#> GSM648704     4  0.2921      0.840 0.000 0.068 0.028 0.884 0.020
#> GSM648706     4  0.2984      0.839 0.000 0.072 0.028 0.880 0.020
#> GSM648593     1  0.5195      0.572 0.644 0.296 0.008 0.000 0.052
#> GSM648594     1  0.5228      0.611 0.660 0.276 0.016 0.000 0.048
#> GSM648600     5  0.4603      0.825 0.248 0.028 0.012 0.000 0.712
#> GSM648621     5  0.4402      0.816 0.292 0.012 0.008 0.000 0.688
#> GSM648622     1  0.0609      0.850 0.980 0.000 0.000 0.000 0.020
#> GSM648623     5  0.4415      0.613 0.444 0.000 0.004 0.000 0.552
#> GSM648636     1  0.5436      0.566 0.636 0.292 0.016 0.000 0.056
#> GSM648655     1  0.5321      0.576 0.644 0.288 0.012 0.000 0.056
#> GSM648661     1  0.0898      0.854 0.972 0.008 0.000 0.000 0.020
#> GSM648664     1  0.1117      0.854 0.964 0.016 0.000 0.000 0.020
#> GSM648683     1  0.1299      0.854 0.960 0.012 0.008 0.000 0.020
#> GSM648685     1  0.3031      0.800 0.856 0.120 0.004 0.000 0.020
#> GSM648702     1  0.5225      0.593 0.652 0.288 0.016 0.000 0.044
#> GSM648597     5  0.4379      0.827 0.220 0.032 0.008 0.000 0.740
#> GSM648603     5  0.4146      0.831 0.268 0.012 0.004 0.000 0.716
#> GSM648606     5  0.4601      0.631 0.032 0.012 0.236 0.000 0.720
#> GSM648613     5  0.4628      0.628 0.032 0.012 0.240 0.000 0.716
#> GSM648619     5  0.3684      0.831 0.280 0.000 0.000 0.000 0.720
#> GSM648654     1  0.2864      0.805 0.864 0.112 0.000 0.000 0.024
#> GSM648663     5  0.4951      0.750 0.104 0.012 0.148 0.000 0.736
#> GSM648670     4  0.6891      0.222 0.000 0.308 0.012 0.456 0.224
#> GSM648707     5  0.5014      0.528 0.000 0.040 0.212 0.032 0.716
#> GSM648615     2  0.5179      0.413 0.000 0.640 0.000 0.288 0.072
#> GSM648643     2  0.5044      0.334 0.000 0.608 0.004 0.352 0.036
#> GSM648650     2  0.2866      0.796 0.080 0.884 0.008 0.004 0.024
#> GSM648656     4  0.3031      0.812 0.000 0.120 0.004 0.856 0.020
#> GSM648715     2  0.1701      0.813 0.048 0.936 0.000 0.016 0.000
#> GSM648598     1  0.0404      0.854 0.988 0.000 0.000 0.000 0.012
#> GSM648601     1  0.0955      0.851 0.968 0.000 0.004 0.000 0.028
#> GSM648602     1  0.1082      0.852 0.964 0.000 0.008 0.000 0.028
#> GSM648604     1  0.0703      0.850 0.976 0.000 0.000 0.000 0.024
#> GSM648614     5  0.5177      0.802 0.160 0.040 0.068 0.000 0.732
#> GSM648624     1  0.0609      0.850 0.980 0.000 0.000 0.000 0.020
#> GSM648625     1  0.4218      0.720 0.760 0.196 0.004 0.000 0.040
#> GSM648629     1  0.0703      0.850 0.976 0.000 0.000 0.000 0.024
#> GSM648634     1  0.1764      0.846 0.940 0.012 0.012 0.000 0.036
#> GSM648648     1  0.4741      0.664 0.708 0.240 0.008 0.000 0.044
#> GSM648651     1  0.0703      0.849 0.976 0.000 0.000 0.000 0.024
#> GSM648657     1  0.2824      0.807 0.880 0.024 0.008 0.000 0.088
#> GSM648660     1  0.0955      0.851 0.968 0.000 0.004 0.000 0.028
#> GSM648697     1  0.3031      0.797 0.856 0.120 0.004 0.000 0.020
#> GSM648710     1  0.0703      0.850 0.976 0.000 0.000 0.000 0.024
#> GSM648591     5  0.4116      0.834 0.212 0.028 0.004 0.000 0.756
#> GSM648592     5  0.4811      0.747 0.108 0.140 0.008 0.000 0.744
#> GSM648607     5  0.4262      0.620 0.440 0.000 0.000 0.000 0.560
#> GSM648611     5  0.5035      0.766 0.124 0.008 0.144 0.000 0.724
#> GSM648612     5  0.3480      0.838 0.248 0.000 0.000 0.000 0.752
#> GSM648616     3  0.6983      0.467 0.000 0.036 0.500 0.164 0.300
#> GSM648617     5  0.4203      0.821 0.188 0.052 0.000 0.000 0.760
#> GSM648626     5  0.4121      0.833 0.264 0.012 0.004 0.000 0.720
#> GSM648711     1  0.1965      0.775 0.904 0.000 0.000 0.000 0.096
#> GSM648712     5  0.3508      0.838 0.252 0.000 0.000 0.000 0.748
#> GSM648713     5  0.3752      0.824 0.292 0.000 0.000 0.000 0.708
#> GSM648714     5  0.5023      0.646 0.032 0.044 0.204 0.000 0.720
#> GSM648716     5  0.3752      0.824 0.292 0.000 0.000 0.000 0.708
#> GSM648717     5  0.4552      0.637 0.040 0.004 0.240 0.000 0.716
#> GSM648590     2  0.2539      0.806 0.028 0.912 0.008 0.016 0.036
#> GSM648596     2  0.6647      0.302 0.004 0.520 0.008 0.284 0.184
#> GSM648642     2  0.1934      0.811 0.040 0.932 0.000 0.020 0.008
#> GSM648696     2  0.4469      0.699 0.196 0.756 0.016 0.004 0.028
#> GSM648705     2  0.4522      0.632 0.240 0.720 0.008 0.000 0.032
#> GSM648718     2  0.2900      0.737 0.000 0.864 0.000 0.108 0.028
#> GSM648599     5  0.4464      0.817 0.284 0.012 0.012 0.000 0.692
#> GSM648608     1  0.0865      0.850 0.972 0.000 0.004 0.000 0.024
#> GSM648609     1  0.0771      0.853 0.976 0.004 0.000 0.000 0.020
#> GSM648610     1  0.1857      0.812 0.928 0.004 0.008 0.000 0.060
#> GSM648633     1  0.1934      0.841 0.932 0.020 0.008 0.000 0.040
#> GSM648644     4  0.2921      0.840 0.000 0.068 0.028 0.884 0.020
#> GSM648652     1  0.4874      0.657 0.700 0.244 0.012 0.000 0.044
#> GSM648653     1  0.0771      0.853 0.976 0.000 0.004 0.000 0.020
#> GSM648658     1  0.4552      0.714 0.752 0.184 0.012 0.000 0.052
#> GSM648659     2  0.3733      0.785 0.056 0.844 0.004 0.020 0.076
#> GSM648662     1  0.1608      0.812 0.928 0.000 0.000 0.000 0.072
#> GSM648665     1  0.1216      0.854 0.960 0.020 0.000 0.000 0.020
#> GSM648666     1  0.0912      0.856 0.972 0.012 0.000 0.000 0.016
#> GSM648680     1  0.4235      0.731 0.772 0.176 0.008 0.000 0.044
#> GSM648684     1  0.1059      0.852 0.968 0.004 0.008 0.000 0.020
#> GSM648709     2  0.1921      0.812 0.044 0.932 0.000 0.012 0.012
#> GSM648719     1  0.1041      0.850 0.964 0.000 0.004 0.000 0.032
#> GSM648627     5  0.3752      0.824 0.292 0.000 0.000 0.000 0.708
#> GSM648637     4  0.2966      0.835 0.000 0.020 0.040 0.884 0.056
#> GSM648638     4  0.2966      0.835 0.000 0.020 0.040 0.884 0.056
#> GSM648641     3  0.4347      0.410 0.000 0.004 0.636 0.004 0.356
#> GSM648672     4  0.2305      0.844 0.000 0.012 0.044 0.916 0.028
#> GSM648674     4  0.3297      0.828 0.000 0.032 0.040 0.868 0.060
#> GSM648703     4  0.3720      0.811 0.000 0.048 0.020 0.836 0.096
#> GSM648631     3  0.1830      0.852 0.000 0.008 0.924 0.000 0.068
#> GSM648669     4  0.2514      0.837 0.000 0.000 0.044 0.896 0.060
#> GSM648671     4  0.2514      0.837 0.000 0.000 0.044 0.896 0.060
#> GSM648678     4  0.2312      0.843 0.000 0.060 0.016 0.912 0.012
#> GSM648679     4  0.3100      0.832 0.000 0.020 0.040 0.876 0.064
#> GSM648681     2  0.1901      0.789 0.000 0.928 0.004 0.056 0.012
#> GSM648686     3  0.0963      0.904 0.000 0.000 0.964 0.036 0.000
#> GSM648689     3  0.1153      0.898 0.000 0.004 0.964 0.024 0.008
#> GSM648690     3  0.0963      0.904 0.000 0.000 0.964 0.036 0.000
#> GSM648691     3  0.0963      0.904 0.000 0.000 0.964 0.036 0.000
#> GSM648693     3  0.1179      0.895 0.000 0.004 0.964 0.016 0.016
#> GSM648700     4  0.6425      0.545 0.008 0.240 0.024 0.604 0.124
#> GSM648630     3  0.0963      0.904 0.000 0.000 0.964 0.036 0.000
#> GSM648632     3  0.1168      0.884 0.000 0.008 0.960 0.000 0.032
#> GSM648639     3  0.5819      0.560 0.000 0.020 0.632 0.256 0.092
#> GSM648640     3  0.1956      0.889 0.000 0.008 0.928 0.052 0.012
#> GSM648668     4  0.2228      0.844 0.000 0.012 0.040 0.920 0.028
#> GSM648676     4  0.5589      0.676 0.000 0.172 0.024 0.688 0.116
#> GSM648692     3  0.0963      0.904 0.000 0.000 0.964 0.036 0.000
#> GSM648694     3  0.0963      0.904 0.000 0.000 0.964 0.036 0.000
#> GSM648699     4  0.4602      0.771 0.000 0.100 0.020 0.776 0.104
#> GSM648701     4  0.4602      0.771 0.000 0.100 0.020 0.776 0.104
#> GSM648673     4  0.2514      0.837 0.000 0.000 0.044 0.896 0.060
#> GSM648677     4  0.2053      0.841 0.000 0.040 0.016 0.928 0.016
#> GSM648687     3  0.1124      0.904 0.000 0.004 0.960 0.036 0.000
#> GSM648688     3  0.1124      0.904 0.000 0.004 0.960 0.036 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM648605     2  0.3975     0.5891 0.000 0.744 0.000 0.204 0.004 0.048
#> GSM648618     5  0.5290     0.6964 0.060 0.064 0.016 0.000 0.704 0.156
#> GSM648620     2  0.1116     0.7656 0.004 0.960 0.000 0.000 0.008 0.028
#> GSM648646     4  0.3344     0.5351 0.000 0.152 0.000 0.804 0.000 0.044
#> GSM648649     2  0.5277     0.5845 0.148 0.680 0.000 0.000 0.044 0.128
#> GSM648675     2  0.4139     0.6889 0.000 0.760 0.008 0.036 0.016 0.180
#> GSM648682     4  0.3417     0.5248 0.000 0.160 0.000 0.796 0.000 0.044
#> GSM648698     2  0.3885     0.5750 0.000 0.736 0.000 0.220 0.000 0.044
#> GSM648708     2  0.0767     0.7685 0.008 0.976 0.000 0.004 0.000 0.012
#> GSM648628     5  0.3286     0.7772 0.044 0.000 0.068 0.000 0.848 0.040
#> GSM648595     2  0.5537     0.6030 0.096 0.668 0.004 0.000 0.064 0.168
#> GSM648635     1  0.6010     0.5121 0.544 0.280 0.000 0.000 0.032 0.144
#> GSM648645     1  0.4007     0.7766 0.776 0.016 0.000 0.000 0.064 0.144
#> GSM648647     2  0.1036     0.7636 0.004 0.964 0.000 0.024 0.000 0.008
#> GSM648667     2  0.4352     0.6531 0.124 0.752 0.000 0.000 0.016 0.108
#> GSM648695     2  0.0862     0.7682 0.004 0.972 0.000 0.008 0.000 0.016
#> GSM648704     4  0.1864     0.6474 0.000 0.040 0.004 0.924 0.000 0.032
#> GSM648706     4  0.2433     0.6199 0.000 0.072 0.000 0.884 0.000 0.044
#> GSM648593     1  0.6147     0.4932 0.520 0.256 0.004 0.000 0.016 0.204
#> GSM648594     1  0.6522     0.4909 0.492 0.252 0.000 0.000 0.048 0.208
#> GSM648600     5  0.3777     0.7682 0.072 0.036 0.004 0.000 0.820 0.068
#> GSM648621     5  0.3575     0.7728 0.140 0.004 0.004 0.000 0.804 0.048
#> GSM648622     1  0.1074     0.8197 0.960 0.000 0.000 0.000 0.028 0.012
#> GSM648623     5  0.4493     0.5229 0.364 0.000 0.000 0.000 0.596 0.040
#> GSM648636     1  0.5840     0.5585 0.576 0.236 0.004 0.000 0.016 0.168
#> GSM648655     1  0.5920     0.5464 0.564 0.236 0.004 0.000 0.016 0.180
#> GSM648661     1  0.1078     0.8235 0.964 0.008 0.000 0.000 0.016 0.012
#> GSM648664     1  0.0984     0.8240 0.968 0.008 0.000 0.000 0.012 0.012
#> GSM648683     1  0.1129     0.8239 0.964 0.008 0.004 0.000 0.012 0.012
#> GSM648685     1  0.1856     0.8075 0.920 0.048 0.000 0.000 0.000 0.032
#> GSM648702     1  0.5898     0.5667 0.580 0.252 0.004 0.000 0.028 0.136
#> GSM648597     5  0.4267     0.6741 0.048 0.016 0.000 0.000 0.732 0.204
#> GSM648603     5  0.3002     0.7884 0.100 0.004 0.000 0.000 0.848 0.048
#> GSM648606     5  0.4102     0.6844 0.004 0.004 0.128 0.000 0.768 0.096
#> GSM648613     5  0.4095     0.6808 0.004 0.004 0.132 0.000 0.768 0.092
#> GSM648619     5  0.2178     0.7898 0.132 0.000 0.000 0.000 0.868 0.000
#> GSM648654     1  0.2926     0.7580 0.844 0.124 0.000 0.000 0.028 0.004
#> GSM648663     5  0.4081     0.7385 0.036 0.004 0.096 0.000 0.796 0.068
#> GSM648670     6  0.7183     0.3266 0.000 0.128 0.012 0.332 0.108 0.420
#> GSM648707     5  0.5521     0.2151 0.000 0.004 0.080 0.016 0.544 0.356
#> GSM648615     2  0.5404     0.4285 0.000 0.624 0.000 0.244 0.024 0.108
#> GSM648643     2  0.4563     0.3842 0.000 0.604 0.000 0.348 0.000 0.048
#> GSM648650     2  0.3103     0.7206 0.036 0.848 0.000 0.000 0.016 0.100
#> GSM648656     4  0.2542     0.6138 0.000 0.080 0.000 0.876 0.000 0.044
#> GSM648715     2  0.0862     0.7684 0.008 0.972 0.000 0.004 0.000 0.016
#> GSM648598     1  0.1151     0.8268 0.956 0.000 0.000 0.000 0.012 0.032
#> GSM648601     1  0.2801     0.8095 0.860 0.000 0.000 0.000 0.072 0.068
#> GSM648602     1  0.1693     0.8251 0.932 0.000 0.004 0.000 0.044 0.020
#> GSM648604     1  0.0632     0.8212 0.976 0.000 0.000 0.000 0.024 0.000
#> GSM648614     5  0.4216     0.7392 0.040 0.008 0.088 0.000 0.792 0.072
#> GSM648624     1  0.0891     0.8207 0.968 0.000 0.000 0.000 0.024 0.008
#> GSM648625     1  0.6365     0.5661 0.564 0.208 0.000 0.000 0.092 0.136
#> GSM648629     1  0.0632     0.8212 0.976 0.000 0.000 0.000 0.024 0.000
#> GSM648634     1  0.3547     0.7961 0.828 0.024 0.004 0.000 0.044 0.100
#> GSM648648     1  0.5467     0.6344 0.636 0.204 0.000 0.000 0.028 0.132
#> GSM648651     1  0.1480     0.8177 0.940 0.000 0.000 0.000 0.040 0.020
#> GSM648657     1  0.5734     0.6581 0.628 0.048 0.000 0.000 0.156 0.168
#> GSM648660     1  0.2822     0.8110 0.864 0.004 0.000 0.000 0.056 0.076
#> GSM648697     1  0.2134     0.8065 0.904 0.044 0.000 0.000 0.000 0.052
#> GSM648710     1  0.0777     0.8209 0.972 0.000 0.000 0.000 0.024 0.004
#> GSM648591     5  0.4071     0.7063 0.048 0.008 0.004 0.000 0.756 0.184
#> GSM648592     5  0.4138     0.6552 0.020 0.044 0.000 0.000 0.752 0.184
#> GSM648607     5  0.3528     0.6344 0.296 0.000 0.000 0.000 0.700 0.004
#> GSM648611     5  0.3491     0.7620 0.040 0.000 0.100 0.000 0.828 0.032
#> GSM648612     5  0.2006     0.7936 0.104 0.000 0.000 0.000 0.892 0.004
#> GSM648616     6  0.7498     0.4431 0.000 0.004 0.244 0.188 0.164 0.400
#> GSM648617     5  0.2906     0.7754 0.044 0.032 0.000 0.000 0.872 0.052
#> GSM648626     5  0.3186     0.7865 0.100 0.004 0.000 0.000 0.836 0.060
#> GSM648711     1  0.2446     0.7538 0.864 0.000 0.000 0.000 0.124 0.012
#> GSM648712     5  0.2053     0.7937 0.108 0.000 0.000 0.000 0.888 0.004
#> GSM648713     5  0.2668     0.7722 0.168 0.000 0.000 0.000 0.828 0.004
#> GSM648714     5  0.4357     0.6769 0.004 0.016 0.124 0.000 0.760 0.096
#> GSM648716     5  0.2527     0.7736 0.168 0.000 0.000 0.000 0.832 0.000
#> GSM648717     5  0.3840     0.7069 0.012 0.000 0.136 0.000 0.788 0.064
#> GSM648590     2  0.2468     0.7527 0.000 0.884 0.008 0.012 0.004 0.092
#> GSM648596     2  0.6286     0.3681 0.000 0.560 0.000 0.240 0.088 0.112
#> GSM648642     2  0.1036     0.7636 0.004 0.964 0.000 0.024 0.000 0.008
#> GSM648696     2  0.4855     0.6345 0.132 0.720 0.004 0.000 0.024 0.120
#> GSM648705     2  0.4419     0.6585 0.100 0.756 0.000 0.000 0.028 0.116
#> GSM648718     2  0.2728     0.7021 0.000 0.860 0.000 0.100 0.000 0.040
#> GSM648599     5  0.3536     0.7787 0.124 0.004 0.004 0.000 0.812 0.056
#> GSM648608     1  0.0922     0.8206 0.968 0.000 0.004 0.000 0.024 0.004
#> GSM648609     1  0.0622     0.8230 0.980 0.000 0.000 0.000 0.012 0.008
#> GSM648610     1  0.1555     0.8027 0.932 0.000 0.004 0.000 0.060 0.004
#> GSM648633     1  0.4613     0.7569 0.740 0.040 0.000 0.000 0.076 0.144
#> GSM648644     4  0.1716     0.6500 0.000 0.036 0.004 0.932 0.000 0.028
#> GSM648652     1  0.5832     0.5731 0.580 0.240 0.000 0.000 0.028 0.152
#> GSM648653     1  0.0862     0.8276 0.972 0.000 0.004 0.000 0.008 0.016
#> GSM648658     1  0.4937     0.7079 0.696 0.104 0.004 0.000 0.016 0.180
#> GSM648659     2  0.3404     0.6948 0.012 0.792 0.004 0.008 0.000 0.184
#> GSM648662     1  0.3314     0.6224 0.764 0.000 0.000 0.000 0.224 0.012
#> GSM648665     1  0.1173     0.8240 0.960 0.008 0.000 0.000 0.016 0.016
#> GSM648666     1  0.1049     0.8256 0.960 0.008 0.000 0.000 0.000 0.032
#> GSM648680     1  0.4303     0.7512 0.764 0.080 0.000 0.000 0.028 0.128
#> GSM648684     1  0.0870     0.8233 0.972 0.000 0.004 0.000 0.012 0.012
#> GSM648709     2  0.0665     0.7654 0.000 0.980 0.000 0.008 0.004 0.008
#> GSM648719     1  0.2685     0.8103 0.868 0.000 0.000 0.000 0.072 0.060
#> GSM648627     5  0.2841     0.7766 0.164 0.000 0.000 0.000 0.824 0.012
#> GSM648637     4  0.3484     0.5474 0.000 0.000 0.016 0.784 0.012 0.188
#> GSM648638     4  0.3892     0.5104 0.000 0.000 0.020 0.752 0.020 0.208
#> GSM648641     3  0.4962     0.0392 0.000 0.000 0.516 0.000 0.416 0.068
#> GSM648672     4  0.2264     0.6410 0.000 0.000 0.012 0.888 0.004 0.096
#> GSM648674     4  0.4586     0.4235 0.000 0.004 0.016 0.680 0.036 0.264
#> GSM648703     4  0.4586     0.5448 0.000 0.040 0.004 0.688 0.016 0.252
#> GSM648631     3  0.0820     0.8290 0.000 0.000 0.972 0.000 0.016 0.012
#> GSM648669     4  0.3893     0.5682 0.000 0.000 0.016 0.744 0.020 0.220
#> GSM648671     4  0.3893     0.5682 0.000 0.000 0.016 0.744 0.020 0.220
#> GSM648678     4  0.1313     0.6564 0.000 0.016 0.004 0.952 0.000 0.028
#> GSM648679     4  0.4221     0.4936 0.000 0.000 0.016 0.716 0.032 0.236
#> GSM648681     2  0.2878     0.7290 0.000 0.860 0.000 0.016 0.024 0.100
#> GSM648686     3  0.1010     0.8579 0.000 0.000 0.960 0.036 0.000 0.004
#> GSM648689     3  0.0767     0.8474 0.000 0.000 0.976 0.012 0.008 0.004
#> GSM648690     3  0.1010     0.8579 0.000 0.000 0.960 0.036 0.000 0.004
#> GSM648691     3  0.0865     0.8584 0.000 0.000 0.964 0.036 0.000 0.000
#> GSM648693     3  0.0260     0.8481 0.000 0.000 0.992 0.008 0.000 0.000
#> GSM648700     4  0.6384     0.3055 0.008 0.148 0.008 0.484 0.016 0.336
#> GSM648630     3  0.0865     0.8584 0.000 0.000 0.964 0.036 0.000 0.000
#> GSM648632     3  0.0665     0.8453 0.000 0.000 0.980 0.008 0.004 0.008
#> GSM648639     3  0.7155    -0.5128 0.000 0.000 0.352 0.236 0.084 0.328
#> GSM648640     3  0.3757     0.6754 0.000 0.000 0.784 0.036 0.016 0.164
#> GSM648668     4  0.2405     0.6402 0.000 0.000 0.016 0.880 0.004 0.100
#> GSM648676     4  0.5688     0.4095 0.000 0.096 0.008 0.560 0.016 0.320
#> GSM648692     3  0.0865     0.8584 0.000 0.000 0.964 0.036 0.000 0.000
#> GSM648694     3  0.0865     0.8584 0.000 0.000 0.964 0.036 0.000 0.000
#> GSM648699     4  0.4945     0.5083 0.000 0.052 0.004 0.640 0.016 0.288
#> GSM648701     4  0.4871     0.5183 0.000 0.052 0.004 0.656 0.016 0.272
#> GSM648673     4  0.3893     0.5682 0.000 0.000 0.016 0.744 0.020 0.220
#> GSM648677     4  0.2417     0.6548 0.000 0.008 0.004 0.888 0.012 0.088
#> GSM648687     3  0.1296     0.8559 0.000 0.000 0.952 0.032 0.004 0.012
#> GSM648688     3  0.1296     0.8559 0.000 0.000 0.952 0.032 0.004 0.012

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-MAD-kmeans-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-MAD-kmeans-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-MAD-kmeans-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-MAD-kmeans-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-MAD-kmeans-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-MAD-kmeans-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-MAD-kmeans-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-MAD-kmeans-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-MAD-kmeans-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-MAD-kmeans-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-MAD-kmeans-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-MAD-kmeans-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-MAD-kmeans-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-MAD-kmeans-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-MAD-kmeans-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-MAD-kmeans-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-MAD-kmeans-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)
#> Error in mat[ceiling(1:nr/h_ratio), ceiling(1:nc/w_ratio), drop = FALSE]: subscript out of bounds

plot of chunk tab-MAD-kmeans-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-MAD-kmeans-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-MAD-kmeans-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk MAD-kmeans-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-MAD-kmeans-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-MAD-kmeans-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-MAD-kmeans-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-MAD-kmeans-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-MAD-kmeans-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk MAD-kmeans-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>              n disease.state(p) development.stage(p) other(p) k
#> MAD:kmeans 117         1.04e-12             0.038842 2.23e-15 2
#> MAD:kmeans 124         7.50e-11             0.005313 9.50e-19 3
#> MAD:kmeans 108         2.59e-12             0.012207 1.63e-22 4
#> MAD:kmeans 124         8.25e-20             0.000705 1.28e-44 5
#> MAD:kmeans 116         4.39e-18             0.000986 1.03e-40 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


MAD:skmeans

The object with results only for a single top-value method and a single partition method can be extracted as:

res = res_list["MAD", "skmeans"]
# you can also extract it by
# res = res_list["MAD:skmeans"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 130 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#>   Subgroups are detected by 'skmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk MAD-skmeans-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk MAD-skmeans-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.639           0.825       0.929         0.4938 0.502   0.502
#> 3 3 0.657           0.769       0.889         0.3199 0.717   0.494
#> 4 4 0.673           0.738       0.822         0.1310 0.802   0.498
#> 5 5 0.847           0.808       0.905         0.0712 0.822   0.453
#> 6 6 0.755           0.730       0.821         0.0450 0.930   0.692

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 2

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM648605     2   0.000     0.8880 0.000 1.000
#> GSM648618     1   0.973     0.2263 0.596 0.404
#> GSM648620     2   0.971     0.3485 0.400 0.600
#> GSM648646     2   0.000     0.8880 0.000 1.000
#> GSM648649     1   0.722     0.6984 0.800 0.200
#> GSM648675     2   0.000     0.8880 0.000 1.000
#> GSM648682     2   0.000     0.8880 0.000 1.000
#> GSM648698     2   0.000     0.8880 0.000 1.000
#> GSM648708     2   0.999     0.0992 0.480 0.520
#> GSM648628     1   0.000     0.9400 1.000 0.000
#> GSM648595     1   0.971     0.2999 0.600 0.400
#> GSM648635     1   0.000     0.9400 1.000 0.000
#> GSM648645     1   0.000     0.9400 1.000 0.000
#> GSM648647     2   0.722     0.7207 0.200 0.800
#> GSM648667     1   0.971     0.2999 0.600 0.400
#> GSM648695     2   0.971     0.3485 0.400 0.600
#> GSM648704     2   0.000     0.8880 0.000 1.000
#> GSM648706     2   0.000     0.8880 0.000 1.000
#> GSM648593     1   0.000     0.9400 1.000 0.000
#> GSM648594     1   0.000     0.9400 1.000 0.000
#> GSM648600     1   0.000     0.9400 1.000 0.000
#> GSM648621     1   0.000     0.9400 1.000 0.000
#> GSM648622     1   0.000     0.9400 1.000 0.000
#> GSM648623     1   0.000     0.9400 1.000 0.000
#> GSM648636     1   0.000     0.9400 1.000 0.000
#> GSM648655     1   0.000     0.9400 1.000 0.000
#> GSM648661     1   0.000     0.9400 1.000 0.000
#> GSM648664     1   0.000     0.9400 1.000 0.000
#> GSM648683     1   0.000     0.9400 1.000 0.000
#> GSM648685     1   0.000     0.9400 1.000 0.000
#> GSM648702     1   0.000     0.9400 1.000 0.000
#> GSM648597     1   0.000     0.9400 1.000 0.000
#> GSM648603     1   0.000     0.9400 1.000 0.000
#> GSM648606     2   0.961     0.4299 0.384 0.616
#> GSM648613     2   0.760     0.7148 0.220 0.780
#> GSM648619     1   0.000     0.9400 1.000 0.000
#> GSM648654     1   0.000     0.9400 1.000 0.000
#> GSM648663     1   0.000     0.9400 1.000 0.000
#> GSM648670     2   0.000     0.8880 0.000 1.000
#> GSM648707     2   0.722     0.7383 0.200 0.800
#> GSM648615     2   0.000     0.8880 0.000 1.000
#> GSM648643     2   0.000     0.8880 0.000 1.000
#> GSM648650     1   0.971     0.2999 0.600 0.400
#> GSM648656     2   0.000     0.8880 0.000 1.000
#> GSM648715     2   0.971     0.3485 0.400 0.600
#> GSM648598     1   0.000     0.9400 1.000 0.000
#> GSM648601     1   0.000     0.9400 1.000 0.000
#> GSM648602     1   0.000     0.9400 1.000 0.000
#> GSM648604     1   0.000     0.9400 1.000 0.000
#> GSM648614     1   0.000     0.9400 1.000 0.000
#> GSM648624     1   0.000     0.9400 1.000 0.000
#> GSM648625     1   0.000     0.9400 1.000 0.000
#> GSM648629     1   0.000     0.9400 1.000 0.000
#> GSM648634     1   0.000     0.9400 1.000 0.000
#> GSM648648     1   0.000     0.9400 1.000 0.000
#> GSM648651     1   0.000     0.9400 1.000 0.000
#> GSM648657     1   0.000     0.9400 1.000 0.000
#> GSM648660     1   0.000     0.9400 1.000 0.000
#> GSM648697     1   0.000     0.9400 1.000 0.000
#> GSM648710     1   0.000     0.9400 1.000 0.000
#> GSM648591     1   0.000     0.9400 1.000 0.000
#> GSM648592     1   0.963     0.3312 0.612 0.388
#> GSM648607     1   0.000     0.9400 1.000 0.000
#> GSM648611     1   0.000     0.9400 1.000 0.000
#> GSM648612     1   0.000     0.9400 1.000 0.000
#> GSM648616     2   0.000     0.8880 0.000 1.000
#> GSM648617     1   0.000     0.9400 1.000 0.000
#> GSM648626     1   0.000     0.9400 1.000 0.000
#> GSM648711     1   0.000     0.9400 1.000 0.000
#> GSM648712     1   0.000     0.9400 1.000 0.000
#> GSM648713     1   0.000     0.9400 1.000 0.000
#> GSM648714     2   0.000     0.8880 0.000 1.000
#> GSM648716     1   0.000     0.9400 1.000 0.000
#> GSM648717     1   0.000     0.9400 1.000 0.000
#> GSM648590     2   0.722     0.7207 0.200 0.800
#> GSM648596     2   0.000     0.8880 0.000 1.000
#> GSM648642     2   0.706     0.7301 0.192 0.808
#> GSM648696     1   0.971     0.2999 0.600 0.400
#> GSM648705     1   0.722     0.6984 0.800 0.200
#> GSM648718     2   0.000     0.8880 0.000 1.000
#> GSM648599     1   0.000     0.9400 1.000 0.000
#> GSM648608     1   0.000     0.9400 1.000 0.000
#> GSM648609     1   0.000     0.9400 1.000 0.000
#> GSM648610     1   0.000     0.9400 1.000 0.000
#> GSM648633     1   0.000     0.9400 1.000 0.000
#> GSM648644     2   0.000     0.8880 0.000 1.000
#> GSM648652     1   0.000     0.9400 1.000 0.000
#> GSM648653     1   0.000     0.9400 1.000 0.000
#> GSM648658     1   0.000     0.9400 1.000 0.000
#> GSM648659     2   0.871     0.5810 0.292 0.708
#> GSM648662     1   0.000     0.9400 1.000 0.000
#> GSM648665     1   0.000     0.9400 1.000 0.000
#> GSM648666     1   0.000     0.9400 1.000 0.000
#> GSM648680     1   0.000     0.9400 1.000 0.000
#> GSM648684     1   0.000     0.9400 1.000 0.000
#> GSM648709     2   0.722     0.7207 0.200 0.800
#> GSM648719     1   0.000     0.9400 1.000 0.000
#> GSM648627     1   0.000     0.9400 1.000 0.000
#> GSM648637     2   0.000     0.8880 0.000 1.000
#> GSM648638     2   0.000     0.8880 0.000 1.000
#> GSM648641     2   0.760     0.7148 0.220 0.780
#> GSM648672     2   0.000     0.8880 0.000 1.000
#> GSM648674     2   0.000     0.8880 0.000 1.000
#> GSM648703     2   0.000     0.8880 0.000 1.000
#> GSM648631     1   0.971     0.2382 0.600 0.400
#> GSM648669     2   0.000     0.8880 0.000 1.000
#> GSM648671     2   0.000     0.8880 0.000 1.000
#> GSM648678     2   0.000     0.8880 0.000 1.000
#> GSM648679     2   0.000     0.8880 0.000 1.000
#> GSM648681     2   0.000     0.8880 0.000 1.000
#> GSM648686     2   0.000     0.8880 0.000 1.000
#> GSM648689     2   0.722     0.7383 0.200 0.800
#> GSM648690     2   0.000     0.8880 0.000 1.000
#> GSM648691     2   0.722     0.7383 0.200 0.800
#> GSM648693     2   0.971     0.3901 0.400 0.600
#> GSM648700     2   0.000     0.8880 0.000 1.000
#> GSM648630     2   0.722     0.7383 0.200 0.800
#> GSM648632     1   0.980     0.1886 0.584 0.416
#> GSM648639     2   0.000     0.8880 0.000 1.000
#> GSM648640     2   0.000     0.8880 0.000 1.000
#> GSM648668     2   0.000     0.8880 0.000 1.000
#> GSM648676     2   0.000     0.8880 0.000 1.000
#> GSM648692     2   0.000     0.8880 0.000 1.000
#> GSM648694     2   0.722     0.7383 0.200 0.800
#> GSM648699     2   0.000     0.8880 0.000 1.000
#> GSM648701     2   0.000     0.8880 0.000 1.000
#> GSM648673     2   0.000     0.8880 0.000 1.000
#> GSM648677     2   0.000     0.8880 0.000 1.000
#> GSM648687     2   0.730     0.7339 0.204 0.796
#> GSM648688     2   0.971     0.3901 0.400 0.600

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM648605     2  0.0237     0.8850 0.004 0.996 0.000
#> GSM648618     3  0.4047     0.7403 0.004 0.148 0.848
#> GSM648620     2  0.5061     0.7596 0.208 0.784 0.008
#> GSM648646     2  0.0000     0.8862 0.000 1.000 0.000
#> GSM648649     1  0.4963     0.6880 0.792 0.200 0.008
#> GSM648675     2  0.0000     0.8862 0.000 1.000 0.000
#> GSM648682     2  0.0000     0.8862 0.000 1.000 0.000
#> GSM648698     2  0.0237     0.8850 0.004 0.996 0.000
#> GSM648708     2  0.5061     0.7596 0.208 0.784 0.008
#> GSM648628     3  0.0424     0.7354 0.008 0.000 0.992
#> GSM648595     2  0.6632     0.4693 0.392 0.596 0.012
#> GSM648635     1  0.0424     0.9277 0.992 0.000 0.008
#> GSM648645     1  0.0237     0.9313 0.996 0.000 0.004
#> GSM648647     2  0.5061     0.7596 0.208 0.784 0.008
#> GSM648667     2  0.6498     0.4716 0.396 0.596 0.008
#> GSM648695     2  0.5061     0.7596 0.208 0.784 0.008
#> GSM648704     2  0.0000     0.8862 0.000 1.000 0.000
#> GSM648706     2  0.0000     0.8862 0.000 1.000 0.000
#> GSM648593     1  0.0424     0.9277 0.992 0.000 0.008
#> GSM648594     1  0.0424     0.9277 0.992 0.000 0.008
#> GSM648600     1  0.4654     0.7509 0.792 0.000 0.208
#> GSM648621     1  0.4654     0.7509 0.792 0.000 0.208
#> GSM648622     1  0.0237     0.9313 0.996 0.000 0.004
#> GSM648623     1  0.4654     0.7509 0.792 0.000 0.208
#> GSM648636     1  0.0424     0.9277 0.992 0.000 0.008
#> GSM648655     1  0.0424     0.9277 0.992 0.000 0.008
#> GSM648661     1  0.0000     0.9305 1.000 0.000 0.000
#> GSM648664     1  0.0000     0.9305 1.000 0.000 0.000
#> GSM648683     1  0.0000     0.9305 1.000 0.000 0.000
#> GSM648685     1  0.0424     0.9277 0.992 0.000 0.008
#> GSM648702     1  0.0424     0.9277 0.992 0.000 0.008
#> GSM648597     1  0.4654     0.7509 0.792 0.000 0.208
#> GSM648603     1  0.6280     0.1959 0.540 0.000 0.460
#> GSM648606     3  0.0424     0.7354 0.008 0.000 0.992
#> GSM648613     3  0.0424     0.7354 0.008 0.000 0.992
#> GSM648619     3  0.6308    -0.0644 0.492 0.000 0.508
#> GSM648654     1  0.0747     0.9217 0.984 0.000 0.016
#> GSM648663     3  0.0424     0.7354 0.008 0.000 0.992
#> GSM648670     2  0.0000     0.8862 0.000 1.000 0.000
#> GSM648707     3  0.4555     0.7373 0.000 0.200 0.800
#> GSM648615     2  0.0000     0.8862 0.000 1.000 0.000
#> GSM648643     2  0.0237     0.8850 0.004 0.996 0.000
#> GSM648650     2  0.6498     0.4716 0.396 0.596 0.008
#> GSM648656     2  0.0000     0.8862 0.000 1.000 0.000
#> GSM648715     2  0.5061     0.7596 0.208 0.784 0.008
#> GSM648598     1  0.0237     0.9313 0.996 0.000 0.004
#> GSM648601     1  0.0237     0.9313 0.996 0.000 0.004
#> GSM648602     1  0.0237     0.9313 0.996 0.000 0.004
#> GSM648604     1  0.0237     0.9313 0.996 0.000 0.004
#> GSM648614     3  0.0424     0.7354 0.008 0.000 0.992
#> GSM648624     1  0.0237     0.9313 0.996 0.000 0.004
#> GSM648625     1  0.0592     0.9272 0.988 0.000 0.012
#> GSM648629     1  0.0237     0.9313 0.996 0.000 0.004
#> GSM648634     1  0.0237     0.9313 0.996 0.000 0.004
#> GSM648648     1  0.0424     0.9277 0.992 0.000 0.008
#> GSM648651     1  0.0237     0.9313 0.996 0.000 0.004
#> GSM648657     1  0.2356     0.8833 0.928 0.000 0.072
#> GSM648660     1  0.0237     0.9313 0.996 0.000 0.004
#> GSM648697     1  0.0424     0.9277 0.992 0.000 0.008
#> GSM648710     1  0.0237     0.9313 0.996 0.000 0.004
#> GSM648591     3  0.3192     0.6701 0.112 0.000 0.888
#> GSM648592     3  0.9098     0.0226 0.404 0.140 0.456
#> GSM648607     1  0.4654     0.7509 0.792 0.000 0.208
#> GSM648611     3  0.0424     0.7354 0.008 0.000 0.992
#> GSM648612     3  0.0592     0.7343 0.012 0.000 0.988
#> GSM648616     3  0.4750     0.7323 0.000 0.216 0.784
#> GSM648617     3  0.6308    -0.0644 0.492 0.000 0.508
#> GSM648626     3  0.6308    -0.0644 0.492 0.000 0.508
#> GSM648711     1  0.4654     0.7509 0.792 0.000 0.208
#> GSM648712     3  0.6308    -0.0644 0.492 0.000 0.508
#> GSM648713     3  0.6308    -0.0644 0.492 0.000 0.508
#> GSM648714     3  0.0592     0.7353 0.000 0.012 0.988
#> GSM648716     3  0.6308    -0.0644 0.492 0.000 0.508
#> GSM648717     3  0.0424     0.7354 0.008 0.000 0.992
#> GSM648590     2  0.5012     0.7625 0.204 0.788 0.008
#> GSM648596     2  0.2878     0.8136 0.000 0.904 0.096
#> GSM648642     2  0.5012     0.7625 0.204 0.788 0.008
#> GSM648696     2  0.6577     0.4119 0.420 0.572 0.008
#> GSM648705     1  0.3965     0.7824 0.860 0.132 0.008
#> GSM648718     2  0.0661     0.8813 0.004 0.988 0.008
#> GSM648599     1  0.4654     0.7509 0.792 0.000 0.208
#> GSM648608     1  0.0237     0.9313 0.996 0.000 0.004
#> GSM648609     1  0.0237     0.9313 0.996 0.000 0.004
#> GSM648610     1  0.3941     0.8073 0.844 0.000 0.156
#> GSM648633     1  0.0237     0.9313 0.996 0.000 0.004
#> GSM648644     2  0.0000     0.8862 0.000 1.000 0.000
#> GSM648652     1  0.0424     0.9277 0.992 0.000 0.008
#> GSM648653     1  0.0237     0.9313 0.996 0.000 0.004
#> GSM648658     1  0.0424     0.9277 0.992 0.000 0.008
#> GSM648659     2  0.5061     0.7596 0.208 0.784 0.008
#> GSM648662     1  0.3879     0.8117 0.848 0.000 0.152
#> GSM648665     1  0.0000     0.9305 1.000 0.000 0.000
#> GSM648666     1  0.0000     0.9305 1.000 0.000 0.000
#> GSM648680     1  0.0424     0.9277 0.992 0.000 0.008
#> GSM648684     1  0.0237     0.9313 0.996 0.000 0.004
#> GSM648709     2  0.4963     0.7650 0.200 0.792 0.008
#> GSM648719     1  0.0237     0.9313 0.996 0.000 0.004
#> GSM648627     3  0.6308    -0.0644 0.492 0.000 0.508
#> GSM648637     2  0.0000     0.8862 0.000 1.000 0.000
#> GSM648638     2  0.0000     0.8862 0.000 1.000 0.000
#> GSM648641     3  0.4605     0.7365 0.000 0.204 0.796
#> GSM648672     2  0.0000     0.8862 0.000 1.000 0.000
#> GSM648674     2  0.0000     0.8862 0.000 1.000 0.000
#> GSM648703     2  0.0000     0.8862 0.000 1.000 0.000
#> GSM648631     3  0.4733     0.7380 0.004 0.196 0.800
#> GSM648669     2  0.0000     0.8862 0.000 1.000 0.000
#> GSM648671     2  0.0000     0.8862 0.000 1.000 0.000
#> GSM648678     2  0.0000     0.8862 0.000 1.000 0.000
#> GSM648679     2  0.0000     0.8862 0.000 1.000 0.000
#> GSM648681     2  0.0237     0.8849 0.000 0.996 0.004
#> GSM648686     3  0.4750     0.7323 0.000 0.216 0.784
#> GSM648689     3  0.4750     0.7323 0.000 0.216 0.784
#> GSM648690     3  0.4750     0.7323 0.000 0.216 0.784
#> GSM648691     3  0.4750     0.7323 0.000 0.216 0.784
#> GSM648693     3  0.4654     0.7353 0.000 0.208 0.792
#> GSM648700     2  0.0000     0.8862 0.000 1.000 0.000
#> GSM648630     3  0.4750     0.7323 0.000 0.216 0.784
#> GSM648632     3  0.4834     0.7367 0.004 0.204 0.792
#> GSM648639     3  0.4750     0.7323 0.000 0.216 0.784
#> GSM648640     3  0.4750     0.7323 0.000 0.216 0.784
#> GSM648668     2  0.0000     0.8862 0.000 1.000 0.000
#> GSM648676     2  0.0000     0.8862 0.000 1.000 0.000
#> GSM648692     3  0.4750     0.7323 0.000 0.216 0.784
#> GSM648694     3  0.4750     0.7323 0.000 0.216 0.784
#> GSM648699     2  0.0000     0.8862 0.000 1.000 0.000
#> GSM648701     2  0.0000     0.8862 0.000 1.000 0.000
#> GSM648673     2  0.0000     0.8862 0.000 1.000 0.000
#> GSM648677     2  0.0000     0.8862 0.000 1.000 0.000
#> GSM648687     3  0.4750     0.7323 0.000 0.216 0.784
#> GSM648688     3  0.4750     0.7323 0.000 0.216 0.784

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM648605     2  0.0000     0.7690 0.000 1.000 0.000 0.000
#> GSM648618     3  0.4155     0.7790 0.240 0.004 0.756 0.000
#> GSM648620     4  0.4817     0.5651 0.000 0.388 0.000 0.612
#> GSM648646     2  0.2469     0.8602 0.000 0.892 0.108 0.000
#> GSM648649     4  0.2216     0.7204 0.000 0.092 0.000 0.908
#> GSM648675     2  0.3528     0.9062 0.000 0.808 0.192 0.000
#> GSM648682     2  0.3528     0.9062 0.000 0.808 0.192 0.000
#> GSM648698     2  0.0000     0.7690 0.000 1.000 0.000 0.000
#> GSM648708     4  0.4817     0.5651 0.000 0.388 0.000 0.612
#> GSM648628     3  0.4761     0.6929 0.372 0.000 0.628 0.000
#> GSM648595     4  0.3074     0.7159 0.000 0.152 0.000 0.848
#> GSM648635     4  0.0000     0.7075 0.000 0.000 0.000 1.000
#> GSM648645     1  0.4866     0.7347 0.596 0.000 0.000 0.404
#> GSM648647     4  0.4996     0.4168 0.000 0.484 0.000 0.516
#> GSM648667     4  0.4103     0.6670 0.000 0.256 0.000 0.744
#> GSM648695     4  0.4989     0.4432 0.000 0.472 0.000 0.528
#> GSM648704     2  0.3569     0.9068 0.000 0.804 0.196 0.000
#> GSM648706     2  0.3569     0.9068 0.000 0.804 0.196 0.000
#> GSM648593     4  0.0000     0.7075 0.000 0.000 0.000 1.000
#> GSM648594     4  0.0000     0.7075 0.000 0.000 0.000 1.000
#> GSM648600     1  0.2469     0.6145 0.892 0.000 0.000 0.108
#> GSM648621     1  0.0921     0.6960 0.972 0.000 0.000 0.028
#> GSM648622     1  0.4761     0.7586 0.628 0.000 0.000 0.372
#> GSM648623     1  0.0000     0.6872 1.000 0.000 0.000 0.000
#> GSM648636     4  0.0000     0.7075 0.000 0.000 0.000 1.000
#> GSM648655     4  0.0000     0.7075 0.000 0.000 0.000 1.000
#> GSM648661     1  0.4776     0.7569 0.624 0.000 0.000 0.376
#> GSM648664     1  0.4776     0.7569 0.624 0.000 0.000 0.376
#> GSM648683     1  0.4776     0.7569 0.624 0.000 0.000 0.376
#> GSM648685     4  0.3486     0.4299 0.188 0.000 0.000 0.812
#> GSM648702     4  0.0000     0.7075 0.000 0.000 0.000 1.000
#> GSM648597     1  0.1022     0.6731 0.968 0.000 0.000 0.032
#> GSM648603     1  0.0000     0.6872 1.000 0.000 0.000 0.000
#> GSM648606     3  0.4304     0.7642 0.284 0.000 0.716 0.000
#> GSM648613     3  0.4304     0.7642 0.284 0.000 0.716 0.000
#> GSM648619     1  0.0000     0.6872 1.000 0.000 0.000 0.000
#> GSM648654     1  0.6617     0.6919 0.628 0.124 0.004 0.244
#> GSM648663     3  0.4304     0.7642 0.284 0.000 0.716 0.000
#> GSM648670     2  0.3610     0.9056 0.000 0.800 0.200 0.000
#> GSM648707     3  0.2281     0.8224 0.096 0.000 0.904 0.000
#> GSM648615     2  0.0469     0.7811 0.000 0.988 0.012 0.000
#> GSM648643     2  0.0000     0.7690 0.000 1.000 0.000 0.000
#> GSM648650     4  0.4661     0.6010 0.000 0.348 0.000 0.652
#> GSM648656     2  0.3356     0.9000 0.000 0.824 0.176 0.000
#> GSM648715     4  0.4866     0.5401 0.000 0.404 0.000 0.596
#> GSM648598     1  0.4776     0.7569 0.624 0.000 0.000 0.376
#> GSM648601     1  0.4761     0.7586 0.628 0.000 0.000 0.372
#> GSM648602     1  0.4761     0.7586 0.628 0.000 0.000 0.372
#> GSM648604     1  0.4761     0.7586 0.628 0.000 0.000 0.372
#> GSM648614     3  0.4304     0.7642 0.284 0.000 0.716 0.000
#> GSM648624     1  0.4761     0.7586 0.628 0.000 0.000 0.372
#> GSM648625     4  0.4955    -0.5278 0.444 0.000 0.000 0.556
#> GSM648629     1  0.4761     0.7586 0.628 0.000 0.000 0.372
#> GSM648634     1  0.4996     0.6392 0.516 0.000 0.000 0.484
#> GSM648648     4  0.0000     0.7075 0.000 0.000 0.000 1.000
#> GSM648651     1  0.4761     0.7586 0.628 0.000 0.000 0.372
#> GSM648657     1  0.4830     0.6666 0.608 0.000 0.000 0.392
#> GSM648660     1  0.4866     0.7347 0.596 0.000 0.000 0.404
#> GSM648697     4  0.3486     0.4299 0.188 0.000 0.000 0.812
#> GSM648710     1  0.4761     0.7586 0.628 0.000 0.000 0.372
#> GSM648591     1  0.0336     0.6824 0.992 0.000 0.008 0.000
#> GSM648592     1  0.3356     0.5281 0.824 0.000 0.000 0.176
#> GSM648607     1  0.0000     0.6872 1.000 0.000 0.000 0.000
#> GSM648611     3  0.4331     0.7616 0.288 0.000 0.712 0.000
#> GSM648612     1  0.0336     0.6824 0.992 0.000 0.008 0.000
#> GSM648616     3  0.0188     0.8686 0.004 0.000 0.996 0.000
#> GSM648617     1  0.2469     0.6145 0.892 0.000 0.000 0.108
#> GSM648626     1  0.0000     0.6872 1.000 0.000 0.000 0.000
#> GSM648711     1  0.3764     0.7404 0.784 0.000 0.000 0.216
#> GSM648712     1  0.0000     0.6872 1.000 0.000 0.000 0.000
#> GSM648713     1  0.0000     0.6872 1.000 0.000 0.000 0.000
#> GSM648714     3  0.4304     0.7642 0.284 0.000 0.716 0.000
#> GSM648716     1  0.0000     0.6872 1.000 0.000 0.000 0.000
#> GSM648717     3  0.4304     0.7642 0.284 0.000 0.716 0.000
#> GSM648590     2  0.4697    -0.0139 0.000 0.644 0.000 0.356
#> GSM648596     2  0.3320     0.8195 0.068 0.876 0.056 0.000
#> GSM648642     4  0.4996     0.4168 0.000 0.484 0.000 0.516
#> GSM648696     4  0.3074     0.7159 0.000 0.152 0.000 0.848
#> GSM648705     4  0.2530     0.7115 0.000 0.112 0.000 0.888
#> GSM648718     2  0.0000     0.7690 0.000 1.000 0.000 0.000
#> GSM648599     1  0.0000     0.6872 1.000 0.000 0.000 0.000
#> GSM648608     1  0.4761     0.7586 0.628 0.000 0.000 0.372
#> GSM648609     1  0.4776     0.7569 0.624 0.000 0.000 0.376
#> GSM648610     1  0.4477     0.7568 0.688 0.000 0.000 0.312
#> GSM648633     1  0.4994     0.6431 0.520 0.000 0.000 0.480
#> GSM648644     2  0.3569     0.9068 0.000 0.804 0.196 0.000
#> GSM648652     4  0.0000     0.7075 0.000 0.000 0.000 1.000
#> GSM648653     1  0.4776     0.7569 0.624 0.000 0.000 0.376
#> GSM648658     4  0.0707     0.6864 0.020 0.000 0.000 0.980
#> GSM648659     4  0.4955     0.4851 0.000 0.444 0.000 0.556
#> GSM648662     1  0.4250     0.7520 0.724 0.000 0.000 0.276
#> GSM648665     1  0.4776     0.7569 0.624 0.000 0.000 0.376
#> GSM648666     1  0.4776     0.7569 0.624 0.000 0.000 0.376
#> GSM648680     4  0.0000     0.7075 0.000 0.000 0.000 1.000
#> GSM648684     1  0.4776     0.7569 0.624 0.000 0.000 0.376
#> GSM648709     2  0.4304     0.2402 0.000 0.716 0.000 0.284
#> GSM648719     1  0.4761     0.7586 0.628 0.000 0.000 0.372
#> GSM648627     1  0.0000     0.6872 1.000 0.000 0.000 0.000
#> GSM648637     2  0.3688     0.9009 0.000 0.792 0.208 0.000
#> GSM648638     2  0.3942     0.8759 0.000 0.764 0.236 0.000
#> GSM648641     3  0.0921     0.8616 0.028 0.000 0.972 0.000
#> GSM648672     2  0.3610     0.9056 0.000 0.800 0.200 0.000
#> GSM648674     2  0.3610     0.9056 0.000 0.800 0.200 0.000
#> GSM648703     2  0.3569     0.9068 0.000 0.804 0.196 0.000
#> GSM648631     3  0.0000     0.8695 0.000 0.000 1.000 0.000
#> GSM648669     2  0.4134     0.8500 0.000 0.740 0.260 0.000
#> GSM648671     2  0.4134     0.8500 0.000 0.740 0.260 0.000
#> GSM648678     2  0.3569     0.9068 0.000 0.804 0.196 0.000
#> GSM648679     2  0.3688     0.9009 0.000 0.792 0.208 0.000
#> GSM648681     2  0.2011     0.8402 0.000 0.920 0.080 0.000
#> GSM648686     3  0.0000     0.8695 0.000 0.000 1.000 0.000
#> GSM648689     3  0.0000     0.8695 0.000 0.000 1.000 0.000
#> GSM648690     3  0.0000     0.8695 0.000 0.000 1.000 0.000
#> GSM648691     3  0.0000     0.8695 0.000 0.000 1.000 0.000
#> GSM648693     3  0.0000     0.8695 0.000 0.000 1.000 0.000
#> GSM648700     2  0.3751     0.9054 0.000 0.800 0.196 0.004
#> GSM648630     3  0.0000     0.8695 0.000 0.000 1.000 0.000
#> GSM648632     3  0.0000     0.8695 0.000 0.000 1.000 0.000
#> GSM648639     3  0.0000     0.8695 0.000 0.000 1.000 0.000
#> GSM648640     3  0.0000     0.8695 0.000 0.000 1.000 0.000
#> GSM648668     2  0.3610     0.9056 0.000 0.800 0.200 0.000
#> GSM648676     2  0.3569     0.9068 0.000 0.804 0.196 0.000
#> GSM648692     3  0.0000     0.8695 0.000 0.000 1.000 0.000
#> GSM648694     3  0.0000     0.8695 0.000 0.000 1.000 0.000
#> GSM648699     2  0.3569     0.9068 0.000 0.804 0.196 0.000
#> GSM648701     2  0.3569     0.9068 0.000 0.804 0.196 0.000
#> GSM648673     2  0.3688     0.9009 0.000 0.792 0.208 0.000
#> GSM648677     2  0.3569     0.9068 0.000 0.804 0.196 0.000
#> GSM648687     3  0.0000     0.8695 0.000 0.000 1.000 0.000
#> GSM648688     3  0.0000     0.8695 0.000 0.000 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM648605     2  0.4060      0.456 0.000 0.640 0.000 0.360 0.000
#> GSM648618     3  0.4262      0.202 0.000 0.000 0.560 0.000 0.440
#> GSM648620     2  0.0000      0.830 0.000 1.000 0.000 0.000 0.000
#> GSM648646     4  0.0404      0.976 0.000 0.012 0.000 0.988 0.000
#> GSM648649     2  0.3196      0.653 0.192 0.804 0.000 0.000 0.004
#> GSM648675     4  0.0671      0.968 0.000 0.004 0.016 0.980 0.000
#> GSM648682     4  0.0290      0.978 0.000 0.008 0.000 0.992 0.000
#> GSM648698     2  0.4060      0.456 0.000 0.640 0.000 0.360 0.000
#> GSM648708     2  0.0000      0.830 0.000 1.000 0.000 0.000 0.000
#> GSM648628     5  0.1043      0.832 0.000 0.000 0.040 0.000 0.960
#> GSM648595     2  0.3612      0.667 0.184 0.796 0.016 0.000 0.004
#> GSM648635     1  0.4299      0.498 0.608 0.388 0.000 0.000 0.004
#> GSM648645     1  0.1942      0.848 0.920 0.012 0.000 0.000 0.068
#> GSM648647     2  0.0880      0.831 0.000 0.968 0.000 0.032 0.000
#> GSM648667     2  0.1205      0.815 0.040 0.956 0.000 0.000 0.004
#> GSM648695     2  0.0880      0.831 0.000 0.968 0.000 0.032 0.000
#> GSM648704     4  0.0290      0.978 0.000 0.008 0.000 0.992 0.000
#> GSM648706     4  0.0290      0.978 0.000 0.008 0.000 0.992 0.000
#> GSM648593     1  0.4182      0.560 0.644 0.352 0.000 0.000 0.004
#> GSM648594     1  0.4268      0.566 0.648 0.344 0.000 0.000 0.008
#> GSM648600     5  0.0968      0.837 0.004 0.012 0.012 0.000 0.972
#> GSM648621     5  0.2189      0.783 0.084 0.000 0.012 0.000 0.904
#> GSM648622     1  0.0290      0.876 0.992 0.000 0.000 0.000 0.008
#> GSM648623     5  0.2561      0.729 0.144 0.000 0.000 0.000 0.856
#> GSM648636     1  0.4066      0.595 0.672 0.324 0.000 0.000 0.004
#> GSM648655     1  0.3990      0.616 0.688 0.308 0.000 0.000 0.004
#> GSM648661     1  0.0000      0.876 1.000 0.000 0.000 0.000 0.000
#> GSM648664     1  0.0290      0.875 0.992 0.008 0.000 0.000 0.000
#> GSM648683     1  0.0162      0.876 0.996 0.004 0.000 0.000 0.000
#> GSM648685     1  0.0290      0.875 0.992 0.008 0.000 0.000 0.000
#> GSM648702     1  0.4196      0.554 0.640 0.356 0.000 0.000 0.004
#> GSM648597     5  0.0451      0.840 0.000 0.000 0.008 0.004 0.988
#> GSM648603     5  0.0162      0.842 0.004 0.000 0.000 0.000 0.996
#> GSM648606     5  0.4210      0.454 0.000 0.000 0.412 0.000 0.588
#> GSM648613     5  0.4192      0.468 0.000 0.000 0.404 0.000 0.596
#> GSM648619     5  0.0162      0.842 0.004 0.000 0.000 0.000 0.996
#> GSM648654     1  0.4140      0.664 0.764 0.200 0.028 0.000 0.008
#> GSM648663     5  0.4192      0.469 0.000 0.000 0.404 0.000 0.596
#> GSM648670     4  0.0609      0.968 0.000 0.000 0.020 0.980 0.000
#> GSM648707     3  0.4817      0.313 0.000 0.000 0.572 0.024 0.404
#> GSM648615     4  0.1043      0.948 0.000 0.040 0.000 0.960 0.000
#> GSM648643     4  0.3774      0.542 0.000 0.296 0.000 0.704 0.000
#> GSM648650     2  0.0162      0.829 0.000 0.996 0.000 0.000 0.004
#> GSM648656     4  0.0290      0.978 0.000 0.008 0.000 0.992 0.000
#> GSM648715     2  0.0000      0.830 0.000 1.000 0.000 0.000 0.000
#> GSM648598     1  0.0000      0.876 1.000 0.000 0.000 0.000 0.000
#> GSM648601     1  0.0404      0.876 0.988 0.000 0.000 0.000 0.012
#> GSM648602     1  0.0290      0.876 0.992 0.000 0.000 0.000 0.008
#> GSM648604     1  0.0290      0.876 0.992 0.000 0.000 0.000 0.008
#> GSM648614     5  0.4341      0.465 0.000 0.004 0.404 0.000 0.592
#> GSM648624     1  0.0290      0.876 0.992 0.000 0.000 0.000 0.008
#> GSM648625     1  0.4546      0.587 0.668 0.304 0.000 0.000 0.028
#> GSM648629     1  0.0290      0.876 0.992 0.000 0.000 0.000 0.008
#> GSM648634     1  0.1082      0.869 0.964 0.028 0.000 0.000 0.008
#> GSM648648     1  0.4101      0.585 0.664 0.332 0.000 0.000 0.004
#> GSM648651     1  0.0290      0.876 0.992 0.000 0.000 0.000 0.008
#> GSM648657     1  0.4707      0.414 0.588 0.020 0.000 0.000 0.392
#> GSM648660     1  0.0609      0.875 0.980 0.000 0.000 0.000 0.020
#> GSM648697     1  0.0290      0.875 0.992 0.008 0.000 0.000 0.000
#> GSM648710     1  0.0290      0.876 0.992 0.000 0.000 0.000 0.008
#> GSM648591     5  0.0609      0.838 0.000 0.000 0.020 0.000 0.980
#> GSM648592     5  0.0451      0.839 0.000 0.008 0.000 0.004 0.988
#> GSM648607     5  0.1671      0.805 0.076 0.000 0.000 0.000 0.924
#> GSM648611     5  0.3913      0.594 0.000 0.000 0.324 0.000 0.676
#> GSM648612     5  0.0162      0.842 0.004 0.000 0.000 0.000 0.996
#> GSM648616     3  0.3051      0.820 0.000 0.000 0.852 0.120 0.028
#> GSM648617     5  0.0671      0.837 0.000 0.016 0.004 0.000 0.980
#> GSM648626     5  0.0162      0.842 0.004 0.000 0.000 0.000 0.996
#> GSM648711     1  0.3508      0.640 0.748 0.000 0.000 0.000 0.252
#> GSM648712     5  0.0162      0.842 0.004 0.000 0.000 0.000 0.996
#> GSM648713     5  0.0404      0.841 0.012 0.000 0.000 0.000 0.988
#> GSM648714     5  0.4350      0.457 0.000 0.004 0.408 0.000 0.588
#> GSM648716     5  0.0290      0.842 0.008 0.000 0.000 0.000 0.992
#> GSM648717     5  0.4210      0.454 0.000 0.000 0.412 0.000 0.588
#> GSM648590     2  0.4734      0.498 0.008 0.632 0.016 0.344 0.000
#> GSM648596     4  0.1372      0.950 0.000 0.016 0.004 0.956 0.024
#> GSM648642     2  0.0880      0.831 0.000 0.968 0.000 0.032 0.000
#> GSM648696     2  0.3355      0.671 0.184 0.804 0.012 0.000 0.000
#> GSM648705     2  0.0865      0.823 0.024 0.972 0.000 0.000 0.004
#> GSM648718     2  0.4101      0.431 0.000 0.628 0.000 0.372 0.000
#> GSM648599     5  0.1012      0.835 0.020 0.000 0.012 0.000 0.968
#> GSM648608     1  0.0290      0.876 0.992 0.000 0.000 0.000 0.008
#> GSM648609     1  0.0000      0.876 1.000 0.000 0.000 0.000 0.000
#> GSM648610     1  0.1012      0.866 0.968 0.000 0.012 0.000 0.020
#> GSM648633     1  0.1907      0.856 0.928 0.044 0.000 0.000 0.028
#> GSM648644     4  0.0290      0.978 0.000 0.008 0.000 0.992 0.000
#> GSM648652     1  0.4196      0.554 0.640 0.356 0.000 0.000 0.004
#> GSM648653     1  0.0162      0.876 0.996 0.000 0.000 0.000 0.004
#> GSM648658     1  0.0865      0.870 0.972 0.024 0.000 0.000 0.004
#> GSM648659     2  0.0798      0.832 0.008 0.976 0.000 0.016 0.000
#> GSM648662     1  0.2389      0.791 0.880 0.000 0.004 0.000 0.116
#> GSM648665     1  0.0290      0.875 0.992 0.008 0.000 0.000 0.000
#> GSM648666     1  0.0290      0.875 0.992 0.008 0.000 0.000 0.000
#> GSM648680     1  0.0955      0.868 0.968 0.028 0.000 0.000 0.004
#> GSM648684     1  0.0000      0.876 1.000 0.000 0.000 0.000 0.000
#> GSM648709     2  0.1478      0.816 0.000 0.936 0.000 0.064 0.000
#> GSM648719     1  0.0510      0.875 0.984 0.000 0.000 0.000 0.016
#> GSM648627     5  0.0912      0.839 0.016 0.000 0.012 0.000 0.972
#> GSM648637     4  0.0162      0.977 0.000 0.000 0.004 0.996 0.000
#> GSM648638     4  0.0162      0.977 0.000 0.000 0.004 0.996 0.000
#> GSM648641     3  0.1914      0.860 0.000 0.000 0.924 0.016 0.060
#> GSM648672     4  0.0162      0.977 0.000 0.000 0.004 0.996 0.000
#> GSM648674     4  0.0162      0.977 0.000 0.000 0.004 0.996 0.000
#> GSM648703     4  0.0162      0.979 0.000 0.004 0.000 0.996 0.000
#> GSM648631     3  0.0609      0.915 0.000 0.000 0.980 0.020 0.000
#> GSM648669     4  0.0162      0.977 0.000 0.000 0.004 0.996 0.000
#> GSM648671     4  0.0162      0.977 0.000 0.000 0.004 0.996 0.000
#> GSM648678     4  0.0162      0.979 0.000 0.004 0.000 0.996 0.000
#> GSM648679     4  0.0162      0.977 0.000 0.000 0.004 0.996 0.000
#> GSM648681     4  0.0566      0.969 0.000 0.012 0.004 0.984 0.000
#> GSM648686     3  0.0963      0.909 0.000 0.000 0.964 0.036 0.000
#> GSM648689     3  0.0609      0.915 0.000 0.000 0.980 0.020 0.000
#> GSM648690     3  0.0963      0.909 0.000 0.000 0.964 0.036 0.000
#> GSM648691     3  0.0609      0.915 0.000 0.000 0.980 0.020 0.000
#> GSM648693     3  0.0609      0.915 0.000 0.000 0.980 0.020 0.000
#> GSM648700     4  0.0162      0.979 0.000 0.004 0.000 0.996 0.000
#> GSM648630     3  0.0609      0.915 0.000 0.000 0.980 0.020 0.000
#> GSM648632     3  0.0609      0.915 0.000 0.000 0.980 0.020 0.000
#> GSM648639     3  0.2280      0.834 0.000 0.000 0.880 0.120 0.000
#> GSM648640     3  0.0609      0.915 0.000 0.000 0.980 0.020 0.000
#> GSM648668     4  0.0324      0.978 0.000 0.004 0.004 0.992 0.000
#> GSM648676     4  0.0162      0.979 0.000 0.004 0.000 0.996 0.000
#> GSM648692     3  0.0609      0.915 0.000 0.000 0.980 0.020 0.000
#> GSM648694     3  0.0609      0.915 0.000 0.000 0.980 0.020 0.000
#> GSM648699     4  0.0162      0.979 0.000 0.004 0.000 0.996 0.000
#> GSM648701     4  0.0162      0.979 0.000 0.004 0.000 0.996 0.000
#> GSM648673     4  0.0162      0.977 0.000 0.000 0.004 0.996 0.000
#> GSM648677     4  0.0162      0.979 0.000 0.004 0.000 0.996 0.000
#> GSM648687     3  0.0880      0.911 0.000 0.000 0.968 0.032 0.000
#> GSM648688     3  0.0703      0.914 0.000 0.000 0.976 0.024 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM648605     2  0.1918     0.7892 0.000 0.904 0.000 0.088 0.000 0.008
#> GSM648618     5  0.4649     0.1120 0.000 0.000 0.468 0.000 0.492 0.040
#> GSM648620     2  0.1049     0.8060 0.000 0.960 0.000 0.008 0.000 0.032
#> GSM648646     4  0.2814     0.8445 0.000 0.172 0.000 0.820 0.000 0.008
#> GSM648649     6  0.5307     0.5370 0.128 0.276 0.000 0.000 0.004 0.592
#> GSM648675     4  0.4460     0.7918 0.000 0.108 0.008 0.740 0.004 0.140
#> GSM648682     4  0.2631     0.8597 0.000 0.152 0.000 0.840 0.000 0.008
#> GSM648698     2  0.1918     0.7892 0.000 0.904 0.000 0.088 0.000 0.008
#> GSM648708     2  0.0790     0.8039 0.000 0.968 0.000 0.000 0.000 0.032
#> GSM648628     5  0.1268     0.7619 0.004 0.000 0.008 0.000 0.952 0.036
#> GSM648595     6  0.5084     0.5250 0.096 0.244 0.004 0.000 0.008 0.648
#> GSM648635     6  0.4793     0.7484 0.288 0.084 0.000 0.000 0.000 0.628
#> GSM648645     6  0.4493     0.6460 0.344 0.000 0.000 0.000 0.044 0.612
#> GSM648647     2  0.0717     0.8129 0.000 0.976 0.000 0.016 0.000 0.008
#> GSM648667     2  0.4144     0.3643 0.020 0.620 0.000 0.000 0.000 0.360
#> GSM648695     2  0.0820     0.8123 0.000 0.972 0.000 0.016 0.000 0.012
#> GSM648704     4  0.2595     0.8558 0.000 0.160 0.000 0.836 0.000 0.004
#> GSM648706     4  0.2848     0.8416 0.000 0.176 0.000 0.816 0.000 0.008
#> GSM648593     6  0.4428     0.7264 0.268 0.052 0.000 0.000 0.004 0.676
#> GSM648594     6  0.4657     0.7340 0.224 0.056 0.004 0.000 0.016 0.700
#> GSM648600     5  0.2679     0.7525 0.040 0.000 0.000 0.000 0.864 0.096
#> GSM648621     5  0.3770     0.6839 0.148 0.000 0.000 0.000 0.776 0.076
#> GSM648622     1  0.1398     0.8121 0.940 0.000 0.000 0.000 0.008 0.052
#> GSM648623     5  0.4823     0.3913 0.348 0.000 0.000 0.000 0.584 0.068
#> GSM648636     6  0.4956     0.6691 0.332 0.072 0.000 0.000 0.004 0.592
#> GSM648655     6  0.4782     0.6250 0.380 0.048 0.000 0.000 0.004 0.568
#> GSM648661     1  0.0937     0.8334 0.960 0.000 0.000 0.000 0.000 0.040
#> GSM648664     1  0.0937     0.8334 0.960 0.000 0.000 0.000 0.000 0.040
#> GSM648683     1  0.1204     0.8298 0.944 0.000 0.000 0.000 0.000 0.056
#> GSM648685     1  0.1075     0.8298 0.952 0.000 0.000 0.000 0.000 0.048
#> GSM648702     6  0.4634     0.7481 0.284 0.072 0.000 0.000 0.000 0.644
#> GSM648597     5  0.3862     0.7015 0.016 0.000 0.008 0.036 0.792 0.148
#> GSM648603     5  0.2058     0.7621 0.036 0.000 0.000 0.000 0.908 0.056
#> GSM648606     5  0.5351     0.4829 0.000 0.000 0.288 0.000 0.568 0.144
#> GSM648613     5  0.5287     0.5031 0.000 0.000 0.272 0.000 0.584 0.144
#> GSM648619     5  0.1225     0.7683 0.036 0.000 0.000 0.000 0.952 0.012
#> GSM648654     1  0.3250     0.6193 0.788 0.196 0.012 0.000 0.000 0.004
#> GSM648663     5  0.5351     0.4829 0.000 0.000 0.288 0.000 0.568 0.144
#> GSM648670     4  0.1196     0.8771 0.000 0.000 0.008 0.952 0.000 0.040
#> GSM648707     5  0.5598     0.0909 0.000 0.000 0.432 0.064 0.472 0.032
#> GSM648615     4  0.3454     0.7709 0.000 0.208 0.000 0.768 0.000 0.024
#> GSM648643     2  0.3936     0.4649 0.000 0.688 0.000 0.288 0.000 0.024
#> GSM648650     2  0.3578     0.4378 0.000 0.660 0.000 0.000 0.000 0.340
#> GSM648656     4  0.2706     0.8538 0.000 0.160 0.000 0.832 0.000 0.008
#> GSM648715     2  0.0858     0.8065 0.000 0.968 0.000 0.004 0.000 0.028
#> GSM648598     1  0.2631     0.7153 0.820 0.000 0.000 0.000 0.000 0.180
#> GSM648601     1  0.3136     0.6845 0.796 0.000 0.000 0.000 0.016 0.188
#> GSM648602     1  0.1663     0.8040 0.912 0.000 0.000 0.000 0.000 0.088
#> GSM648604     1  0.0000     0.8383 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648614     5  0.5758     0.4688 0.000 0.016 0.288 0.000 0.552 0.144
#> GSM648624     1  0.0260     0.8372 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM648625     1  0.5724    -0.1774 0.484 0.084 0.000 0.000 0.028 0.404
#> GSM648629     1  0.0000     0.8383 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648634     6  0.3847     0.5824 0.456 0.000 0.000 0.000 0.000 0.544
#> GSM648648     6  0.4795     0.7374 0.324 0.072 0.000 0.000 0.000 0.604
#> GSM648651     1  0.1913     0.8009 0.908 0.000 0.000 0.000 0.012 0.080
#> GSM648657     6  0.5193     0.5605 0.164 0.004 0.000 0.000 0.200 0.632
#> GSM648660     1  0.3584     0.4073 0.688 0.000 0.000 0.000 0.004 0.308
#> GSM648697     1  0.1501     0.8174 0.924 0.000 0.000 0.000 0.000 0.076
#> GSM648710     1  0.0000     0.8383 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648591     5  0.2291     0.7622 0.008 0.000 0.008 0.016 0.904 0.064
#> GSM648592     5  0.2752     0.7547 0.000 0.000 0.004 0.036 0.864 0.096
#> GSM648607     5  0.3999     0.5890 0.272 0.000 0.000 0.000 0.696 0.032
#> GSM648611     5  0.4550     0.5899 0.000 0.000 0.240 0.000 0.676 0.084
#> GSM648612     5  0.0405     0.7629 0.004 0.000 0.000 0.000 0.988 0.008
#> GSM648616     3  0.5214     0.5370 0.000 0.000 0.588 0.332 0.048 0.032
#> GSM648617     5  0.1531     0.7582 0.000 0.000 0.004 0.000 0.928 0.068
#> GSM648626     5  0.2058     0.7621 0.036 0.000 0.000 0.000 0.908 0.056
#> GSM648711     1  0.3254     0.6601 0.816 0.000 0.000 0.000 0.136 0.048
#> GSM648712     5  0.0520     0.7637 0.008 0.000 0.000 0.000 0.984 0.008
#> GSM648713     5  0.1616     0.7698 0.048 0.000 0.000 0.000 0.932 0.020
#> GSM648714     5  0.5772     0.4622 0.000 0.016 0.292 0.000 0.548 0.144
#> GSM648716     5  0.1500     0.7691 0.052 0.000 0.000 0.000 0.936 0.012
#> GSM648717     5  0.5408     0.4582 0.000 0.000 0.304 0.000 0.552 0.144
#> GSM648590     2  0.6023     0.5439 0.032 0.596 0.004 0.156 0.004 0.208
#> GSM648596     4  0.3950     0.8190 0.000 0.140 0.008 0.792 0.024 0.036
#> GSM648642     2  0.0717     0.8129 0.000 0.976 0.000 0.016 0.000 0.008
#> GSM648696     2  0.5244     0.2204 0.112 0.552 0.000 0.000 0.000 0.336
#> GSM648705     6  0.4152     0.1171 0.012 0.440 0.000 0.000 0.000 0.548
#> GSM648718     2  0.2020     0.7842 0.000 0.896 0.000 0.096 0.000 0.008
#> GSM648599     5  0.2937     0.7462 0.056 0.000 0.000 0.000 0.848 0.096
#> GSM648608     1  0.0363     0.8356 0.988 0.000 0.000 0.000 0.000 0.012
#> GSM648609     1  0.0713     0.8373 0.972 0.000 0.000 0.000 0.000 0.028
#> GSM648610     1  0.1723     0.7943 0.928 0.000 0.000 0.000 0.036 0.036
#> GSM648633     6  0.4486     0.6401 0.364 0.020 0.000 0.000 0.012 0.604
#> GSM648644     4  0.2558     0.8585 0.000 0.156 0.000 0.840 0.000 0.004
#> GSM648652     6  0.4704     0.7472 0.300 0.072 0.000 0.000 0.000 0.628
#> GSM648653     1  0.1714     0.8025 0.908 0.000 0.000 0.000 0.000 0.092
#> GSM648658     6  0.4332     0.5629 0.416 0.016 0.000 0.000 0.004 0.564
#> GSM648659     2  0.2558     0.7375 0.000 0.840 0.000 0.000 0.004 0.156
#> GSM648662     1  0.4141     0.5925 0.756 0.000 0.004 0.000 0.128 0.112
#> GSM648665     1  0.1007     0.8341 0.956 0.000 0.000 0.000 0.000 0.044
#> GSM648666     1  0.1327     0.8288 0.936 0.000 0.000 0.000 0.000 0.064
#> GSM648680     6  0.4010     0.6512 0.408 0.008 0.000 0.000 0.000 0.584
#> GSM648684     1  0.1204     0.8298 0.944 0.000 0.000 0.000 0.000 0.056
#> GSM648709     2  0.1196     0.8094 0.000 0.952 0.000 0.040 0.000 0.008
#> GSM648719     1  0.3582     0.5608 0.732 0.000 0.000 0.000 0.016 0.252
#> GSM648627     5  0.1970     0.7678 0.060 0.000 0.000 0.000 0.912 0.028
#> GSM648637     4  0.0146     0.8895 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM648638     4  0.0146     0.8895 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM648641     3  0.3190     0.7309 0.000 0.000 0.820 0.000 0.136 0.044
#> GSM648672     4  0.0713     0.8942 0.000 0.028 0.000 0.972 0.000 0.000
#> GSM648674     4  0.0146     0.8895 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM648703     4  0.2474     0.8811 0.000 0.080 0.000 0.884 0.004 0.032
#> GSM648631     3  0.0405     0.9259 0.000 0.000 0.988 0.008 0.004 0.000
#> GSM648669     4  0.0000     0.8902 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648671     4  0.0000     0.8902 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648678     4  0.1471     0.8912 0.000 0.064 0.000 0.932 0.000 0.004
#> GSM648679     4  0.0146     0.8895 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM648681     4  0.0665     0.8876 0.000 0.004 0.008 0.980 0.000 0.008
#> GSM648686     3  0.0363     0.9294 0.000 0.000 0.988 0.012 0.000 0.000
#> GSM648689     3  0.0508     0.9274 0.000 0.000 0.984 0.012 0.000 0.004
#> GSM648690     3  0.0363     0.9294 0.000 0.000 0.988 0.012 0.000 0.000
#> GSM648691     3  0.0363     0.9294 0.000 0.000 0.988 0.012 0.000 0.000
#> GSM648693     3  0.0363     0.9294 0.000 0.000 0.988 0.012 0.000 0.000
#> GSM648700     4  0.3885     0.8167 0.000 0.100 0.000 0.780 0.004 0.116
#> GSM648630     3  0.0363     0.9294 0.000 0.000 0.988 0.012 0.000 0.000
#> GSM648632     3  0.0363     0.9294 0.000 0.000 0.988 0.012 0.000 0.000
#> GSM648639     3  0.4198     0.6024 0.000 0.000 0.656 0.316 0.004 0.024
#> GSM648640     3  0.1088     0.9134 0.000 0.000 0.960 0.016 0.000 0.024
#> GSM648668     4  0.0713     0.8942 0.000 0.028 0.000 0.972 0.000 0.000
#> GSM648676     4  0.3843     0.8216 0.000 0.104 0.000 0.784 0.004 0.108
#> GSM648692     3  0.0363     0.9294 0.000 0.000 0.988 0.012 0.000 0.000
#> GSM648694     3  0.0363     0.9294 0.000 0.000 0.988 0.012 0.000 0.000
#> GSM648699     4  0.3658     0.8345 0.000 0.104 0.000 0.800 0.004 0.092
#> GSM648701     4  0.3658     0.8345 0.000 0.104 0.000 0.800 0.004 0.092
#> GSM648673     4  0.0000     0.8902 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648677     4  0.1471     0.8912 0.000 0.064 0.000 0.932 0.000 0.004
#> GSM648687     3  0.0458     0.9270 0.000 0.000 0.984 0.016 0.000 0.000
#> GSM648688     3  0.0363     0.9294 0.000 0.000 0.988 0.012 0.000 0.000

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-MAD-skmeans-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-MAD-skmeans-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-MAD-skmeans-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-MAD-skmeans-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-MAD-skmeans-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-MAD-skmeans-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-MAD-skmeans-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-MAD-skmeans-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-MAD-skmeans-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-MAD-skmeans-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-MAD-skmeans-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-MAD-skmeans-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-MAD-skmeans-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-MAD-skmeans-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-MAD-skmeans-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-MAD-skmeans-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-MAD-skmeans-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-MAD-skmeans-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-MAD-skmeans-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-MAD-skmeans-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk MAD-skmeans-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-MAD-skmeans-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-MAD-skmeans-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-MAD-skmeans-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-MAD-skmeans-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-MAD-skmeans-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk MAD-skmeans-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>               n disease.state(p) development.stage(p) other(p) k
#> MAD:skmeans 115         4.21e-11              0.01602 3.61e-16 2
#> MAD:skmeans 117         7.71e-08              0.00157 3.99e-21 3
#> MAD:skmeans 121         1.36e-10              0.00278 8.27e-19 4
#> MAD:skmeans 116         4.91e-16              0.01526 6.22e-38 5
#> MAD:skmeans 115         1.37e-15              0.00645 1.26e-34 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


MAD:pam

The object with results only for a single top-value method and a single partition method can be extracted as:

res = res_list["MAD", "pam"]
# you can also extract it by
# res = res_list["MAD:pam"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 130 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#>   Subgroups are detected by 'pam' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk MAD-pam-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk MAD-pam-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.802           0.918       0.959         0.4438 0.554   0.554
#> 3 3 0.517           0.716       0.816         0.3448 0.805   0.669
#> 4 4 0.657           0.814       0.883         0.2146 0.795   0.542
#> 5 5 0.630           0.578       0.789         0.0803 0.807   0.420
#> 6 6 0.787           0.728       0.866         0.0576 0.892   0.554

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 2

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM648605     2  0.5737      0.848 0.136 0.864
#> GSM648618     1  0.0000      0.969 1.000 0.000
#> GSM648620     2  0.9710      0.426 0.400 0.600
#> GSM648646     2  0.0000      0.927 0.000 1.000
#> GSM648649     1  0.2948      0.928 0.948 0.052
#> GSM648675     1  0.5178      0.873 0.884 0.116
#> GSM648682     2  0.0000      0.927 0.000 1.000
#> GSM648698     2  0.5294      0.861 0.120 0.880
#> GSM648708     1  0.3274      0.922 0.940 0.060
#> GSM648628     1  0.0000      0.969 1.000 0.000
#> GSM648595     1  0.0376      0.967 0.996 0.004
#> GSM648635     1  0.0000      0.969 1.000 0.000
#> GSM648645     1  0.0000      0.969 1.000 0.000
#> GSM648647     2  0.7602      0.758 0.220 0.780
#> GSM648667     1  0.3114      0.925 0.944 0.056
#> GSM648695     1  0.4022      0.904 0.920 0.080
#> GSM648704     2  0.0000      0.927 0.000 1.000
#> GSM648706     2  0.0000      0.927 0.000 1.000
#> GSM648593     1  0.0000      0.969 1.000 0.000
#> GSM648594     1  0.0000      0.969 1.000 0.000
#> GSM648600     1  0.0000      0.969 1.000 0.000
#> GSM648621     1  0.0000      0.969 1.000 0.000
#> GSM648622     1  0.0000      0.969 1.000 0.000
#> GSM648623     1  0.0000      0.969 1.000 0.000
#> GSM648636     1  0.0000      0.969 1.000 0.000
#> GSM648655     1  0.0000      0.969 1.000 0.000
#> GSM648661     1  0.0000      0.969 1.000 0.000
#> GSM648664     1  0.0000      0.969 1.000 0.000
#> GSM648683     1  0.0000      0.969 1.000 0.000
#> GSM648685     1  0.0000      0.969 1.000 0.000
#> GSM648702     1  0.0000      0.969 1.000 0.000
#> GSM648597     1  0.0000      0.969 1.000 0.000
#> GSM648603     1  0.0000      0.969 1.000 0.000
#> GSM648606     1  0.0000      0.969 1.000 0.000
#> GSM648613     1  0.0000      0.969 1.000 0.000
#> GSM648619     1  0.0000      0.969 1.000 0.000
#> GSM648654     1  0.0000      0.969 1.000 0.000
#> GSM648663     1  0.0000      0.969 1.000 0.000
#> GSM648670     1  0.7602      0.746 0.780 0.220
#> GSM648707     1  0.6247      0.810 0.844 0.156
#> GSM648615     2  0.2948      0.907 0.052 0.948
#> GSM648643     2  0.0000      0.927 0.000 1.000
#> GSM648650     1  0.3114      0.925 0.944 0.056
#> GSM648656     2  0.0000      0.927 0.000 1.000
#> GSM648715     2  0.9393      0.531 0.356 0.644
#> GSM648598     1  0.0000      0.969 1.000 0.000
#> GSM648601     1  0.0000      0.969 1.000 0.000
#> GSM648602     1  0.0000      0.969 1.000 0.000
#> GSM648604     1  0.0000      0.969 1.000 0.000
#> GSM648614     1  0.3879      0.901 0.924 0.076
#> GSM648624     1  0.0000      0.969 1.000 0.000
#> GSM648625     1  0.0000      0.969 1.000 0.000
#> GSM648629     1  0.0000      0.969 1.000 0.000
#> GSM648634     1  0.0000      0.969 1.000 0.000
#> GSM648648     1  0.0000      0.969 1.000 0.000
#> GSM648651     1  0.0000      0.969 1.000 0.000
#> GSM648657     1  0.0000      0.969 1.000 0.000
#> GSM648660     1  0.0000      0.969 1.000 0.000
#> GSM648697     1  0.0000      0.969 1.000 0.000
#> GSM648710     1  0.0000      0.969 1.000 0.000
#> GSM648591     1  0.0000      0.969 1.000 0.000
#> GSM648592     1  0.3114      0.925 0.944 0.056
#> GSM648607     1  0.0000      0.969 1.000 0.000
#> GSM648611     1  0.0000      0.969 1.000 0.000
#> GSM648612     1  0.0000      0.969 1.000 0.000
#> GSM648616     2  0.3274      0.901 0.060 0.940
#> GSM648617     1  0.0000      0.969 1.000 0.000
#> GSM648626     1  0.0000      0.969 1.000 0.000
#> GSM648711     1  0.0000      0.969 1.000 0.000
#> GSM648712     1  0.0000      0.969 1.000 0.000
#> GSM648713     1  0.0000      0.969 1.000 0.000
#> GSM648714     2  0.7056      0.793 0.192 0.808
#> GSM648716     1  0.0000      0.969 1.000 0.000
#> GSM648717     1  0.0000      0.969 1.000 0.000
#> GSM648590     1  0.3431      0.918 0.936 0.064
#> GSM648596     2  0.7056      0.794 0.192 0.808
#> GSM648642     2  0.6623      0.815 0.172 0.828
#> GSM648696     1  0.0000      0.969 1.000 0.000
#> GSM648705     1  0.0000      0.969 1.000 0.000
#> GSM648718     2  0.6343      0.827 0.160 0.840
#> GSM648599     1  0.0000      0.969 1.000 0.000
#> GSM648608     1  0.0000      0.969 1.000 0.000
#> GSM648609     1  0.0000      0.969 1.000 0.000
#> GSM648610     1  0.0000      0.969 1.000 0.000
#> GSM648633     1  0.0000      0.969 1.000 0.000
#> GSM648644     2  0.0000      0.927 0.000 1.000
#> GSM648652     1  0.0000      0.969 1.000 0.000
#> GSM648653     1  0.0000      0.969 1.000 0.000
#> GSM648658     1  0.0000      0.969 1.000 0.000
#> GSM648659     1  0.0938      0.961 0.988 0.012
#> GSM648662     1  0.0000      0.969 1.000 0.000
#> GSM648665     1  0.0000      0.969 1.000 0.000
#> GSM648666     1  0.0000      0.969 1.000 0.000
#> GSM648680     1  0.0000      0.969 1.000 0.000
#> GSM648684     1  0.0000      0.969 1.000 0.000
#> GSM648709     2  0.9170      0.580 0.332 0.668
#> GSM648719     1  0.0000      0.969 1.000 0.000
#> GSM648627     1  0.0000      0.969 1.000 0.000
#> GSM648637     2  0.0000      0.927 0.000 1.000
#> GSM648638     2  0.0000      0.927 0.000 1.000
#> GSM648641     1  0.8813      0.582 0.700 0.300
#> GSM648672     2  0.0000      0.927 0.000 1.000
#> GSM648674     2  0.0000      0.927 0.000 1.000
#> GSM648703     2  0.0000      0.927 0.000 1.000
#> GSM648631     1  0.2043      0.945 0.968 0.032
#> GSM648669     2  0.0000      0.927 0.000 1.000
#> GSM648671     2  0.0000      0.927 0.000 1.000
#> GSM648678     2  0.0000      0.927 0.000 1.000
#> GSM648679     2  0.0000      0.927 0.000 1.000
#> GSM648681     1  0.5946      0.831 0.856 0.144
#> GSM648686     2  0.3431      0.901 0.064 0.936
#> GSM648689     2  0.3431      0.901 0.064 0.936
#> GSM648690     2  0.3114      0.905 0.056 0.944
#> GSM648691     2  0.5178      0.863 0.116 0.884
#> GSM648693     1  0.7815      0.705 0.768 0.232
#> GSM648700     1  0.7602      0.723 0.780 0.220
#> GSM648630     2  0.3431      0.901 0.064 0.936
#> GSM648632     1  0.3114      0.924 0.944 0.056
#> GSM648639     2  0.0000      0.927 0.000 1.000
#> GSM648640     2  0.0672      0.925 0.008 0.992
#> GSM648668     2  0.0000      0.927 0.000 1.000
#> GSM648676     2  0.0000      0.927 0.000 1.000
#> GSM648692     2  0.3114      0.905 0.056 0.944
#> GSM648694     2  0.4298      0.886 0.088 0.912
#> GSM648699     2  0.0000      0.927 0.000 1.000
#> GSM648701     2  0.0000      0.927 0.000 1.000
#> GSM648673     2  0.0000      0.927 0.000 1.000
#> GSM648677     2  0.0000      0.927 0.000 1.000
#> GSM648687     1  0.7602      0.723 0.780 0.220
#> GSM648688     1  0.7453      0.735 0.788 0.212

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM648605     2  0.3886     0.7962 0.096 0.880 0.024
#> GSM648618     1  0.6267     0.4880 0.548 0.000 0.452
#> GSM648620     1  0.4015     0.7484 0.876 0.028 0.096
#> GSM648646     2  0.0747     0.8708 0.000 0.984 0.016
#> GSM648649     1  0.3116     0.7579 0.892 0.000 0.108
#> GSM648675     1  0.5166     0.7121 0.828 0.056 0.116
#> GSM648682     2  0.0424     0.8739 0.000 0.992 0.008
#> GSM648698     2  0.3722     0.8022 0.088 0.888 0.024
#> GSM648708     1  0.1453     0.7791 0.968 0.008 0.024
#> GSM648628     3  0.6225    -0.1160 0.432 0.000 0.568
#> GSM648595     1  0.0747     0.7867 0.984 0.000 0.016
#> GSM648635     1  0.0237     0.7879 0.996 0.000 0.004
#> GSM648645     1  0.5650     0.6983 0.688 0.000 0.312
#> GSM648647     2  0.5559     0.6785 0.192 0.780 0.028
#> GSM648667     1  0.0592     0.7850 0.988 0.000 0.012
#> GSM648695     1  0.4277     0.7070 0.852 0.132 0.016
#> GSM648704     2  0.0237     0.8764 0.000 0.996 0.004
#> GSM648706     2  0.0424     0.8739 0.000 0.992 0.008
#> GSM648593     1  0.0424     0.7880 0.992 0.000 0.008
#> GSM648594     1  0.3038     0.7667 0.896 0.000 0.104
#> GSM648600     1  0.2878     0.7621 0.904 0.000 0.096
#> GSM648621     1  0.0592     0.7875 0.988 0.000 0.012
#> GSM648622     1  0.5431     0.7156 0.716 0.000 0.284
#> GSM648623     1  0.5465     0.7151 0.712 0.000 0.288
#> GSM648636     1  0.0000     0.7877 1.000 0.000 0.000
#> GSM648655     1  0.1964     0.7826 0.944 0.000 0.056
#> GSM648661     1  0.5431     0.7156 0.716 0.000 0.284
#> GSM648664     1  0.5431     0.7156 0.716 0.000 0.284
#> GSM648683     1  0.0000     0.7877 1.000 0.000 0.000
#> GSM648685     1  0.1964     0.7826 0.944 0.000 0.056
#> GSM648702     1  0.0000     0.7877 1.000 0.000 0.000
#> GSM648597     1  0.5733     0.6921 0.676 0.000 0.324
#> GSM648603     1  0.5733     0.6921 0.676 0.000 0.324
#> GSM648606     3  0.5968    -0.0044 0.364 0.000 0.636
#> GSM648613     3  0.4931     0.5065 0.232 0.000 0.768
#> GSM648619     1  0.5733     0.6921 0.676 0.000 0.324
#> GSM648654     1  0.5497     0.7141 0.708 0.000 0.292
#> GSM648663     1  0.6079     0.6756 0.612 0.000 0.388
#> GSM648670     1  0.7013     0.0409 0.548 0.432 0.020
#> GSM648707     3  0.4902     0.7483 0.064 0.092 0.844
#> GSM648615     2  0.3375     0.8090 0.008 0.892 0.100
#> GSM648643     2  0.1878     0.8564 0.004 0.952 0.044
#> GSM648650     1  0.0592     0.7850 0.988 0.000 0.012
#> GSM648656     2  0.0424     0.8739 0.000 0.992 0.008
#> GSM648715     2  0.7274     0.1677 0.452 0.520 0.028
#> GSM648598     1  0.2448     0.7844 0.924 0.000 0.076
#> GSM648601     1  0.2165     0.7821 0.936 0.000 0.064
#> GSM648602     1  0.0237     0.7879 0.996 0.000 0.004
#> GSM648604     1  0.5431     0.7156 0.716 0.000 0.284
#> GSM648614     1  0.5529     0.7136 0.704 0.000 0.296
#> GSM648624     1  0.5431     0.7156 0.716 0.000 0.284
#> GSM648625     1  0.2261     0.7829 0.932 0.000 0.068
#> GSM648629     1  0.5431     0.7156 0.716 0.000 0.284
#> GSM648634     1  0.0592     0.7875 0.988 0.000 0.012
#> GSM648648     1  0.1964     0.7826 0.944 0.000 0.056
#> GSM648651     1  0.5397     0.7179 0.720 0.000 0.280
#> GSM648657     1  0.2878     0.7621 0.904 0.000 0.096
#> GSM648660     1  0.1964     0.7826 0.944 0.000 0.056
#> GSM648697     1  0.1964     0.7826 0.944 0.000 0.056
#> GSM648710     1  0.5431     0.7156 0.716 0.000 0.284
#> GSM648591     1  0.5733     0.6921 0.676 0.000 0.324
#> GSM648592     1  0.5810     0.6874 0.664 0.000 0.336
#> GSM648607     1  0.5988     0.6829 0.632 0.000 0.368
#> GSM648611     3  0.6286    -0.1208 0.464 0.000 0.536
#> GSM648612     1  0.5835     0.6898 0.660 0.000 0.340
#> GSM648616     3  0.8322     0.4451 0.120 0.276 0.604
#> GSM648617     1  0.3038     0.7594 0.896 0.000 0.104
#> GSM648626     1  0.5733     0.6921 0.676 0.000 0.324
#> GSM648711     1  0.5431     0.7156 0.716 0.000 0.284
#> GSM648712     1  0.5733     0.6921 0.676 0.000 0.324
#> GSM648713     1  0.5988     0.6829 0.632 0.000 0.368
#> GSM648714     2  0.5915     0.7112 0.080 0.792 0.128
#> GSM648716     1  0.6026     0.6782 0.624 0.000 0.376
#> GSM648717     3  0.3482     0.6554 0.128 0.000 0.872
#> GSM648590     1  0.3045     0.7701 0.916 0.020 0.064
#> GSM648596     2  0.5657     0.7247 0.088 0.808 0.104
#> GSM648642     2  0.5977     0.6281 0.252 0.728 0.020
#> GSM648696     1  0.3116     0.7579 0.892 0.000 0.108
#> GSM648705     1  0.1643     0.7829 0.956 0.000 0.044
#> GSM648718     2  0.4483     0.7690 0.128 0.848 0.024
#> GSM648599     1  0.2878     0.7621 0.904 0.000 0.096
#> GSM648608     1  0.5363     0.7202 0.724 0.000 0.276
#> GSM648609     1  0.5431     0.7156 0.716 0.000 0.284
#> GSM648610     1  0.0592     0.7875 0.988 0.000 0.012
#> GSM648633     1  0.0000     0.7877 1.000 0.000 0.000
#> GSM648644     2  0.0237     0.8764 0.000 0.996 0.004
#> GSM648652     1  0.0000     0.7877 1.000 0.000 0.000
#> GSM648653     1  0.0000     0.7877 1.000 0.000 0.000
#> GSM648658     1  0.1860     0.7835 0.948 0.000 0.052
#> GSM648659     1  0.1129     0.7804 0.976 0.004 0.020
#> GSM648662     1  0.5431     0.7156 0.716 0.000 0.284
#> GSM648665     1  0.5431     0.7156 0.716 0.000 0.284
#> GSM648666     1  0.3482     0.7783 0.872 0.000 0.128
#> GSM648680     1  0.1964     0.7826 0.944 0.000 0.056
#> GSM648684     1  0.1860     0.7835 0.948 0.000 0.052
#> GSM648709     1  0.8573     0.3557 0.524 0.372 0.104
#> GSM648719     1  0.5431     0.7156 0.716 0.000 0.284
#> GSM648627     1  0.5733     0.6921 0.676 0.000 0.324
#> GSM648637     2  0.0424     0.8751 0.000 0.992 0.008
#> GSM648638     2  0.1289     0.8620 0.000 0.968 0.032
#> GSM648641     3  0.5036     0.7546 0.048 0.120 0.832
#> GSM648672     2  0.0237     0.8764 0.000 0.996 0.004
#> GSM648674     2  0.0237     0.8764 0.000 0.996 0.004
#> GSM648703     2  0.0237     0.8764 0.000 0.996 0.004
#> GSM648631     3  0.3340     0.7158 0.120 0.000 0.880
#> GSM648669     2  0.1031     0.8669 0.000 0.976 0.024
#> GSM648671     2  0.0424     0.8751 0.000 0.992 0.008
#> GSM648678     2  0.0237     0.8764 0.000 0.996 0.004
#> GSM648679     2  0.0237     0.8764 0.000 0.996 0.004
#> GSM648681     2  0.6825    -0.0447 0.492 0.496 0.012
#> GSM648686     3  0.4504     0.7346 0.000 0.196 0.804
#> GSM648689     3  0.3941     0.7508 0.000 0.156 0.844
#> GSM648690     3  0.4399     0.7412 0.000 0.188 0.812
#> GSM648691     3  0.4121     0.7530 0.000 0.168 0.832
#> GSM648693     3  0.3500     0.7573 0.004 0.116 0.880
#> GSM648700     1  0.5331     0.5911 0.792 0.184 0.024
#> GSM648630     3  0.4291     0.7480 0.000 0.180 0.820
#> GSM648632     3  0.3267     0.7180 0.116 0.000 0.884
#> GSM648639     2  0.5948     0.3762 0.000 0.640 0.360
#> GSM648640     3  0.4346     0.7452 0.000 0.184 0.816
#> GSM648668     2  0.1031     0.8669 0.000 0.976 0.024
#> GSM648676     2  0.0237     0.8764 0.000 0.996 0.004
#> GSM648692     3  0.4346     0.7452 0.000 0.184 0.816
#> GSM648694     3  0.4121     0.7537 0.000 0.168 0.832
#> GSM648699     2  0.0237     0.8764 0.000 0.996 0.004
#> GSM648701     2  0.0237     0.8764 0.000 0.996 0.004
#> GSM648673     2  0.0592     0.8733 0.000 0.988 0.012
#> GSM648677     2  0.0237     0.8764 0.000 0.996 0.004
#> GSM648687     3  0.7898     0.5359 0.232 0.116 0.652
#> GSM648688     3  0.3500     0.7573 0.004 0.116 0.880

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM648605     2  0.4364     0.7779 0.056 0.808 0.000 0.136
#> GSM648618     1  0.3266     0.7898 0.832 0.000 0.000 0.168
#> GSM648620     1  0.1661     0.8409 0.944 0.004 0.000 0.052
#> GSM648646     2  0.1302     0.8993 0.044 0.956 0.000 0.000
#> GSM648649     1  0.1557     0.8492 0.944 0.000 0.000 0.056
#> GSM648675     1  0.0376     0.8321 0.992 0.004 0.000 0.004
#> GSM648682     2  0.1302     0.8993 0.044 0.956 0.000 0.000
#> GSM648698     2  0.1635     0.8969 0.044 0.948 0.000 0.008
#> GSM648708     1  0.3052     0.8194 0.860 0.004 0.000 0.136
#> GSM648628     1  0.3810     0.7885 0.804 0.000 0.008 0.188
#> GSM648595     1  0.3024     0.8491 0.852 0.000 0.000 0.148
#> GSM648635     1  0.3311     0.8400 0.828 0.000 0.000 0.172
#> GSM648645     1  0.3764     0.7944 0.784 0.000 0.000 0.216
#> GSM648647     2  0.5321     0.6793 0.056 0.716 0.000 0.228
#> GSM648667     1  0.3356     0.8374 0.824 0.000 0.000 0.176
#> GSM648695     1  0.4956     0.8078 0.756 0.056 0.000 0.188
#> GSM648704     2  0.0188     0.9109 0.000 0.996 0.004 0.000
#> GSM648706     2  0.1302     0.8993 0.044 0.956 0.000 0.000
#> GSM648593     1  0.3975     0.7832 0.760 0.000 0.000 0.240
#> GSM648594     1  0.3074     0.8380 0.848 0.000 0.000 0.152
#> GSM648600     1  0.1557     0.8497 0.944 0.000 0.000 0.056
#> GSM648621     1  0.3123     0.8510 0.844 0.000 0.000 0.156
#> GSM648622     4  0.0188     0.8802 0.004 0.000 0.000 0.996
#> GSM648623     4  0.0336     0.8783 0.008 0.000 0.000 0.992
#> GSM648636     1  0.3400     0.8365 0.820 0.000 0.000 0.180
#> GSM648655     4  0.2868     0.8383 0.136 0.000 0.000 0.864
#> GSM648661     4  0.1792     0.8741 0.068 0.000 0.000 0.932
#> GSM648664     4  0.1867     0.8730 0.072 0.000 0.000 0.928
#> GSM648683     1  0.3975     0.7849 0.760 0.000 0.000 0.240
#> GSM648685     4  0.2973     0.8322 0.144 0.000 0.000 0.856
#> GSM648702     1  0.3400     0.8365 0.820 0.000 0.000 0.180
#> GSM648597     1  0.3486     0.7915 0.812 0.000 0.000 0.188
#> GSM648603     1  0.3486     0.7915 0.812 0.000 0.000 0.188
#> GSM648606     4  0.7519    -0.0955 0.184 0.000 0.392 0.424
#> GSM648613     3  0.6936     0.4978 0.224 0.000 0.588 0.188
#> GSM648619     1  0.3801     0.7715 0.780 0.000 0.000 0.220
#> GSM648654     4  0.1118     0.8645 0.036 0.000 0.000 0.964
#> GSM648663     4  0.2814     0.7642 0.132 0.000 0.000 0.868
#> GSM648670     1  0.1994     0.8278 0.936 0.052 0.004 0.008
#> GSM648707     3  0.5669     0.7433 0.104 0.048 0.768 0.080
#> GSM648615     2  0.3105     0.8342 0.140 0.856 0.000 0.004
#> GSM648643     2  0.1389     0.8982 0.048 0.952 0.000 0.000
#> GSM648650     1  0.3356     0.8374 0.824 0.000 0.000 0.176
#> GSM648656     2  0.1302     0.8993 0.044 0.956 0.000 0.000
#> GSM648715     2  0.7702     0.2455 0.288 0.452 0.000 0.260
#> GSM648598     4  0.2704     0.8476 0.124 0.000 0.000 0.876
#> GSM648601     1  0.3356     0.8463 0.824 0.000 0.000 0.176
#> GSM648602     1  0.3311     0.8461 0.828 0.000 0.000 0.172
#> GSM648604     4  0.0188     0.8802 0.004 0.000 0.000 0.996
#> GSM648614     4  0.0188     0.8802 0.004 0.000 0.000 0.996
#> GSM648624     4  0.0188     0.8802 0.004 0.000 0.000 0.996
#> GSM648625     4  0.1940     0.8694 0.076 0.000 0.000 0.924
#> GSM648629     4  0.0188     0.8802 0.004 0.000 0.000 0.996
#> GSM648634     1  0.3123     0.8510 0.844 0.000 0.000 0.156
#> GSM648648     4  0.3024     0.8303 0.148 0.000 0.000 0.852
#> GSM648651     4  0.1867     0.8742 0.072 0.000 0.000 0.928
#> GSM648657     1  0.1557     0.8492 0.944 0.000 0.000 0.056
#> GSM648660     4  0.4193     0.6547 0.268 0.000 0.000 0.732
#> GSM648697     4  0.2973     0.8322 0.144 0.000 0.000 0.856
#> GSM648710     4  0.0000     0.8802 0.000 0.000 0.000 1.000
#> GSM648591     1  0.3528     0.7902 0.808 0.000 0.000 0.192
#> GSM648592     1  0.3486     0.7915 0.812 0.000 0.000 0.188
#> GSM648607     4  0.2408     0.7924 0.104 0.000 0.000 0.896
#> GSM648611     3  0.7684     0.0651 0.216 0.000 0.392 0.392
#> GSM648612     1  0.4500     0.6478 0.684 0.000 0.000 0.316
#> GSM648616     3  0.1389     0.8599 0.000 0.048 0.952 0.000
#> GSM648617     1  0.1474     0.8492 0.948 0.000 0.000 0.052
#> GSM648626     1  0.3486     0.7915 0.812 0.000 0.000 0.188
#> GSM648711     4  0.0188     0.8802 0.004 0.000 0.000 0.996
#> GSM648712     1  0.3486     0.7922 0.812 0.000 0.000 0.188
#> GSM648713     4  0.2408     0.7924 0.104 0.000 0.000 0.896
#> GSM648714     2  0.5582     0.6727 0.136 0.728 0.000 0.136
#> GSM648716     4  0.3024     0.7552 0.148 0.000 0.000 0.852
#> GSM648717     3  0.6445     0.4613 0.096 0.000 0.600 0.304
#> GSM648590     1  0.2011     0.8567 0.920 0.000 0.000 0.080
#> GSM648596     2  0.4205     0.7757 0.124 0.820 0.000 0.056
#> GSM648642     1  0.5116     0.7390 0.764 0.108 0.000 0.128
#> GSM648696     1  0.1474     0.8492 0.948 0.000 0.000 0.052
#> GSM648705     1  0.3074     0.8505 0.848 0.000 0.000 0.152
#> GSM648718     2  0.1890     0.8921 0.056 0.936 0.000 0.008
#> GSM648599     1  0.1557     0.8497 0.944 0.000 0.000 0.056
#> GSM648608     4  0.1940     0.8733 0.076 0.000 0.000 0.924
#> GSM648609     4  0.0336     0.8791 0.008 0.000 0.000 0.992
#> GSM648610     1  0.3123     0.8510 0.844 0.000 0.000 0.156
#> GSM648633     1  0.3444     0.8408 0.816 0.000 0.000 0.184
#> GSM648644     2  0.0188     0.9109 0.000 0.996 0.004 0.000
#> GSM648652     1  0.3356     0.8374 0.824 0.000 0.000 0.176
#> GSM648653     1  0.3444     0.8398 0.816 0.000 0.000 0.184
#> GSM648658     4  0.3311     0.8075 0.172 0.000 0.000 0.828
#> GSM648659     1  0.2944     0.8229 0.868 0.004 0.000 0.128
#> GSM648662     4  0.0188     0.8802 0.004 0.000 0.000 0.996
#> GSM648665     4  0.0336     0.8791 0.008 0.000 0.000 0.992
#> GSM648666     4  0.2921     0.8358 0.140 0.000 0.000 0.860
#> GSM648680     4  0.2973     0.8327 0.144 0.000 0.000 0.856
#> GSM648684     4  0.3024     0.8303 0.148 0.000 0.000 0.852
#> GSM648709     2  0.6733     0.4153 0.112 0.564 0.000 0.324
#> GSM648719     4  0.0469     0.8820 0.012 0.000 0.000 0.988
#> GSM648627     1  0.4103     0.7347 0.744 0.000 0.000 0.256
#> GSM648637     2  0.0188     0.9109 0.000 0.996 0.004 0.000
#> GSM648638     2  0.1118     0.8939 0.000 0.964 0.036 0.000
#> GSM648641     3  0.0000     0.8854 0.000 0.000 1.000 0.000
#> GSM648672     2  0.0188     0.9109 0.000 0.996 0.004 0.000
#> GSM648674     2  0.0188     0.9109 0.000 0.996 0.004 0.000
#> GSM648703     2  0.0188     0.9109 0.000 0.996 0.004 0.000
#> GSM648631     3  0.0188     0.8832 0.000 0.000 0.996 0.004
#> GSM648669     2  0.0188     0.9109 0.000 0.996 0.004 0.000
#> GSM648671     2  0.0188     0.9109 0.000 0.996 0.004 0.000
#> GSM648678     2  0.0188     0.9109 0.000 0.996 0.004 0.000
#> GSM648679     2  0.0188     0.9109 0.000 0.996 0.004 0.000
#> GSM648681     2  0.2924     0.8317 0.016 0.884 0.000 0.100
#> GSM648686     3  0.0188     0.8837 0.000 0.004 0.996 0.000
#> GSM648689     3  0.0000     0.8854 0.000 0.000 1.000 0.000
#> GSM648690     3  0.0000     0.8854 0.000 0.000 1.000 0.000
#> GSM648691     3  0.0000     0.8854 0.000 0.000 1.000 0.000
#> GSM648693     3  0.0000     0.8854 0.000 0.000 1.000 0.000
#> GSM648700     1  0.4229     0.7691 0.824 0.124 0.048 0.004
#> GSM648630     3  0.0000     0.8854 0.000 0.000 1.000 0.000
#> GSM648632     3  0.0188     0.8832 0.000 0.000 0.996 0.004
#> GSM648639     3  0.4925     0.1791 0.000 0.428 0.572 0.000
#> GSM648640     3  0.1302     0.8624 0.000 0.044 0.956 0.000
#> GSM648668     2  0.0188     0.9109 0.000 0.996 0.004 0.000
#> GSM648676     2  0.0188     0.9109 0.000 0.996 0.004 0.000
#> GSM648692     3  0.0000     0.8854 0.000 0.000 1.000 0.000
#> GSM648694     3  0.0000     0.8854 0.000 0.000 1.000 0.000
#> GSM648699     2  0.0188     0.9109 0.000 0.996 0.004 0.000
#> GSM648701     2  0.0188     0.9109 0.000 0.996 0.004 0.000
#> GSM648673     2  0.0188     0.9109 0.000 0.996 0.004 0.000
#> GSM648677     2  0.0188     0.9109 0.000 0.996 0.004 0.000
#> GSM648687     3  0.0000     0.8854 0.000 0.000 1.000 0.000
#> GSM648688     3  0.0000     0.8854 0.000 0.000 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM648605     2  0.4307   -0.47069 0.000 0.504 0.000 0.496 0.000
#> GSM648618     5  0.3876    0.44038 0.000 0.316 0.000 0.000 0.684
#> GSM648620     2  0.0703    0.51208 0.000 0.976 0.000 0.000 0.024
#> GSM648646     4  0.3684    0.71115 0.000 0.280 0.000 0.720 0.000
#> GSM648649     2  0.5447    0.30824 0.072 0.572 0.000 0.000 0.356
#> GSM648675     2  0.5562    0.03428 0.072 0.520 0.000 0.000 0.408
#> GSM648682     4  0.3508    0.72996 0.000 0.252 0.000 0.748 0.000
#> GSM648698     4  0.4273    0.52982 0.000 0.448 0.000 0.552 0.000
#> GSM648708     2  0.0000    0.52298 0.000 1.000 0.000 0.000 0.000
#> GSM648628     5  0.1410    0.65782 0.060 0.000 0.000 0.000 0.940
#> GSM648595     2  0.6023    0.45713 0.248 0.576 0.000 0.000 0.176
#> GSM648635     2  0.6072    0.46420 0.252 0.568 0.000 0.000 0.180
#> GSM648645     5  0.4756    0.41790 0.044 0.288 0.000 0.000 0.668
#> GSM648647     2  0.3730    0.04533 0.000 0.712 0.000 0.288 0.000
#> GSM648667     2  0.4466    0.53845 0.176 0.748 0.000 0.000 0.076
#> GSM648695     2  0.4875    0.53895 0.136 0.760 0.000 0.040 0.064
#> GSM648704     4  0.0000    0.85631 0.000 0.000 0.000 1.000 0.000
#> GSM648706     4  0.3508    0.72996 0.000 0.252 0.000 0.748 0.000
#> GSM648593     2  0.6163    0.40900 0.300 0.536 0.000 0.000 0.164
#> GSM648594     5  0.5785    0.09056 0.092 0.404 0.000 0.000 0.504
#> GSM648600     5  0.5655    0.33789 0.112 0.288 0.000 0.000 0.600
#> GSM648621     1  0.6496    0.08159 0.488 0.280 0.000 0.000 0.232
#> GSM648622     1  0.2377    0.74216 0.872 0.000 0.000 0.000 0.128
#> GSM648623     1  0.4235    0.40290 0.576 0.000 0.000 0.000 0.424
#> GSM648636     1  0.5673    0.26746 0.596 0.292 0.000 0.000 0.112
#> GSM648655     1  0.2104    0.73826 0.916 0.024 0.000 0.000 0.060
#> GSM648661     1  0.0510    0.76218 0.984 0.000 0.000 0.000 0.016
#> GSM648664     1  0.0510    0.76218 0.984 0.000 0.000 0.000 0.016
#> GSM648683     1  0.5284    0.38506 0.660 0.236 0.000 0.000 0.104
#> GSM648685     1  0.0162    0.75761 0.996 0.004 0.000 0.000 0.000
#> GSM648702     2  0.5971    0.27616 0.396 0.492 0.000 0.000 0.112
#> GSM648597     5  0.3730    0.44929 0.000 0.288 0.000 0.000 0.712
#> GSM648603     5  0.0000    0.66777 0.000 0.000 0.000 0.000 1.000
#> GSM648606     5  0.3493    0.61690 0.060 0.000 0.108 0.000 0.832
#> GSM648613     5  0.2179    0.63137 0.000 0.000 0.112 0.000 0.888
#> GSM648619     5  0.0162    0.66836 0.004 0.000 0.000 0.000 0.996
#> GSM648654     1  0.1768    0.75695 0.924 0.004 0.000 0.000 0.072
#> GSM648663     5  0.2891    0.59313 0.176 0.000 0.000 0.000 0.824
#> GSM648670     2  0.7172    0.39256 0.072 0.544 0.000 0.192 0.192
#> GSM648707     5  0.5150    0.46396 0.000 0.000 0.136 0.172 0.692
#> GSM648615     4  0.4201    0.64821 0.000 0.328 0.000 0.664 0.008
#> GSM648643     4  0.4262    0.54190 0.000 0.440 0.000 0.560 0.000
#> GSM648650     2  0.4486    0.53866 0.172 0.748 0.000 0.000 0.080
#> GSM648656     4  0.3508    0.72996 0.000 0.252 0.000 0.748 0.000
#> GSM648715     2  0.5532    0.17354 0.104 0.616 0.000 0.280 0.000
#> GSM648598     1  0.1478    0.74933 0.936 0.000 0.000 0.000 0.064
#> GSM648601     1  0.6790    0.00424 0.384 0.300 0.000 0.000 0.316
#> GSM648602     1  0.5923    0.24603 0.576 0.280 0.000 0.000 0.144
#> GSM648604     1  0.1608    0.75721 0.928 0.000 0.000 0.000 0.072
#> GSM648614     1  0.4227    0.41132 0.580 0.000 0.000 0.000 0.420
#> GSM648624     1  0.1544    0.75925 0.932 0.000 0.000 0.000 0.068
#> GSM648625     1  0.5006    0.55358 0.704 0.180 0.000 0.000 0.116
#> GSM648629     1  0.1608    0.75721 0.928 0.000 0.000 0.000 0.072
#> GSM648634     1  0.6117    0.17341 0.540 0.304 0.000 0.000 0.156
#> GSM648648     1  0.0865    0.75228 0.972 0.024 0.000 0.000 0.004
#> GSM648651     1  0.1671    0.75208 0.924 0.000 0.000 0.000 0.076
#> GSM648657     5  0.5272    0.31101 0.072 0.308 0.000 0.000 0.620
#> GSM648660     1  0.4016    0.63934 0.796 0.112 0.000 0.000 0.092
#> GSM648697     1  0.0162    0.75761 0.996 0.004 0.000 0.000 0.000
#> GSM648710     1  0.1544    0.75925 0.932 0.000 0.000 0.000 0.068
#> GSM648591     5  0.3508    0.49438 0.000 0.252 0.000 0.000 0.748
#> GSM648592     5  0.0290    0.66667 0.000 0.008 0.000 0.000 0.992
#> GSM648607     5  0.4287    0.11740 0.460 0.000 0.000 0.000 0.540
#> GSM648611     1  0.6085    0.17990 0.472 0.000 0.124 0.000 0.404
#> GSM648612     5  0.0703    0.66748 0.024 0.000 0.000 0.000 0.976
#> GSM648616     5  0.6601    0.02476 0.000 0.000 0.292 0.248 0.460
#> GSM648617     5  0.4444    0.43426 0.072 0.180 0.000 0.000 0.748
#> GSM648626     5  0.0000    0.66777 0.000 0.000 0.000 0.000 1.000
#> GSM648711     1  0.2230    0.74750 0.884 0.000 0.000 0.000 0.116
#> GSM648712     5  0.1341    0.65962 0.056 0.000 0.000 0.000 0.944
#> GSM648713     5  0.2891    0.59234 0.176 0.000 0.000 0.000 0.824
#> GSM648714     5  0.3267    0.62004 0.016 0.044 0.000 0.076 0.864
#> GSM648716     5  0.2813    0.61980 0.168 0.000 0.000 0.000 0.832
#> GSM648717     5  0.6112    0.17902 0.140 0.000 0.344 0.000 0.516
#> GSM648590     2  0.5496    0.46562 0.152 0.652 0.000 0.000 0.196
#> GSM648596     4  0.6333    0.30489 0.008 0.236 0.000 0.564 0.192
#> GSM648642     2  0.1544    0.49179 0.000 0.932 0.000 0.068 0.000
#> GSM648696     2  0.5498    0.30640 0.076 0.568 0.000 0.000 0.356
#> GSM648705     2  0.5759    0.48263 0.180 0.620 0.000 0.000 0.200
#> GSM648718     2  0.3752    0.03487 0.000 0.708 0.000 0.292 0.000
#> GSM648599     5  0.5139    0.35858 0.072 0.280 0.000 0.000 0.648
#> GSM648608     1  0.0510    0.76218 0.984 0.000 0.000 0.000 0.016
#> GSM648609     1  0.1544    0.75925 0.932 0.000 0.000 0.000 0.068
#> GSM648610     1  0.6022    0.22731 0.564 0.280 0.000 0.000 0.156
#> GSM648633     2  0.6415    0.17843 0.400 0.428 0.000 0.000 0.172
#> GSM648644     4  0.0000    0.85631 0.000 0.000 0.000 1.000 0.000
#> GSM648652     2  0.6317    0.34138 0.332 0.496 0.000 0.000 0.172
#> GSM648653     1  0.5637    0.28208 0.604 0.284 0.000 0.000 0.112
#> GSM648658     1  0.2171    0.73718 0.912 0.024 0.000 0.000 0.064
#> GSM648659     2  0.0898    0.53081 0.020 0.972 0.000 0.000 0.008
#> GSM648662     1  0.1671    0.75739 0.924 0.000 0.000 0.000 0.076
#> GSM648665     1  0.1608    0.75721 0.928 0.000 0.000 0.000 0.072
#> GSM648666     1  0.0000    0.75788 1.000 0.000 0.000 0.000 0.000
#> GSM648680     1  0.2104    0.73826 0.916 0.024 0.000 0.000 0.060
#> GSM648684     1  0.0000    0.75788 1.000 0.000 0.000 0.000 0.000
#> GSM648709     2  0.5083    0.13405 0.000 0.652 0.000 0.280 0.068
#> GSM648719     1  0.2329    0.74467 0.876 0.000 0.000 0.000 0.124
#> GSM648627     5  0.5779    0.45517 0.172 0.212 0.000 0.000 0.616
#> GSM648637     4  0.0000    0.85631 0.000 0.000 0.000 1.000 0.000
#> GSM648638     4  0.0000    0.85631 0.000 0.000 0.000 1.000 0.000
#> GSM648641     3  0.3730    0.57967 0.000 0.000 0.712 0.000 0.288
#> GSM648672     4  0.0000    0.85631 0.000 0.000 0.000 1.000 0.000
#> GSM648674     4  0.0000    0.85631 0.000 0.000 0.000 1.000 0.000
#> GSM648703     4  0.0000    0.85631 0.000 0.000 0.000 1.000 0.000
#> GSM648631     3  0.0000    0.92456 0.000 0.000 1.000 0.000 0.000
#> GSM648669     4  0.0000    0.85631 0.000 0.000 0.000 1.000 0.000
#> GSM648671     4  0.0000    0.85631 0.000 0.000 0.000 1.000 0.000
#> GSM648678     4  0.0000    0.85631 0.000 0.000 0.000 1.000 0.000
#> GSM648679     4  0.0000    0.85631 0.000 0.000 0.000 1.000 0.000
#> GSM648681     2  0.4907    0.13188 0.000 0.664 0.000 0.280 0.056
#> GSM648686     3  0.0000    0.92456 0.000 0.000 1.000 0.000 0.000
#> GSM648689     3  0.0000    0.92456 0.000 0.000 1.000 0.000 0.000
#> GSM648690     3  0.0000    0.92456 0.000 0.000 1.000 0.000 0.000
#> GSM648691     3  0.0000    0.92456 0.000 0.000 1.000 0.000 0.000
#> GSM648693     3  0.0000    0.92456 0.000 0.000 1.000 0.000 0.000
#> GSM648700     2  0.6042    0.45277 0.040 0.632 0.004 0.256 0.068
#> GSM648630     3  0.0000    0.92456 0.000 0.000 1.000 0.000 0.000
#> GSM648632     3  0.0000    0.92456 0.000 0.000 1.000 0.000 0.000
#> GSM648639     3  0.4451    0.52681 0.000 0.000 0.644 0.340 0.016
#> GSM648640     3  0.2732    0.79161 0.000 0.000 0.840 0.160 0.000
#> GSM648668     4  0.0290    0.85185 0.000 0.008 0.000 0.992 0.000
#> GSM648676     4  0.3336    0.69590 0.000 0.228 0.000 0.772 0.000
#> GSM648692     3  0.0000    0.92456 0.000 0.000 1.000 0.000 0.000
#> GSM648694     3  0.0000    0.92456 0.000 0.000 1.000 0.000 0.000
#> GSM648699     4  0.2561    0.78498 0.000 0.144 0.000 0.856 0.000
#> GSM648701     4  0.2127    0.80342 0.000 0.108 0.000 0.892 0.000
#> GSM648673     4  0.0000    0.85631 0.000 0.000 0.000 1.000 0.000
#> GSM648677     4  0.0000    0.85631 0.000 0.000 0.000 1.000 0.000
#> GSM648687     3  0.2605    0.77913 0.148 0.000 0.852 0.000 0.000
#> GSM648688     3  0.0000    0.92456 0.000 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM648605     2  0.0713     0.7772 0.000 0.972 0.000 0.028 0.000 0.000
#> GSM648618     5  0.4076     0.2729 0.000 0.012 0.000 0.000 0.592 0.396
#> GSM648620     2  0.1141     0.8145 0.000 0.948 0.000 0.000 0.000 0.052
#> GSM648646     4  0.3765     0.5222 0.000 0.404 0.000 0.596 0.000 0.000
#> GSM648649     6  0.0692     0.8272 0.000 0.020 0.000 0.000 0.004 0.976
#> GSM648675     6  0.2680     0.8021 0.000 0.108 0.000 0.000 0.032 0.860
#> GSM648682     4  0.3756     0.5282 0.000 0.400 0.000 0.600 0.000 0.000
#> GSM648698     2  0.0713     0.7772 0.000 0.972 0.000 0.028 0.000 0.000
#> GSM648708     2  0.1141     0.8145 0.000 0.948 0.000 0.000 0.000 0.052
#> GSM648628     5  0.0632     0.7638 0.024 0.000 0.000 0.000 0.976 0.000
#> GSM648595     6  0.1262     0.8301 0.016 0.020 0.000 0.000 0.008 0.956
#> GSM648635     6  0.0547     0.8267 0.000 0.020 0.000 0.000 0.000 0.980
#> GSM648645     5  0.3789     0.2666 0.000 0.000 0.000 0.000 0.584 0.416
#> GSM648647     2  0.1219     0.8139 0.004 0.948 0.000 0.000 0.000 0.048
#> GSM648667     2  0.4835     0.5626 0.072 0.592 0.000 0.000 0.000 0.336
#> GSM648695     2  0.4671     0.6901 0.160 0.688 0.000 0.000 0.000 0.152
#> GSM648704     4  0.1075     0.8227 0.000 0.048 0.000 0.952 0.000 0.000
#> GSM648706     4  0.3756     0.5282 0.000 0.400 0.000 0.600 0.000 0.000
#> GSM648593     6  0.3668     0.6486 0.228 0.028 0.000 0.000 0.000 0.744
#> GSM648594     6  0.3868    -0.1505 0.000 0.000 0.000 0.000 0.496 0.504
#> GSM648600     6  0.2445     0.7944 0.020 0.000 0.000 0.000 0.108 0.872
#> GSM648621     6  0.2491     0.8195 0.112 0.000 0.000 0.000 0.020 0.868
#> GSM648622     1  0.1082     0.9055 0.956 0.000 0.000 0.000 0.004 0.040
#> GSM648623     1  0.4584     0.2738 0.556 0.000 0.000 0.000 0.404 0.040
#> GSM648636     6  0.2053     0.8261 0.108 0.004 0.000 0.000 0.000 0.888
#> GSM648655     1  0.2001     0.8762 0.900 0.004 0.000 0.000 0.004 0.092
#> GSM648661     1  0.0000     0.9164 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648664     1  0.0146     0.9163 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM648683     6  0.2912     0.7496 0.216 0.000 0.000 0.000 0.000 0.784
#> GSM648685     1  0.0260     0.9157 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM648702     6  0.1480     0.8344 0.040 0.020 0.000 0.000 0.000 0.940
#> GSM648597     5  0.3782     0.2702 0.000 0.000 0.000 0.000 0.588 0.412
#> GSM648603     5  0.0937     0.7642 0.000 0.000 0.000 0.000 0.960 0.040
#> GSM648606     5  0.0260     0.7630 0.008 0.000 0.000 0.000 0.992 0.000
#> GSM648613     5  0.0146     0.7634 0.000 0.000 0.000 0.000 0.996 0.004
#> GSM648619     5  0.0547     0.7656 0.000 0.000 0.000 0.000 0.980 0.020
#> GSM648654     1  0.0632     0.9062 0.976 0.000 0.000 0.000 0.024 0.000
#> GSM648663     5  0.1806     0.7251 0.088 0.000 0.000 0.000 0.908 0.004
#> GSM648670     6  0.2920     0.7784 0.000 0.020 0.000 0.128 0.008 0.844
#> GSM648707     5  0.2346     0.6908 0.000 0.000 0.008 0.124 0.868 0.000
#> GSM648615     4  0.4310     0.4767 0.000 0.404 0.000 0.576 0.004 0.016
#> GSM648643     2  0.0713     0.7772 0.000 0.972 0.000 0.028 0.000 0.000
#> GSM648650     2  0.3782     0.4841 0.000 0.588 0.000 0.000 0.000 0.412
#> GSM648656     4  0.3756     0.5282 0.000 0.400 0.000 0.600 0.000 0.000
#> GSM648715     2  0.4040     0.7330 0.132 0.756 0.000 0.000 0.000 0.112
#> GSM648598     1  0.1082     0.9055 0.956 0.000 0.000 0.000 0.004 0.040
#> GSM648601     6  0.4014     0.6791 0.096 0.000 0.000 0.000 0.148 0.756
#> GSM648602     6  0.2278     0.8143 0.128 0.000 0.000 0.000 0.004 0.868
#> GSM648604     1  0.0000     0.9164 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648614     1  0.3955     0.2591 0.560 0.000 0.000 0.000 0.436 0.004
#> GSM648624     1  0.0000     0.9164 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648625     1  0.1753     0.8847 0.912 0.000 0.000 0.000 0.004 0.084
#> GSM648629     1  0.0000     0.9164 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648634     6  0.1970     0.8299 0.092 0.000 0.000 0.000 0.008 0.900
#> GSM648648     1  0.1327     0.8867 0.936 0.000 0.000 0.000 0.000 0.064
#> GSM648651     1  0.1152     0.9047 0.952 0.000 0.000 0.000 0.004 0.044
#> GSM648657     6  0.2996     0.6271 0.000 0.000 0.000 0.000 0.228 0.772
#> GSM648660     1  0.2994     0.7207 0.788 0.000 0.000 0.000 0.004 0.208
#> GSM648697     1  0.0260     0.9157 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM648710     1  0.0000     0.9164 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648591     5  0.3706     0.3374 0.000 0.000 0.000 0.000 0.620 0.380
#> GSM648592     5  0.1007     0.7635 0.000 0.000 0.000 0.000 0.956 0.044
#> GSM648607     5  0.4254     0.2550 0.404 0.000 0.000 0.000 0.576 0.020
#> GSM648611     5  0.6381     0.1199 0.256 0.000 0.016 0.000 0.416 0.312
#> GSM648612     5  0.0458     0.7656 0.000 0.000 0.000 0.000 0.984 0.016
#> GSM648616     5  0.5160     0.3228 0.000 0.000 0.104 0.332 0.564 0.000
#> GSM648617     5  0.3843     0.1605 0.000 0.000 0.000 0.000 0.548 0.452
#> GSM648626     5  0.0713     0.7661 0.000 0.000 0.000 0.000 0.972 0.028
#> GSM648711     1  0.1074     0.9053 0.960 0.000 0.000 0.000 0.028 0.012
#> GSM648712     5  0.1088     0.7619 0.024 0.000 0.000 0.000 0.960 0.016
#> GSM648713     5  0.1003     0.7655 0.020 0.000 0.000 0.000 0.964 0.016
#> GSM648714     5  0.0777     0.7578 0.000 0.024 0.000 0.000 0.972 0.004
#> GSM648716     5  0.0777     0.7653 0.024 0.000 0.000 0.000 0.972 0.004
#> GSM648717     5  0.5100     0.3286 0.116 0.000 0.284 0.000 0.600 0.000
#> GSM648590     6  0.2022     0.8182 0.024 0.052 0.000 0.000 0.008 0.916
#> GSM648596     4  0.4840     0.6025 0.000 0.036 0.000 0.700 0.200 0.064
#> GSM648642     2  0.1141     0.8145 0.000 0.948 0.000 0.000 0.000 0.052
#> GSM648696     6  0.0951     0.8294 0.004 0.020 0.000 0.000 0.008 0.968
#> GSM648705     6  0.0547     0.8267 0.000 0.020 0.000 0.000 0.000 0.980
#> GSM648718     2  0.1141     0.8145 0.000 0.948 0.000 0.000 0.000 0.052
#> GSM648599     6  0.1957     0.7900 0.000 0.000 0.000 0.000 0.112 0.888
#> GSM648608     1  0.0000     0.9164 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648609     1  0.0000     0.9164 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648610     6  0.2553     0.8087 0.144 0.000 0.000 0.000 0.008 0.848
#> GSM648633     6  0.1082     0.8325 0.040 0.000 0.000 0.000 0.004 0.956
#> GSM648644     4  0.1007     0.8237 0.000 0.044 0.000 0.956 0.000 0.000
#> GSM648652     6  0.0458     0.8325 0.016 0.000 0.000 0.000 0.000 0.984
#> GSM648653     6  0.2003     0.8227 0.116 0.000 0.000 0.000 0.000 0.884
#> GSM648658     1  0.2902     0.7910 0.800 0.004 0.000 0.000 0.000 0.196
#> GSM648659     2  0.2912     0.7507 0.000 0.784 0.000 0.000 0.000 0.216
#> GSM648662     1  0.0146     0.9165 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM648665     1  0.0000     0.9164 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648666     1  0.0146     0.9165 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM648680     1  0.1863     0.8722 0.896 0.000 0.000 0.000 0.000 0.104
#> GSM648684     1  0.2491     0.7513 0.836 0.000 0.000 0.000 0.000 0.164
#> GSM648709     2  0.1745     0.8098 0.000 0.920 0.000 0.000 0.012 0.068
#> GSM648719     1  0.1196     0.9043 0.952 0.000 0.000 0.000 0.008 0.040
#> GSM648627     6  0.4273     0.7280 0.148 0.000 0.000 0.000 0.120 0.732
#> GSM648637     4  0.0000     0.8333 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648638     4  0.0146     0.8330 0.000 0.004 0.000 0.996 0.000 0.000
#> GSM648641     3  0.3727     0.3387 0.000 0.000 0.612 0.000 0.388 0.000
#> GSM648672     4  0.0000     0.8333 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648674     4  0.0000     0.8333 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648703     4  0.0777     0.8290 0.000 0.024 0.000 0.972 0.004 0.000
#> GSM648631     3  0.0000     0.9108 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648669     4  0.0000     0.8333 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648671     4  0.0000     0.8333 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648678     4  0.1007     0.8237 0.000 0.044 0.000 0.956 0.000 0.000
#> GSM648679     4  0.0000     0.8333 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648681     2  0.2234     0.7983 0.000 0.872 0.000 0.000 0.004 0.124
#> GSM648686     3  0.0000     0.9108 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648689     3  0.0000     0.9108 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648690     3  0.0000     0.9108 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648691     3  0.0000     0.9108 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648693     3  0.0000     0.9108 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648700     6  0.6003     0.1222 0.000 0.252 0.000 0.268 0.004 0.476
#> GSM648630     3  0.0000     0.9108 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648632     3  0.0000     0.9108 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648639     3  0.3819     0.4888 0.000 0.000 0.652 0.340 0.008 0.000
#> GSM648640     3  0.2300     0.7839 0.000 0.000 0.856 0.144 0.000 0.000
#> GSM648668     4  0.0363     0.8262 0.000 0.012 0.000 0.988 0.000 0.000
#> GSM648676     2  0.4015     0.3699 0.000 0.596 0.000 0.396 0.004 0.004
#> GSM648692     3  0.0000     0.9108 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648694     3  0.0000     0.9108 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648699     2  0.3742     0.4117 0.000 0.648 0.000 0.348 0.004 0.000
#> GSM648701     4  0.3997    -0.0669 0.000 0.488 0.000 0.508 0.004 0.000
#> GSM648673     4  0.0146     0.8318 0.000 0.004 0.000 0.996 0.000 0.000
#> GSM648677     4  0.0000     0.8333 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648687     3  0.2854     0.6977 0.208 0.000 0.792 0.000 0.000 0.000
#> GSM648688     3  0.0000     0.9108 0.000 0.000 1.000 0.000 0.000 0.000

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-MAD-pam-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-MAD-pam-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-MAD-pam-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-MAD-pam-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-MAD-pam-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-MAD-pam-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-MAD-pam-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-MAD-pam-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-MAD-pam-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-MAD-pam-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-MAD-pam-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-MAD-pam-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-MAD-pam-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-MAD-pam-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-MAD-pam-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-MAD-pam-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-MAD-pam-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-MAD-pam-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-MAD-pam-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-MAD-pam-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk MAD-pam-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-MAD-pam-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-MAD-pam-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-MAD-pam-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-MAD-pam-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-MAD-pam-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk MAD-pam-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>           n disease.state(p) development.stage(p) other(p) k
#> MAD:pam 129         1.26e-08              0.08227 1.18e-11 2
#> MAD:pam 120         4.28e-14              0.01801 1.66e-16 3
#> MAD:pam 123         7.26e-15              0.03136 3.28e-19 4
#> MAD:pam  84         3.69e-12              0.02793 6.25e-31 5
#> MAD:pam 110         7.05e-16              0.00284 1.28e-35 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


MAD:mclust

The object with results only for a single top-value method and a single partition method can be extracted as:

res = res_list["MAD", "mclust"]
# you can also extract it by
# res = res_list["MAD:mclust"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 130 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#>   Subgroups are detected by 'mclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk MAD-mclust-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk MAD-mclust-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.806           0.881       0.930         0.4942 0.497   0.497
#> 3 3 0.637           0.785       0.889         0.2641 0.814   0.644
#> 4 4 0.681           0.816       0.884         0.1358 0.710   0.382
#> 5 5 0.756           0.867       0.915         0.0587 0.904   0.694
#> 6 6 0.710           0.572       0.785         0.0635 0.956   0.827

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 2

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM648605     2  0.0938      0.891 0.012 0.988
#> GSM648618     2  0.8861      0.700 0.304 0.696
#> GSM648620     2  0.9686      0.443 0.396 0.604
#> GSM648646     2  0.0672      0.891 0.008 0.992
#> GSM648649     1  0.3431      0.946 0.936 0.064
#> GSM648675     2  0.0938      0.891 0.012 0.988
#> GSM648682     2  0.0672      0.891 0.008 0.992
#> GSM648698     2  0.0938      0.891 0.012 0.988
#> GSM648708     2  0.9815      0.380 0.420 0.580
#> GSM648628     2  0.8861      0.700 0.304 0.696
#> GSM648595     1  0.3584      0.944 0.932 0.068
#> GSM648635     1  0.3431      0.946 0.936 0.064
#> GSM648645     1  0.2778      0.953 0.952 0.048
#> GSM648647     2  0.8016      0.714 0.244 0.756
#> GSM648667     1  0.3431      0.946 0.936 0.064
#> GSM648695     2  0.9710      0.433 0.400 0.600
#> GSM648704     2  0.0672      0.891 0.008 0.992
#> GSM648706     2  0.0672      0.891 0.008 0.992
#> GSM648593     1  0.3431      0.946 0.936 0.064
#> GSM648594     1  0.3584      0.944 0.932 0.068
#> GSM648600     1  0.2948      0.952 0.948 0.052
#> GSM648621     1  0.0000      0.964 1.000 0.000
#> GSM648622     1  0.0000      0.964 1.000 0.000
#> GSM648623     1  0.0000      0.964 1.000 0.000
#> GSM648636     1  0.3431      0.946 0.936 0.064
#> GSM648655     1  0.3431      0.946 0.936 0.064
#> GSM648661     1  0.0000      0.964 1.000 0.000
#> GSM648664     1  0.0000      0.964 1.000 0.000
#> GSM648683     1  0.0000      0.964 1.000 0.000
#> GSM648685     1  0.0000      0.964 1.000 0.000
#> GSM648702     1  0.3431      0.946 0.936 0.064
#> GSM648597     1  0.2778      0.954 0.952 0.048
#> GSM648603     1  0.0000      0.964 1.000 0.000
#> GSM648606     2  0.8443      0.738 0.272 0.728
#> GSM648613     2  0.7815      0.777 0.232 0.768
#> GSM648619     1  0.0000      0.964 1.000 0.000
#> GSM648654     2  0.9944      0.412 0.456 0.544
#> GSM648663     2  0.8861      0.700 0.304 0.696
#> GSM648670     2  0.0938      0.891 0.012 0.988
#> GSM648707     2  0.3733      0.878 0.072 0.928
#> GSM648615     2  0.0938      0.891 0.012 0.988
#> GSM648643     2  0.0938      0.891 0.012 0.988
#> GSM648650     1  0.3431      0.946 0.936 0.064
#> GSM648656     2  0.0672      0.891 0.008 0.992
#> GSM648715     2  0.9686      0.443 0.396 0.604
#> GSM648598     1  0.0376      0.964 0.996 0.004
#> GSM648601     1  0.0000      0.964 1.000 0.000
#> GSM648602     1  0.0000      0.964 1.000 0.000
#> GSM648604     1  0.0000      0.964 1.000 0.000
#> GSM648614     2  0.8861      0.700 0.304 0.696
#> GSM648624     1  0.0000      0.964 1.000 0.000
#> GSM648625     1  0.3431      0.946 0.936 0.064
#> GSM648629     1  0.0000      0.964 1.000 0.000
#> GSM648634     1  0.2423      0.956 0.960 0.040
#> GSM648648     1  0.3431      0.946 0.936 0.064
#> GSM648651     1  0.0000      0.964 1.000 0.000
#> GSM648657     1  0.3431      0.946 0.936 0.064
#> GSM648660     1  0.2043      0.958 0.968 0.032
#> GSM648697     1  0.0000      0.964 1.000 0.000
#> GSM648710     1  0.0000      0.964 1.000 0.000
#> GSM648591     1  0.7376      0.679 0.792 0.208
#> GSM648592     1  0.6438      0.835 0.836 0.164
#> GSM648607     1  0.0000      0.964 1.000 0.000
#> GSM648611     2  0.8861      0.700 0.304 0.696
#> GSM648612     1  0.0672      0.960 0.992 0.008
#> GSM648616     2  0.3431      0.881 0.064 0.936
#> GSM648617     1  0.3114      0.951 0.944 0.056
#> GSM648626     1  0.0000      0.964 1.000 0.000
#> GSM648711     1  0.0000      0.964 1.000 0.000
#> GSM648712     1  0.0000      0.964 1.000 0.000
#> GSM648713     1  0.0000      0.964 1.000 0.000
#> GSM648714     2  0.3733      0.881 0.072 0.928
#> GSM648716     1  0.0000      0.964 1.000 0.000
#> GSM648717     2  0.8661      0.720 0.288 0.712
#> GSM648590     2  0.9358      0.540 0.352 0.648
#> GSM648596     2  0.0938      0.891 0.012 0.988
#> GSM648642     2  0.7674      0.736 0.224 0.776
#> GSM648696     1  0.3584      0.944 0.932 0.068
#> GSM648705     1  0.3431      0.946 0.936 0.064
#> GSM648718     2  0.0938      0.891 0.012 0.988
#> GSM648599     1  0.0000      0.964 1.000 0.000
#> GSM648608     1  0.0000      0.964 1.000 0.000
#> GSM648609     1  0.0000      0.964 1.000 0.000
#> GSM648610     1  0.0000      0.964 1.000 0.000
#> GSM648633     1  0.3431      0.946 0.936 0.064
#> GSM648644     2  0.0672      0.891 0.008 0.992
#> GSM648652     1  0.3431      0.946 0.936 0.064
#> GSM648653     1  0.0000      0.964 1.000 0.000
#> GSM648658     1  0.3431      0.946 0.936 0.064
#> GSM648659     2  0.9286      0.556 0.344 0.656
#> GSM648662     1  0.0000      0.964 1.000 0.000
#> GSM648665     1  0.0000      0.964 1.000 0.000
#> GSM648666     1  0.0000      0.964 1.000 0.000
#> GSM648680     1  0.3431      0.946 0.936 0.064
#> GSM648684     1  0.0000      0.964 1.000 0.000
#> GSM648709     2  0.7950      0.718 0.240 0.760
#> GSM648719     1  0.0000      0.964 1.000 0.000
#> GSM648627     1  0.0000      0.964 1.000 0.000
#> GSM648637     2  0.0672      0.891 0.008 0.992
#> GSM648638     2  0.0672      0.891 0.008 0.992
#> GSM648641     2  0.3733      0.878 0.072 0.928
#> GSM648672     2  0.0672      0.891 0.008 0.992
#> GSM648674     2  0.0672      0.891 0.008 0.992
#> GSM648703     2  0.0672      0.891 0.008 0.992
#> GSM648631     2  0.3431      0.877 0.064 0.936
#> GSM648669     2  0.0672      0.891 0.008 0.992
#> GSM648671     2  0.0672      0.891 0.008 0.992
#> GSM648678     2  0.0672      0.891 0.008 0.992
#> GSM648679     2  0.0672      0.891 0.008 0.992
#> GSM648681     2  0.1184      0.890 0.016 0.984
#> GSM648686     2  0.3431      0.877 0.064 0.936
#> GSM648689     2  0.3431      0.877 0.064 0.936
#> GSM648690     2  0.3431      0.877 0.064 0.936
#> GSM648691     2  0.3431      0.877 0.064 0.936
#> GSM648693     2  0.3431      0.877 0.064 0.936
#> GSM648700     2  0.0672      0.891 0.008 0.992
#> GSM648630     2  0.3431      0.877 0.064 0.936
#> GSM648632     2  0.3431      0.877 0.064 0.936
#> GSM648639     2  0.3431      0.881 0.064 0.936
#> GSM648640     2  0.3733      0.878 0.072 0.928
#> GSM648668     2  0.0672      0.891 0.008 0.992
#> GSM648676     2  0.0672      0.891 0.008 0.992
#> GSM648692     2  0.3431      0.877 0.064 0.936
#> GSM648694     2  0.3431      0.877 0.064 0.936
#> GSM648699     2  0.0672      0.891 0.008 0.992
#> GSM648701     2  0.0672      0.891 0.008 0.992
#> GSM648673     2  0.0672      0.891 0.008 0.992
#> GSM648677     2  0.0672      0.891 0.008 0.992
#> GSM648687     2  0.3584      0.878 0.068 0.932
#> GSM648688     2  0.3431      0.877 0.064 0.936

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM648605     2  0.4475    0.77211 0.064 0.864 0.072
#> GSM648618     3  0.8949    0.51333 0.320 0.148 0.532
#> GSM648620     2  0.6075    0.61058 0.316 0.676 0.008
#> GSM648646     2  0.1860    0.84866 0.000 0.948 0.052
#> GSM648649     1  0.6079    0.28207 0.612 0.388 0.000
#> GSM648675     2  0.1289    0.83384 0.032 0.968 0.000
#> GSM648682     2  0.2261    0.84981 0.000 0.932 0.068
#> GSM648698     2  0.0829    0.84117 0.004 0.984 0.012
#> GSM648708     2  0.5363    0.66546 0.276 0.724 0.000
#> GSM648628     3  0.8830    0.22970 0.416 0.116 0.468
#> GSM648595     2  0.6082    0.60236 0.296 0.692 0.012
#> GSM648635     1  0.2711    0.84832 0.912 0.088 0.000
#> GSM648645     1  0.0000    0.91058 1.000 0.000 0.000
#> GSM648647     2  0.3412    0.80264 0.124 0.876 0.000
#> GSM648667     2  0.6168    0.40551 0.412 0.588 0.000
#> GSM648695     2  0.5216    0.68420 0.260 0.740 0.000
#> GSM648704     2  0.2537    0.84935 0.000 0.920 0.080
#> GSM648706     2  0.2711    0.84634 0.000 0.912 0.088
#> GSM648593     1  0.5016    0.64442 0.760 0.240 0.000
#> GSM648594     1  0.3752    0.78972 0.856 0.144 0.000
#> GSM648600     1  0.1289    0.90112 0.968 0.000 0.032
#> GSM648621     1  0.1289    0.90112 0.968 0.000 0.032
#> GSM648622     1  0.0237    0.91035 0.996 0.000 0.004
#> GSM648623     1  0.1289    0.90112 0.968 0.000 0.032
#> GSM648636     1  0.2165    0.86995 0.936 0.064 0.000
#> GSM648655     1  0.2066    0.87312 0.940 0.060 0.000
#> GSM648661     1  0.0000    0.91058 1.000 0.000 0.000
#> GSM648664     1  0.0000    0.91058 1.000 0.000 0.000
#> GSM648683     1  0.0000    0.91058 1.000 0.000 0.000
#> GSM648685     1  0.0000    0.91058 1.000 0.000 0.000
#> GSM648702     1  0.3116    0.82873 0.892 0.108 0.000
#> GSM648597     1  0.7419    0.55664 0.680 0.088 0.232
#> GSM648603     1  0.1289    0.90112 0.968 0.000 0.032
#> GSM648606     3  0.6325    0.75528 0.112 0.116 0.772
#> GSM648613     3  0.5695    0.77821 0.076 0.120 0.804
#> GSM648619     1  0.1289    0.90112 0.968 0.000 0.032
#> GSM648654     1  0.6527    0.41844 0.660 0.020 0.320
#> GSM648663     3  0.8468    0.50771 0.308 0.116 0.576
#> GSM648670     2  0.1711    0.83241 0.032 0.960 0.008
#> GSM648707     3  0.4931    0.80125 0.032 0.140 0.828
#> GSM648615     2  0.1482    0.83498 0.020 0.968 0.012
#> GSM648643     2  0.0848    0.84029 0.008 0.984 0.008
#> GSM648650     2  0.6008    0.50040 0.372 0.628 0.000
#> GSM648656     2  0.2537    0.84935 0.000 0.920 0.080
#> GSM648715     2  0.4605    0.74271 0.204 0.796 0.000
#> GSM648598     1  0.0000    0.91058 1.000 0.000 0.000
#> GSM648601     1  0.0000    0.91058 1.000 0.000 0.000
#> GSM648602     1  0.0237    0.91035 0.996 0.000 0.004
#> GSM648604     1  0.0000    0.91058 1.000 0.000 0.000
#> GSM648614     3  0.8513    0.49206 0.316 0.116 0.568
#> GSM648624     1  0.0237    0.91035 0.996 0.000 0.004
#> GSM648625     1  0.0237    0.91035 0.996 0.000 0.004
#> GSM648629     1  0.0000    0.91058 1.000 0.000 0.000
#> GSM648634     1  0.0000    0.91058 1.000 0.000 0.000
#> GSM648648     1  0.2356    0.86292 0.928 0.072 0.000
#> GSM648651     1  0.0237    0.91035 0.996 0.000 0.004
#> GSM648657     1  0.0892    0.90588 0.980 0.000 0.020
#> GSM648660     1  0.0000    0.91058 1.000 0.000 0.000
#> GSM648697     1  0.0000    0.91058 1.000 0.000 0.000
#> GSM648710     1  0.0000    0.91058 1.000 0.000 0.000
#> GSM648591     1  0.8550    0.00364 0.492 0.096 0.412
#> GSM648592     1  0.8765    0.09679 0.504 0.116 0.380
#> GSM648607     1  0.1289    0.90112 0.968 0.000 0.032
#> GSM648611     3  0.8765    0.33882 0.380 0.116 0.504
#> GSM648612     1  0.4745    0.80447 0.852 0.080 0.068
#> GSM648616     3  0.3690    0.81048 0.016 0.100 0.884
#> GSM648617     1  0.8202    0.19378 0.544 0.080 0.376
#> GSM648626     1  0.1643    0.89614 0.956 0.000 0.044
#> GSM648711     1  0.1289    0.90112 0.968 0.000 0.032
#> GSM648712     1  0.3134    0.86318 0.916 0.052 0.032
#> GSM648713     1  0.2689    0.87727 0.932 0.036 0.032
#> GSM648714     3  0.5998    0.77524 0.084 0.128 0.788
#> GSM648716     1  0.2176    0.88967 0.948 0.020 0.032
#> GSM648717     3  0.6462    0.75073 0.120 0.116 0.764
#> GSM648590     2  0.3686    0.77205 0.140 0.860 0.000
#> GSM648596     2  0.1620    0.83387 0.024 0.964 0.012
#> GSM648642     2  0.2066    0.82255 0.060 0.940 0.000
#> GSM648696     2  0.6309    0.16195 0.496 0.504 0.000
#> GSM648705     1  0.6302   -0.07031 0.520 0.480 0.000
#> GSM648718     2  0.0592    0.83757 0.012 0.988 0.000
#> GSM648599     1  0.1289    0.90112 0.968 0.000 0.032
#> GSM648608     1  0.0000    0.91058 1.000 0.000 0.000
#> GSM648609     1  0.0000    0.91058 1.000 0.000 0.000
#> GSM648610     1  0.0592    0.90849 0.988 0.000 0.012
#> GSM648633     1  0.0424    0.90957 0.992 0.000 0.008
#> GSM648644     2  0.2537    0.84935 0.000 0.920 0.080
#> GSM648652     1  0.1643    0.88551 0.956 0.044 0.000
#> GSM648653     1  0.0000    0.91058 1.000 0.000 0.000
#> GSM648658     1  0.0000    0.91058 1.000 0.000 0.000
#> GSM648659     2  0.4235    0.73354 0.176 0.824 0.000
#> GSM648662     1  0.0424    0.90957 0.992 0.000 0.008
#> GSM648665     1  0.0000    0.91058 1.000 0.000 0.000
#> GSM648666     1  0.0000    0.91058 1.000 0.000 0.000
#> GSM648680     1  0.1289    0.89202 0.968 0.032 0.000
#> GSM648684     1  0.0000    0.91058 1.000 0.000 0.000
#> GSM648709     2  0.4346    0.72647 0.184 0.816 0.000
#> GSM648719     1  0.0237    0.91035 0.996 0.000 0.004
#> GSM648627     1  0.1711    0.89718 0.960 0.008 0.032
#> GSM648637     2  0.2796    0.84501 0.000 0.908 0.092
#> GSM648638     2  0.5560    0.58315 0.000 0.700 0.300
#> GSM648641     3  0.3272    0.82445 0.016 0.080 0.904
#> GSM648672     2  0.2537    0.84935 0.000 0.920 0.080
#> GSM648674     2  0.2711    0.84684 0.000 0.912 0.088
#> GSM648703     2  0.2537    0.84935 0.000 0.920 0.080
#> GSM648631     3  0.1289    0.83779 0.000 0.032 0.968
#> GSM648669     2  0.3116    0.83329 0.000 0.892 0.108
#> GSM648671     2  0.2537    0.84935 0.000 0.920 0.080
#> GSM648678     2  0.2537    0.84935 0.000 0.920 0.080
#> GSM648679     2  0.2711    0.84684 0.000 0.912 0.088
#> GSM648681     2  0.1163    0.83511 0.028 0.972 0.000
#> GSM648686     3  0.1411    0.83687 0.000 0.036 0.964
#> GSM648689     3  0.1289    0.83779 0.000 0.032 0.968
#> GSM648690     3  0.1411    0.83687 0.000 0.036 0.964
#> GSM648691     3  0.1289    0.83779 0.000 0.032 0.968
#> GSM648693     3  0.1289    0.83779 0.000 0.032 0.968
#> GSM648700     2  0.0747    0.84272 0.000 0.984 0.016
#> GSM648630     3  0.1289    0.83779 0.000 0.032 0.968
#> GSM648632     3  0.1289    0.83779 0.000 0.032 0.968
#> GSM648639     3  0.3193    0.81094 0.004 0.100 0.896
#> GSM648640     3  0.2590    0.82446 0.004 0.072 0.924
#> GSM648668     2  0.2625    0.84793 0.000 0.916 0.084
#> GSM648676     2  0.2537    0.84935 0.000 0.920 0.080
#> GSM648692     3  0.1289    0.83779 0.000 0.032 0.968
#> GSM648694     3  0.1289    0.83779 0.000 0.032 0.968
#> GSM648699     2  0.2537    0.84935 0.000 0.920 0.080
#> GSM648701     2  0.2537    0.84935 0.000 0.920 0.080
#> GSM648673     2  0.2537    0.84935 0.000 0.920 0.080
#> GSM648677     2  0.2537    0.84935 0.000 0.920 0.080
#> GSM648687     3  0.1711    0.83678 0.008 0.032 0.960
#> GSM648688     3  0.1289    0.83779 0.000 0.032 0.968

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM648605     2  0.3176      0.832 0.000 0.880 0.084 0.036
#> GSM648618     3  0.0712      0.814 0.004 0.008 0.984 0.004
#> GSM648620     1  0.2921      0.816 0.860 0.140 0.000 0.000
#> GSM648646     2  0.0000      0.934 0.000 1.000 0.000 0.000
#> GSM648649     1  0.2469      0.831 0.892 0.108 0.000 0.000
#> GSM648675     1  0.3972      0.762 0.788 0.204 0.008 0.000
#> GSM648682     2  0.0000      0.934 0.000 1.000 0.000 0.000
#> GSM648698     2  0.0376      0.930 0.000 0.992 0.004 0.004
#> GSM648708     1  0.3266      0.799 0.832 0.168 0.000 0.000
#> GSM648628     3  0.0376      0.814 0.004 0.000 0.992 0.004
#> GSM648595     1  0.3266      0.799 0.832 0.168 0.000 0.000
#> GSM648635     1  0.0188      0.831 0.996 0.004 0.000 0.000
#> GSM648645     1  0.0188      0.829 0.996 0.000 0.000 0.004
#> GSM648647     1  0.5060      0.409 0.584 0.412 0.004 0.000
#> GSM648667     1  0.2589      0.828 0.884 0.116 0.000 0.000
#> GSM648695     1  0.3266      0.799 0.832 0.168 0.000 0.000
#> GSM648704     2  0.0000      0.934 0.000 1.000 0.000 0.000
#> GSM648706     2  0.0592      0.922 0.000 0.984 0.000 0.016
#> GSM648593     1  0.2704      0.826 0.876 0.124 0.000 0.000
#> GSM648594     1  0.2408      0.832 0.896 0.104 0.000 0.000
#> GSM648600     1  0.1792      0.817 0.932 0.000 0.068 0.000
#> GSM648621     3  0.3219      0.881 0.164 0.000 0.836 0.000
#> GSM648622     3  0.3908      0.887 0.212 0.000 0.784 0.004
#> GSM648623     3  0.2760      0.879 0.128 0.000 0.872 0.000
#> GSM648636     1  0.0000      0.830 1.000 0.000 0.000 0.000
#> GSM648655     1  0.0000      0.830 1.000 0.000 0.000 0.000
#> GSM648661     3  0.3870      0.889 0.208 0.000 0.788 0.004
#> GSM648664     3  0.3870      0.889 0.208 0.000 0.788 0.004
#> GSM648683     3  0.3870      0.889 0.208 0.000 0.788 0.004
#> GSM648685     3  0.3870      0.889 0.208 0.000 0.788 0.004
#> GSM648702     1  0.0817      0.834 0.976 0.024 0.000 0.000
#> GSM648597     1  0.3831      0.744 0.792 0.004 0.204 0.000
#> GSM648603     1  0.4193      0.531 0.732 0.000 0.268 0.000
#> GSM648606     3  0.0188      0.811 0.000 0.000 0.996 0.004
#> GSM648613     3  0.0188      0.811 0.000 0.000 0.996 0.004
#> GSM648619     3  0.2814      0.880 0.132 0.000 0.868 0.000
#> GSM648654     3  0.3791      0.888 0.200 0.000 0.796 0.004
#> GSM648663     3  0.0376      0.814 0.004 0.000 0.992 0.004
#> GSM648670     1  0.4544      0.779 0.788 0.164 0.048 0.000
#> GSM648707     3  0.2718      0.765 0.012 0.056 0.912 0.020
#> GSM648615     1  0.5148      0.554 0.640 0.348 0.008 0.004
#> GSM648643     2  0.2010      0.871 0.060 0.932 0.004 0.004
#> GSM648650     1  0.2921      0.817 0.860 0.140 0.000 0.000
#> GSM648656     2  0.0000      0.934 0.000 1.000 0.000 0.000
#> GSM648715     1  0.3266      0.799 0.832 0.168 0.000 0.000
#> GSM648598     1  0.0376      0.827 0.992 0.000 0.004 0.004
#> GSM648601     1  0.0895      0.817 0.976 0.000 0.020 0.004
#> GSM648602     1  0.5137     -0.251 0.544 0.000 0.452 0.004
#> GSM648604     3  0.3870      0.889 0.208 0.000 0.788 0.004
#> GSM648614     3  0.0524      0.817 0.008 0.000 0.988 0.004
#> GSM648624     3  0.3870      0.889 0.208 0.000 0.788 0.004
#> GSM648625     1  0.0524      0.825 0.988 0.000 0.008 0.004
#> GSM648629     3  0.3870      0.889 0.208 0.000 0.788 0.004
#> GSM648634     1  0.0376      0.827 0.992 0.000 0.004 0.004
#> GSM648648     1  0.0000      0.830 1.000 0.000 0.000 0.000
#> GSM648651     3  0.4456      0.826 0.280 0.000 0.716 0.004
#> GSM648657     1  0.0469      0.829 0.988 0.000 0.012 0.000
#> GSM648660     1  0.0188      0.829 0.996 0.000 0.000 0.004
#> GSM648697     3  0.4188      0.863 0.244 0.000 0.752 0.004
#> GSM648710     3  0.3870      0.889 0.208 0.000 0.788 0.004
#> GSM648591     3  0.3569      0.643 0.196 0.000 0.804 0.000
#> GSM648592     1  0.4019      0.749 0.792 0.012 0.196 0.000
#> GSM648607     3  0.3688      0.889 0.208 0.000 0.792 0.000
#> GSM648611     3  0.0376      0.814 0.004 0.000 0.992 0.004
#> GSM648612     3  0.2647      0.877 0.120 0.000 0.880 0.000
#> GSM648616     3  0.4988      0.455 0.000 0.288 0.692 0.020
#> GSM648617     1  0.3688      0.745 0.792 0.000 0.208 0.000
#> GSM648626     3  0.4193      0.719 0.268 0.000 0.732 0.000
#> GSM648711     3  0.3870      0.889 0.208 0.000 0.788 0.004
#> GSM648712     3  0.2704      0.878 0.124 0.000 0.876 0.000
#> GSM648713     3  0.2647      0.877 0.120 0.000 0.880 0.000
#> GSM648714     3  0.0188      0.811 0.000 0.000 0.996 0.004
#> GSM648716     3  0.2760      0.879 0.128 0.000 0.872 0.000
#> GSM648717     3  0.0376      0.814 0.004 0.000 0.992 0.004
#> GSM648590     1  0.3626      0.783 0.812 0.184 0.004 0.000
#> GSM648596     1  0.4578      0.780 0.788 0.160 0.052 0.000
#> GSM648642     2  0.4687      0.508 0.288 0.704 0.004 0.004
#> GSM648696     1  0.2281      0.833 0.904 0.096 0.000 0.000
#> GSM648705     1  0.2704      0.826 0.876 0.124 0.000 0.000
#> GSM648718     2  0.4832      0.447 0.312 0.680 0.004 0.004
#> GSM648599     1  0.4730      0.192 0.636 0.000 0.364 0.000
#> GSM648608     3  0.3870      0.889 0.208 0.000 0.788 0.004
#> GSM648609     3  0.3870      0.889 0.208 0.000 0.788 0.004
#> GSM648610     3  0.3870      0.889 0.208 0.000 0.788 0.004
#> GSM648633     1  0.0336      0.828 0.992 0.000 0.008 0.000
#> GSM648644     2  0.0000      0.934 0.000 1.000 0.000 0.000
#> GSM648652     1  0.0000      0.830 1.000 0.000 0.000 0.000
#> GSM648653     1  0.5151     -0.290 0.532 0.000 0.464 0.004
#> GSM648658     1  0.0000      0.830 1.000 0.000 0.000 0.000
#> GSM648659     1  0.4283      0.708 0.740 0.256 0.000 0.004
#> GSM648662     3  0.3870      0.889 0.208 0.000 0.788 0.004
#> GSM648665     3  0.3870      0.889 0.208 0.000 0.788 0.004
#> GSM648666     3  0.4018      0.879 0.224 0.000 0.772 0.004
#> GSM648680     1  0.0000      0.830 1.000 0.000 0.000 0.000
#> GSM648684     3  0.3870      0.889 0.208 0.000 0.788 0.004
#> GSM648709     1  0.3852      0.774 0.800 0.192 0.008 0.000
#> GSM648719     1  0.0376      0.827 0.992 0.000 0.004 0.004
#> GSM648627     3  0.2921      0.882 0.140 0.000 0.860 0.000
#> GSM648637     2  0.0188      0.933 0.000 0.996 0.004 0.000
#> GSM648638     2  0.2124      0.873 0.000 0.932 0.040 0.028
#> GSM648641     3  0.4511      0.463 0.000 0.008 0.724 0.268
#> GSM648672     2  0.0188      0.933 0.000 0.996 0.004 0.000
#> GSM648674     2  0.0188      0.933 0.000 0.996 0.004 0.000
#> GSM648703     2  0.0000      0.934 0.000 1.000 0.000 0.000
#> GSM648631     4  0.0336      0.973 0.000 0.008 0.000 0.992
#> GSM648669     2  0.0524      0.929 0.000 0.988 0.004 0.008
#> GSM648671     2  0.0524      0.929 0.000 0.988 0.004 0.008
#> GSM648678     2  0.0000      0.934 0.000 1.000 0.000 0.000
#> GSM648679     2  0.0188      0.933 0.000 0.996 0.004 0.000
#> GSM648681     1  0.4012      0.762 0.788 0.204 0.004 0.004
#> GSM648686     4  0.0336      0.973 0.000 0.008 0.000 0.992
#> GSM648689     4  0.0336      0.973 0.000 0.008 0.000 0.992
#> GSM648690     4  0.0336      0.973 0.000 0.008 0.000 0.992
#> GSM648691     4  0.0336      0.973 0.000 0.008 0.000 0.992
#> GSM648693     4  0.0336      0.973 0.000 0.008 0.000 0.992
#> GSM648700     2  0.0188      0.933 0.000 0.996 0.000 0.004
#> GSM648630     4  0.0336      0.973 0.000 0.008 0.000 0.992
#> GSM648632     4  0.0336      0.973 0.000 0.008 0.000 0.992
#> GSM648639     2  0.6650      0.222 0.000 0.484 0.432 0.084
#> GSM648640     4  0.3808      0.832 0.000 0.012 0.176 0.812
#> GSM648668     2  0.0188      0.933 0.000 0.996 0.004 0.000
#> GSM648676     2  0.0188      0.933 0.000 0.996 0.000 0.004
#> GSM648692     4  0.0336      0.973 0.000 0.008 0.000 0.992
#> GSM648694     4  0.0336      0.973 0.000 0.008 0.000 0.992
#> GSM648699     2  0.0188      0.933 0.000 0.996 0.000 0.004
#> GSM648701     2  0.0188      0.933 0.000 0.996 0.000 0.004
#> GSM648673     2  0.0376      0.931 0.000 0.992 0.004 0.004
#> GSM648677     2  0.0000      0.934 0.000 1.000 0.000 0.000
#> GSM648687     4  0.3088      0.839 0.000 0.008 0.128 0.864
#> GSM648688     4  0.0336      0.973 0.000 0.008 0.000 0.992

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM648605     4  0.2699      0.909 0.008 0.100 0.012 0.880 0.000
#> GSM648618     1  0.2646      0.812 0.868 0.000 0.004 0.004 0.124
#> GSM648620     2  0.1168      0.847 0.008 0.960 0.000 0.032 0.000
#> GSM648646     4  0.1341      0.948 0.000 0.056 0.000 0.944 0.000
#> GSM648649     2  0.2127      0.881 0.108 0.892 0.000 0.000 0.000
#> GSM648675     2  0.1043      0.838 0.000 0.960 0.000 0.040 0.000
#> GSM648682     4  0.1043      0.958 0.000 0.040 0.000 0.960 0.000
#> GSM648698     4  0.1965      0.918 0.000 0.096 0.000 0.904 0.000
#> GSM648708     2  0.1041      0.845 0.004 0.964 0.000 0.032 0.000
#> GSM648628     5  0.3086      0.731 0.180 0.000 0.004 0.000 0.816
#> GSM648595     2  0.3114      0.871 0.076 0.872 0.000 0.016 0.036
#> GSM648635     2  0.2127      0.881 0.108 0.892 0.000 0.000 0.000
#> GSM648645     2  0.2732      0.860 0.160 0.840 0.000 0.000 0.000
#> GSM648647     2  0.1124      0.843 0.004 0.960 0.000 0.036 0.000
#> GSM648667     2  0.2416      0.882 0.100 0.888 0.000 0.012 0.000
#> GSM648695     2  0.1168      0.847 0.008 0.960 0.000 0.032 0.000
#> GSM648704     4  0.0880      0.960 0.000 0.032 0.000 0.968 0.000
#> GSM648706     4  0.0880      0.960 0.000 0.032 0.000 0.968 0.000
#> GSM648593     2  0.2130      0.879 0.080 0.908 0.000 0.012 0.000
#> GSM648594     2  0.2669      0.881 0.104 0.876 0.000 0.020 0.000
#> GSM648600     2  0.3741      0.775 0.264 0.732 0.000 0.000 0.004
#> GSM648621     1  0.0404      0.933 0.988 0.000 0.000 0.000 0.012
#> GSM648622     1  0.0703      0.934 0.976 0.024 0.000 0.000 0.000
#> GSM648623     1  0.0880      0.925 0.968 0.000 0.000 0.000 0.032
#> GSM648636     2  0.2127      0.881 0.108 0.892 0.000 0.000 0.000
#> GSM648655     2  0.2230      0.880 0.116 0.884 0.000 0.000 0.000
#> GSM648661     1  0.0404      0.941 0.988 0.012 0.000 0.000 0.000
#> GSM648664     1  0.0404      0.941 0.988 0.012 0.000 0.000 0.000
#> GSM648683     1  0.0404      0.941 0.988 0.012 0.000 0.000 0.000
#> GSM648685     1  0.0404      0.941 0.988 0.012 0.000 0.000 0.000
#> GSM648702     2  0.2127      0.881 0.108 0.892 0.000 0.000 0.000
#> GSM648597     2  0.3579      0.851 0.100 0.828 0.000 0.000 0.072
#> GSM648603     1  0.1764      0.888 0.928 0.064 0.000 0.000 0.008
#> GSM648606     5  0.1502      0.833 0.056 0.000 0.004 0.000 0.940
#> GSM648613     5  0.0771      0.827 0.020 0.000 0.004 0.000 0.976
#> GSM648619     1  0.0609      0.930 0.980 0.000 0.000 0.000 0.020
#> GSM648654     1  0.1670      0.901 0.936 0.012 0.000 0.000 0.052
#> GSM648663     5  0.4440      0.117 0.468 0.000 0.004 0.000 0.528
#> GSM648670     2  0.2450      0.823 0.000 0.900 0.000 0.048 0.052
#> GSM648707     5  0.0510      0.813 0.000 0.016 0.000 0.000 0.984
#> GSM648615     2  0.5112     -0.015 0.000 0.496 0.000 0.468 0.036
#> GSM648643     4  0.2605      0.855 0.000 0.148 0.000 0.852 0.000
#> GSM648650     2  0.2293      0.881 0.084 0.900 0.000 0.016 0.000
#> GSM648656     4  0.0880      0.960 0.000 0.032 0.000 0.968 0.000
#> GSM648715     2  0.1041      0.845 0.004 0.964 0.000 0.032 0.000
#> GSM648598     2  0.3143      0.830 0.204 0.796 0.000 0.000 0.000
#> GSM648601     2  0.3932      0.674 0.328 0.672 0.000 0.000 0.000
#> GSM648602     1  0.2605      0.788 0.852 0.148 0.000 0.000 0.000
#> GSM648604     1  0.0290      0.940 0.992 0.008 0.000 0.000 0.000
#> GSM648614     1  0.3300      0.716 0.792 0.000 0.004 0.000 0.204
#> GSM648624     1  0.0404      0.939 0.988 0.012 0.000 0.000 0.000
#> GSM648625     2  0.3561      0.780 0.260 0.740 0.000 0.000 0.000
#> GSM648629     1  0.0404      0.941 0.988 0.012 0.000 0.000 0.000
#> GSM648634     2  0.3336      0.808 0.228 0.772 0.000 0.000 0.000
#> GSM648648     2  0.2179      0.880 0.112 0.888 0.000 0.000 0.000
#> GSM648651     1  0.0703      0.934 0.976 0.024 0.000 0.000 0.000
#> GSM648657     2  0.2773      0.861 0.164 0.836 0.000 0.000 0.000
#> GSM648660     2  0.2813      0.856 0.168 0.832 0.000 0.000 0.000
#> GSM648697     1  0.1043      0.922 0.960 0.040 0.000 0.000 0.000
#> GSM648710     1  0.0404      0.941 0.988 0.012 0.000 0.000 0.000
#> GSM648591     1  0.2597      0.865 0.884 0.024 0.000 0.000 0.092
#> GSM648592     2  0.3535      0.850 0.080 0.832 0.000 0.000 0.088
#> GSM648607     1  0.0162      0.939 0.996 0.004 0.000 0.000 0.000
#> GSM648611     5  0.2068      0.816 0.092 0.000 0.004 0.000 0.904
#> GSM648612     1  0.2329      0.849 0.876 0.000 0.000 0.000 0.124
#> GSM648616     5  0.1756      0.796 0.000 0.016 0.008 0.036 0.940
#> GSM648617     2  0.4670      0.770 0.200 0.724 0.000 0.000 0.076
#> GSM648626     1  0.0880      0.928 0.968 0.000 0.000 0.000 0.032
#> GSM648711     1  0.0290      0.940 0.992 0.008 0.000 0.000 0.000
#> GSM648712     1  0.2230      0.857 0.884 0.000 0.000 0.000 0.116
#> GSM648713     1  0.2230      0.857 0.884 0.000 0.000 0.000 0.116
#> GSM648714     5  0.1124      0.833 0.036 0.000 0.004 0.000 0.960
#> GSM648716     1  0.2230      0.857 0.884 0.000 0.000 0.000 0.116
#> GSM648717     5  0.1768      0.828 0.072 0.000 0.004 0.000 0.924
#> GSM648590     2  0.1331      0.843 0.008 0.952 0.000 0.040 0.000
#> GSM648596     2  0.2536      0.823 0.004 0.900 0.000 0.044 0.052
#> GSM648642     2  0.3612      0.548 0.000 0.732 0.000 0.268 0.000
#> GSM648696     2  0.2179      0.881 0.112 0.888 0.000 0.000 0.000
#> GSM648705     2  0.2077      0.880 0.084 0.908 0.000 0.008 0.000
#> GSM648718     2  0.2516      0.748 0.000 0.860 0.000 0.140 0.000
#> GSM648599     1  0.2020      0.851 0.900 0.100 0.000 0.000 0.000
#> GSM648608     1  0.0404      0.941 0.988 0.012 0.000 0.000 0.000
#> GSM648609     1  0.0404      0.941 0.988 0.012 0.000 0.000 0.000
#> GSM648610     1  0.0162      0.939 0.996 0.004 0.000 0.000 0.000
#> GSM648633     2  0.3242      0.824 0.216 0.784 0.000 0.000 0.000
#> GSM648644     4  0.0880      0.960 0.000 0.032 0.000 0.968 0.000
#> GSM648652     2  0.2179      0.880 0.112 0.888 0.000 0.000 0.000
#> GSM648653     1  0.2471      0.810 0.864 0.136 0.000 0.000 0.000
#> GSM648658     2  0.2329      0.877 0.124 0.876 0.000 0.000 0.000
#> GSM648659     2  0.1205      0.841 0.004 0.956 0.000 0.040 0.000
#> GSM648662     1  0.0162      0.939 0.996 0.004 0.000 0.000 0.000
#> GSM648665     1  0.0404      0.941 0.988 0.012 0.000 0.000 0.000
#> GSM648666     1  0.0404      0.941 0.988 0.012 0.000 0.000 0.000
#> GSM648680     2  0.2230      0.879 0.116 0.884 0.000 0.000 0.000
#> GSM648684     1  0.0404      0.941 0.988 0.012 0.000 0.000 0.000
#> GSM648709     2  0.1364      0.845 0.012 0.952 0.000 0.036 0.000
#> GSM648719     2  0.3336      0.810 0.228 0.772 0.000 0.000 0.000
#> GSM648627     1  0.0510      0.931 0.984 0.000 0.000 0.000 0.016
#> GSM648637     4  0.0798      0.938 0.000 0.016 0.000 0.976 0.008
#> GSM648638     4  0.1018      0.935 0.000 0.016 0.000 0.968 0.016
#> GSM648641     5  0.2612      0.725 0.000 0.008 0.124 0.000 0.868
#> GSM648672     4  0.0290      0.947 0.000 0.008 0.000 0.992 0.000
#> GSM648674     4  0.0798      0.938 0.000 0.016 0.000 0.976 0.008
#> GSM648703     4  0.0880      0.960 0.000 0.032 0.000 0.968 0.000
#> GSM648631     3  0.0000      0.957 0.000 0.000 1.000 0.000 0.000
#> GSM648669     4  0.0000      0.950 0.000 0.000 0.000 1.000 0.000
#> GSM648671     4  0.0510      0.957 0.000 0.016 0.000 0.984 0.000
#> GSM648678     4  0.0880      0.960 0.000 0.032 0.000 0.968 0.000
#> GSM648679     4  0.0798      0.938 0.000 0.016 0.000 0.976 0.008
#> GSM648681     2  0.1121      0.837 0.000 0.956 0.000 0.044 0.000
#> GSM648686     3  0.0000      0.957 0.000 0.000 1.000 0.000 0.000
#> GSM648689     3  0.0000      0.957 0.000 0.000 1.000 0.000 0.000
#> GSM648690     3  0.0000      0.957 0.000 0.000 1.000 0.000 0.000
#> GSM648691     3  0.0000      0.957 0.000 0.000 1.000 0.000 0.000
#> GSM648693     3  0.0000      0.957 0.000 0.000 1.000 0.000 0.000
#> GSM648700     4  0.2280      0.906 0.000 0.120 0.000 0.880 0.000
#> GSM648630     3  0.0000      0.957 0.000 0.000 1.000 0.000 0.000
#> GSM648632     3  0.0000      0.957 0.000 0.000 1.000 0.000 0.000
#> GSM648639     5  0.4394      0.672 0.000 0.016 0.112 0.084 0.788
#> GSM648640     3  0.2995      0.847 0.000 0.008 0.872 0.032 0.088
#> GSM648668     4  0.1830      0.921 0.000 0.068 0.000 0.924 0.008
#> GSM648676     4  0.2230      0.908 0.000 0.116 0.000 0.884 0.000
#> GSM648692     3  0.0000      0.957 0.000 0.000 1.000 0.000 0.000
#> GSM648694     3  0.0000      0.957 0.000 0.000 1.000 0.000 0.000
#> GSM648699     4  0.0880      0.960 0.000 0.032 0.000 0.968 0.000
#> GSM648701     4  0.0880      0.960 0.000 0.032 0.000 0.968 0.000
#> GSM648673     4  0.0609      0.958 0.000 0.020 0.000 0.980 0.000
#> GSM648677     4  0.0703      0.959 0.000 0.024 0.000 0.976 0.000
#> GSM648687     3  0.4074      0.390 0.000 0.000 0.636 0.000 0.364
#> GSM648688     3  0.0000      0.957 0.000 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM648605     4  0.4267    0.63937 0.044 0.040 0.000 0.760 0.000 0.156
#> GSM648618     5  0.3733    0.47069 0.288 0.008 0.000 0.004 0.700 0.000
#> GSM648620     6  0.4467    0.20503 0.048 0.320 0.000 0.000 0.000 0.632
#> GSM648646     4  0.0508    0.88645 0.000 0.012 0.000 0.984 0.000 0.004
#> GSM648649     6  0.1075    0.58234 0.048 0.000 0.000 0.000 0.000 0.952
#> GSM648675     6  0.4032   -0.07089 0.000 0.420 0.000 0.008 0.000 0.572
#> GSM648682     4  0.1257    0.86489 0.000 0.020 0.000 0.952 0.000 0.028
#> GSM648698     4  0.3578    0.64470 0.000 0.052 0.000 0.784 0.000 0.164
#> GSM648708     6  0.4491    0.07146 0.036 0.388 0.000 0.000 0.000 0.576
#> GSM648628     5  0.0865    0.76915 0.036 0.000 0.000 0.000 0.964 0.000
#> GSM648595     6  0.1285    0.58342 0.052 0.004 0.000 0.000 0.000 0.944
#> GSM648635     6  0.1814    0.59647 0.100 0.000 0.000 0.000 0.000 0.900
#> GSM648645     6  0.4215    0.55346 0.276 0.012 0.000 0.000 0.024 0.688
#> GSM648647     6  0.4101   -0.04726 0.000 0.408 0.000 0.012 0.000 0.580
#> GSM648667     6  0.1075    0.58234 0.048 0.000 0.000 0.000 0.000 0.952
#> GSM648695     6  0.4530    0.13930 0.044 0.356 0.000 0.000 0.000 0.600
#> GSM648704     4  0.0000    0.89323 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648706     4  0.0146    0.89135 0.000 0.004 0.000 0.996 0.000 0.000
#> GSM648593     6  0.1075    0.58234 0.048 0.000 0.000 0.000 0.000 0.952
#> GSM648594     6  0.1285    0.58397 0.052 0.004 0.000 0.000 0.000 0.944
#> GSM648600     6  0.5517    0.38931 0.128 0.012 0.000 0.000 0.280 0.580
#> GSM648621     1  0.3198    0.61231 0.740 0.000 0.000 0.000 0.260 0.000
#> GSM648622     1  0.0146    0.79342 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM648623     1  0.3371    0.57679 0.708 0.000 0.000 0.000 0.292 0.000
#> GSM648636     6  0.2118    0.59716 0.104 0.008 0.000 0.000 0.000 0.888
#> GSM648655     6  0.2146    0.59748 0.116 0.004 0.000 0.000 0.000 0.880
#> GSM648661     1  0.0146    0.79492 0.996 0.004 0.000 0.000 0.000 0.000
#> GSM648664     1  0.0146    0.79492 0.996 0.004 0.000 0.000 0.000 0.000
#> GSM648683     1  0.0146    0.79492 0.996 0.004 0.000 0.000 0.000 0.000
#> GSM648685     1  0.0260    0.79345 0.992 0.008 0.000 0.000 0.000 0.000
#> GSM648702     6  0.1958    0.59656 0.100 0.004 0.000 0.000 0.000 0.896
#> GSM648597     6  0.3855    0.45676 0.004 0.016 0.000 0.000 0.276 0.704
#> GSM648603     6  0.6387   -0.16624 0.344 0.012 0.000 0.000 0.280 0.364
#> GSM648606     5  0.0632    0.76890 0.024 0.000 0.000 0.000 0.976 0.000
#> GSM648613     5  0.2778    0.68842 0.008 0.168 0.000 0.000 0.824 0.000
#> GSM648619     1  0.3563    0.52365 0.664 0.000 0.000 0.000 0.336 0.000
#> GSM648654     1  0.2933    0.59862 0.796 0.004 0.000 0.000 0.200 0.000
#> GSM648663     5  0.1204    0.75951 0.056 0.000 0.000 0.000 0.944 0.000
#> GSM648670     2  0.5700    0.27433 0.000 0.460 0.000 0.140 0.004 0.396
#> GSM648707     5  0.3989    0.40551 0.000 0.468 0.000 0.004 0.528 0.000
#> GSM648615     2  0.6037    0.45222 0.000 0.420 0.000 0.276 0.000 0.304
#> GSM648643     2  0.5867    0.31207 0.000 0.420 0.000 0.384 0.000 0.196
#> GSM648650     6  0.1075    0.58234 0.048 0.000 0.000 0.000 0.000 0.952
#> GSM648656     4  0.0363    0.88844 0.000 0.012 0.000 0.988 0.000 0.000
#> GSM648715     6  0.4066   -0.01807 0.000 0.392 0.000 0.012 0.000 0.596
#> GSM648598     6  0.4485    0.51111 0.340 0.012 0.000 0.000 0.024 0.624
#> GSM648601     6  0.4717    0.26511 0.460 0.012 0.000 0.000 0.024 0.504
#> GSM648602     1  0.4253    0.32866 0.664 0.008 0.000 0.000 0.024 0.304
#> GSM648604     1  0.0000    0.79495 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648614     5  0.3266    0.48292 0.272 0.000 0.000 0.000 0.728 0.000
#> GSM648624     1  0.0000    0.79495 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648625     6  0.4365    0.53672 0.292 0.012 0.000 0.000 0.028 0.668
#> GSM648629     1  0.0000    0.79495 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648634     6  0.4601    0.44802 0.380 0.012 0.000 0.000 0.024 0.584
#> GSM648648     6  0.2838    0.58816 0.188 0.004 0.000 0.000 0.000 0.808
#> GSM648651     1  0.1757    0.73031 0.916 0.000 0.000 0.000 0.008 0.076
#> GSM648657     6  0.4801    0.52879 0.096 0.016 0.000 0.000 0.192 0.696
#> GSM648660     6  0.4255    0.54969 0.284 0.012 0.000 0.000 0.024 0.680
#> GSM648697     1  0.0260    0.79345 0.992 0.008 0.000 0.000 0.000 0.000
#> GSM648710     1  0.0000    0.79495 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648591     1  0.4288    0.55563 0.660 0.020 0.000 0.000 0.308 0.012
#> GSM648592     6  0.3799    0.45488 0.000 0.020 0.000 0.000 0.276 0.704
#> GSM648607     1  0.2300    0.71211 0.856 0.000 0.000 0.000 0.144 0.000
#> GSM648611     5  0.0790    0.76972 0.032 0.000 0.000 0.000 0.968 0.000
#> GSM648612     1  0.3854    0.28795 0.536 0.000 0.000 0.000 0.464 0.000
#> GSM648616     2  0.4158   -0.45035 0.000 0.572 0.004 0.008 0.416 0.000
#> GSM648617     6  0.5485    0.37681 0.108 0.016 0.000 0.000 0.296 0.580
#> GSM648626     1  0.4274    0.57802 0.676 0.012 0.000 0.000 0.288 0.024
#> GSM648711     1  0.0713    0.78090 0.972 0.000 0.000 0.000 0.028 0.000
#> GSM648712     1  0.3782    0.40042 0.588 0.000 0.000 0.000 0.412 0.000
#> GSM648713     1  0.3789    0.39375 0.584 0.000 0.000 0.000 0.416 0.000
#> GSM648714     5  0.2558    0.69809 0.004 0.156 0.000 0.000 0.840 0.000
#> GSM648716     1  0.3765    0.41458 0.596 0.000 0.000 0.000 0.404 0.000
#> GSM648717     5  0.0632    0.76890 0.024 0.000 0.000 0.000 0.976 0.000
#> GSM648590     6  0.3774   -0.03492 0.000 0.408 0.000 0.000 0.000 0.592
#> GSM648596     2  0.5633    0.23824 0.000 0.448 0.000 0.128 0.004 0.420
#> GSM648642     6  0.4410   -0.10259 0.000 0.412 0.000 0.028 0.000 0.560
#> GSM648696     6  0.1285    0.58356 0.052 0.004 0.000 0.000 0.000 0.944
#> GSM648705     6  0.1141    0.58416 0.052 0.000 0.000 0.000 0.000 0.948
#> GSM648718     6  0.4423   -0.11272 0.000 0.420 0.000 0.028 0.000 0.552
#> GSM648599     1  0.6371    0.21196 0.388 0.012 0.000 0.000 0.280 0.320
#> GSM648608     1  0.0000    0.79495 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648609     1  0.0146    0.79492 0.996 0.004 0.000 0.000 0.000 0.000
#> GSM648610     1  0.0000    0.79495 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648633     6  0.4840    0.52017 0.316 0.012 0.000 0.000 0.052 0.620
#> GSM648644     4  0.0000    0.89323 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648652     6  0.2703    0.59151 0.172 0.004 0.000 0.000 0.000 0.824
#> GSM648653     1  0.4096    0.34207 0.672 0.008 0.000 0.000 0.016 0.304
#> GSM648658     6  0.3383    0.56302 0.268 0.004 0.000 0.000 0.000 0.728
#> GSM648659     6  0.4109   -0.05459 0.000 0.412 0.000 0.012 0.000 0.576
#> GSM648662     1  0.0000    0.79495 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648665     1  0.0146    0.79492 0.996 0.004 0.000 0.000 0.000 0.000
#> GSM648666     1  0.0291    0.79388 0.992 0.004 0.000 0.000 0.004 0.000
#> GSM648680     6  0.3421    0.56613 0.256 0.008 0.000 0.000 0.000 0.736
#> GSM648684     1  0.0146    0.79492 0.996 0.004 0.000 0.000 0.000 0.000
#> GSM648709     6  0.4261    0.00387 0.020 0.408 0.000 0.000 0.000 0.572
#> GSM648719     6  0.4581    0.46159 0.372 0.012 0.000 0.000 0.024 0.592
#> GSM648627     1  0.3266    0.59745 0.728 0.000 0.000 0.000 0.272 0.000
#> GSM648637     4  0.0713    0.87997 0.000 0.028 0.000 0.972 0.000 0.000
#> GSM648638     4  0.3515    0.56022 0.000 0.324 0.000 0.676 0.000 0.000
#> GSM648641     5  0.5762    0.38330 0.000 0.260 0.204 0.004 0.532 0.000
#> GSM648672     4  0.0000    0.89323 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648674     4  0.1141    0.86635 0.000 0.052 0.000 0.948 0.000 0.000
#> GSM648703     4  0.0000    0.89323 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648631     3  0.0000    0.94547 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648669     4  0.0000    0.89323 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648671     4  0.0000    0.89323 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648678     4  0.0000    0.89323 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648679     4  0.0547    0.88366 0.000 0.020 0.000 0.980 0.000 0.000
#> GSM648681     6  0.3930   -0.06259 0.000 0.420 0.000 0.004 0.000 0.576
#> GSM648686     3  0.0260    0.93997 0.000 0.000 0.992 0.008 0.000 0.000
#> GSM648689     3  0.0000    0.94547 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648690     3  0.0146    0.94302 0.000 0.000 0.996 0.004 0.000 0.000
#> GSM648691     3  0.0000    0.94547 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648693     3  0.0000    0.94547 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648700     2  0.6034    0.36924 0.000 0.412 0.000 0.328 0.000 0.260
#> GSM648630     3  0.0000    0.94547 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648632     3  0.0000    0.94547 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648639     2  0.5183   -0.39625 0.000 0.568 0.020 0.056 0.356 0.000
#> GSM648640     3  0.3265    0.71623 0.000 0.248 0.748 0.004 0.000 0.000
#> GSM648668     4  0.3804    0.14386 0.000 0.424 0.000 0.576 0.000 0.000
#> GSM648676     4  0.5834   -0.18493 0.000 0.304 0.000 0.480 0.000 0.216
#> GSM648692     3  0.0146    0.94302 0.000 0.000 0.996 0.004 0.000 0.000
#> GSM648694     3  0.0000    0.94547 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648699     4  0.0000    0.89323 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648701     4  0.0000    0.89323 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648673     4  0.0000    0.89323 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648677     4  0.0000    0.89323 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648687     3  0.3940    0.42225 0.000 0.012 0.640 0.000 0.348 0.000
#> GSM648688     3  0.0000    0.94547 0.000 0.000 1.000 0.000 0.000 0.000

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-MAD-mclust-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-MAD-mclust-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-MAD-mclust-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-MAD-mclust-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-MAD-mclust-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-MAD-mclust-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-MAD-mclust-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-MAD-mclust-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-MAD-mclust-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-MAD-mclust-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-MAD-mclust-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-MAD-mclust-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-MAD-mclust-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-MAD-mclust-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-MAD-mclust-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-MAD-mclust-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-MAD-mclust-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-MAD-mclust-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-MAD-mclust-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-MAD-mclust-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk MAD-mclust-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-MAD-mclust-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-MAD-mclust-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-MAD-mclust-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-MAD-mclust-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-MAD-mclust-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk MAD-mclust-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>              n disease.state(p) development.stage(p) other(p) k
#> MAD:mclust 125         1.49e-10             0.005323 3.46e-14 2
#> MAD:mclust 119         1.26e-09             0.000849 5.58e-21 3
#> MAD:mclust 122         5.31e-18             0.024983 7.80e-22 4
#> MAD:mclust 127         7.18e-17             0.006301 5.49e-24 5
#> MAD:mclust  89         3.31e-13             0.002433 6.29e-22 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


MAD:NMF

The object with results only for a single top-value method and a single partition method can be extracted as:

res = res_list["MAD", "NMF"]
# you can also extract it by
# res = res_list["MAD:NMF"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 130 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#>   Subgroups are detected by 'NMF' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 3.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk MAD-NMF-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk MAD-NMF-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.516           0.881       0.893         0.4847 0.508   0.508
#> 3 3 0.841           0.871       0.947         0.2662 0.611   0.396
#> 4 4 0.589           0.482       0.703         0.1355 0.809   0.554
#> 5 5 0.627           0.630       0.806         0.0608 0.798   0.445
#> 6 6 0.622           0.646       0.798         0.0633 0.904   0.668

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 3

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM648605     2  0.5946      0.913 0.144 0.856
#> GSM648618     1  0.3114      0.908 0.944 0.056
#> GSM648620     2  0.5946      0.913 0.144 0.856
#> GSM648646     2  0.0000      0.878 0.000 1.000
#> GSM648649     2  0.5946      0.913 0.144 0.856
#> GSM648675     2  0.5946      0.913 0.144 0.856
#> GSM648682     2  0.5946      0.913 0.144 0.856
#> GSM648698     2  0.5946      0.913 0.144 0.856
#> GSM648708     2  0.5946      0.913 0.144 0.856
#> GSM648628     1  0.0000      0.906 1.000 0.000
#> GSM648595     2  0.5946      0.913 0.144 0.856
#> GSM648635     2  0.6247      0.904 0.156 0.844
#> GSM648645     1  0.4022      0.895 0.920 0.080
#> GSM648647     2  0.5946      0.913 0.144 0.856
#> GSM648667     2  0.5946      0.913 0.144 0.856
#> GSM648695     2  0.5946      0.913 0.144 0.856
#> GSM648704     2  0.0672      0.875 0.008 0.992
#> GSM648706     2  0.0000      0.878 0.000 1.000
#> GSM648593     2  0.5946      0.913 0.144 0.856
#> GSM648594     2  0.5946      0.913 0.144 0.856
#> GSM648600     1  0.3114      0.908 0.944 0.056
#> GSM648621     1  0.1414      0.909 0.980 0.020
#> GSM648622     1  0.3114      0.908 0.944 0.056
#> GSM648623     1  0.0376      0.907 0.996 0.004
#> GSM648636     2  0.5946      0.913 0.144 0.856
#> GSM648655     2  0.5946      0.913 0.144 0.856
#> GSM648661     1  0.3114      0.908 0.944 0.056
#> GSM648664     1  0.3733      0.901 0.928 0.072
#> GSM648683     1  0.3733      0.901 0.928 0.072
#> GSM648685     1  0.6343      0.808 0.840 0.160
#> GSM648702     2  0.5946      0.913 0.144 0.856
#> GSM648597     1  0.2236      0.910 0.964 0.036
#> GSM648603     1  0.2948      0.909 0.948 0.052
#> GSM648606     1  0.5946      0.841 0.856 0.144
#> GSM648613     1  0.5946      0.841 0.856 0.144
#> GSM648619     1  0.0672      0.907 0.992 0.008
#> GSM648654     1  0.3114      0.908 0.944 0.056
#> GSM648663     1  0.4939      0.864 0.892 0.108
#> GSM648670     2  0.3114      0.843 0.056 0.944
#> GSM648707     1  0.5737      0.846 0.864 0.136
#> GSM648615     2  0.0672      0.875 0.008 0.992
#> GSM648643     2  0.5946      0.913 0.144 0.856
#> GSM648650     2  0.5946      0.913 0.144 0.856
#> GSM648656     2  0.0376      0.880 0.004 0.996
#> GSM648715     2  0.5946      0.913 0.144 0.856
#> GSM648598     1  0.4022      0.895 0.920 0.080
#> GSM648601     1  0.3431      0.905 0.936 0.064
#> GSM648602     1  0.3114      0.908 0.944 0.056
#> GSM648604     1  0.3114      0.908 0.944 0.056
#> GSM648614     1  0.2603      0.895 0.956 0.044
#> GSM648624     1  0.3114      0.908 0.944 0.056
#> GSM648625     1  0.6148      0.821 0.848 0.152
#> GSM648629     1  0.3114      0.908 0.944 0.056
#> GSM648634     1  0.4022      0.895 0.920 0.080
#> GSM648648     2  0.5946      0.913 0.144 0.856
#> GSM648651     1  0.3114      0.908 0.944 0.056
#> GSM648657     1  0.3733      0.901 0.928 0.072
#> GSM648660     1  0.3733      0.901 0.928 0.072
#> GSM648697     1  0.6712      0.786 0.824 0.176
#> GSM648710     1  0.3114      0.908 0.944 0.056
#> GSM648591     1  0.1184      0.903 0.984 0.016
#> GSM648592     1  0.7376      0.716 0.792 0.208
#> GSM648607     1  0.2778      0.909 0.952 0.048
#> GSM648611     1  0.1184      0.903 0.984 0.016
#> GSM648612     1  0.0938      0.903 0.988 0.012
#> GSM648616     1  0.5946      0.841 0.856 0.144
#> GSM648617     1  0.0000      0.906 1.000 0.000
#> GSM648626     1  0.1184      0.908 0.984 0.016
#> GSM648711     1  0.2043      0.910 0.968 0.032
#> GSM648712     1  0.0000      0.906 1.000 0.000
#> GSM648713     1  0.0000      0.906 1.000 0.000
#> GSM648714     1  0.5946      0.841 0.856 0.144
#> GSM648716     1  0.0376      0.907 0.996 0.004
#> GSM648717     1  0.4161      0.877 0.916 0.084
#> GSM648590     2  0.5946      0.913 0.144 0.856
#> GSM648596     2  0.2236      0.859 0.036 0.964
#> GSM648642     2  0.5946      0.913 0.144 0.856
#> GSM648696     2  0.6247      0.904 0.156 0.844
#> GSM648705     2  0.5946      0.913 0.144 0.856
#> GSM648718     2  0.5946      0.913 0.144 0.856
#> GSM648599     1  0.2948      0.909 0.948 0.052
#> GSM648608     1  0.3114      0.908 0.944 0.056
#> GSM648609     1  0.3114      0.908 0.944 0.056
#> GSM648610     1  0.2948      0.909 0.948 0.052
#> GSM648633     1  0.3431      0.905 0.936 0.064
#> GSM648644     2  0.0672      0.875 0.008 0.992
#> GSM648652     2  0.6148      0.907 0.152 0.848
#> GSM648653     1  0.3431      0.905 0.936 0.064
#> GSM648658     2  0.9608      0.528 0.384 0.616
#> GSM648659     2  0.5946      0.913 0.144 0.856
#> GSM648662     1  0.2778      0.909 0.952 0.048
#> GSM648665     1  0.3733      0.901 0.928 0.072
#> GSM648666     1  0.3879      0.898 0.924 0.076
#> GSM648680     2  0.7674      0.828 0.224 0.776
#> GSM648684     1  0.3114      0.908 0.944 0.056
#> GSM648709     2  0.5294      0.909 0.120 0.880
#> GSM648719     1  0.3431      0.905 0.936 0.064
#> GSM648627     1  0.0672      0.907 0.992 0.008
#> GSM648637     2  0.3274      0.841 0.060 0.940
#> GSM648638     1  0.9732      0.459 0.596 0.404
#> GSM648641     1  0.5946      0.841 0.856 0.144
#> GSM648672     2  0.1843      0.863 0.028 0.972
#> GSM648674     2  0.3114      0.843 0.056 0.944
#> GSM648703     2  0.0938      0.883 0.012 0.988
#> GSM648631     1  0.4562      0.870 0.904 0.096
#> GSM648669     2  0.3274      0.841 0.060 0.940
#> GSM648671     2  0.2778      0.850 0.048 0.952
#> GSM648678     2  0.0672      0.875 0.008 0.992
#> GSM648679     2  0.3114      0.843 0.056 0.944
#> GSM648681     2  0.0938      0.883 0.012 0.988
#> GSM648686     1  0.5946      0.841 0.856 0.144
#> GSM648689     1  0.5946      0.841 0.856 0.144
#> GSM648690     1  0.5946      0.841 0.856 0.144
#> GSM648691     1  0.5946      0.841 0.856 0.144
#> GSM648693     1  0.5946      0.841 0.856 0.144
#> GSM648700     2  0.5946      0.913 0.144 0.856
#> GSM648630     1  0.5946      0.841 0.856 0.144
#> GSM648632     1  0.2778      0.892 0.952 0.048
#> GSM648639     1  0.5946      0.841 0.856 0.144
#> GSM648640     1  0.5946      0.841 0.856 0.144
#> GSM648668     2  0.2948      0.847 0.052 0.948
#> GSM648676     2  0.5946      0.913 0.144 0.856
#> GSM648692     1  0.5946      0.841 0.856 0.144
#> GSM648694     1  0.5946      0.841 0.856 0.144
#> GSM648699     2  0.1414      0.886 0.020 0.980
#> GSM648701     2  0.2236      0.890 0.036 0.964
#> GSM648673     2  0.0672      0.875 0.008 0.992
#> GSM648677     2  0.0672      0.882 0.008 0.992
#> GSM648687     1  0.4161      0.877 0.916 0.084
#> GSM648688     1  0.4431      0.873 0.908 0.092

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM648605     2  0.6267     0.2246 0.452 0.548 0.000
#> GSM648618     1  0.1163     0.9188 0.972 0.000 0.028
#> GSM648620     1  0.3941     0.7829 0.844 0.156 0.000
#> GSM648646     2  0.0000     0.9020 0.000 1.000 0.000
#> GSM648649     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648675     1  0.0592     0.9289 0.988 0.012 0.000
#> GSM648682     2  0.4002     0.7850 0.160 0.840 0.000
#> GSM648698     2  0.1289     0.8837 0.032 0.968 0.000
#> GSM648708     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648628     3  0.0000     0.9744 0.000 0.000 1.000
#> GSM648595     1  0.3038     0.8452 0.896 0.104 0.000
#> GSM648635     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648645     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648647     2  0.5431     0.6282 0.284 0.716 0.000
#> GSM648667     1  0.2448     0.8747 0.924 0.076 0.000
#> GSM648695     1  0.1163     0.9175 0.972 0.028 0.000
#> GSM648704     2  0.0000     0.9020 0.000 1.000 0.000
#> GSM648706     2  0.0000     0.9020 0.000 1.000 0.000
#> GSM648593     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648594     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648600     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648621     1  0.1529     0.9080 0.960 0.000 0.040
#> GSM648622     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648623     1  0.5968     0.4569 0.636 0.000 0.364
#> GSM648636     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648655     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648661     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648664     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648683     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648685     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648702     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648597     1  0.1964     0.8975 0.944 0.000 0.056
#> GSM648603     1  0.2448     0.8793 0.924 0.000 0.076
#> GSM648606     3  0.0000     0.9744 0.000 0.000 1.000
#> GSM648613     3  0.0000     0.9744 0.000 0.000 1.000
#> GSM648619     1  0.5968     0.4617 0.636 0.000 0.364
#> GSM648654     1  0.1529     0.9102 0.960 0.000 0.040
#> GSM648663     3  0.0000     0.9744 0.000 0.000 1.000
#> GSM648670     2  0.4504     0.7205 0.000 0.804 0.196
#> GSM648707     3  0.0000     0.9744 0.000 0.000 1.000
#> GSM648615     2  0.0000     0.9020 0.000 1.000 0.000
#> GSM648643     2  0.4555     0.7499 0.200 0.800 0.000
#> GSM648650     1  0.4002     0.7777 0.840 0.160 0.000
#> GSM648656     2  0.0000     0.9020 0.000 1.000 0.000
#> GSM648715     1  0.6244     0.1454 0.560 0.440 0.000
#> GSM648598     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648601     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648602     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648604     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648614     1  0.5810     0.5116 0.664 0.000 0.336
#> GSM648624     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648625     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648629     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648634     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648648     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648651     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648657     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648660     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648697     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648710     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648591     3  0.0000     0.9744 0.000 0.000 1.000
#> GSM648592     3  0.6046     0.7318 0.080 0.136 0.784
#> GSM648607     1  0.0237     0.9337 0.996 0.000 0.004
#> GSM648611     3  0.0000     0.9744 0.000 0.000 1.000
#> GSM648612     3  0.0000     0.9744 0.000 0.000 1.000
#> GSM648616     3  0.0000     0.9744 0.000 0.000 1.000
#> GSM648617     1  0.5058     0.6719 0.756 0.000 0.244
#> GSM648626     1  0.6192     0.3245 0.580 0.000 0.420
#> GSM648711     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648712     3  0.0424     0.9658 0.008 0.000 0.992
#> GSM648713     3  0.0000     0.9744 0.000 0.000 1.000
#> GSM648714     3  0.0000     0.9744 0.000 0.000 1.000
#> GSM648716     3  0.5254     0.6125 0.264 0.000 0.736
#> GSM648717     3  0.0000     0.9744 0.000 0.000 1.000
#> GSM648590     1  0.0592     0.9288 0.988 0.012 0.000
#> GSM648596     2  0.0237     0.9000 0.000 0.996 0.004
#> GSM648642     1  0.1529     0.9086 0.960 0.040 0.000
#> GSM648696     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648705     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648718     2  0.4796     0.7273 0.220 0.780 0.000
#> GSM648599     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648608     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648609     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648610     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648633     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648644     2  0.0000     0.9020 0.000 1.000 0.000
#> GSM648652     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648653     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648658     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648659     1  0.1289     0.9162 0.968 0.032 0.000
#> GSM648662     1  0.0237     0.9337 0.996 0.000 0.004
#> GSM648665     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648666     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648680     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648684     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648709     1  0.6204     0.2096 0.576 0.424 0.000
#> GSM648719     1  0.0000     0.9360 1.000 0.000 0.000
#> GSM648627     1  0.6274     0.2105 0.544 0.000 0.456
#> GSM648637     2  0.3752     0.7819 0.000 0.856 0.144
#> GSM648638     3  0.0000     0.9744 0.000 0.000 1.000
#> GSM648641     3  0.0000     0.9744 0.000 0.000 1.000
#> GSM648672     2  0.0000     0.9020 0.000 1.000 0.000
#> GSM648674     2  0.0000     0.9020 0.000 1.000 0.000
#> GSM648703     2  0.0000     0.9020 0.000 1.000 0.000
#> GSM648631     3  0.0000     0.9744 0.000 0.000 1.000
#> GSM648669     2  0.0892     0.8891 0.000 0.980 0.020
#> GSM648671     2  0.0000     0.9020 0.000 1.000 0.000
#> GSM648678     2  0.0000     0.9020 0.000 1.000 0.000
#> GSM648679     2  0.0000     0.9020 0.000 1.000 0.000
#> GSM648681     2  0.0000     0.9020 0.000 1.000 0.000
#> GSM648686     3  0.4121     0.7946 0.000 0.168 0.832
#> GSM648689     3  0.0237     0.9715 0.000 0.004 0.996
#> GSM648690     3  0.0237     0.9715 0.000 0.004 0.996
#> GSM648691     3  0.0237     0.9715 0.000 0.004 0.996
#> GSM648693     3  0.0000     0.9744 0.000 0.000 1.000
#> GSM648700     1  0.1860     0.8985 0.948 0.052 0.000
#> GSM648630     3  0.0000     0.9744 0.000 0.000 1.000
#> GSM648632     3  0.0000     0.9744 0.000 0.000 1.000
#> GSM648639     3  0.0000     0.9744 0.000 0.000 1.000
#> GSM648640     3  0.0000     0.9744 0.000 0.000 1.000
#> GSM648668     2  0.0892     0.8908 0.000 0.980 0.020
#> GSM648676     2  0.6309     0.0617 0.496 0.504 0.000
#> GSM648692     3  0.0000     0.9744 0.000 0.000 1.000
#> GSM648694     3  0.0000     0.9744 0.000 0.000 1.000
#> GSM648699     2  0.0000     0.9020 0.000 1.000 0.000
#> GSM648701     2  0.0000     0.9020 0.000 1.000 0.000
#> GSM648673     2  0.0000     0.9020 0.000 1.000 0.000
#> GSM648677     2  0.0000     0.9020 0.000 1.000 0.000
#> GSM648687     3  0.0000     0.9744 0.000 0.000 1.000
#> GSM648688     3  0.0000     0.9744 0.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM648605     2  0.7738    0.39128 0.072 0.604 0.120 0.204
#> GSM648618     1  0.5517    0.55150 0.568 0.000 0.020 0.412
#> GSM648620     1  0.7733    0.13425 0.440 0.256 0.000 0.304
#> GSM648646     2  0.0000    0.74634 0.000 1.000 0.000 0.000
#> GSM648649     1  0.4817    0.57284 0.612 0.000 0.000 0.388
#> GSM648675     4  0.5277   -0.26276 0.460 0.008 0.000 0.532
#> GSM648682     2  0.3505    0.70344 0.088 0.864 0.000 0.048
#> GSM648698     2  0.2060    0.73568 0.016 0.932 0.000 0.052
#> GSM648708     1  0.5508    0.56078 0.572 0.020 0.000 0.408
#> GSM648628     3  0.4477    0.68379 0.312 0.000 0.688 0.000
#> GSM648595     4  0.6332    0.00776 0.404 0.064 0.000 0.532
#> GSM648635     1  0.4877    0.58429 0.592 0.000 0.000 0.408
#> GSM648645     1  0.4866    0.58421 0.596 0.000 0.000 0.404
#> GSM648647     2  0.5719    0.51027 0.132 0.716 0.000 0.152
#> GSM648667     1  0.6136    0.49678 0.584 0.060 0.000 0.356
#> GSM648695     1  0.6903    0.38635 0.508 0.112 0.000 0.380
#> GSM648704     2  0.0000    0.74634 0.000 1.000 0.000 0.000
#> GSM648706     2  0.0000    0.74634 0.000 1.000 0.000 0.000
#> GSM648593     1  0.4877    0.58429 0.592 0.000 0.000 0.408
#> GSM648594     1  0.4877    0.58429 0.592 0.000 0.000 0.408
#> GSM648600     1  0.2281    0.25892 0.904 0.000 0.000 0.096
#> GSM648621     1  0.5185    0.22783 0.748 0.000 0.076 0.176
#> GSM648622     1  0.4877    0.58429 0.592 0.000 0.000 0.408
#> GSM648623     1  0.4454   -0.33200 0.692 0.000 0.308 0.000
#> GSM648636     4  0.4998   -0.27313 0.488 0.000 0.000 0.512
#> GSM648655     4  0.4277    0.45764 0.280 0.000 0.000 0.720
#> GSM648661     4  0.5772    0.44559 0.260 0.000 0.068 0.672
#> GSM648664     4  0.4356    0.44651 0.292 0.000 0.000 0.708
#> GSM648683     4  0.4955   -0.05015 0.444 0.000 0.000 0.556
#> GSM648685     4  0.4356    0.44701 0.292 0.000 0.000 0.708
#> GSM648702     1  0.4925    0.53946 0.572 0.000 0.000 0.428
#> GSM648597     1  0.3474    0.10478 0.868 0.000 0.064 0.068
#> GSM648603     1  0.1488    0.18119 0.956 0.000 0.032 0.012
#> GSM648606     3  0.0336    0.74357 0.008 0.000 0.992 0.000
#> GSM648613     3  0.4643    0.67343 0.344 0.000 0.656 0.000
#> GSM648619     1  0.3521    0.16936 0.864 0.000 0.084 0.052
#> GSM648654     3  0.7877   -0.17012 0.312 0.000 0.388 0.300
#> GSM648663     3  0.0188    0.74290 0.004 0.000 0.996 0.000
#> GSM648670     1  0.8297   -0.49984 0.452 0.264 0.024 0.260
#> GSM648707     3  0.4877    0.64358 0.408 0.000 0.592 0.000
#> GSM648615     2  0.3024    0.68978 0.148 0.852 0.000 0.000
#> GSM648643     2  0.4462    0.64856 0.132 0.804 0.000 0.064
#> GSM648650     1  0.6309    0.45512 0.588 0.076 0.000 0.336
#> GSM648656     2  0.0000    0.74634 0.000 1.000 0.000 0.000
#> GSM648715     2  0.7416   -0.00722 0.244 0.516 0.000 0.240
#> GSM648598     1  0.4877    0.58429 0.592 0.000 0.000 0.408
#> GSM648601     1  0.4877    0.58429 0.592 0.000 0.000 0.408
#> GSM648602     1  0.4877    0.58429 0.592 0.000 0.000 0.408
#> GSM648604     1  0.4877    0.58429 0.592 0.000 0.000 0.408
#> GSM648614     3  0.8004    0.20234 0.316 0.164 0.492 0.028
#> GSM648624     1  0.4877    0.58429 0.592 0.000 0.000 0.408
#> GSM648625     1  0.4843    0.57961 0.604 0.000 0.000 0.396
#> GSM648629     1  0.4888    0.57734 0.588 0.000 0.000 0.412
#> GSM648634     1  0.4866    0.58421 0.596 0.000 0.000 0.404
#> GSM648648     1  0.4955    0.49388 0.556 0.000 0.000 0.444
#> GSM648651     1  0.4877    0.58429 0.592 0.000 0.000 0.408
#> GSM648657     1  0.3219    0.30782 0.836 0.000 0.000 0.164
#> GSM648660     1  0.4866    0.58421 0.596 0.000 0.000 0.404
#> GSM648697     4  0.4356    0.44712 0.292 0.000 0.000 0.708
#> GSM648710     4  0.4933    0.01545 0.432 0.000 0.000 0.568
#> GSM648591     3  0.4888    0.64226 0.412 0.000 0.588 0.000
#> GSM648592     1  0.3751   -0.03993 0.800 0.004 0.196 0.000
#> GSM648607     1  0.4877    0.58429 0.592 0.000 0.000 0.408
#> GSM648611     3  0.0376    0.74281 0.004 0.000 0.992 0.004
#> GSM648612     3  0.4907    0.63829 0.420 0.000 0.580 0.000
#> GSM648616     3  0.4877    0.64358 0.408 0.000 0.592 0.000
#> GSM648617     1  0.3123    0.09071 0.844 0.000 0.156 0.000
#> GSM648626     1  0.2888    0.12254 0.872 0.000 0.124 0.004
#> GSM648711     1  0.4888    0.57734 0.588 0.000 0.000 0.412
#> GSM648712     3  0.4998    0.58960 0.488 0.000 0.512 0.000
#> GSM648713     3  0.3810    0.71979 0.188 0.000 0.804 0.008
#> GSM648714     3  0.7102    0.58794 0.288 0.164 0.548 0.000
#> GSM648716     3  0.6980    0.49105 0.400 0.000 0.484 0.116
#> GSM648717     3  0.0188    0.74290 0.004 0.000 0.996 0.000
#> GSM648590     1  0.5183    0.56813 0.584 0.008 0.000 0.408
#> GSM648596     2  0.4006    0.72993 0.084 0.848 0.008 0.060
#> GSM648642     2  0.7458   -0.25672 0.176 0.444 0.000 0.380
#> GSM648696     1  0.4843    0.57961 0.604 0.000 0.000 0.396
#> GSM648705     1  0.4877    0.58429 0.592 0.000 0.000 0.408
#> GSM648718     2  0.5159    0.60142 0.156 0.756 0.000 0.088
#> GSM648599     1  0.2216    0.25609 0.908 0.000 0.000 0.092
#> GSM648608     1  0.4992    0.37748 0.524 0.000 0.000 0.476
#> GSM648609     4  0.4790    0.23182 0.380 0.000 0.000 0.620
#> GSM648610     1  0.4877    0.58429 0.592 0.000 0.000 0.408
#> GSM648633     1  0.4761    0.55412 0.628 0.000 0.000 0.372
#> GSM648644     2  0.0000    0.74634 0.000 1.000 0.000 0.000
#> GSM648652     1  0.4877    0.58429 0.592 0.000 0.000 0.408
#> GSM648653     1  0.4877    0.58429 0.592 0.000 0.000 0.408
#> GSM648658     4  0.4277    0.45836 0.280 0.000 0.000 0.720
#> GSM648659     4  0.4035    0.44874 0.176 0.020 0.000 0.804
#> GSM648662     1  0.6646    0.35263 0.584 0.000 0.112 0.304
#> GSM648665     4  0.6921    0.38535 0.260 0.000 0.160 0.580
#> GSM648666     4  0.4164    0.46384 0.264 0.000 0.000 0.736
#> GSM648680     1  0.4877    0.58429 0.592 0.000 0.000 0.408
#> GSM648684     4  0.4981   -0.15821 0.464 0.000 0.000 0.536
#> GSM648709     2  0.6637    0.29461 0.240 0.616 0.000 0.144
#> GSM648719     1  0.4866    0.58421 0.596 0.000 0.000 0.404
#> GSM648627     3  0.6805    0.19534 0.260 0.000 0.592 0.148
#> GSM648637     2  0.7955    0.63226 0.140 0.580 0.068 0.212
#> GSM648638     3  0.5172    0.64275 0.404 0.008 0.588 0.000
#> GSM648641     3  0.1389    0.74271 0.048 0.000 0.952 0.000
#> GSM648672     2  0.4040    0.74923 0.000 0.752 0.000 0.248
#> GSM648674     2  0.4220    0.74924 0.004 0.748 0.000 0.248
#> GSM648703     2  0.4193    0.74643 0.000 0.732 0.000 0.268
#> GSM648631     3  0.0707    0.73957 0.000 0.000 0.980 0.020
#> GSM648669     2  0.5810    0.71305 0.000 0.672 0.072 0.256
#> GSM648671     2  0.5508    0.72555 0.000 0.692 0.056 0.252
#> GSM648678     2  0.0000    0.74634 0.000 1.000 0.000 0.000
#> GSM648679     2  0.4485    0.74750 0.012 0.740 0.000 0.248
#> GSM648681     2  0.4103    0.74845 0.000 0.744 0.000 0.256
#> GSM648686     3  0.6340    0.51429 0.000 0.096 0.620 0.284
#> GSM648689     3  0.3105    0.69832 0.000 0.012 0.868 0.120
#> GSM648690     3  0.2256    0.71896 0.000 0.056 0.924 0.020
#> GSM648691     3  0.2256    0.71914 0.000 0.056 0.924 0.020
#> GSM648693     3  0.0592    0.74019 0.000 0.000 0.984 0.016
#> GSM648700     4  0.1489    0.33843 0.000 0.044 0.004 0.952
#> GSM648630     3  0.0524    0.74096 0.000 0.004 0.988 0.008
#> GSM648632     3  0.3024    0.68839 0.000 0.000 0.852 0.148
#> GSM648639     3  0.4855    0.64779 0.400 0.000 0.600 0.000
#> GSM648640     3  0.1940    0.73999 0.076 0.000 0.924 0.000
#> GSM648668     2  0.4946    0.74442 0.020 0.720 0.004 0.256
#> GSM648676     4  0.3764   -0.15301 0.000 0.216 0.000 0.784
#> GSM648692     3  0.0376    0.74146 0.000 0.004 0.992 0.004
#> GSM648694     3  0.0336    0.74153 0.000 0.000 0.992 0.008
#> GSM648699     4  0.5050   -0.51823 0.000 0.408 0.004 0.588
#> GSM648701     2  0.4955    0.63427 0.000 0.556 0.000 0.444
#> GSM648673     2  0.4134    0.74777 0.000 0.740 0.000 0.260
#> GSM648677     2  0.4134    0.74777 0.000 0.740 0.000 0.260
#> GSM648687     3  0.4866    0.47803 0.000 0.000 0.596 0.404
#> GSM648688     3  0.4624    0.54360 0.000 0.000 0.660 0.340

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM648605     2  0.2011     0.7083 0.088 0.908 0.004 0.000 0.000
#> GSM648618     1  0.2670     0.8429 0.904 0.004 0.024 0.044 0.024
#> GSM648620     2  0.4278     0.3222 0.452 0.548 0.000 0.000 0.000
#> GSM648646     2  0.0510     0.6947 0.000 0.984 0.000 0.016 0.000
#> GSM648649     1  0.0162     0.8784 0.996 0.004 0.000 0.000 0.000
#> GSM648675     4  0.4286     0.3882 0.340 0.004 0.004 0.652 0.000
#> GSM648682     2  0.2969     0.6990 0.128 0.852 0.000 0.020 0.000
#> GSM648698     2  0.1121     0.7088 0.044 0.956 0.000 0.000 0.000
#> GSM648708     1  0.2516     0.7700 0.860 0.140 0.000 0.000 0.000
#> GSM648628     5  0.3635     0.3919 0.000 0.004 0.248 0.000 0.748
#> GSM648595     4  0.3080     0.6820 0.124 0.000 0.004 0.852 0.020
#> GSM648635     1  0.0162     0.8784 0.996 0.004 0.000 0.000 0.000
#> GSM648645     1  0.1153     0.8722 0.964 0.004 0.000 0.024 0.008
#> GSM648647     2  0.3689     0.6387 0.256 0.740 0.000 0.004 0.000
#> GSM648667     1  0.1043     0.8625 0.960 0.040 0.000 0.000 0.000
#> GSM648695     1  0.3480     0.5970 0.752 0.248 0.000 0.000 0.000
#> GSM648704     2  0.0404     0.6953 0.000 0.988 0.000 0.012 0.000
#> GSM648706     2  0.0162     0.6950 0.000 0.996 0.000 0.004 0.000
#> GSM648593     1  0.1410     0.8630 0.940 0.000 0.000 0.060 0.000
#> GSM648594     1  0.3521     0.7070 0.764 0.000 0.000 0.232 0.004
#> GSM648600     1  0.2773     0.7597 0.836 0.000 0.000 0.000 0.164
#> GSM648621     1  0.4979     0.6068 0.708 0.000 0.036 0.028 0.228
#> GSM648622     1  0.0162     0.8790 0.996 0.000 0.000 0.004 0.000
#> GSM648623     5  0.2871     0.6141 0.088 0.000 0.004 0.032 0.876
#> GSM648636     1  0.1915     0.8578 0.928 0.000 0.040 0.032 0.000
#> GSM648655     1  0.5700     0.5374 0.628 0.000 0.176 0.196 0.000
#> GSM648661     3  0.3728     0.3719 0.244 0.000 0.748 0.008 0.000
#> GSM648664     1  0.3003     0.7398 0.812 0.000 0.188 0.000 0.000
#> GSM648683     1  0.1041     0.8725 0.964 0.000 0.032 0.004 0.000
#> GSM648685     1  0.3561     0.6505 0.740 0.000 0.260 0.000 0.000
#> GSM648702     1  0.1549     0.8669 0.944 0.000 0.016 0.040 0.000
#> GSM648597     5  0.5577     0.4161 0.256 0.000 0.000 0.120 0.624
#> GSM648603     1  0.4307    -0.0261 0.500 0.000 0.000 0.000 0.500
#> GSM648606     5  0.4759     0.0371 0.000 0.016 0.388 0.004 0.592
#> GSM648613     5  0.1571     0.6014 0.000 0.004 0.060 0.000 0.936
#> GSM648619     1  0.3969     0.5195 0.692 0.000 0.000 0.004 0.304
#> GSM648654     3  0.5485     0.4243 0.256 0.012 0.652 0.000 0.080
#> GSM648663     5  0.5086    -0.0435 0.000 0.040 0.396 0.000 0.564
#> GSM648670     4  0.3607     0.5959 0.000 0.004 0.000 0.752 0.244
#> GSM648707     5  0.1908     0.6156 0.000 0.000 0.000 0.092 0.908
#> GSM648615     2  0.0579     0.6995 0.008 0.984 0.000 0.008 0.000
#> GSM648643     2  0.3944     0.6619 0.200 0.768 0.000 0.032 0.000
#> GSM648650     1  0.0703     0.8722 0.976 0.024 0.000 0.000 0.000
#> GSM648656     2  0.0609     0.6938 0.000 0.980 0.000 0.020 0.000
#> GSM648715     1  0.4306    -0.1757 0.508 0.492 0.000 0.000 0.000
#> GSM648598     1  0.0290     0.8793 0.992 0.000 0.000 0.008 0.000
#> GSM648601     1  0.0000     0.8786 1.000 0.000 0.000 0.000 0.000
#> GSM648602     1  0.0000     0.8786 1.000 0.000 0.000 0.000 0.000
#> GSM648604     1  0.0000     0.8786 1.000 0.000 0.000 0.000 0.000
#> GSM648614     2  0.7682     0.3212 0.296 0.468 0.128 0.004 0.104
#> GSM648624     1  0.0324     0.8792 0.992 0.000 0.004 0.004 0.000
#> GSM648625     1  0.0162     0.8788 0.996 0.000 0.000 0.004 0.000
#> GSM648629     1  0.0162     0.8787 0.996 0.000 0.004 0.000 0.000
#> GSM648634     1  0.0162     0.8784 0.996 0.004 0.000 0.000 0.000
#> GSM648648     1  0.0510     0.8771 0.984 0.000 0.016 0.000 0.000
#> GSM648651     1  0.1461     0.8684 0.952 0.000 0.004 0.028 0.016
#> GSM648657     1  0.3086     0.7382 0.816 0.000 0.000 0.004 0.180
#> GSM648660     1  0.0000     0.8786 1.000 0.000 0.000 0.000 0.000
#> GSM648697     1  0.4921     0.4898 0.620 0.000 0.340 0.040 0.000
#> GSM648710     1  0.1043     0.8707 0.960 0.000 0.040 0.000 0.000
#> GSM648591     5  0.2416     0.6118 0.012 0.000 0.000 0.100 0.888
#> GSM648592     5  0.5304     0.4224 0.292 0.000 0.000 0.080 0.628
#> GSM648607     1  0.0324     0.8791 0.992 0.004 0.000 0.000 0.004
#> GSM648611     3  0.4489     0.4210 0.000 0.000 0.572 0.008 0.420
#> GSM648612     5  0.1267     0.6258 0.012 0.000 0.024 0.004 0.960
#> GSM648616     5  0.1851     0.6171 0.000 0.000 0.000 0.088 0.912
#> GSM648617     5  0.4288     0.3474 0.384 0.000 0.000 0.004 0.612
#> GSM648626     5  0.4963     0.3964 0.352 0.000 0.000 0.040 0.608
#> GSM648711     1  0.0671     0.8765 0.980 0.000 0.000 0.004 0.016
#> GSM648712     5  0.1547     0.6323 0.032 0.000 0.016 0.004 0.948
#> GSM648713     5  0.3861     0.5184 0.068 0.000 0.128 0.000 0.804
#> GSM648714     2  0.5431     0.1489 0.000 0.516 0.060 0.000 0.424
#> GSM648716     5  0.5178     0.3505 0.304 0.000 0.056 0.004 0.636
#> GSM648717     5  0.4333     0.1598 0.000 0.004 0.352 0.004 0.640
#> GSM648590     1  0.1205     0.8681 0.956 0.004 0.000 0.040 0.000
#> GSM648596     2  0.6022     0.3535 0.004 0.596 0.000 0.232 0.168
#> GSM648642     2  0.4138     0.4867 0.384 0.616 0.000 0.000 0.000
#> GSM648696     1  0.0290     0.8780 0.992 0.008 0.000 0.000 0.000
#> GSM648705     1  0.0162     0.8784 0.996 0.004 0.000 0.000 0.000
#> GSM648718     2  0.5672     0.4654 0.368 0.544 0.000 0.088 0.000
#> GSM648599     1  0.2970     0.7577 0.828 0.004 0.000 0.000 0.168
#> GSM648608     1  0.0451     0.8784 0.988 0.000 0.008 0.004 0.000
#> GSM648609     1  0.0880     0.8729 0.968 0.000 0.032 0.000 0.000
#> GSM648610     1  0.0162     0.8788 0.996 0.000 0.000 0.004 0.000
#> GSM648633     1  0.0290     0.8784 0.992 0.000 0.000 0.000 0.008
#> GSM648644     2  0.0609     0.6938 0.000 0.980 0.000 0.020 0.000
#> GSM648652     1  0.0000     0.8786 1.000 0.000 0.000 0.000 0.000
#> GSM648653     1  0.0000     0.8786 1.000 0.000 0.000 0.000 0.000
#> GSM648658     1  0.5692     0.5455 0.628 0.000 0.204 0.168 0.000
#> GSM648659     4  0.7841     0.1859 0.276 0.064 0.312 0.348 0.000
#> GSM648662     1  0.2024     0.8438 0.920 0.004 0.068 0.004 0.004
#> GSM648665     3  0.4101     0.2032 0.372 0.000 0.628 0.000 0.000
#> GSM648666     1  0.5221     0.3533 0.552 0.000 0.400 0.048 0.000
#> GSM648680     1  0.0566     0.8787 0.984 0.000 0.004 0.012 0.000
#> GSM648684     1  0.1444     0.8673 0.948 0.000 0.040 0.012 0.000
#> GSM648709     2  0.3461     0.6622 0.224 0.772 0.000 0.004 0.000
#> GSM648719     1  0.0000     0.8786 1.000 0.000 0.000 0.000 0.000
#> GSM648627     3  0.6533     0.1890 0.400 0.000 0.428 0.004 0.168
#> GSM648637     4  0.6277     0.2293 0.000 0.152 0.000 0.464 0.384
#> GSM648638     5  0.0693     0.6280 0.000 0.008 0.000 0.012 0.980
#> GSM648641     5  0.4114     0.1011 0.000 0.000 0.376 0.000 0.624
#> GSM648672     4  0.4047     0.5328 0.000 0.320 0.000 0.676 0.004
#> GSM648674     4  0.3323     0.7130 0.000 0.056 0.000 0.844 0.100
#> GSM648703     4  0.2519     0.7090 0.000 0.100 0.016 0.884 0.000
#> GSM648631     3  0.3366     0.6160 0.000 0.000 0.768 0.000 0.232
#> GSM648669     4  0.1770     0.7395 0.000 0.048 0.008 0.936 0.008
#> GSM648671     4  0.1798     0.7376 0.000 0.064 0.004 0.928 0.004
#> GSM648678     2  0.1197     0.6777 0.000 0.952 0.000 0.048 0.000
#> GSM648679     4  0.4599     0.6615 0.000 0.100 0.000 0.744 0.156
#> GSM648681     4  0.1357     0.7389 0.000 0.048 0.000 0.948 0.004
#> GSM648686     3  0.2812     0.6252 0.000 0.024 0.876 0.004 0.096
#> GSM648689     3  0.2951     0.6302 0.000 0.028 0.860 0.000 0.112
#> GSM648690     3  0.4865     0.5900 0.000 0.064 0.684 0.000 0.252
#> GSM648691     3  0.4413     0.6090 0.000 0.044 0.724 0.000 0.232
#> GSM648693     3  0.4074     0.5170 0.000 0.000 0.636 0.000 0.364
#> GSM648700     4  0.4101     0.5716 0.004 0.000 0.332 0.664 0.000
#> GSM648630     3  0.4551     0.5065 0.000 0.016 0.616 0.000 0.368
#> GSM648632     3  0.2424     0.6309 0.000 0.000 0.868 0.000 0.132
#> GSM648639     5  0.0703     0.6294 0.000 0.000 0.000 0.024 0.976
#> GSM648640     5  0.2516     0.5398 0.000 0.000 0.140 0.000 0.860
#> GSM648668     4  0.2921     0.7103 0.000 0.124 0.000 0.856 0.020
#> GSM648676     4  0.4017     0.6507 0.004 0.012 0.248 0.736 0.000
#> GSM648692     3  0.4736     0.4484 0.000 0.020 0.576 0.000 0.404
#> GSM648694     3  0.4101     0.5072 0.000 0.000 0.628 0.000 0.372
#> GSM648699     4  0.4161     0.5089 0.000 0.000 0.392 0.608 0.000
#> GSM648701     4  0.3845     0.6754 0.000 0.024 0.208 0.768 0.000
#> GSM648673     4  0.1205     0.7392 0.000 0.040 0.004 0.956 0.000
#> GSM648677     4  0.2763     0.6938 0.000 0.148 0.004 0.848 0.000
#> GSM648687     3  0.1270     0.5403 0.000 0.000 0.948 0.052 0.000
#> GSM648688     3  0.1357     0.6015 0.000 0.000 0.948 0.004 0.048

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM648605     2  0.3317    0.72059 0.168 0.804 0.016 0.000 0.000 0.012
#> GSM648618     1  0.6312    0.20925 0.496 0.012 0.372 0.072 0.012 0.036
#> GSM648620     1  0.3969    0.41888 0.652 0.332 0.000 0.000 0.000 0.016
#> GSM648646     2  0.1267    0.73735 0.000 0.940 0.000 0.060 0.000 0.000
#> GSM648649     1  0.0820    0.79760 0.972 0.012 0.000 0.000 0.000 0.016
#> GSM648675     6  0.6026    0.29792 0.256 0.000 0.000 0.180 0.024 0.540
#> GSM648682     2  0.4618    0.57399 0.312 0.640 0.000 0.028 0.000 0.020
#> GSM648698     2  0.2704    0.73914 0.140 0.844 0.000 0.000 0.000 0.016
#> GSM648708     1  0.1951    0.77406 0.908 0.076 0.000 0.000 0.000 0.016
#> GSM648628     5  0.4996    0.51705 0.004 0.004 0.260 0.028 0.664 0.040
#> GSM648595     4  0.5930    0.38516 0.056 0.000 0.000 0.564 0.092 0.288
#> GSM648635     1  0.0820    0.79760 0.972 0.012 0.000 0.000 0.000 0.016
#> GSM648645     1  0.1275    0.79832 0.956 0.012 0.000 0.016 0.000 0.016
#> GSM648647     2  0.3636    0.56437 0.320 0.676 0.000 0.004 0.000 0.000
#> GSM648667     1  0.1080    0.80289 0.960 0.032 0.000 0.004 0.000 0.004
#> GSM648695     1  0.2848    0.70987 0.816 0.176 0.000 0.000 0.000 0.008
#> GSM648704     2  0.1075    0.73776 0.000 0.952 0.000 0.048 0.000 0.000
#> GSM648706     2  0.0717    0.73348 0.000 0.976 0.008 0.016 0.000 0.000
#> GSM648593     6  0.3896    0.52600 0.204 0.000 0.000 0.000 0.052 0.744
#> GSM648594     1  0.5035    0.60303 0.668 0.004 0.000 0.148 0.004 0.176
#> GSM648600     1  0.4263    0.43303 0.600 0.000 0.000 0.000 0.376 0.024
#> GSM648621     5  0.5051    0.58320 0.112 0.000 0.000 0.020 0.676 0.192
#> GSM648622     1  0.2282    0.78923 0.908 0.008 0.004 0.008 0.012 0.060
#> GSM648623     5  0.4075    0.69150 0.100 0.000 0.000 0.080 0.788 0.032
#> GSM648636     1  0.4181    0.13856 0.512 0.012 0.000 0.000 0.000 0.476
#> GSM648655     6  0.1572    0.66583 0.036 0.000 0.000 0.000 0.028 0.936
#> GSM648661     3  0.6246    0.22282 0.184 0.012 0.552 0.024 0.000 0.228
#> GSM648664     1  0.2510    0.77561 0.884 0.008 0.088 0.004 0.000 0.016
#> GSM648683     1  0.3048    0.74566 0.824 0.004 0.000 0.000 0.020 0.152
#> GSM648685     1  0.2469    0.79126 0.896 0.008 0.048 0.004 0.000 0.044
#> GSM648702     1  0.1471    0.79842 0.932 0.000 0.000 0.004 0.000 0.064
#> GSM648597     5  0.4231    0.45546 0.012 0.000 0.008 0.364 0.616 0.000
#> GSM648603     5  0.4576    0.38011 0.368 0.000 0.000 0.036 0.592 0.004
#> GSM648606     5  0.4137    0.67720 0.000 0.036 0.144 0.008 0.780 0.032
#> GSM648613     5  0.2264    0.72117 0.000 0.004 0.096 0.012 0.888 0.000
#> GSM648619     5  0.3309    0.64107 0.192 0.000 0.004 0.000 0.788 0.016
#> GSM648654     3  0.4119    0.42934 0.280 0.004 0.692 0.016 0.000 0.008
#> GSM648663     5  0.3917    0.66758 0.004 0.056 0.164 0.000 0.772 0.004
#> GSM648670     4  0.3736    0.70650 0.000 0.000 0.000 0.776 0.068 0.156
#> GSM648707     5  0.3617    0.62845 0.000 0.000 0.020 0.244 0.736 0.000
#> GSM648615     2  0.3100    0.74781 0.108 0.848 0.000 0.028 0.004 0.012
#> GSM648643     2  0.3839    0.68652 0.212 0.748 0.000 0.036 0.000 0.004
#> GSM648650     1  0.2001    0.78821 0.920 0.044 0.000 0.020 0.000 0.016
#> GSM648656     2  0.1444    0.73297 0.000 0.928 0.000 0.072 0.000 0.000
#> GSM648715     1  0.4700    0.00863 0.488 0.476 0.000 0.008 0.000 0.028
#> GSM648598     1  0.2806    0.75543 0.844 0.000 0.000 0.004 0.016 0.136
#> GSM648601     1  0.1572    0.79667 0.936 0.000 0.000 0.000 0.028 0.036
#> GSM648602     1  0.1829    0.79197 0.920 0.000 0.000 0.000 0.056 0.024
#> GSM648604     1  0.0520    0.79974 0.984 0.008 0.000 0.000 0.000 0.008
#> GSM648614     2  0.6422    0.06504 0.052 0.468 0.076 0.000 0.384 0.020
#> GSM648624     1  0.1196    0.80018 0.952 0.008 0.000 0.000 0.000 0.040
#> GSM648625     1  0.4953    0.65107 0.704 0.012 0.004 0.004 0.160 0.116
#> GSM648629     1  0.0767    0.79916 0.976 0.008 0.004 0.000 0.000 0.012
#> GSM648634     1  0.1269    0.79895 0.956 0.012 0.000 0.000 0.012 0.020
#> GSM648648     1  0.0810    0.80281 0.976 0.004 0.008 0.004 0.000 0.008
#> GSM648651     1  0.5685    0.43492 0.568 0.012 0.004 0.008 0.092 0.316
#> GSM648657     1  0.4790    0.57912 0.656 0.000 0.000 0.056 0.272 0.016
#> GSM648660     1  0.0837    0.80080 0.972 0.000 0.000 0.004 0.004 0.020
#> GSM648697     1  0.4577    0.39073 0.572 0.004 0.024 0.004 0.000 0.396
#> GSM648710     1  0.1155    0.80310 0.956 0.004 0.036 0.000 0.000 0.004
#> GSM648591     5  0.3254    0.69393 0.000 0.000 0.008 0.172 0.804 0.016
#> GSM648592     5  0.4364    0.59733 0.052 0.000 0.004 0.256 0.688 0.000
#> GSM648607     1  0.2959    0.77350 0.864 0.012 0.020 0.000 0.092 0.012
#> GSM648611     5  0.5504    0.35216 0.000 0.000 0.328 0.024 0.564 0.084
#> GSM648612     5  0.0508    0.73824 0.000 0.000 0.004 0.000 0.984 0.012
#> GSM648616     5  0.3245    0.64417 0.000 0.000 0.008 0.228 0.764 0.000
#> GSM648617     5  0.3419    0.64599 0.172 0.000 0.000 0.008 0.796 0.024
#> GSM648626     5  0.4494    0.63748 0.136 0.000 0.004 0.140 0.720 0.000
#> GSM648711     1  0.4518    0.62505 0.688 0.000 0.000 0.004 0.236 0.072
#> GSM648712     5  0.0922    0.73854 0.004 0.000 0.004 0.000 0.968 0.024
#> GSM648713     5  0.2570    0.72902 0.024 0.000 0.076 0.000 0.884 0.016
#> GSM648714     5  0.4889    0.44119 0.000 0.312 0.084 0.000 0.604 0.000
#> GSM648716     5  0.2164    0.73596 0.044 0.000 0.028 0.000 0.912 0.016
#> GSM648717     5  0.3291    0.70811 0.016 0.012 0.120 0.000 0.836 0.016
#> GSM648590     1  0.4994    0.43617 0.624 0.020 0.000 0.044 0.004 0.308
#> GSM648596     2  0.4950    0.51534 0.000 0.652 0.000 0.184 0.164 0.000
#> GSM648642     1  0.4076    0.32721 0.620 0.364 0.000 0.000 0.000 0.016
#> GSM648696     1  0.1448    0.79717 0.948 0.016 0.000 0.000 0.012 0.024
#> GSM648705     1  0.0964    0.79759 0.968 0.012 0.004 0.000 0.000 0.016
#> GSM648718     1  0.3543    0.61597 0.756 0.224 0.000 0.004 0.000 0.016
#> GSM648599     1  0.4204    0.56983 0.676 0.004 0.000 0.012 0.296 0.012
#> GSM648608     1  0.1003    0.80314 0.964 0.000 0.004 0.000 0.004 0.028
#> GSM648609     1  0.2257    0.78506 0.900 0.008 0.012 0.004 0.000 0.076
#> GSM648610     1  0.3161    0.75101 0.828 0.008 0.000 0.000 0.136 0.028
#> GSM648633     1  0.2588    0.76067 0.860 0.000 0.000 0.004 0.124 0.012
#> GSM648644     2  0.1267    0.73735 0.000 0.940 0.000 0.060 0.000 0.000
#> GSM648652     1  0.0508    0.80122 0.984 0.000 0.000 0.004 0.000 0.012
#> GSM648653     1  0.0622    0.80113 0.980 0.000 0.000 0.000 0.012 0.008
#> GSM648658     6  0.2056    0.65044 0.080 0.000 0.004 0.000 0.012 0.904
#> GSM648659     6  0.1622    0.67757 0.016 0.016 0.000 0.028 0.000 0.940
#> GSM648662     1  0.7014    0.43377 0.548 0.048 0.056 0.004 0.136 0.208
#> GSM648665     6  0.6677    0.06757 0.348 0.012 0.276 0.012 0.000 0.352
#> GSM648666     1  0.5347    0.15578 0.484 0.012 0.036 0.012 0.004 0.452
#> GSM648680     1  0.0551    0.79990 0.984 0.004 0.004 0.000 0.000 0.008
#> GSM648684     1  0.4337    0.61730 0.700 0.004 0.000 0.004 0.044 0.248
#> GSM648709     2  0.2704    0.72852 0.140 0.844 0.000 0.016 0.000 0.000
#> GSM648719     1  0.1268    0.80239 0.952 0.004 0.000 0.000 0.036 0.008
#> GSM648627     5  0.6648    0.01318 0.148 0.000 0.384 0.008 0.416 0.044
#> GSM648637     4  0.4719    0.60120 0.000 0.100 0.000 0.680 0.216 0.004
#> GSM648638     5  0.2638    0.73041 0.000 0.032 0.036 0.044 0.888 0.000
#> GSM648641     5  0.3046    0.66903 0.000 0.000 0.188 0.000 0.800 0.012
#> GSM648672     4  0.3175    0.75220 0.000 0.164 0.000 0.808 0.000 0.028
#> GSM648674     4  0.3344    0.78437 0.000 0.020 0.000 0.828 0.032 0.120
#> GSM648703     6  0.4299    0.36831 0.000 0.040 0.000 0.308 0.000 0.652
#> GSM648631     3  0.2543    0.82640 0.000 0.008 0.868 0.004 0.116 0.004
#> GSM648669     4  0.3214    0.77903 0.000 0.024 0.084 0.852 0.004 0.036
#> GSM648671     4  0.2867    0.79435 0.000 0.024 0.064 0.872 0.000 0.040
#> GSM648678     2  0.1663    0.72414 0.000 0.912 0.000 0.088 0.000 0.000
#> GSM648679     4  0.1594    0.80108 0.000 0.052 0.000 0.932 0.016 0.000
#> GSM648681     4  0.2129    0.81161 0.000 0.056 0.000 0.904 0.000 0.040
#> GSM648686     3  0.2202    0.81924 0.000 0.016 0.916 0.016 0.040 0.012
#> GSM648689     3  0.3590    0.80809 0.000 0.064 0.812 0.000 0.112 0.012
#> GSM648690     3  0.2622    0.82607 0.000 0.024 0.868 0.000 0.104 0.004
#> GSM648691     3  0.1434    0.80821 0.000 0.008 0.948 0.020 0.024 0.000
#> GSM648693     3  0.2340    0.80650 0.000 0.000 0.852 0.000 0.148 0.000
#> GSM648700     6  0.1531    0.67213 0.000 0.000 0.000 0.068 0.004 0.928
#> GSM648630     3  0.2278    0.81912 0.000 0.004 0.868 0.000 0.128 0.000
#> GSM648632     3  0.1985    0.82766 0.000 0.008 0.916 0.004 0.064 0.008
#> GSM648639     5  0.3156    0.68169 0.000 0.000 0.020 0.180 0.800 0.000
#> GSM648640     5  0.3514    0.63122 0.000 0.000 0.228 0.020 0.752 0.000
#> GSM648668     4  0.3123    0.79171 0.000 0.088 0.000 0.836 0.000 0.076
#> GSM648676     6  0.1411    0.67304 0.000 0.000 0.004 0.060 0.000 0.936
#> GSM648692     3  0.3012    0.75197 0.000 0.008 0.796 0.000 0.196 0.000
#> GSM648694     3  0.2300    0.81122 0.000 0.000 0.856 0.000 0.144 0.000
#> GSM648699     6  0.2553    0.62641 0.000 0.000 0.008 0.144 0.000 0.848
#> GSM648701     6  0.2488    0.64052 0.000 0.008 0.004 0.124 0.000 0.864
#> GSM648673     4  0.3263    0.78593 0.000 0.028 0.024 0.836 0.000 0.112
#> GSM648677     6  0.4823    0.12243 0.000 0.060 0.000 0.388 0.000 0.552
#> GSM648687     3  0.3142    0.70624 0.004 0.012 0.852 0.044 0.000 0.088
#> GSM648688     3  0.2294    0.76353 0.004 0.012 0.912 0.032 0.004 0.036

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-MAD-NMF-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-MAD-NMF-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-MAD-NMF-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-MAD-NMF-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-MAD-NMF-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-MAD-NMF-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-MAD-NMF-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-MAD-NMF-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-MAD-NMF-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-MAD-NMF-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-MAD-NMF-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-MAD-NMF-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-MAD-NMF-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-MAD-NMF-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-MAD-NMF-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-MAD-NMF-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-MAD-NMF-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-MAD-NMF-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-MAD-NMF-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-MAD-NMF-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk MAD-NMF-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-MAD-NMF-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-MAD-NMF-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-MAD-NMF-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-MAD-NMF-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-MAD-NMF-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk MAD-NMF-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>           n disease.state(p) development.stage(p) other(p) k
#> MAD:NMF 129         3.41e-01             0.000926 8.61e-11 2
#> MAD:NMF 122         1.69e-09             0.019900 5.07e-19 3
#> MAD:NMF  83         6.36e-06             0.032218 7.97e-15 4
#> MAD:NMF 101         6.56e-16             0.090942 3.61e-24 5
#> MAD:NMF 106         6.33e-14             0.032664 9.08e-27 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


ATC:hclust**

The object with results only for a single top-value method and a single partition method can be extracted as:

res = res_list["ATC", "hclust"]
# you can also extract it by
# res = res_list["ATC:hclust"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 130 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#>   Subgroups are detected by 'hclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk ATC-hclust-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk ATC-hclust-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           0.996       0.997         0.4345 0.565   0.565
#> 3 3 0.819           0.920       0.945         0.5062 0.764   0.582
#> 4 4 0.782           0.844       0.888         0.0927 0.940   0.819
#> 5 5 0.764           0.826       0.839         0.0591 0.953   0.831
#> 6 6 0.785           0.804       0.888         0.0435 0.973   0.883

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 2

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM648605     2  0.0376      0.997 0.004 0.996
#> GSM648618     2  0.0672      0.994 0.008 0.992
#> GSM648620     2  0.0000      0.998 0.000 1.000
#> GSM648646     2  0.0000      0.998 0.000 1.000
#> GSM648649     2  0.0000      0.998 0.000 1.000
#> GSM648675     2  0.0376      0.997 0.004 0.996
#> GSM648682     2  0.0000      0.998 0.000 1.000
#> GSM648698     2  0.0000      0.998 0.000 1.000
#> GSM648708     2  0.0000      0.998 0.000 1.000
#> GSM648628     1  0.0000      0.994 1.000 0.000
#> GSM648595     2  0.0000      0.998 0.000 1.000
#> GSM648635     2  0.0000      0.998 0.000 1.000
#> GSM648645     2  0.0376      0.997 0.004 0.996
#> GSM648647     2  0.0000      0.998 0.000 1.000
#> GSM648667     2  0.0000      0.998 0.000 1.000
#> GSM648695     2  0.0000      0.998 0.000 1.000
#> GSM648704     2  0.0000      0.998 0.000 1.000
#> GSM648706     2  0.0376      0.997 0.004 0.996
#> GSM648593     2  0.0000      0.998 0.000 1.000
#> GSM648594     2  0.0376      0.997 0.004 0.996
#> GSM648600     2  0.0000      0.998 0.000 1.000
#> GSM648621     2  0.0000      0.998 0.000 1.000
#> GSM648622     2  0.0672      0.994 0.008 0.992
#> GSM648623     2  0.0672      0.994 0.008 0.992
#> GSM648636     2  0.0000      0.998 0.000 1.000
#> GSM648655     2  0.0000      0.998 0.000 1.000
#> GSM648661     1  0.0000      0.994 1.000 0.000
#> GSM648664     1  0.0000      0.994 1.000 0.000
#> GSM648683     1  0.1414      0.985 0.980 0.020
#> GSM648685     1  0.1414      0.985 0.980 0.020
#> GSM648702     2  0.0000      0.998 0.000 1.000
#> GSM648597     2  0.0376      0.997 0.004 0.996
#> GSM648603     2  0.0000      0.998 0.000 1.000
#> GSM648606     1  0.1414      0.985 0.980 0.020
#> GSM648613     1  0.1414      0.985 0.980 0.020
#> GSM648619     1  0.0000      0.994 1.000 0.000
#> GSM648654     1  0.0000      0.994 1.000 0.000
#> GSM648663     1  0.0000      0.994 1.000 0.000
#> GSM648670     2  0.0000      0.998 0.000 1.000
#> GSM648707     2  0.0672      0.994 0.008 0.992
#> GSM648615     2  0.0000      0.998 0.000 1.000
#> GSM648643     2  0.0000      0.998 0.000 1.000
#> GSM648650     2  0.0000      0.998 0.000 1.000
#> GSM648656     2  0.0000      0.998 0.000 1.000
#> GSM648715     2  0.0000      0.998 0.000 1.000
#> GSM648598     2  0.0000      0.998 0.000 1.000
#> GSM648601     2  0.0000      0.998 0.000 1.000
#> GSM648602     2  0.0000      0.998 0.000 1.000
#> GSM648604     1  0.1184      0.987 0.984 0.016
#> GSM648614     2  0.0376      0.997 0.004 0.996
#> GSM648624     2  0.0672      0.994 0.008 0.992
#> GSM648625     2  0.0000      0.998 0.000 1.000
#> GSM648629     1  0.0000      0.994 1.000 0.000
#> GSM648634     2  0.0000      0.998 0.000 1.000
#> GSM648648     2  0.0376      0.997 0.004 0.996
#> GSM648651     2  0.0672      0.994 0.008 0.992
#> GSM648657     2  0.0376      0.997 0.004 0.996
#> GSM648660     2  0.0376      0.997 0.004 0.996
#> GSM648697     2  0.0672      0.994 0.008 0.992
#> GSM648710     1  0.0000      0.994 1.000 0.000
#> GSM648591     2  0.0672      0.994 0.008 0.992
#> GSM648592     2  0.0000      0.998 0.000 1.000
#> GSM648607     1  0.0000      0.994 1.000 0.000
#> GSM648611     1  0.0000      0.994 1.000 0.000
#> GSM648612     1  0.0000      0.994 1.000 0.000
#> GSM648616     2  0.0000      0.998 0.000 1.000
#> GSM648617     2  0.0000      0.998 0.000 1.000
#> GSM648626     2  0.0000      0.998 0.000 1.000
#> GSM648711     1  0.0000      0.994 1.000 0.000
#> GSM648712     1  0.0000      0.994 1.000 0.000
#> GSM648713     1  0.0000      0.994 1.000 0.000
#> GSM648714     2  0.0376      0.997 0.004 0.996
#> GSM648716     1  0.0000      0.994 1.000 0.000
#> GSM648717     1  0.1414      0.985 0.980 0.020
#> GSM648590     2  0.0000      0.998 0.000 1.000
#> GSM648596     2  0.0000      0.998 0.000 1.000
#> GSM648642     2  0.0376      0.997 0.004 0.996
#> GSM648696     2  0.0000      0.998 0.000 1.000
#> GSM648705     2  0.0000      0.998 0.000 1.000
#> GSM648718     2  0.0000      0.998 0.000 1.000
#> GSM648599     2  0.0000      0.998 0.000 1.000
#> GSM648608     1  0.1184      0.987 0.984 0.016
#> GSM648609     1  0.1184      0.987 0.984 0.016
#> GSM648610     1  0.1843      0.977 0.972 0.028
#> GSM648633     2  0.0000      0.998 0.000 1.000
#> GSM648644     2  0.0000      0.998 0.000 1.000
#> GSM648652     2  0.0000      0.998 0.000 1.000
#> GSM648653     2  0.0000      0.998 0.000 1.000
#> GSM648658     2  0.0376      0.997 0.004 0.996
#> GSM648659     2  0.0000      0.998 0.000 1.000
#> GSM648662     1  0.1414      0.985 0.980 0.020
#> GSM648665     1  0.1414      0.985 0.980 0.020
#> GSM648666     2  0.0672      0.994 0.008 0.992
#> GSM648680     2  0.0000      0.998 0.000 1.000
#> GSM648684     1  0.1414      0.985 0.980 0.020
#> GSM648709     2  0.0000      0.998 0.000 1.000
#> GSM648719     2  0.0376      0.997 0.004 0.996
#> GSM648627     1  0.0000      0.994 1.000 0.000
#> GSM648637     2  0.0000      0.998 0.000 1.000
#> GSM648638     2  0.0376      0.997 0.004 0.996
#> GSM648641     1  0.0000      0.994 1.000 0.000
#> GSM648672     2  0.0000      0.998 0.000 1.000
#> GSM648674     2  0.0000      0.998 0.000 1.000
#> GSM648703     2  0.0000      0.998 0.000 1.000
#> GSM648631     1  0.0000      0.994 1.000 0.000
#> GSM648669     2  0.0376      0.997 0.004 0.996
#> GSM648671     2  0.0376      0.997 0.004 0.996
#> GSM648678     2  0.0000      0.998 0.000 1.000
#> GSM648679     2  0.0000      0.998 0.000 1.000
#> GSM648681     2  0.0000      0.998 0.000 1.000
#> GSM648686     1  0.0000      0.994 1.000 0.000
#> GSM648689     1  0.0000      0.994 1.000 0.000
#> GSM648690     1  0.0000      0.994 1.000 0.000
#> GSM648691     1  0.0000      0.994 1.000 0.000
#> GSM648693     1  0.0000      0.994 1.000 0.000
#> GSM648700     2  0.0376      0.997 0.004 0.996
#> GSM648630     1  0.0000      0.994 1.000 0.000
#> GSM648632     1  0.0000      0.994 1.000 0.000
#> GSM648639     2  0.0000      0.998 0.000 1.000
#> GSM648640     1  0.0000      0.994 1.000 0.000
#> GSM648668     2  0.0000      0.998 0.000 1.000
#> GSM648676     2  0.0000      0.998 0.000 1.000
#> GSM648692     1  0.0000      0.994 1.000 0.000
#> GSM648694     1  0.0000      0.994 1.000 0.000
#> GSM648699     2  0.0376      0.997 0.004 0.996
#> GSM648701     2  0.0000      0.998 0.000 1.000
#> GSM648673     2  0.0376      0.997 0.004 0.996
#> GSM648677     2  0.0000      0.998 0.000 1.000
#> GSM648687     2  0.0672      0.994 0.008 0.992
#> GSM648688     1  0.0000      0.994 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM648605     1  0.0237      0.942 0.996 0.004 0.000
#> GSM648618     1  0.0000      0.940 1.000 0.000 0.000
#> GSM648620     2  0.3340      0.923 0.120 0.880 0.000
#> GSM648646     2  0.0000      0.885 0.000 1.000 0.000
#> GSM648649     2  0.3116      0.926 0.108 0.892 0.000
#> GSM648675     1  0.1529      0.939 0.960 0.040 0.000
#> GSM648682     2  0.3267      0.924 0.116 0.884 0.000
#> GSM648698     2  0.3267      0.924 0.116 0.884 0.000
#> GSM648708     2  0.3340      0.923 0.120 0.880 0.000
#> GSM648628     3  0.0000      0.992 0.000 0.000 1.000
#> GSM648595     2  0.2878      0.927 0.096 0.904 0.000
#> GSM648635     2  0.4235      0.882 0.176 0.824 0.000
#> GSM648645     1  0.1411      0.941 0.964 0.036 0.000
#> GSM648647     2  0.2878      0.927 0.096 0.904 0.000
#> GSM648667     2  0.2537      0.921 0.080 0.920 0.000
#> GSM648695     2  0.3192      0.925 0.112 0.888 0.000
#> GSM648704     2  0.0000      0.885 0.000 1.000 0.000
#> GSM648706     1  0.0237      0.942 0.996 0.004 0.000
#> GSM648593     2  0.4235      0.882 0.176 0.824 0.000
#> GSM648594     1  0.1411      0.941 0.964 0.036 0.000
#> GSM648600     1  0.5835      0.448 0.660 0.340 0.000
#> GSM648621     1  0.1529      0.940 0.960 0.040 0.000
#> GSM648622     1  0.0000      0.940 1.000 0.000 0.000
#> GSM648623     1  0.0000      0.940 1.000 0.000 0.000
#> GSM648636     2  0.4178      0.887 0.172 0.828 0.000
#> GSM648655     2  0.4178      0.887 0.172 0.828 0.000
#> GSM648661     3  0.0000      0.992 0.000 0.000 1.000
#> GSM648664     3  0.0237      0.991 0.004 0.000 0.996
#> GSM648683     3  0.1163      0.981 0.028 0.000 0.972
#> GSM648685     3  0.1163      0.981 0.028 0.000 0.972
#> GSM648702     2  0.4235      0.882 0.176 0.824 0.000
#> GSM648597     1  0.1411      0.941 0.964 0.036 0.000
#> GSM648603     1  0.1529      0.940 0.960 0.040 0.000
#> GSM648606     3  0.1163      0.981 0.028 0.000 0.972
#> GSM648613     3  0.1163      0.981 0.028 0.000 0.972
#> GSM648619     3  0.0237      0.991 0.004 0.000 0.996
#> GSM648654     3  0.0000      0.992 0.000 0.000 1.000
#> GSM648663     3  0.0237      0.991 0.004 0.000 0.996
#> GSM648670     2  0.3267      0.924 0.116 0.884 0.000
#> GSM648707     1  0.0000      0.940 1.000 0.000 0.000
#> GSM648615     2  0.3267      0.924 0.116 0.884 0.000
#> GSM648643     2  0.0000      0.885 0.000 1.000 0.000
#> GSM648650     2  0.3116      0.926 0.108 0.892 0.000
#> GSM648656     2  0.0000      0.885 0.000 1.000 0.000
#> GSM648715     2  0.2878      0.927 0.096 0.904 0.000
#> GSM648598     1  0.1529      0.940 0.960 0.040 0.000
#> GSM648601     1  0.1529      0.940 0.960 0.040 0.000
#> GSM648602     1  0.1529      0.940 0.960 0.040 0.000
#> GSM648604     3  0.1031      0.983 0.024 0.000 0.976
#> GSM648614     1  0.0237      0.942 0.996 0.004 0.000
#> GSM648624     1  0.0000      0.940 1.000 0.000 0.000
#> GSM648625     2  0.3267      0.924 0.116 0.884 0.000
#> GSM648629     3  0.0237      0.991 0.004 0.000 0.996
#> GSM648634     1  0.1529      0.940 0.960 0.040 0.000
#> GSM648648     1  0.1289      0.942 0.968 0.032 0.000
#> GSM648651     1  0.0000      0.940 1.000 0.000 0.000
#> GSM648657     1  0.1289      0.942 0.968 0.032 0.000
#> GSM648660     1  0.1411      0.941 0.964 0.036 0.000
#> GSM648697     1  0.0000      0.940 1.000 0.000 0.000
#> GSM648710     3  0.0237      0.991 0.004 0.000 0.996
#> GSM648591     1  0.0000      0.940 1.000 0.000 0.000
#> GSM648592     2  0.5327      0.748 0.272 0.728 0.000
#> GSM648607     3  0.0237      0.991 0.004 0.000 0.996
#> GSM648611     3  0.0000      0.992 0.000 0.000 1.000
#> GSM648612     3  0.0237      0.991 0.004 0.000 0.996
#> GSM648616     1  0.1529      0.940 0.960 0.040 0.000
#> GSM648617     1  0.5560      0.548 0.700 0.300 0.000
#> GSM648626     1  0.1529      0.940 0.960 0.040 0.000
#> GSM648711     3  0.0000      0.992 0.000 0.000 1.000
#> GSM648712     3  0.0237      0.991 0.004 0.000 0.996
#> GSM648713     3  0.0237      0.991 0.004 0.000 0.996
#> GSM648714     1  0.0237      0.942 0.996 0.004 0.000
#> GSM648716     3  0.0000      0.992 0.000 0.000 1.000
#> GSM648717     3  0.1163      0.981 0.028 0.000 0.972
#> GSM648590     2  0.2878      0.927 0.096 0.904 0.000
#> GSM648596     2  0.0000      0.885 0.000 1.000 0.000
#> GSM648642     1  0.0237      0.942 0.996 0.004 0.000
#> GSM648696     2  0.6307      0.166 0.488 0.512 0.000
#> GSM648705     2  0.3116      0.926 0.108 0.892 0.000
#> GSM648718     2  0.2878      0.927 0.096 0.904 0.000
#> GSM648599     1  0.1529      0.940 0.960 0.040 0.000
#> GSM648608     3  0.1031      0.983 0.024 0.000 0.976
#> GSM648609     3  0.1031      0.983 0.024 0.000 0.976
#> GSM648610     3  0.1411      0.974 0.036 0.000 0.964
#> GSM648633     2  0.4235      0.882 0.176 0.824 0.000
#> GSM648644     2  0.0000      0.885 0.000 1.000 0.000
#> GSM648652     2  0.4605      0.850 0.204 0.796 0.000
#> GSM648653     1  0.1529      0.940 0.960 0.040 0.000
#> GSM648658     1  0.1289      0.942 0.968 0.032 0.000
#> GSM648659     2  0.4002      0.896 0.160 0.840 0.000
#> GSM648662     3  0.1163      0.981 0.028 0.000 0.972
#> GSM648665     3  0.1163      0.981 0.028 0.000 0.972
#> GSM648666     1  0.0000      0.940 1.000 0.000 0.000
#> GSM648680     1  0.6235      0.108 0.564 0.436 0.000
#> GSM648684     3  0.1163      0.981 0.028 0.000 0.972
#> GSM648709     1  0.5591      0.539 0.696 0.304 0.000
#> GSM648719     1  0.1289      0.942 0.968 0.032 0.000
#> GSM648627     3  0.0000      0.992 0.000 0.000 1.000
#> GSM648637     2  0.0000      0.885 0.000 1.000 0.000
#> GSM648638     1  0.0237      0.942 0.996 0.004 0.000
#> GSM648641     3  0.0000      0.992 0.000 0.000 1.000
#> GSM648672     2  0.0000      0.885 0.000 1.000 0.000
#> GSM648674     2  0.2878      0.927 0.096 0.904 0.000
#> GSM648703     2  0.0000      0.885 0.000 1.000 0.000
#> GSM648631     3  0.0000      0.992 0.000 0.000 1.000
#> GSM648669     1  0.0237      0.942 0.996 0.004 0.000
#> GSM648671     1  0.0237      0.942 0.996 0.004 0.000
#> GSM648678     2  0.0000      0.885 0.000 1.000 0.000
#> GSM648679     2  0.2878      0.927 0.096 0.904 0.000
#> GSM648681     2  0.3551      0.915 0.132 0.868 0.000
#> GSM648686     3  0.0000      0.992 0.000 0.000 1.000
#> GSM648689     3  0.0000      0.992 0.000 0.000 1.000
#> GSM648690     3  0.0000      0.992 0.000 0.000 1.000
#> GSM648691     3  0.0000      0.992 0.000 0.000 1.000
#> GSM648693     3  0.0000      0.992 0.000 0.000 1.000
#> GSM648700     1  0.0424      0.943 0.992 0.008 0.000
#> GSM648630     3  0.0000      0.992 0.000 0.000 1.000
#> GSM648632     3  0.0000      0.992 0.000 0.000 1.000
#> GSM648639     1  0.3752      0.823 0.856 0.144 0.000
#> GSM648640     3  0.0000      0.992 0.000 0.000 1.000
#> GSM648668     2  0.0000      0.885 0.000 1.000 0.000
#> GSM648676     2  0.2878      0.927 0.096 0.904 0.000
#> GSM648692     3  0.0000      0.992 0.000 0.000 1.000
#> GSM648694     3  0.0000      0.992 0.000 0.000 1.000
#> GSM648699     1  0.0237      0.942 0.996 0.004 0.000
#> GSM648701     2  0.2959      0.926 0.100 0.900 0.000
#> GSM648673     1  0.0237      0.942 0.996 0.004 0.000
#> GSM648677     2  0.0000      0.885 0.000 1.000 0.000
#> GSM648687     1  0.0000      0.940 1.000 0.000 0.000
#> GSM648688     3  0.0000      0.992 0.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM648605     1  0.0817     0.8945 0.976 0.000 0.000 0.024
#> GSM648618     1  0.0336     0.9008 0.992 0.000 0.000 0.008
#> GSM648620     2  0.0336     0.9066 0.008 0.992 0.000 0.000
#> GSM648646     2  0.3311     0.8441 0.000 0.828 0.000 0.172
#> GSM648649     2  0.0524     0.9081 0.004 0.988 0.000 0.008
#> GSM648675     1  0.1867     0.9036 0.928 0.072 0.000 0.000
#> GSM648682     2  0.0188     0.9070 0.004 0.996 0.000 0.000
#> GSM648698     2  0.0188     0.9070 0.004 0.996 0.000 0.000
#> GSM648708     2  0.0336     0.9066 0.008 0.992 0.000 0.000
#> GSM648628     3  0.4072     0.6731 0.000 0.000 0.748 0.252
#> GSM648595     2  0.0895     0.9080 0.004 0.976 0.000 0.020
#> GSM648635     2  0.1716     0.8779 0.064 0.936 0.000 0.000
#> GSM648645     1  0.1867     0.9034 0.928 0.072 0.000 0.000
#> GSM648647     2  0.0895     0.9080 0.004 0.976 0.000 0.020
#> GSM648667     2  0.1824     0.8972 0.004 0.936 0.000 0.060
#> GSM648695     2  0.0376     0.9078 0.004 0.992 0.000 0.004
#> GSM648704     2  0.3311     0.8441 0.000 0.828 0.000 0.172
#> GSM648706     1  0.0188     0.9022 0.996 0.000 0.000 0.004
#> GSM648593     2  0.1716     0.8779 0.064 0.936 0.000 0.000
#> GSM648594     1  0.1867     0.9034 0.928 0.072 0.000 0.000
#> GSM648600     1  0.4967     0.3363 0.548 0.452 0.000 0.000
#> GSM648621     1  0.3074     0.8703 0.848 0.152 0.000 0.000
#> GSM648622     1  0.0336     0.9008 0.992 0.000 0.000 0.008
#> GSM648623     1  0.0336     0.9008 0.992 0.000 0.000 0.008
#> GSM648636     2  0.1637     0.8827 0.060 0.940 0.000 0.000
#> GSM648655     2  0.1637     0.8827 0.060 0.940 0.000 0.000
#> GSM648661     3  0.4522     0.5117 0.000 0.000 0.680 0.320
#> GSM648664     4  0.4222     0.8740 0.000 0.000 0.272 0.728
#> GSM648683     4  0.3494     0.9179 0.004 0.000 0.172 0.824
#> GSM648685     4  0.3494     0.9179 0.004 0.000 0.172 0.824
#> GSM648702     2  0.1716     0.8779 0.064 0.936 0.000 0.000
#> GSM648597     1  0.1867     0.9034 0.928 0.072 0.000 0.000
#> GSM648603     1  0.3074     0.8703 0.848 0.152 0.000 0.000
#> GSM648606     4  0.3494     0.9179 0.004 0.000 0.172 0.824
#> GSM648613     4  0.3494     0.9179 0.004 0.000 0.172 0.824
#> GSM648619     4  0.4250     0.8715 0.000 0.000 0.276 0.724
#> GSM648654     3  0.4193     0.6411 0.000 0.000 0.732 0.268
#> GSM648663     4  0.3610     0.9132 0.000 0.000 0.200 0.800
#> GSM648670     2  0.0188     0.9070 0.004 0.996 0.000 0.000
#> GSM648707     1  0.0336     0.9008 0.992 0.000 0.000 0.008
#> GSM648615     2  0.0188     0.9070 0.004 0.996 0.000 0.000
#> GSM648643     2  0.3311     0.8441 0.000 0.828 0.000 0.172
#> GSM648650     2  0.0524     0.9081 0.004 0.988 0.000 0.008
#> GSM648656     2  0.3311     0.8441 0.000 0.828 0.000 0.172
#> GSM648715     2  0.0895     0.9080 0.004 0.976 0.000 0.020
#> GSM648598     1  0.3074     0.8703 0.848 0.152 0.000 0.000
#> GSM648601     1  0.3074     0.8703 0.848 0.152 0.000 0.000
#> GSM648602     1  0.3074     0.8703 0.848 0.152 0.000 0.000
#> GSM648604     4  0.3583     0.9189 0.004 0.000 0.180 0.816
#> GSM648614     1  0.0817     0.8945 0.976 0.000 0.000 0.024
#> GSM648624     1  0.0336     0.9008 0.992 0.000 0.000 0.008
#> GSM648625     2  0.0188     0.9070 0.004 0.996 0.000 0.000
#> GSM648629     4  0.4356     0.8518 0.000 0.000 0.292 0.708
#> GSM648634     1  0.3074     0.8703 0.848 0.152 0.000 0.000
#> GSM648648     1  0.1792     0.9041 0.932 0.068 0.000 0.000
#> GSM648651     1  0.0336     0.9008 0.992 0.000 0.000 0.008
#> GSM648657     1  0.1792     0.9041 0.932 0.068 0.000 0.000
#> GSM648660     1  0.1867     0.9034 0.928 0.072 0.000 0.000
#> GSM648697     1  0.0336     0.9008 0.992 0.000 0.000 0.008
#> GSM648710     4  0.4406     0.8401 0.000 0.000 0.300 0.700
#> GSM648591     1  0.0188     0.9016 0.996 0.000 0.000 0.004
#> GSM648592     2  0.3172     0.7665 0.160 0.840 0.000 0.000
#> GSM648607     4  0.4250     0.8715 0.000 0.000 0.276 0.724
#> GSM648611     3  0.3975     0.6872 0.000 0.000 0.760 0.240
#> GSM648612     4  0.3873     0.9021 0.000 0.000 0.228 0.772
#> GSM648616     1  0.3074     0.8703 0.848 0.152 0.000 0.000
#> GSM648617     1  0.4888     0.4483 0.588 0.412 0.000 0.000
#> GSM648626     1  0.3074     0.8703 0.848 0.152 0.000 0.000
#> GSM648711     3  0.4072     0.6731 0.000 0.000 0.748 0.252
#> GSM648712     4  0.4250     0.8715 0.000 0.000 0.276 0.724
#> GSM648713     4  0.4250     0.8715 0.000 0.000 0.276 0.724
#> GSM648714     1  0.0817     0.8945 0.976 0.000 0.000 0.024
#> GSM648716     3  0.4072     0.6731 0.000 0.000 0.748 0.252
#> GSM648717     4  0.3494     0.9179 0.004 0.000 0.172 0.824
#> GSM648590     2  0.0895     0.9080 0.004 0.976 0.000 0.020
#> GSM648596     2  0.3311     0.8441 0.000 0.828 0.000 0.172
#> GSM648642     1  0.0188     0.9022 0.996 0.000 0.000 0.004
#> GSM648696     2  0.4776     0.2700 0.376 0.624 0.000 0.000
#> GSM648705     2  0.0524     0.9081 0.004 0.988 0.000 0.008
#> GSM648718     2  0.0895     0.9080 0.004 0.976 0.000 0.020
#> GSM648599     1  0.3074     0.8703 0.848 0.152 0.000 0.000
#> GSM648608     4  0.3583     0.9189 0.004 0.000 0.180 0.816
#> GSM648609     4  0.3583     0.9189 0.004 0.000 0.180 0.816
#> GSM648610     4  0.3591     0.9110 0.008 0.000 0.168 0.824
#> GSM648633     2  0.1716     0.8779 0.064 0.936 0.000 0.000
#> GSM648644     2  0.3311     0.8441 0.000 0.828 0.000 0.172
#> GSM648652     2  0.2216     0.8531 0.092 0.908 0.000 0.000
#> GSM648653     1  0.3074     0.8703 0.848 0.152 0.000 0.000
#> GSM648658     1  0.1792     0.9041 0.932 0.068 0.000 0.000
#> GSM648659     2  0.1389     0.8883 0.048 0.952 0.000 0.000
#> GSM648662     4  0.3494     0.9179 0.004 0.000 0.172 0.824
#> GSM648665     4  0.3494     0.9179 0.004 0.000 0.172 0.824
#> GSM648666     1  0.0336     0.9008 0.992 0.000 0.000 0.008
#> GSM648680     2  0.4977    -0.0138 0.460 0.540 0.000 0.000
#> GSM648684     4  0.3494     0.9179 0.004 0.000 0.172 0.824
#> GSM648709     1  0.4898     0.4383 0.584 0.416 0.000 0.000
#> GSM648719     1  0.1792     0.9041 0.932 0.068 0.000 0.000
#> GSM648627     3  0.4072     0.6731 0.000 0.000 0.748 0.252
#> GSM648637     2  0.3311     0.8441 0.000 0.828 0.000 0.172
#> GSM648638     1  0.0188     0.9022 0.996 0.000 0.000 0.004
#> GSM648641     4  0.4967     0.4626 0.000 0.000 0.452 0.548
#> GSM648672     2  0.3311     0.8441 0.000 0.828 0.000 0.172
#> GSM648674     2  0.1004     0.9075 0.004 0.972 0.000 0.024
#> GSM648703     2  0.3311     0.8441 0.000 0.828 0.000 0.172
#> GSM648631     3  0.0000     0.8369 0.000 0.000 1.000 0.000
#> GSM648669     1  0.0188     0.9040 0.996 0.004 0.000 0.000
#> GSM648671     1  0.0188     0.9040 0.996 0.004 0.000 0.000
#> GSM648678     2  0.3311     0.8441 0.000 0.828 0.000 0.172
#> GSM648679     2  0.1004     0.9075 0.004 0.972 0.000 0.024
#> GSM648681     2  0.0707     0.9016 0.020 0.980 0.000 0.000
#> GSM648686     3  0.0000     0.8369 0.000 0.000 1.000 0.000
#> GSM648689     3  0.0469     0.8330 0.000 0.000 0.988 0.012
#> GSM648690     3  0.0000     0.8369 0.000 0.000 1.000 0.000
#> GSM648691     3  0.0000     0.8369 0.000 0.000 1.000 0.000
#> GSM648693     3  0.0000     0.8369 0.000 0.000 1.000 0.000
#> GSM648700     1  0.0336     0.9045 0.992 0.008 0.000 0.000
#> GSM648630     3  0.0000     0.8369 0.000 0.000 1.000 0.000
#> GSM648632     3  0.0000     0.8369 0.000 0.000 1.000 0.000
#> GSM648639     1  0.4103     0.7501 0.744 0.256 0.000 0.000
#> GSM648640     3  0.3400     0.7407 0.000 0.000 0.820 0.180
#> GSM648668     2  0.3311     0.8441 0.000 0.828 0.000 0.172
#> GSM648676     2  0.0895     0.9080 0.004 0.976 0.000 0.020
#> GSM648692     3  0.0000     0.8369 0.000 0.000 1.000 0.000
#> GSM648694     3  0.0000     0.8369 0.000 0.000 1.000 0.000
#> GSM648699     1  0.0188     0.9040 0.996 0.004 0.000 0.000
#> GSM648701     2  0.0779     0.9080 0.004 0.980 0.000 0.016
#> GSM648673     1  0.0188     0.9040 0.996 0.004 0.000 0.000
#> GSM648677     2  0.3311     0.8441 0.000 0.828 0.000 0.172
#> GSM648687     1  0.0336     0.9008 0.992 0.000 0.000 0.008
#> GSM648688     3  0.0000     0.8369 0.000 0.000 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM648605     5  0.4421      0.688 0.024 0.000 0.004 0.268 0.704
#> GSM648618     5  0.0833      0.852 0.004 0.000 0.004 0.016 0.976
#> GSM648620     2  0.0162      0.894 0.000 0.996 0.000 0.000 0.004
#> GSM648646     4  0.3876      0.975 0.000 0.316 0.000 0.684 0.000
#> GSM648649     2  0.0290      0.893 0.000 0.992 0.000 0.008 0.000
#> GSM648675     5  0.1831      0.861 0.000 0.076 0.000 0.004 0.920
#> GSM648682     2  0.0000      0.894 0.000 1.000 0.000 0.000 0.000
#> GSM648698     2  0.0000      0.894 0.000 1.000 0.000 0.000 0.000
#> GSM648708     2  0.0162      0.894 0.000 0.996 0.000 0.000 0.004
#> GSM648628     3  0.3932      0.640 0.328 0.000 0.672 0.000 0.000
#> GSM648595     2  0.0703      0.884 0.000 0.976 0.000 0.024 0.000
#> GSM648635     2  0.1410      0.863 0.000 0.940 0.000 0.000 0.060
#> GSM648645     5  0.1671      0.860 0.000 0.076 0.000 0.000 0.924
#> GSM648647     2  0.0703      0.884 0.000 0.976 0.000 0.024 0.000
#> GSM648667     2  0.3039      0.591 0.000 0.808 0.000 0.192 0.000
#> GSM648695     2  0.0510      0.891 0.000 0.984 0.000 0.016 0.000
#> GSM648704     4  0.3876      0.975 0.000 0.316 0.000 0.684 0.000
#> GSM648706     5  0.3766      0.708 0.000 0.000 0.004 0.268 0.728
#> GSM648593     2  0.1410      0.863 0.000 0.940 0.000 0.000 0.060
#> GSM648594     5  0.1671      0.860 0.000 0.076 0.000 0.000 0.924
#> GSM648600     5  0.4968      0.277 0.000 0.456 0.000 0.028 0.516
#> GSM648621     5  0.3454      0.824 0.000 0.156 0.000 0.028 0.816
#> GSM648622     5  0.0833      0.852 0.004 0.000 0.004 0.016 0.976
#> GSM648623     5  0.0833      0.852 0.004 0.000 0.004 0.016 0.976
#> GSM648636     2  0.1341      0.868 0.000 0.944 0.000 0.000 0.056
#> GSM648655     2  0.1341      0.868 0.000 0.944 0.000 0.000 0.056
#> GSM648661     3  0.4210      0.461 0.412 0.000 0.588 0.000 0.000
#> GSM648664     1  0.2179      0.882 0.888 0.000 0.112 0.000 0.000
#> GSM648683     1  0.0000      0.924 1.000 0.000 0.000 0.000 0.000
#> GSM648685     1  0.0000      0.924 1.000 0.000 0.000 0.000 0.000
#> GSM648702     2  0.1410      0.863 0.000 0.940 0.000 0.000 0.060
#> GSM648597     5  0.1671      0.860 0.000 0.076 0.000 0.000 0.924
#> GSM648603     5  0.3454      0.824 0.000 0.156 0.000 0.028 0.816
#> GSM648606     1  0.0000      0.924 1.000 0.000 0.000 0.000 0.000
#> GSM648613     1  0.0000      0.924 1.000 0.000 0.000 0.000 0.000
#> GSM648619     1  0.2179      0.884 0.888 0.000 0.112 0.000 0.000
#> GSM648654     3  0.3999      0.612 0.344 0.000 0.656 0.000 0.000
#> GSM648663     1  0.0880      0.921 0.968 0.000 0.032 0.000 0.000
#> GSM648670     2  0.0000      0.894 0.000 1.000 0.000 0.000 0.000
#> GSM648707     5  0.0833      0.852 0.004 0.000 0.004 0.016 0.976
#> GSM648615     2  0.0000      0.894 0.000 1.000 0.000 0.000 0.000
#> GSM648643     4  0.3876      0.975 0.000 0.316 0.000 0.684 0.000
#> GSM648650     2  0.0290      0.893 0.000 0.992 0.000 0.008 0.000
#> GSM648656     4  0.3876      0.975 0.000 0.316 0.000 0.684 0.000
#> GSM648715     2  0.0703      0.884 0.000 0.976 0.000 0.024 0.000
#> GSM648598     5  0.3454      0.824 0.000 0.156 0.000 0.028 0.816
#> GSM648601     5  0.3454      0.824 0.000 0.156 0.000 0.028 0.816
#> GSM648602     5  0.3454      0.824 0.000 0.156 0.000 0.028 0.816
#> GSM648604     1  0.0404      0.925 0.988 0.000 0.012 0.000 0.000
#> GSM648614     5  0.4421      0.688 0.024 0.000 0.004 0.268 0.704
#> GSM648624     5  0.0833      0.852 0.004 0.000 0.004 0.016 0.976
#> GSM648625     2  0.0000      0.894 0.000 1.000 0.000 0.000 0.000
#> GSM648629     1  0.2424      0.865 0.868 0.000 0.132 0.000 0.000
#> GSM648634     5  0.3454      0.824 0.000 0.156 0.000 0.028 0.816
#> GSM648648     5  0.1608      0.861 0.000 0.072 0.000 0.000 0.928
#> GSM648651     5  0.0833      0.852 0.004 0.000 0.004 0.016 0.976
#> GSM648657     5  0.1608      0.861 0.000 0.072 0.000 0.000 0.928
#> GSM648660     5  0.1671      0.860 0.000 0.076 0.000 0.000 0.924
#> GSM648697     5  0.0833      0.852 0.004 0.000 0.004 0.016 0.976
#> GSM648710     1  0.2516      0.855 0.860 0.000 0.140 0.000 0.000
#> GSM648591     5  0.0671      0.853 0.004 0.000 0.000 0.016 0.980
#> GSM648592     2  0.2690      0.725 0.000 0.844 0.000 0.000 0.156
#> GSM648607     1  0.2179      0.884 0.888 0.000 0.112 0.000 0.000
#> GSM648611     3  0.3876      0.652 0.316 0.000 0.684 0.000 0.000
#> GSM648612     1  0.1410      0.911 0.940 0.000 0.060 0.000 0.000
#> GSM648616     5  0.3454      0.824 0.000 0.156 0.000 0.028 0.816
#> GSM648617     5  0.4917      0.395 0.000 0.416 0.000 0.028 0.556
#> GSM648626     5  0.3454      0.824 0.000 0.156 0.000 0.028 0.816
#> GSM648711     3  0.3932      0.640 0.328 0.000 0.672 0.000 0.000
#> GSM648712     1  0.2179      0.884 0.888 0.000 0.112 0.000 0.000
#> GSM648713     1  0.2179      0.884 0.888 0.000 0.112 0.000 0.000
#> GSM648714     5  0.4421      0.688 0.024 0.000 0.004 0.268 0.704
#> GSM648716     3  0.3932      0.640 0.328 0.000 0.672 0.000 0.000
#> GSM648717     1  0.0000      0.924 1.000 0.000 0.000 0.000 0.000
#> GSM648590     2  0.0703      0.884 0.000 0.976 0.000 0.024 0.000
#> GSM648596     4  0.3876      0.975 0.000 0.316 0.000 0.684 0.000
#> GSM648642     5  0.3766      0.708 0.000 0.000 0.004 0.268 0.728
#> GSM648696     2  0.4718      0.322 0.000 0.628 0.000 0.028 0.344
#> GSM648705     2  0.0290      0.893 0.000 0.992 0.000 0.008 0.000
#> GSM648718     2  0.0703      0.884 0.000 0.976 0.000 0.024 0.000
#> GSM648599     5  0.3454      0.824 0.000 0.156 0.000 0.028 0.816
#> GSM648608     1  0.0404      0.925 0.988 0.000 0.012 0.000 0.000
#> GSM648609     1  0.0404      0.925 0.988 0.000 0.012 0.000 0.000
#> GSM648610     1  0.0324      0.918 0.992 0.000 0.004 0.000 0.004
#> GSM648633     2  0.1410      0.863 0.000 0.940 0.000 0.000 0.060
#> GSM648644     4  0.3876      0.975 0.000 0.316 0.000 0.684 0.000
#> GSM648652     2  0.1851      0.830 0.000 0.912 0.000 0.000 0.088
#> GSM648653     5  0.3454      0.824 0.000 0.156 0.000 0.028 0.816
#> GSM648658     5  0.1608      0.861 0.000 0.072 0.000 0.000 0.928
#> GSM648659     2  0.1121      0.875 0.000 0.956 0.000 0.000 0.044
#> GSM648662     1  0.0000      0.924 1.000 0.000 0.000 0.000 0.000
#> GSM648665     1  0.0000      0.924 1.000 0.000 0.000 0.000 0.000
#> GSM648666     5  0.0833      0.852 0.004 0.000 0.004 0.016 0.976
#> GSM648680     2  0.4283      0.028 0.000 0.544 0.000 0.000 0.456
#> GSM648684     1  0.0000      0.924 1.000 0.000 0.000 0.000 0.000
#> GSM648709     5  0.4924      0.385 0.000 0.420 0.000 0.028 0.552
#> GSM648719     5  0.1608      0.861 0.000 0.072 0.000 0.000 0.928
#> GSM648627     3  0.3932      0.640 0.328 0.000 0.672 0.000 0.000
#> GSM648637     4  0.3707      0.975 0.000 0.284 0.000 0.716 0.000
#> GSM648638     5  0.3766      0.708 0.000 0.000 0.004 0.268 0.728
#> GSM648641     1  0.3932      0.475 0.672 0.000 0.328 0.000 0.000
#> GSM648672     4  0.3707      0.975 0.000 0.284 0.000 0.716 0.000
#> GSM648674     2  0.1197      0.864 0.000 0.952 0.000 0.048 0.000
#> GSM648703     4  0.3730      0.976 0.000 0.288 0.000 0.712 0.000
#> GSM648631     3  0.0162      0.829 0.004 0.000 0.996 0.000 0.000
#> GSM648669     5  0.0798      0.856 0.000 0.008 0.000 0.016 0.976
#> GSM648671     5  0.0798      0.856 0.000 0.008 0.000 0.016 0.976
#> GSM648678     4  0.3707      0.975 0.000 0.284 0.000 0.716 0.000
#> GSM648679     2  0.1043      0.871 0.000 0.960 0.000 0.040 0.000
#> GSM648681     2  0.0510      0.889 0.000 0.984 0.000 0.000 0.016
#> GSM648686     3  0.0162      0.829 0.004 0.000 0.996 0.000 0.000
#> GSM648689     3  0.0510      0.826 0.016 0.000 0.984 0.000 0.000
#> GSM648690     3  0.0162      0.829 0.004 0.000 0.996 0.000 0.000
#> GSM648691     3  0.0162      0.829 0.004 0.000 0.996 0.000 0.000
#> GSM648693     3  0.0162      0.829 0.004 0.000 0.996 0.000 0.000
#> GSM648700     5  0.0912      0.856 0.000 0.012 0.000 0.016 0.972
#> GSM648630     3  0.0162      0.829 0.004 0.000 0.996 0.000 0.000
#> GSM648632     3  0.0162      0.829 0.004 0.000 0.996 0.000 0.000
#> GSM648639     5  0.4301      0.705 0.000 0.260 0.000 0.028 0.712
#> GSM648640     3  0.3109      0.742 0.200 0.000 0.800 0.000 0.000
#> GSM648668     4  0.3707      0.975 0.000 0.284 0.000 0.716 0.000
#> GSM648676     2  0.0703      0.884 0.000 0.976 0.000 0.024 0.000
#> GSM648692     3  0.0162      0.829 0.004 0.000 0.996 0.000 0.000
#> GSM648694     3  0.0162      0.829 0.004 0.000 0.996 0.000 0.000
#> GSM648699     5  0.0798      0.856 0.000 0.008 0.000 0.016 0.976
#> GSM648701     2  0.0510      0.888 0.000 0.984 0.000 0.016 0.000
#> GSM648673     5  0.0798      0.856 0.000 0.008 0.000 0.016 0.976
#> GSM648677     4  0.3707      0.975 0.000 0.284 0.000 0.716 0.000
#> GSM648687     5  0.0833      0.852 0.004 0.000 0.004 0.016 0.976
#> GSM648688     3  0.0162      0.829 0.004 0.000 0.996 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM648605     5  0.3454     0.9844 0.024 0.000 0.000 0.000 0.768 0.208
#> GSM648618     6  0.2823     0.6104 0.000 0.000 0.000 0.000 0.204 0.796
#> GSM648620     2  0.0363     0.9256 0.000 0.988 0.000 0.000 0.000 0.012
#> GSM648646     4  0.0865     0.9553 0.000 0.036 0.000 0.964 0.000 0.000
#> GSM648649     2  0.0000     0.9247 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648675     6  0.1584     0.7586 0.000 0.064 0.000 0.000 0.008 0.928
#> GSM648682     2  0.0260     0.9256 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM648698     2  0.0260     0.9256 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM648708     2  0.0363     0.9256 0.000 0.988 0.000 0.000 0.000 0.012
#> GSM648628     3  0.3515     0.6420 0.324 0.000 0.676 0.000 0.000 0.000
#> GSM648595     2  0.0458     0.9202 0.000 0.984 0.000 0.016 0.000 0.000
#> GSM648635     2  0.1387     0.9019 0.000 0.932 0.000 0.000 0.000 0.068
#> GSM648645     6  0.1204     0.7602 0.000 0.056 0.000 0.000 0.000 0.944
#> GSM648647     2  0.0458     0.9202 0.000 0.984 0.000 0.016 0.000 0.000
#> GSM648667     2  0.2793     0.7219 0.000 0.800 0.000 0.200 0.000 0.000
#> GSM648695     2  0.0717     0.9241 0.000 0.976 0.000 0.016 0.000 0.008
#> GSM648704     4  0.0865     0.9553 0.000 0.036 0.000 0.964 0.000 0.000
#> GSM648706     5  0.2912     0.9843 0.000 0.000 0.000 0.000 0.784 0.216
#> GSM648593     2  0.1387     0.9019 0.000 0.932 0.000 0.000 0.000 0.068
#> GSM648594     6  0.1204     0.7602 0.000 0.056 0.000 0.000 0.000 0.944
#> GSM648600     6  0.4739     0.2359 0.000 0.436 0.000 0.000 0.048 0.516
#> GSM648621     6  0.3254     0.7168 0.000 0.136 0.000 0.000 0.048 0.816
#> GSM648622     6  0.2823     0.6104 0.000 0.000 0.000 0.000 0.204 0.796
#> GSM648623     6  0.2793     0.6147 0.000 0.000 0.000 0.000 0.200 0.800
#> GSM648636     2  0.1387     0.9031 0.000 0.932 0.000 0.000 0.000 0.068
#> GSM648655     2  0.1387     0.9031 0.000 0.932 0.000 0.000 0.000 0.068
#> GSM648661     3  0.3774     0.4652 0.408 0.000 0.592 0.000 0.000 0.000
#> GSM648664     1  0.1957     0.8830 0.888 0.000 0.112 0.000 0.000 0.000
#> GSM648683     1  0.0000     0.9243 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648685     1  0.0000     0.9243 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648702     2  0.1387     0.9019 0.000 0.932 0.000 0.000 0.000 0.068
#> GSM648597     6  0.1204     0.7602 0.000 0.056 0.000 0.000 0.000 0.944
#> GSM648603     6  0.3316     0.7166 0.000 0.136 0.000 0.000 0.052 0.812
#> GSM648606     1  0.0000     0.9243 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648613     1  0.0000     0.9243 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648619     1  0.1957     0.8852 0.888 0.000 0.112 0.000 0.000 0.000
#> GSM648654     3  0.3578     0.6143 0.340 0.000 0.660 0.000 0.000 0.000
#> GSM648663     1  0.0790     0.9211 0.968 0.000 0.032 0.000 0.000 0.000
#> GSM648670     2  0.0260     0.9256 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM648707     6  0.2823     0.6104 0.000 0.000 0.000 0.000 0.204 0.796
#> GSM648615     2  0.0260     0.9256 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM648643     4  0.0865     0.9553 0.000 0.036 0.000 0.964 0.000 0.000
#> GSM648650     2  0.0000     0.9247 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648656     4  0.0865     0.9553 0.000 0.036 0.000 0.964 0.000 0.000
#> GSM648715     2  0.0458     0.9202 0.000 0.984 0.000 0.016 0.000 0.000
#> GSM648598     6  0.3254     0.7168 0.000 0.136 0.000 0.000 0.048 0.816
#> GSM648601     6  0.3316     0.7166 0.000 0.136 0.000 0.000 0.052 0.812
#> GSM648602     6  0.3316     0.7166 0.000 0.136 0.000 0.000 0.052 0.812
#> GSM648604     1  0.0363     0.9256 0.988 0.000 0.012 0.000 0.000 0.000
#> GSM648614     5  0.3454     0.9844 0.024 0.000 0.000 0.000 0.768 0.208
#> GSM648624     6  0.2823     0.6104 0.000 0.000 0.000 0.000 0.204 0.796
#> GSM648625     2  0.0260     0.9256 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM648629     1  0.2178     0.8655 0.868 0.000 0.132 0.000 0.000 0.000
#> GSM648634     6  0.3254     0.7168 0.000 0.136 0.000 0.000 0.048 0.816
#> GSM648648     6  0.1349     0.7603 0.000 0.056 0.000 0.000 0.004 0.940
#> GSM648651     6  0.2823     0.6104 0.000 0.000 0.000 0.000 0.204 0.796
#> GSM648657     6  0.1349     0.7603 0.000 0.056 0.000 0.000 0.004 0.940
#> GSM648660     6  0.1204     0.7602 0.000 0.056 0.000 0.000 0.000 0.944
#> GSM648697     6  0.2823     0.6104 0.000 0.000 0.000 0.000 0.204 0.796
#> GSM648710     1  0.2260     0.8560 0.860 0.000 0.140 0.000 0.000 0.000
#> GSM648591     6  0.1501     0.7122 0.000 0.000 0.000 0.000 0.076 0.924
#> GSM648592     2  0.2527     0.7933 0.000 0.832 0.000 0.000 0.000 0.168
#> GSM648607     1  0.1957     0.8852 0.888 0.000 0.112 0.000 0.000 0.000
#> GSM648611     3  0.3464     0.6545 0.312 0.000 0.688 0.000 0.000 0.000
#> GSM648612     1  0.1267     0.9120 0.940 0.000 0.060 0.000 0.000 0.000
#> GSM648616     6  0.3254     0.7168 0.000 0.136 0.000 0.000 0.048 0.816
#> GSM648617     6  0.4682     0.3551 0.000 0.396 0.000 0.000 0.048 0.556
#> GSM648626     6  0.3316     0.7166 0.000 0.136 0.000 0.000 0.052 0.812
#> GSM648711     3  0.3515     0.6420 0.324 0.000 0.676 0.000 0.000 0.000
#> GSM648712     1  0.1957     0.8852 0.888 0.000 0.112 0.000 0.000 0.000
#> GSM648713     1  0.1957     0.8852 0.888 0.000 0.112 0.000 0.000 0.000
#> GSM648714     5  0.3454     0.9844 0.024 0.000 0.000 0.000 0.768 0.208
#> GSM648716     3  0.3515     0.6420 0.324 0.000 0.676 0.000 0.000 0.000
#> GSM648717     1  0.0000     0.9243 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648590     2  0.0458     0.9202 0.000 0.984 0.000 0.016 0.000 0.000
#> GSM648596     4  0.0865     0.9553 0.000 0.036 0.000 0.964 0.000 0.000
#> GSM648642     5  0.2912     0.9843 0.000 0.000 0.000 0.000 0.784 0.216
#> GSM648696     2  0.4524     0.3326 0.000 0.616 0.000 0.000 0.048 0.336
#> GSM648705     2  0.0000     0.9247 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648718     2  0.0458     0.9202 0.000 0.984 0.000 0.016 0.000 0.000
#> GSM648599     6  0.3316     0.7166 0.000 0.136 0.000 0.000 0.052 0.812
#> GSM648608     1  0.0363     0.9256 0.988 0.000 0.012 0.000 0.000 0.000
#> GSM648609     1  0.0363     0.9256 0.988 0.000 0.012 0.000 0.000 0.000
#> GSM648610     1  0.0260     0.9214 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM648633     2  0.1387     0.9019 0.000 0.932 0.000 0.000 0.000 0.068
#> GSM648644     4  0.0865     0.9553 0.000 0.036 0.000 0.964 0.000 0.000
#> GSM648652     2  0.1765     0.8788 0.000 0.904 0.000 0.000 0.000 0.096
#> GSM648653     6  0.3254     0.7168 0.000 0.136 0.000 0.000 0.048 0.816
#> GSM648658     6  0.1349     0.7603 0.000 0.056 0.000 0.000 0.004 0.940
#> GSM648659     2  0.1204     0.9096 0.000 0.944 0.000 0.000 0.000 0.056
#> GSM648662     1  0.0000     0.9243 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648665     1  0.0000     0.9243 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648666     6  0.2823     0.6104 0.000 0.000 0.000 0.000 0.204 0.796
#> GSM648680     2  0.3857     0.0481 0.000 0.532 0.000 0.000 0.000 0.468
#> GSM648684     1  0.0000     0.9243 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648709     6  0.4690     0.3446 0.000 0.400 0.000 0.000 0.048 0.552
#> GSM648719     6  0.1349     0.7603 0.000 0.056 0.000 0.000 0.004 0.940
#> GSM648627     3  0.3515     0.6420 0.324 0.000 0.676 0.000 0.000 0.000
#> GSM648637     4  0.2527     0.8579 0.000 0.000 0.000 0.832 0.168 0.000
#> GSM648638     5  0.2912     0.9843 0.000 0.000 0.000 0.000 0.784 0.216
#> GSM648641     1  0.3531     0.4788 0.672 0.000 0.328 0.000 0.000 0.000
#> GSM648672     4  0.0260     0.9449 0.000 0.000 0.000 0.992 0.008 0.000
#> GSM648674     2  0.0937     0.9085 0.000 0.960 0.000 0.040 0.000 0.000
#> GSM648703     4  0.2897     0.8653 0.000 0.088 0.000 0.852 0.060 0.000
#> GSM648631     3  0.0000     0.8152 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648669     6  0.1757     0.7198 0.000 0.008 0.000 0.000 0.076 0.916
#> GSM648671     6  0.1757     0.7198 0.000 0.008 0.000 0.000 0.076 0.916
#> GSM648678     4  0.0260     0.9449 0.000 0.000 0.000 0.992 0.008 0.000
#> GSM648679     2  0.0790     0.9129 0.000 0.968 0.000 0.032 0.000 0.000
#> GSM648681     2  0.0632     0.9218 0.000 0.976 0.000 0.000 0.000 0.024
#> GSM648686     3  0.0000     0.8152 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648689     3  0.0363     0.8133 0.012 0.000 0.988 0.000 0.000 0.000
#> GSM648690     3  0.0000     0.8152 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648691     3  0.0000     0.8152 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648693     3  0.0000     0.8152 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648700     6  0.1701     0.7213 0.000 0.008 0.000 0.000 0.072 0.920
#> GSM648630     3  0.0000     0.8152 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648632     3  0.0000     0.8152 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648639     6  0.4075     0.5817 0.000 0.240 0.000 0.000 0.048 0.712
#> GSM648640     3  0.2762     0.7430 0.196 0.000 0.804 0.000 0.000 0.000
#> GSM648668     4  0.0260     0.9449 0.000 0.000 0.000 0.992 0.008 0.000
#> GSM648676     2  0.0458     0.9202 0.000 0.984 0.000 0.016 0.000 0.000
#> GSM648692     3  0.0000     0.8152 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648694     3  0.0000     0.8152 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648699     6  0.1757     0.7198 0.000 0.008 0.000 0.000 0.076 0.916
#> GSM648701     2  0.0363     0.9218 0.000 0.988 0.000 0.012 0.000 0.000
#> GSM648673     6  0.1757     0.7198 0.000 0.008 0.000 0.000 0.076 0.916
#> GSM648677     4  0.0547     0.9422 0.000 0.000 0.000 0.980 0.020 0.000
#> GSM648687     6  0.2823     0.6104 0.000 0.000 0.000 0.000 0.204 0.796
#> GSM648688     3  0.0000     0.8152 0.000 0.000 1.000 0.000 0.000 0.000

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-ATC-hclust-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-ATC-hclust-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-ATC-hclust-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-ATC-hclust-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-ATC-hclust-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-ATC-hclust-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-ATC-hclust-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-ATC-hclust-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-ATC-hclust-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-ATC-hclust-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-ATC-hclust-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-ATC-hclust-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-ATC-hclust-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-ATC-hclust-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-ATC-hclust-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-ATC-hclust-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-ATC-hclust-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-ATC-hclust-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-ATC-hclust-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-ATC-hclust-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk ATC-hclust-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-ATC-hclust-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-ATC-hclust-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-ATC-hclust-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-ATC-hclust-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-ATC-hclust-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk ATC-hclust-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>              n disease.state(p) development.stage(p) other(p) k
#> ATC:hclust 130         2.91e-01                0.306 2.96e-05 2
#> ATC:hclust 127         3.84e-01                0.163 1.43e-07 3
#> ATC:hclust 124         5.33e-05                0.176 8.86e-11 4
#> ATC:hclust 123         6.29e-06                0.236 5.12e-11 5
#> ATC:hclust 123         1.85e-05                0.223 5.80e-11 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


ATC:kmeans**

The object with results only for a single top-value method and a single partition method can be extracted as:

res = res_list["ATC", "kmeans"]
# you can also extract it by
# res = res_list["ATC:kmeans"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 130 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#>   Subgroups are detected by 'kmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 3.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk ATC-kmeans-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk ATC-kmeans-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           0.994       0.998         0.4396 0.559   0.559
#> 3 3 1.000           0.969       0.989         0.5260 0.759   0.574
#> 4 4 0.711           0.631       0.743         0.0922 0.959   0.880
#> 5 5 0.673           0.564       0.697         0.0621 0.828   0.498
#> 6 6 0.700           0.628       0.746         0.0470 0.912   0.613

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 3
#> attr(,"optional")
#> [1] 2

There is also optional best \(k\) = 2 that is worth to check.

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM648605     2  0.0000      1.000 0.000 1.000
#> GSM648618     2  0.0000      1.000 0.000 1.000
#> GSM648620     2  0.0000      1.000 0.000 1.000
#> GSM648646     2  0.0000      1.000 0.000 1.000
#> GSM648649     2  0.0000      1.000 0.000 1.000
#> GSM648675     2  0.0000      1.000 0.000 1.000
#> GSM648682     2  0.0000      1.000 0.000 1.000
#> GSM648698     2  0.0000      1.000 0.000 1.000
#> GSM648708     2  0.0000      1.000 0.000 1.000
#> GSM648628     1  0.0000      0.992 1.000 0.000
#> GSM648595     2  0.0000      1.000 0.000 1.000
#> GSM648635     2  0.0000      1.000 0.000 1.000
#> GSM648645     2  0.0000      1.000 0.000 1.000
#> GSM648647     2  0.0000      1.000 0.000 1.000
#> GSM648667     2  0.0000      1.000 0.000 1.000
#> GSM648695     2  0.0000      1.000 0.000 1.000
#> GSM648704     2  0.0000      1.000 0.000 1.000
#> GSM648706     2  0.0000      1.000 0.000 1.000
#> GSM648593     2  0.0000      1.000 0.000 1.000
#> GSM648594     2  0.0000      1.000 0.000 1.000
#> GSM648600     2  0.0000      1.000 0.000 1.000
#> GSM648621     2  0.0000      1.000 0.000 1.000
#> GSM648622     2  0.0000      1.000 0.000 1.000
#> GSM648623     2  0.0000      1.000 0.000 1.000
#> GSM648636     2  0.0000      1.000 0.000 1.000
#> GSM648655     2  0.0000      1.000 0.000 1.000
#> GSM648661     1  0.0000      0.992 1.000 0.000
#> GSM648664     1  0.0000      0.992 1.000 0.000
#> GSM648683     1  0.0000      0.992 1.000 0.000
#> GSM648685     1  0.0000      0.992 1.000 0.000
#> GSM648702     2  0.0000      1.000 0.000 1.000
#> GSM648597     2  0.0000      1.000 0.000 1.000
#> GSM648603     2  0.0000      1.000 0.000 1.000
#> GSM648606     1  0.0000      0.992 1.000 0.000
#> GSM648613     1  0.0000      0.992 1.000 0.000
#> GSM648619     1  0.0000      0.992 1.000 0.000
#> GSM648654     1  0.0000      0.992 1.000 0.000
#> GSM648663     1  0.0000      0.992 1.000 0.000
#> GSM648670     2  0.0000      1.000 0.000 1.000
#> GSM648707     2  0.0000      1.000 0.000 1.000
#> GSM648615     2  0.0000      1.000 0.000 1.000
#> GSM648643     2  0.0000      1.000 0.000 1.000
#> GSM648650     2  0.0000      1.000 0.000 1.000
#> GSM648656     2  0.0000      1.000 0.000 1.000
#> GSM648715     2  0.0000      1.000 0.000 1.000
#> GSM648598     2  0.0000      1.000 0.000 1.000
#> GSM648601     2  0.0000      1.000 0.000 1.000
#> GSM648602     2  0.0000      1.000 0.000 1.000
#> GSM648604     1  0.0000      0.992 1.000 0.000
#> GSM648614     1  0.8909      0.555 0.692 0.308
#> GSM648624     2  0.0000      1.000 0.000 1.000
#> GSM648625     2  0.0000      1.000 0.000 1.000
#> GSM648629     1  0.0000      0.992 1.000 0.000
#> GSM648634     2  0.0000      1.000 0.000 1.000
#> GSM648648     2  0.0000      1.000 0.000 1.000
#> GSM648651     2  0.0000      1.000 0.000 1.000
#> GSM648657     2  0.0000      1.000 0.000 1.000
#> GSM648660     2  0.0000      1.000 0.000 1.000
#> GSM648697     2  0.0000      1.000 0.000 1.000
#> GSM648710     1  0.0000      0.992 1.000 0.000
#> GSM648591     2  0.0000      1.000 0.000 1.000
#> GSM648592     2  0.0000      1.000 0.000 1.000
#> GSM648607     1  0.0000      0.992 1.000 0.000
#> GSM648611     1  0.0000      0.992 1.000 0.000
#> GSM648612     1  0.0000      0.992 1.000 0.000
#> GSM648616     2  0.0000      1.000 0.000 1.000
#> GSM648617     2  0.0000      1.000 0.000 1.000
#> GSM648626     2  0.0000      1.000 0.000 1.000
#> GSM648711     1  0.0000      0.992 1.000 0.000
#> GSM648712     1  0.0000      0.992 1.000 0.000
#> GSM648713     1  0.0000      0.992 1.000 0.000
#> GSM648714     2  0.0376      0.996 0.004 0.996
#> GSM648716     1  0.0000      0.992 1.000 0.000
#> GSM648717     1  0.0000      0.992 1.000 0.000
#> GSM648590     2  0.0000      1.000 0.000 1.000
#> GSM648596     2  0.0000      1.000 0.000 1.000
#> GSM648642     2  0.0000      1.000 0.000 1.000
#> GSM648696     2  0.0000      1.000 0.000 1.000
#> GSM648705     2  0.0000      1.000 0.000 1.000
#> GSM648718     2  0.0000      1.000 0.000 1.000
#> GSM648599     2  0.0000      1.000 0.000 1.000
#> GSM648608     1  0.0000      0.992 1.000 0.000
#> GSM648609     1  0.0000      0.992 1.000 0.000
#> GSM648610     1  0.0000      0.992 1.000 0.000
#> GSM648633     2  0.0000      1.000 0.000 1.000
#> GSM648644     2  0.0000      1.000 0.000 1.000
#> GSM648652     2  0.0000      1.000 0.000 1.000
#> GSM648653     2  0.0000      1.000 0.000 1.000
#> GSM648658     2  0.0000      1.000 0.000 1.000
#> GSM648659     2  0.0000      1.000 0.000 1.000
#> GSM648662     1  0.0000      0.992 1.000 0.000
#> GSM648665     1  0.0000      0.992 1.000 0.000
#> GSM648666     2  0.0000      1.000 0.000 1.000
#> GSM648680     2  0.0000      1.000 0.000 1.000
#> GSM648684     1  0.0000      0.992 1.000 0.000
#> GSM648709     2  0.0000      1.000 0.000 1.000
#> GSM648719     2  0.0000      1.000 0.000 1.000
#> GSM648627     1  0.0000      0.992 1.000 0.000
#> GSM648637     2  0.0000      1.000 0.000 1.000
#> GSM648638     2  0.0000      1.000 0.000 1.000
#> GSM648641     1  0.0000      0.992 1.000 0.000
#> GSM648672     2  0.0000      1.000 0.000 1.000
#> GSM648674     2  0.0000      1.000 0.000 1.000
#> GSM648703     2  0.0000      1.000 0.000 1.000
#> GSM648631     1  0.0000      0.992 1.000 0.000
#> GSM648669     2  0.0000      1.000 0.000 1.000
#> GSM648671     2  0.0000      1.000 0.000 1.000
#> GSM648678     2  0.0000      1.000 0.000 1.000
#> GSM648679     2  0.0000      1.000 0.000 1.000
#> GSM648681     2  0.0000      1.000 0.000 1.000
#> GSM648686     1  0.0000      0.992 1.000 0.000
#> GSM648689     1  0.0000      0.992 1.000 0.000
#> GSM648690     1  0.0000      0.992 1.000 0.000
#> GSM648691     1  0.0000      0.992 1.000 0.000
#> GSM648693     1  0.0000      0.992 1.000 0.000
#> GSM648700     2  0.0000      1.000 0.000 1.000
#> GSM648630     1  0.0000      0.992 1.000 0.000
#> GSM648632     1  0.0000      0.992 1.000 0.000
#> GSM648639     2  0.0000      1.000 0.000 1.000
#> GSM648640     1  0.0000      0.992 1.000 0.000
#> GSM648668     2  0.0000      1.000 0.000 1.000
#> GSM648676     2  0.0000      1.000 0.000 1.000
#> GSM648692     1  0.0000      0.992 1.000 0.000
#> GSM648694     1  0.0000      0.992 1.000 0.000
#> GSM648699     2  0.0000      1.000 0.000 1.000
#> GSM648701     2  0.0000      1.000 0.000 1.000
#> GSM648673     2  0.0000      1.000 0.000 1.000
#> GSM648677     2  0.0000      1.000 0.000 1.000
#> GSM648687     2  0.0000      1.000 0.000 1.000
#> GSM648688     1  0.0000      0.992 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM648605     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648618     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648620     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648646     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648649     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648675     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648682     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648698     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648708     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648628     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648595     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648635     2  0.0237     0.9928 0.004 0.996 0.000
#> GSM648645     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648647     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648667     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648695     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648704     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648706     1  0.6299     0.0977 0.524 0.476 0.000
#> GSM648593     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648594     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648600     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648621     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648622     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648623     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648636     2  0.2261     0.9269 0.068 0.932 0.000
#> GSM648655     2  0.2261     0.9269 0.068 0.932 0.000
#> GSM648661     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648664     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648683     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648685     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648702     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648597     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648603     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648606     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648613     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648619     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648654     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648663     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648670     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648707     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648615     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648643     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648650     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648656     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648715     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648598     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648601     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648602     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648604     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648614     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648624     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648625     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648629     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648634     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648648     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648651     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648657     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648660     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648697     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648710     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648591     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648592     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648607     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648611     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648612     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648616     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648617     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648626     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648711     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648712     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648713     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648714     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648716     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648717     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648590     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648596     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648642     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648696     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648705     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648718     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648599     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648608     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648609     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648610     3  0.6235     0.2331 0.436 0.000 0.564
#> GSM648633     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648644     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648652     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648653     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648658     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648659     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648662     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648665     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648666     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648680     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648684     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648709     1  0.6215     0.2534 0.572 0.428 0.000
#> GSM648719     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648627     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648637     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648638     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648641     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648672     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648674     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648703     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648631     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648669     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648671     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648678     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648679     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648681     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648686     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648689     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648690     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648691     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648693     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648700     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648630     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648632     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648639     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648640     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648668     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648676     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648692     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648694     3  0.0000     0.9889 0.000 0.000 1.000
#> GSM648699     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648701     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648673     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648677     2  0.0000     0.9965 0.000 1.000 0.000
#> GSM648687     1  0.0000     0.9797 1.000 0.000 0.000
#> GSM648688     3  0.0000     0.9889 0.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM648605     4  0.5000    -0.4139 0.496 0.000 0.000 0.504
#> GSM648618     1  0.4907     0.4539 0.580 0.000 0.000 0.420
#> GSM648620     2  0.4250     0.7605 0.276 0.724 0.000 0.000
#> GSM648646     2  0.2530     0.7641 0.000 0.888 0.000 0.112
#> GSM648649     2  0.4040     0.7744 0.248 0.752 0.000 0.000
#> GSM648675     1  0.1474     0.5755 0.948 0.000 0.000 0.052
#> GSM648682     2  0.3610     0.7887 0.200 0.800 0.000 0.000
#> GSM648698     2  0.3726     0.7867 0.212 0.788 0.000 0.000
#> GSM648708     2  0.4948     0.5935 0.440 0.560 0.000 0.000
#> GSM648628     3  0.0000     0.7582 0.000 0.000 1.000 0.000
#> GSM648595     2  0.0188     0.7895 0.000 0.996 0.000 0.004
#> GSM648635     2  0.4998     0.5004 0.488 0.512 0.000 0.000
#> GSM648645     1  0.4164     0.6047 0.736 0.000 0.000 0.264
#> GSM648647     2  0.0000     0.7901 0.000 1.000 0.000 0.000
#> GSM648667     2  0.2216     0.7702 0.000 0.908 0.000 0.092
#> GSM648695     2  0.1389     0.7924 0.048 0.952 0.000 0.000
#> GSM648704     2  0.2530     0.7641 0.000 0.888 0.000 0.112
#> GSM648706     1  0.5306    -0.0129 0.632 0.348 0.000 0.020
#> GSM648593     2  0.4948     0.5935 0.440 0.560 0.000 0.000
#> GSM648594     1  0.3610     0.6189 0.800 0.000 0.000 0.200
#> GSM648600     1  0.2530     0.4784 0.888 0.112 0.000 0.000
#> GSM648621     1  0.4454     0.5818 0.692 0.000 0.000 0.308
#> GSM648622     1  0.4907     0.4539 0.580 0.000 0.000 0.420
#> GSM648623     1  0.4907     0.4539 0.580 0.000 0.000 0.420
#> GSM648636     1  0.4776    -0.1431 0.624 0.376 0.000 0.000
#> GSM648655     1  0.4790    -0.1570 0.620 0.380 0.000 0.000
#> GSM648661     3  0.0000     0.7582 0.000 0.000 1.000 0.000
#> GSM648664     3  0.4961     0.6665 0.000 0.000 0.552 0.448
#> GSM648683     3  0.5000     0.6273 0.000 0.000 0.504 0.496
#> GSM648685     3  0.5000     0.6273 0.000 0.000 0.504 0.496
#> GSM648702     2  0.4941     0.5999 0.436 0.564 0.000 0.000
#> GSM648597     1  0.4008     0.6130 0.756 0.000 0.000 0.244
#> GSM648603     1  0.4830     0.4952 0.608 0.000 0.000 0.392
#> GSM648606     3  0.5000     0.6273 0.000 0.000 0.504 0.496
#> GSM648613     3  0.4985     0.6552 0.000 0.000 0.532 0.468
#> GSM648619     3  0.4382     0.7278 0.000 0.000 0.704 0.296
#> GSM648654     3  0.0000     0.7582 0.000 0.000 1.000 0.000
#> GSM648663     3  0.4985     0.6552 0.000 0.000 0.532 0.468
#> GSM648670     2  0.3942     0.7791 0.236 0.764 0.000 0.000
#> GSM648707     1  0.4907     0.4539 0.580 0.000 0.000 0.420
#> GSM648615     2  0.3688     0.7877 0.208 0.792 0.000 0.000
#> GSM648643     2  0.2530     0.7641 0.000 0.888 0.000 0.112
#> GSM648650     2  0.3649     0.7883 0.204 0.796 0.000 0.000
#> GSM648656     2  0.2530     0.7641 0.000 0.888 0.000 0.112
#> GSM648715     2  0.0000     0.7901 0.000 1.000 0.000 0.000
#> GSM648598     1  0.3837     0.6179 0.776 0.000 0.000 0.224
#> GSM648601     1  0.4477     0.5791 0.688 0.000 0.000 0.312
#> GSM648602     1  0.4697     0.5384 0.644 0.000 0.000 0.356
#> GSM648604     3  0.4989     0.6516 0.000 0.000 0.528 0.472
#> GSM648614     4  0.2530     0.6921 0.112 0.000 0.000 0.888
#> GSM648624     1  0.4907     0.4539 0.580 0.000 0.000 0.420
#> GSM648625     2  0.4103     0.7711 0.256 0.744 0.000 0.000
#> GSM648629     3  0.4382     0.7278 0.000 0.000 0.704 0.296
#> GSM648634     1  0.0336     0.5479 0.992 0.008 0.000 0.000
#> GSM648648     1  0.0524     0.5544 0.988 0.004 0.000 0.008
#> GSM648651     1  0.4907     0.4539 0.580 0.000 0.000 0.420
#> GSM648657     1  0.1792     0.5814 0.932 0.000 0.000 0.068
#> GSM648660     1  0.3610     0.6189 0.800 0.000 0.000 0.200
#> GSM648697     1  0.4907     0.4539 0.580 0.000 0.000 0.420
#> GSM648710     3  0.3837     0.7383 0.000 0.000 0.776 0.224
#> GSM648591     1  0.4907     0.4539 0.580 0.000 0.000 0.420
#> GSM648592     1  0.2530     0.4784 0.888 0.112 0.000 0.000
#> GSM648607     3  0.4543     0.7203 0.000 0.000 0.676 0.324
#> GSM648611     3  0.0000     0.7582 0.000 0.000 1.000 0.000
#> GSM648612     3  0.4985     0.6552 0.000 0.000 0.532 0.468
#> GSM648616     1  0.4406     0.5867 0.700 0.000 0.000 0.300
#> GSM648617     1  0.0921     0.5359 0.972 0.028 0.000 0.000
#> GSM648626     1  0.4605     0.5591 0.664 0.000 0.000 0.336
#> GSM648711     3  0.0000     0.7582 0.000 0.000 1.000 0.000
#> GSM648712     3  0.4564     0.7189 0.000 0.000 0.672 0.328
#> GSM648713     3  0.4543     0.7203 0.000 0.000 0.676 0.324
#> GSM648714     4  0.2530     0.6921 0.112 0.000 0.000 0.888
#> GSM648716     3  0.0000     0.7582 0.000 0.000 1.000 0.000
#> GSM648717     3  0.4985     0.6552 0.000 0.000 0.532 0.468
#> GSM648590     2  0.0000     0.7901 0.000 1.000 0.000 0.000
#> GSM648596     2  0.2530     0.7641 0.000 0.888 0.000 0.112
#> GSM648642     1  0.3463     0.5043 0.864 0.096 0.000 0.040
#> GSM648696     2  0.4103     0.7711 0.256 0.744 0.000 0.000
#> GSM648705     2  0.4454     0.7379 0.308 0.692 0.000 0.000
#> GSM648718     2  0.3726     0.7867 0.212 0.788 0.000 0.000
#> GSM648599     1  0.4624     0.5553 0.660 0.000 0.000 0.340
#> GSM648608     3  0.4985     0.6552 0.000 0.000 0.532 0.468
#> GSM648609     3  0.4985     0.6552 0.000 0.000 0.532 0.468
#> GSM648610     4  0.3308     0.5660 0.036 0.000 0.092 0.872
#> GSM648633     2  0.4916     0.6179 0.424 0.576 0.000 0.000
#> GSM648644     2  0.2530     0.7641 0.000 0.888 0.000 0.112
#> GSM648652     1  0.2530     0.4784 0.888 0.112 0.000 0.000
#> GSM648653     1  0.4477     0.5791 0.688 0.000 0.000 0.312
#> GSM648658     1  0.3942     0.6156 0.764 0.000 0.000 0.236
#> GSM648659     2  0.4907     0.6235 0.420 0.580 0.000 0.000
#> GSM648662     3  0.5000     0.6273 0.000 0.000 0.504 0.496
#> GSM648665     3  0.5000     0.6273 0.000 0.000 0.504 0.496
#> GSM648666     1  0.4907     0.4539 0.580 0.000 0.000 0.420
#> GSM648680     1  0.2408     0.4844 0.896 0.104 0.000 0.000
#> GSM648684     3  0.5000     0.6273 0.000 0.000 0.504 0.496
#> GSM648709     1  0.3873     0.3458 0.772 0.228 0.000 0.000
#> GSM648719     1  0.3726     0.6187 0.788 0.000 0.000 0.212
#> GSM648627     3  0.0000     0.7582 0.000 0.000 1.000 0.000
#> GSM648637     2  0.2530     0.7641 0.000 0.888 0.000 0.112
#> GSM648638     1  0.4996     0.2190 0.516 0.000 0.000 0.484
#> GSM648641     3  0.4382     0.7278 0.000 0.000 0.704 0.296
#> GSM648672     2  0.2530     0.7641 0.000 0.888 0.000 0.112
#> GSM648674     2  0.2081     0.7724 0.000 0.916 0.000 0.084
#> GSM648703     2  0.2530     0.7641 0.000 0.888 0.000 0.112
#> GSM648631     3  0.0000     0.7582 0.000 0.000 1.000 0.000
#> GSM648669     1  0.3907     0.6168 0.768 0.000 0.000 0.232
#> GSM648671     1  0.3975     0.6144 0.760 0.000 0.000 0.240
#> GSM648678     2  0.2530     0.7641 0.000 0.888 0.000 0.112
#> GSM648679     2  0.0188     0.7895 0.000 0.996 0.000 0.004
#> GSM648681     2  0.4790     0.6703 0.380 0.620 0.000 0.000
#> GSM648686     3  0.0000     0.7582 0.000 0.000 1.000 0.000
#> GSM648689     3  0.0000     0.7582 0.000 0.000 1.000 0.000
#> GSM648690     3  0.0000     0.7582 0.000 0.000 1.000 0.000
#> GSM648691     3  0.0000     0.7582 0.000 0.000 1.000 0.000
#> GSM648693     3  0.0000     0.7582 0.000 0.000 1.000 0.000
#> GSM648700     1  0.2300     0.5622 0.924 0.028 0.000 0.048
#> GSM648630     3  0.0000     0.7582 0.000 0.000 1.000 0.000
#> GSM648632     3  0.0000     0.7582 0.000 0.000 1.000 0.000
#> GSM648639     1  0.2530     0.4784 0.888 0.112 0.000 0.000
#> GSM648640     3  0.0000     0.7582 0.000 0.000 1.000 0.000
#> GSM648668     2  0.2530     0.7641 0.000 0.888 0.000 0.112
#> GSM648676     2  0.4277     0.7584 0.280 0.720 0.000 0.000
#> GSM648692     3  0.0000     0.7582 0.000 0.000 1.000 0.000
#> GSM648694     3  0.0000     0.7582 0.000 0.000 1.000 0.000
#> GSM648699     1  0.3486     0.6175 0.812 0.000 0.000 0.188
#> GSM648701     2  0.4304     0.7557 0.284 0.716 0.000 0.000
#> GSM648673     1  0.3400     0.6160 0.820 0.000 0.000 0.180
#> GSM648677     2  0.2530     0.7641 0.000 0.888 0.000 0.112
#> GSM648687     1  0.4907     0.4539 0.580 0.000 0.000 0.420
#> GSM648688     3  0.0000     0.7582 0.000 0.000 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM648605     4  0.5990    0.32265 0.116 0.000 0.000 0.500 0.384
#> GSM648618     4  0.2561    0.69260 0.000 0.000 0.000 0.856 0.144
#> GSM648620     1  0.6231    0.15238 0.508 0.380 0.000 0.016 0.096
#> GSM648646     2  0.0000    0.77745 0.000 1.000 0.000 0.000 0.000
#> GSM648649     1  0.5810   -0.00989 0.480 0.428 0.000 0.000 0.092
#> GSM648675     4  0.5048    0.49087 0.380 0.000 0.000 0.580 0.040
#> GSM648682     2  0.5844    0.17062 0.420 0.484 0.000 0.000 0.096
#> GSM648698     2  0.5847    0.15743 0.424 0.480 0.000 0.000 0.096
#> GSM648708     1  0.5724    0.51367 0.668 0.208 0.000 0.028 0.096
#> GSM648628     3  0.0880    0.75874 0.032 0.000 0.968 0.000 0.000
#> GSM648595     2  0.3236    0.73376 0.152 0.828 0.000 0.000 0.020
#> GSM648635     1  0.3847    0.57603 0.784 0.180 0.000 0.036 0.000
#> GSM648645     4  0.4224    0.64700 0.216 0.000 0.000 0.744 0.040
#> GSM648647     2  0.3236    0.73376 0.152 0.828 0.000 0.000 0.020
#> GSM648667     2  0.2390    0.76039 0.084 0.896 0.000 0.000 0.020
#> GSM648695     2  0.5741    0.32380 0.360 0.544 0.000 0.000 0.096
#> GSM648704     2  0.0000    0.77745 0.000 1.000 0.000 0.000 0.000
#> GSM648706     1  0.6898    0.53080 0.572 0.096 0.000 0.236 0.096
#> GSM648593     1  0.3455    0.55649 0.784 0.208 0.000 0.008 0.000
#> GSM648594     4  0.4935    0.55183 0.344 0.000 0.000 0.616 0.040
#> GSM648600     1  0.5534    0.47990 0.604 0.000 0.000 0.300 0.096
#> GSM648621     4  0.1270    0.71436 0.052 0.000 0.000 0.948 0.000
#> GSM648622     4  0.2516    0.69453 0.000 0.000 0.000 0.860 0.140
#> GSM648623     4  0.2516    0.69453 0.000 0.000 0.000 0.860 0.140
#> GSM648636     1  0.4791    0.58551 0.736 0.100 0.000 0.160 0.004
#> GSM648655     1  0.4779    0.58163 0.736 0.096 0.000 0.164 0.004
#> GSM648661     3  0.0404    0.74293 0.000 0.000 0.988 0.000 0.012
#> GSM648664     5  0.4294    0.56604 0.000 0.000 0.468 0.000 0.532
#> GSM648683     5  0.3752    0.78159 0.000 0.000 0.292 0.000 0.708
#> GSM648685     5  0.3752    0.78159 0.000 0.000 0.292 0.000 0.708
#> GSM648702     1  0.3455    0.55649 0.784 0.208 0.000 0.008 0.000
#> GSM648597     4  0.4503    0.62541 0.256 0.000 0.000 0.704 0.040
#> GSM648603     4  0.1704    0.71008 0.004 0.000 0.000 0.928 0.068
#> GSM648606     5  0.3752    0.78159 0.000 0.000 0.292 0.000 0.708
#> GSM648613     5  0.4030    0.76257 0.000 0.000 0.352 0.000 0.648
#> GSM648619     3  0.4015    0.13348 0.000 0.000 0.652 0.000 0.348
#> GSM648654     3  0.0000    0.75059 0.000 0.000 1.000 0.000 0.000
#> GSM648663     5  0.4045    0.75991 0.000 0.000 0.356 0.000 0.644
#> GSM648670     1  0.5814   -0.04232 0.472 0.436 0.000 0.000 0.092
#> GSM648707     4  0.2561    0.69260 0.000 0.000 0.000 0.856 0.144
#> GSM648615     2  0.5847    0.15743 0.424 0.480 0.000 0.000 0.096
#> GSM648643     2  0.0000    0.77745 0.000 1.000 0.000 0.000 0.000
#> GSM648650     2  0.5435    0.22319 0.428 0.512 0.000 0.000 0.060
#> GSM648656     2  0.0000    0.77745 0.000 1.000 0.000 0.000 0.000
#> GSM648715     2  0.3236    0.73376 0.152 0.828 0.000 0.000 0.020
#> GSM648598     4  0.4644    0.60074 0.280 0.000 0.000 0.680 0.040
#> GSM648601     4  0.0963    0.71650 0.036 0.000 0.000 0.964 0.000
#> GSM648602     4  0.0451    0.71568 0.004 0.000 0.000 0.988 0.008
#> GSM648604     5  0.4030    0.76330 0.000 0.000 0.352 0.000 0.648
#> GSM648614     5  0.4901    0.35266 0.060 0.000 0.000 0.268 0.672
#> GSM648624     4  0.2516    0.69453 0.000 0.000 0.000 0.860 0.140
#> GSM648625     1  0.6251    0.11232 0.496 0.392 0.000 0.016 0.096
#> GSM648629     3  0.4015    0.13348 0.000 0.000 0.652 0.000 0.348
#> GSM648634     1  0.5125    0.16348 0.544 0.000 0.000 0.416 0.040
#> GSM648648     1  0.5168   -0.16583 0.508 0.000 0.000 0.452 0.040
#> GSM648651     4  0.2561    0.69260 0.000 0.000 0.000 0.856 0.144
#> GSM648657     4  0.5048    0.49087 0.380 0.000 0.000 0.580 0.040
#> GSM648660     4  0.4921    0.55427 0.340 0.000 0.000 0.620 0.040
#> GSM648697     4  0.2516    0.69453 0.000 0.000 0.000 0.860 0.140
#> GSM648710     3  0.3752    0.29241 0.000 0.000 0.708 0.000 0.292
#> GSM648591     4  0.2719    0.70668 0.004 0.000 0.000 0.852 0.144
#> GSM648592     1  0.3906    0.39786 0.704 0.000 0.000 0.292 0.004
#> GSM648607     3  0.4045    0.10282 0.000 0.000 0.644 0.000 0.356
#> GSM648611     3  0.2230    0.76209 0.116 0.000 0.884 0.000 0.000
#> GSM648612     5  0.4150    0.71941 0.000 0.000 0.388 0.000 0.612
#> GSM648616     4  0.1341    0.71349 0.056 0.000 0.000 0.944 0.000
#> GSM648617     1  0.5401    0.22756 0.536 0.000 0.000 0.404 0.060
#> GSM648626     4  0.1082    0.71739 0.028 0.000 0.000 0.964 0.008
#> GSM648711     3  0.0000    0.75059 0.000 0.000 1.000 0.000 0.000
#> GSM648712     3  0.4045    0.10282 0.000 0.000 0.644 0.000 0.356
#> GSM648713     3  0.4045    0.10282 0.000 0.000 0.644 0.000 0.356
#> GSM648714     5  0.5172    0.23950 0.060 0.000 0.000 0.324 0.616
#> GSM648716     3  0.0000    0.75059 0.000 0.000 1.000 0.000 0.000
#> GSM648717     5  0.3837    0.77597 0.000 0.000 0.308 0.000 0.692
#> GSM648590     2  0.3476    0.71223 0.176 0.804 0.000 0.000 0.020
#> GSM648596     2  0.0000    0.77745 0.000 1.000 0.000 0.000 0.000
#> GSM648642     1  0.5659    0.23965 0.580 0.016 0.000 0.348 0.056
#> GSM648696     1  0.6245    0.12675 0.500 0.388 0.000 0.016 0.096
#> GSM648705     1  0.5051    0.44652 0.664 0.264 0.000 0.000 0.072
#> GSM648718     2  0.5447    0.18633 0.440 0.500 0.000 0.000 0.060
#> GSM648599     4  0.1082    0.71739 0.028 0.000 0.000 0.964 0.008
#> GSM648608     5  0.4114    0.73665 0.000 0.000 0.376 0.000 0.624
#> GSM648609     5  0.4045    0.75990 0.000 0.000 0.356 0.000 0.644
#> GSM648610     5  0.3039    0.51241 0.000 0.000 0.012 0.152 0.836
#> GSM648633     1  0.4643    0.53848 0.732 0.208 0.000 0.008 0.052
#> GSM648644     2  0.0000    0.77745 0.000 1.000 0.000 0.000 0.000
#> GSM648652     1  0.4874    0.27884 0.632 0.000 0.000 0.328 0.040
#> GSM648653     4  0.1522    0.71477 0.044 0.000 0.000 0.944 0.012
#> GSM648658     4  0.4728    0.60195 0.296 0.000 0.000 0.664 0.040
#> GSM648659     1  0.4205    0.54769 0.756 0.208 0.000 0.008 0.028
#> GSM648662     5  0.3752    0.78159 0.000 0.000 0.292 0.000 0.708
#> GSM648665     5  0.3774    0.78154 0.000 0.000 0.296 0.000 0.704
#> GSM648666     4  0.2561    0.69260 0.000 0.000 0.000 0.856 0.144
#> GSM648680     1  0.4990    0.18487 0.600 0.000 0.000 0.360 0.040
#> GSM648684     5  0.3752    0.78159 0.000 0.000 0.292 0.000 0.708
#> GSM648709     1  0.6006    0.54073 0.624 0.028 0.000 0.252 0.096
#> GSM648719     4  0.4905    0.56207 0.336 0.000 0.000 0.624 0.040
#> GSM648627     3  0.0000    0.75059 0.000 0.000 1.000 0.000 0.000
#> GSM648637     2  0.0510    0.77390 0.000 0.984 0.000 0.000 0.016
#> GSM648638     4  0.6142    0.29708 0.132 0.000 0.000 0.472 0.396
#> GSM648641     3  0.4166    0.12743 0.004 0.000 0.648 0.000 0.348
#> GSM648672     2  0.0290    0.77672 0.000 0.992 0.000 0.000 0.008
#> GSM648674     2  0.2761    0.75412 0.104 0.872 0.000 0.000 0.024
#> GSM648703     2  0.0510    0.77512 0.000 0.984 0.000 0.000 0.016
#> GSM648631     3  0.2648    0.75758 0.152 0.000 0.848 0.000 0.000
#> GSM648669     4  0.4786    0.58861 0.308 0.000 0.000 0.652 0.040
#> GSM648671     4  0.4708    0.60284 0.292 0.000 0.000 0.668 0.040
#> GSM648678     2  0.0162    0.77691 0.000 0.996 0.000 0.000 0.004
#> GSM648679     2  0.3236    0.73376 0.152 0.828 0.000 0.000 0.020
#> GSM648681     1  0.4466    0.51860 0.728 0.232 0.000 0.008 0.032
#> GSM648686     3  0.2280    0.76177 0.120 0.000 0.880 0.000 0.000
#> GSM648689     3  0.1043    0.75903 0.040 0.000 0.960 0.000 0.000
#> GSM648690     3  0.2690    0.75558 0.156 0.000 0.844 0.000 0.000
#> GSM648691     3  0.2648    0.75758 0.152 0.000 0.848 0.000 0.000
#> GSM648693     3  0.2648    0.75758 0.152 0.000 0.848 0.000 0.000
#> GSM648700     4  0.5077    0.45937 0.392 0.000 0.000 0.568 0.040
#> GSM648630     3  0.2648    0.75758 0.152 0.000 0.848 0.000 0.000
#> GSM648632     3  0.2648    0.75758 0.152 0.000 0.848 0.000 0.000
#> GSM648639     1  0.5534    0.47990 0.604 0.000 0.000 0.300 0.096
#> GSM648640     3  0.0609    0.75656 0.020 0.000 0.980 0.000 0.000
#> GSM648668     2  0.0290    0.77672 0.000 0.992 0.000 0.000 0.008
#> GSM648676     1  0.5423    0.16270 0.548 0.388 0.000 0.000 0.064
#> GSM648692     3  0.2648    0.75758 0.152 0.000 0.848 0.000 0.000
#> GSM648694     3  0.2648    0.75758 0.152 0.000 0.848 0.000 0.000
#> GSM648699     4  0.4977    0.52967 0.356 0.000 0.000 0.604 0.040
#> GSM648701     1  0.5405    0.18767 0.556 0.380 0.000 0.000 0.064
#> GSM648673     4  0.4977    0.52967 0.356 0.000 0.000 0.604 0.040
#> GSM648677     2  0.0404    0.77536 0.000 0.988 0.000 0.000 0.012
#> GSM648687     4  0.2561    0.69260 0.000 0.000 0.000 0.856 0.144
#> GSM648688     3  0.2648    0.75758 0.152 0.000 0.848 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM648605     1  0.6752     0.2955 0.492 0.180 0.000 0.000 0.244 0.084
#> GSM648618     1  0.0000     0.7801 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648620     2  0.4011     0.6767 0.000 0.780 0.000 0.144 0.048 0.028
#> GSM648646     4  0.0000     0.8439 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648649     2  0.3897     0.6460 0.000 0.760 0.000 0.192 0.012 0.036
#> GSM648675     6  0.3980     0.7802 0.216 0.052 0.000 0.000 0.000 0.732
#> GSM648682     2  0.4121     0.6068 0.000 0.720 0.000 0.220 0.060 0.000
#> GSM648698     2  0.4039     0.6151 0.000 0.732 0.000 0.208 0.060 0.000
#> GSM648708     2  0.4038     0.6923 0.000 0.784 0.000 0.036 0.048 0.132
#> GSM648628     3  0.0291     0.7215 0.000 0.004 0.992 0.000 0.000 0.004
#> GSM648595     4  0.4308     0.6189 0.000 0.280 0.000 0.680 0.012 0.028
#> GSM648635     2  0.4531     0.6048 0.004 0.608 0.000 0.036 0.000 0.352
#> GSM648645     6  0.4093     0.3697 0.440 0.004 0.000 0.000 0.004 0.552
#> GSM648647     4  0.4288     0.6257 0.000 0.276 0.000 0.684 0.012 0.028
#> GSM648667     4  0.3219     0.7345 0.000 0.192 0.000 0.792 0.012 0.004
#> GSM648695     2  0.4535     0.4929 0.000 0.644 0.000 0.296 0.060 0.000
#> GSM648704     4  0.0000     0.8439 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648706     2  0.5387     0.3956 0.020 0.624 0.000 0.024 0.048 0.284
#> GSM648593     2  0.4470     0.6063 0.000 0.604 0.000 0.040 0.000 0.356
#> GSM648594     6  0.3745     0.7783 0.240 0.028 0.000 0.000 0.000 0.732
#> GSM648600     2  0.4944     0.5405 0.036 0.680 0.000 0.000 0.060 0.224
#> GSM648621     1  0.4058     0.5583 0.708 0.016 0.000 0.000 0.016 0.260
#> GSM648622     1  0.0000     0.7801 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648623     1  0.0000     0.7801 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648636     2  0.4775     0.4457 0.016 0.528 0.000 0.024 0.000 0.432
#> GSM648655     2  0.4779     0.4364 0.016 0.524 0.000 0.024 0.000 0.436
#> GSM648661     3  0.0458     0.7100 0.000 0.000 0.984 0.000 0.016 0.000
#> GSM648664     5  0.3795     0.6237 0.000 0.000 0.364 0.000 0.632 0.004
#> GSM648683     5  0.2527     0.8310 0.000 0.000 0.168 0.000 0.832 0.000
#> GSM648685     5  0.2527     0.8310 0.000 0.000 0.168 0.000 0.832 0.000
#> GSM648702     2  0.4470     0.6063 0.000 0.604 0.000 0.040 0.000 0.356
#> GSM648597     6  0.4131     0.5405 0.384 0.000 0.000 0.000 0.016 0.600
#> GSM648603     1  0.2095     0.7491 0.904 0.004 0.000 0.000 0.016 0.076
#> GSM648606     5  0.2527     0.8310 0.000 0.000 0.168 0.000 0.832 0.000
#> GSM648613     5  0.2912     0.8177 0.000 0.000 0.216 0.000 0.784 0.000
#> GSM648619     3  0.3828    -0.0645 0.000 0.000 0.560 0.000 0.440 0.000
#> GSM648654     3  0.0000     0.7194 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648663     5  0.3192     0.8170 0.000 0.004 0.216 0.000 0.776 0.004
#> GSM648670     2  0.3917     0.6336 0.000 0.752 0.000 0.204 0.012 0.032
#> GSM648707     1  0.0000     0.7801 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648615     2  0.4095     0.6100 0.000 0.724 0.000 0.216 0.060 0.000
#> GSM648643     4  0.0291     0.8428 0.000 0.000 0.000 0.992 0.004 0.004
#> GSM648650     2  0.4499     0.4708 0.000 0.636 0.000 0.324 0.012 0.028
#> GSM648656     4  0.0000     0.8439 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648715     4  0.4215     0.6304 0.000 0.276 0.000 0.688 0.012 0.024
#> GSM648598     6  0.4509     0.6437 0.344 0.020 0.000 0.000 0.016 0.620
#> GSM648601     1  0.3780     0.5941 0.732 0.008 0.000 0.000 0.016 0.244
#> GSM648602     1  0.3354     0.6709 0.792 0.008 0.000 0.000 0.016 0.184
#> GSM648604     5  0.2941     0.8157 0.000 0.000 0.220 0.000 0.780 0.000
#> GSM648614     5  0.5941     0.2727 0.344 0.068 0.000 0.000 0.524 0.064
#> GSM648624     1  0.0000     0.7801 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648625     2  0.3828     0.6658 0.000 0.780 0.000 0.160 0.048 0.012
#> GSM648629     3  0.3828    -0.0645 0.000 0.000 0.560 0.000 0.440 0.000
#> GSM648634     6  0.5951     0.3317 0.104 0.388 0.000 0.000 0.032 0.476
#> GSM648648     6  0.4209     0.7507 0.160 0.104 0.000 0.000 0.000 0.736
#> GSM648651     1  0.0000     0.7801 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648657     6  0.3952     0.7795 0.212 0.052 0.000 0.000 0.000 0.736
#> GSM648660     6  0.4175     0.7754 0.240 0.028 0.000 0.000 0.016 0.716
#> GSM648697     1  0.0000     0.7801 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648710     3  0.3756     0.0550 0.000 0.000 0.600 0.000 0.400 0.000
#> GSM648591     1  0.2982     0.6563 0.820 0.004 0.000 0.000 0.012 0.164
#> GSM648592     6  0.4847    -0.1001 0.040 0.424 0.000 0.000 0.008 0.528
#> GSM648607     3  0.3847    -0.1208 0.000 0.000 0.544 0.000 0.456 0.000
#> GSM648611     3  0.2384     0.7262 0.000 0.048 0.888 0.000 0.000 0.064
#> GSM648612     5  0.3428     0.7194 0.000 0.000 0.304 0.000 0.696 0.000
#> GSM648616     1  0.4035     0.5656 0.712 0.016 0.000 0.000 0.016 0.256
#> GSM648617     2  0.5840    -0.2202 0.076 0.444 0.000 0.000 0.040 0.440
#> GSM648626     1  0.3480     0.6535 0.776 0.008 0.000 0.000 0.016 0.200
#> GSM648711     3  0.0000     0.7194 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648712     3  0.3847    -0.1208 0.000 0.000 0.544 0.000 0.456 0.000
#> GSM648713     3  0.3847    -0.1208 0.000 0.000 0.544 0.000 0.456 0.000
#> GSM648714     5  0.6098     0.1632 0.384 0.076 0.000 0.000 0.476 0.064
#> GSM648716     3  0.0000     0.7194 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648717     5  0.2527     0.8310 0.000 0.000 0.168 0.000 0.832 0.000
#> GSM648590     4  0.4556     0.4842 0.000 0.340 0.000 0.620 0.012 0.028
#> GSM648596     4  0.0000     0.8439 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648642     6  0.5235     0.3761 0.064 0.368 0.000 0.000 0.016 0.552
#> GSM648696     2  0.3918     0.6667 0.000 0.776 0.000 0.160 0.048 0.016
#> GSM648705     2  0.4646     0.7057 0.000 0.692 0.000 0.072 0.012 0.224
#> GSM648718     2  0.4484     0.4793 0.000 0.640 0.000 0.320 0.012 0.028
#> GSM648599     1  0.3480     0.6535 0.776 0.008 0.000 0.000 0.016 0.200
#> GSM648608     5  0.3309     0.7525 0.000 0.000 0.280 0.000 0.720 0.000
#> GSM648609     5  0.2941     0.8157 0.000 0.000 0.220 0.000 0.780 0.000
#> GSM648610     5  0.2706     0.6720 0.160 0.000 0.008 0.000 0.832 0.000
#> GSM648633     2  0.4229     0.6668 0.000 0.668 0.000 0.040 0.000 0.292
#> GSM648644     4  0.0000     0.8439 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648652     6  0.3766     0.5511 0.040 0.212 0.000 0.000 0.000 0.748
#> GSM648653     1  0.3961     0.5326 0.700 0.008 0.000 0.000 0.016 0.276
#> GSM648658     6  0.3288     0.7479 0.276 0.000 0.000 0.000 0.000 0.724
#> GSM648659     2  0.4299     0.6549 0.000 0.652 0.000 0.040 0.000 0.308
#> GSM648662     5  0.2668     0.8300 0.000 0.000 0.168 0.000 0.828 0.004
#> GSM648665     5  0.2668     0.8300 0.000 0.000 0.168 0.000 0.828 0.004
#> GSM648666     1  0.0000     0.7801 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648680     6  0.3923     0.6008 0.060 0.192 0.000 0.000 0.000 0.748
#> GSM648684     5  0.2527     0.8310 0.000 0.000 0.168 0.000 0.832 0.000
#> GSM648709     2  0.4796     0.6161 0.024 0.720 0.000 0.012 0.060 0.184
#> GSM648719     6  0.3695     0.7768 0.244 0.024 0.000 0.000 0.000 0.732
#> GSM648627     3  0.0000     0.7194 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648637     4  0.1401     0.8326 0.000 0.004 0.000 0.948 0.028 0.020
#> GSM648638     1  0.6879     0.2635 0.464 0.196 0.000 0.000 0.256 0.084
#> GSM648641     3  0.4189    -0.0653 0.000 0.008 0.552 0.000 0.436 0.004
#> GSM648672     4  0.1265     0.8364 0.000 0.000 0.000 0.948 0.044 0.008
#> GSM648674     4  0.4017     0.7108 0.000 0.204 0.000 0.748 0.020 0.028
#> GSM648703     4  0.1382     0.8335 0.000 0.008 0.000 0.948 0.036 0.008
#> GSM648631     3  0.3563     0.7167 0.000 0.072 0.796 0.000 0.000 0.132
#> GSM648669     6  0.3788     0.7413 0.280 0.004 0.000 0.000 0.012 0.704
#> GSM648671     6  0.3788     0.7413 0.280 0.004 0.000 0.000 0.012 0.704
#> GSM648678     4  0.1124     0.8371 0.000 0.000 0.000 0.956 0.036 0.008
#> GSM648679     4  0.4308     0.6189 0.000 0.280 0.000 0.680 0.012 0.028
#> GSM648681     2  0.4685     0.6689 0.000 0.648 0.000 0.048 0.012 0.292
#> GSM648686     3  0.2685     0.7252 0.000 0.060 0.868 0.000 0.000 0.072
#> GSM648689     3  0.0914     0.7233 0.000 0.016 0.968 0.000 0.000 0.016
#> GSM648690     3  0.3586     0.7163 0.000 0.080 0.796 0.000 0.000 0.124
#> GSM648691     3  0.3563     0.7167 0.000 0.072 0.796 0.000 0.000 0.132
#> GSM648693     3  0.3563     0.7167 0.000 0.072 0.796 0.000 0.000 0.132
#> GSM648700     6  0.4255     0.7734 0.196 0.064 0.000 0.000 0.008 0.732
#> GSM648630     3  0.3563     0.7167 0.000 0.072 0.796 0.000 0.000 0.132
#> GSM648632     3  0.3563     0.7167 0.000 0.072 0.796 0.000 0.000 0.132
#> GSM648639     2  0.4841     0.5632 0.036 0.696 0.000 0.000 0.060 0.208
#> GSM648640     3  0.0291     0.7210 0.000 0.004 0.992 0.000 0.000 0.004
#> GSM648668     4  0.1265     0.8364 0.000 0.000 0.000 0.948 0.044 0.008
#> GSM648676     2  0.5204     0.6858 0.000 0.660 0.000 0.128 0.020 0.192
#> GSM648692     3  0.3563     0.7167 0.000 0.072 0.796 0.000 0.000 0.132
#> GSM648694     3  0.3563     0.7167 0.000 0.072 0.796 0.000 0.000 0.132
#> GSM648699     6  0.4182     0.7756 0.244 0.032 0.000 0.000 0.012 0.712
#> GSM648701     2  0.5248     0.6864 0.000 0.652 0.000 0.124 0.020 0.204
#> GSM648673     6  0.4182     0.7756 0.244 0.032 0.000 0.000 0.012 0.712
#> GSM648677     4  0.1391     0.8341 0.000 0.000 0.000 0.944 0.040 0.016
#> GSM648687     1  0.0146     0.7793 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM648688     3  0.3563     0.7167 0.000 0.072 0.796 0.000 0.000 0.132

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-ATC-kmeans-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-ATC-kmeans-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-ATC-kmeans-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-ATC-kmeans-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-ATC-kmeans-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-ATC-kmeans-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-ATC-kmeans-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-ATC-kmeans-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-ATC-kmeans-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-ATC-kmeans-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-ATC-kmeans-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-ATC-kmeans-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-ATC-kmeans-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-ATC-kmeans-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-ATC-kmeans-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-ATC-kmeans-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-ATC-kmeans-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-ATC-kmeans-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-ATC-kmeans-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-ATC-kmeans-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk ATC-kmeans-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-ATC-kmeans-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-ATC-kmeans-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-ATC-kmeans-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-ATC-kmeans-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-ATC-kmeans-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk ATC-kmeans-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>              n disease.state(p) development.stage(p) other(p) k
#> ATC:kmeans 130         0.346667               0.2532 3.72e-05 2
#> ATC:kmeans 127         0.291116               0.0961 2.51e-09 3
#> ATC:kmeans 108         0.501680               0.1044 4.87e-08 4
#> ATC:kmeans  93         0.000127               0.0531 8.65e-10 5
#> ATC:kmeans 107         0.000122               0.2790 8.77e-10 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


ATC:skmeans*

The object with results only for a single top-value method and a single partition method can be extracted as:

res = res_list["ATC", "skmeans"]
# you can also extract it by
# res = res_list["ATC:skmeans"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 130 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#>   Subgroups are detected by 'skmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 6.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk ATC-skmeans-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk ATC-skmeans-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           0.959       0.984         0.4828 0.516   0.516
#> 3 3 0.979           0.953       0.980         0.2631 0.851   0.717
#> 4 4 0.977           0.944       0.949         0.1452 0.898   0.742
#> 5 5 0.933           0.833       0.915         0.0391 0.972   0.908
#> 6 6 0.925           0.878       0.946         0.0339 0.939   0.793

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 6
#> attr(,"optional")
#> [1] 2 3 4 5

There is also optional best \(k\) = 2 3 4 5 that is worth to check.

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM648605     1  0.0000    0.97602 1.000 0.000
#> GSM648618     1  0.0000    0.97602 1.000 0.000
#> GSM648620     2  0.0000    0.98876 0.000 1.000
#> GSM648646     2  0.0000    0.98876 0.000 1.000
#> GSM648649     2  0.0000    0.98876 0.000 1.000
#> GSM648675     2  0.0000    0.98876 0.000 1.000
#> GSM648682     2  0.0000    0.98876 0.000 1.000
#> GSM648698     2  0.0000    0.98876 0.000 1.000
#> GSM648708     2  0.0000    0.98876 0.000 1.000
#> GSM648628     1  0.0000    0.97602 1.000 0.000
#> GSM648595     2  0.0000    0.98876 0.000 1.000
#> GSM648635     2  0.0000    0.98876 0.000 1.000
#> GSM648645     2  0.0000    0.98876 0.000 1.000
#> GSM648647     2  0.0000    0.98876 0.000 1.000
#> GSM648667     2  0.0000    0.98876 0.000 1.000
#> GSM648695     2  0.0000    0.98876 0.000 1.000
#> GSM648704     2  0.0000    0.98876 0.000 1.000
#> GSM648706     2  0.0000    0.98876 0.000 1.000
#> GSM648593     2  0.0000    0.98876 0.000 1.000
#> GSM648594     2  0.0000    0.98876 0.000 1.000
#> GSM648600     2  0.0000    0.98876 0.000 1.000
#> GSM648621     2  0.0000    0.98876 0.000 1.000
#> GSM648622     2  0.8267    0.64262 0.260 0.740
#> GSM648623     2  0.9170    0.49648 0.332 0.668
#> GSM648636     2  0.0000    0.98876 0.000 1.000
#> GSM648655     2  0.0000    0.98876 0.000 1.000
#> GSM648661     1  0.0000    0.97602 1.000 0.000
#> GSM648664     1  0.0000    0.97602 1.000 0.000
#> GSM648683     1  0.0000    0.97602 1.000 0.000
#> GSM648685     1  0.0000    0.97602 1.000 0.000
#> GSM648702     2  0.0000    0.98876 0.000 1.000
#> GSM648597     2  0.0000    0.98876 0.000 1.000
#> GSM648603     2  0.0000    0.98876 0.000 1.000
#> GSM648606     1  0.0000    0.97602 1.000 0.000
#> GSM648613     1  0.0000    0.97602 1.000 0.000
#> GSM648619     1  0.0000    0.97602 1.000 0.000
#> GSM648654     1  0.0000    0.97602 1.000 0.000
#> GSM648663     1  0.0000    0.97602 1.000 0.000
#> GSM648670     2  0.0000    0.98876 0.000 1.000
#> GSM648707     1  0.0000    0.97602 1.000 0.000
#> GSM648615     2  0.0000    0.98876 0.000 1.000
#> GSM648643     2  0.0000    0.98876 0.000 1.000
#> GSM648650     2  0.0000    0.98876 0.000 1.000
#> GSM648656     2  0.0000    0.98876 0.000 1.000
#> GSM648715     2  0.0000    0.98876 0.000 1.000
#> GSM648598     2  0.0000    0.98876 0.000 1.000
#> GSM648601     2  0.0000    0.98876 0.000 1.000
#> GSM648602     2  0.0000    0.98876 0.000 1.000
#> GSM648604     1  0.0000    0.97602 1.000 0.000
#> GSM648614     1  0.0000    0.97602 1.000 0.000
#> GSM648624     1  1.0000    0.00774 0.504 0.496
#> GSM648625     2  0.0000    0.98876 0.000 1.000
#> GSM648629     1  0.0000    0.97602 1.000 0.000
#> GSM648634     2  0.0000    0.98876 0.000 1.000
#> GSM648648     2  0.0000    0.98876 0.000 1.000
#> GSM648651     1  0.0000    0.97602 1.000 0.000
#> GSM648657     2  0.0000    0.98876 0.000 1.000
#> GSM648660     2  0.0000    0.98876 0.000 1.000
#> GSM648697     2  0.7950    0.67784 0.240 0.760
#> GSM648710     1  0.0000    0.97602 1.000 0.000
#> GSM648591     1  0.9754    0.30477 0.592 0.408
#> GSM648592     2  0.0000    0.98876 0.000 1.000
#> GSM648607     1  0.0000    0.97602 1.000 0.000
#> GSM648611     1  0.0000    0.97602 1.000 0.000
#> GSM648612     1  0.0000    0.97602 1.000 0.000
#> GSM648616     2  0.0000    0.98876 0.000 1.000
#> GSM648617     2  0.0000    0.98876 0.000 1.000
#> GSM648626     2  0.0000    0.98876 0.000 1.000
#> GSM648711     1  0.0000    0.97602 1.000 0.000
#> GSM648712     1  0.0000    0.97602 1.000 0.000
#> GSM648713     1  0.0000    0.97602 1.000 0.000
#> GSM648714     1  0.0000    0.97602 1.000 0.000
#> GSM648716     1  0.0000    0.97602 1.000 0.000
#> GSM648717     1  0.0000    0.97602 1.000 0.000
#> GSM648590     2  0.0000    0.98876 0.000 1.000
#> GSM648596     2  0.0000    0.98876 0.000 1.000
#> GSM648642     2  0.0000    0.98876 0.000 1.000
#> GSM648696     2  0.0000    0.98876 0.000 1.000
#> GSM648705     2  0.0000    0.98876 0.000 1.000
#> GSM648718     2  0.0000    0.98876 0.000 1.000
#> GSM648599     2  0.0000    0.98876 0.000 1.000
#> GSM648608     1  0.0000    0.97602 1.000 0.000
#> GSM648609     1  0.0000    0.97602 1.000 0.000
#> GSM648610     1  0.0000    0.97602 1.000 0.000
#> GSM648633     2  0.0000    0.98876 0.000 1.000
#> GSM648644     2  0.0000    0.98876 0.000 1.000
#> GSM648652     2  0.0000    0.98876 0.000 1.000
#> GSM648653     2  0.0000    0.98876 0.000 1.000
#> GSM648658     2  0.0000    0.98876 0.000 1.000
#> GSM648659     2  0.0000    0.98876 0.000 1.000
#> GSM648662     1  0.0000    0.97602 1.000 0.000
#> GSM648665     1  0.0000    0.97602 1.000 0.000
#> GSM648666     1  0.0000    0.97602 1.000 0.000
#> GSM648680     2  0.0000    0.98876 0.000 1.000
#> GSM648684     1  0.0000    0.97602 1.000 0.000
#> GSM648709     2  0.0000    0.98876 0.000 1.000
#> GSM648719     2  0.0000    0.98876 0.000 1.000
#> GSM648627     1  0.0000    0.97602 1.000 0.000
#> GSM648637     2  0.0000    0.98876 0.000 1.000
#> GSM648638     1  0.8555    0.60677 0.720 0.280
#> GSM648641     1  0.0000    0.97602 1.000 0.000
#> GSM648672     2  0.0000    0.98876 0.000 1.000
#> GSM648674     2  0.0000    0.98876 0.000 1.000
#> GSM648703     2  0.0000    0.98876 0.000 1.000
#> GSM648631     1  0.0000    0.97602 1.000 0.000
#> GSM648669     2  0.0000    0.98876 0.000 1.000
#> GSM648671     2  0.0000    0.98876 0.000 1.000
#> GSM648678     2  0.0000    0.98876 0.000 1.000
#> GSM648679     2  0.0000    0.98876 0.000 1.000
#> GSM648681     2  0.0000    0.98876 0.000 1.000
#> GSM648686     1  0.0000    0.97602 1.000 0.000
#> GSM648689     1  0.0000    0.97602 1.000 0.000
#> GSM648690     1  0.0000    0.97602 1.000 0.000
#> GSM648691     1  0.0000    0.97602 1.000 0.000
#> GSM648693     1  0.0000    0.97602 1.000 0.000
#> GSM648700     2  0.0000    0.98876 0.000 1.000
#> GSM648630     1  0.0000    0.97602 1.000 0.000
#> GSM648632     1  0.0000    0.97602 1.000 0.000
#> GSM648639     2  0.0000    0.98876 0.000 1.000
#> GSM648640     1  0.0000    0.97602 1.000 0.000
#> GSM648668     2  0.0000    0.98876 0.000 1.000
#> GSM648676     2  0.0000    0.98876 0.000 1.000
#> GSM648692     1  0.0000    0.97602 1.000 0.000
#> GSM648694     1  0.0000    0.97602 1.000 0.000
#> GSM648699     2  0.0000    0.98876 0.000 1.000
#> GSM648701     2  0.0000    0.98876 0.000 1.000
#> GSM648673     2  0.0000    0.98876 0.000 1.000
#> GSM648677     2  0.0000    0.98876 0.000 1.000
#> GSM648687     1  0.0376    0.97234 0.996 0.004
#> GSM648688     1  0.0000    0.97602 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2  p3
#> GSM648605     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648618     1  0.0000     0.9277 1.000 0.000 0.0
#> GSM648620     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648646     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648649     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648675     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648682     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648698     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648708     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648628     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648595     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648635     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648645     1  0.4702     0.7785 0.788 0.212 0.0
#> GSM648647     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648667     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648695     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648704     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648706     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648593     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648594     2  0.0424     0.9727 0.008 0.992 0.0
#> GSM648600     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648621     2  0.6267     0.0822 0.452 0.548 0.0
#> GSM648622     1  0.0000     0.9277 1.000 0.000 0.0
#> GSM648623     1  0.0000     0.9277 1.000 0.000 0.0
#> GSM648636     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648655     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648661     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648664     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648683     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648685     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648702     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648597     1  0.4887     0.7588 0.772 0.228 0.0
#> GSM648603     1  0.0000     0.9277 1.000 0.000 0.0
#> GSM648606     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648613     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648619     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648654     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648663     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648670     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648707     1  0.0000     0.9277 1.000 0.000 0.0
#> GSM648615     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648643     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648650     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648656     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648715     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648598     2  0.6079     0.3014 0.388 0.612 0.0
#> GSM648601     1  0.1031     0.9213 0.976 0.024 0.0
#> GSM648602     1  0.0000     0.9277 1.000 0.000 0.0
#> GSM648604     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648614     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648624     1  0.0000     0.9277 1.000 0.000 0.0
#> GSM648625     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648629     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648634     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648648     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648651     1  0.0000     0.9277 1.000 0.000 0.0
#> GSM648657     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648660     2  0.2356     0.9026 0.072 0.928 0.0
#> GSM648697     1  0.0000     0.9277 1.000 0.000 0.0
#> GSM648710     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648591     1  0.0000     0.9277 1.000 0.000 0.0
#> GSM648592     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648607     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648611     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648612     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648616     1  0.4504     0.7954 0.804 0.196 0.0
#> GSM648617     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648626     1  0.1031     0.9213 0.976 0.024 0.0
#> GSM648711     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648712     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648713     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648714     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648716     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648717     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648590     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648596     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648642     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648696     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648705     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648718     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648599     1  0.1031     0.9213 0.976 0.024 0.0
#> GSM648608     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648609     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648610     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648633     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648644     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648652     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648653     1  0.4887     0.7588 0.772 0.228 0.0
#> GSM648658     1  0.5178     0.7152 0.744 0.256 0.0
#> GSM648659     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648662     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648665     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648666     1  0.0000     0.9277 1.000 0.000 0.0
#> GSM648680     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648684     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648709     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648719     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648627     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648637     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648638     3  0.4555     0.7034 0.000 0.200 0.8
#> GSM648641     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648672     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648674     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648703     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648631     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648669     2  0.0237     0.9766 0.004 0.996 0.0
#> GSM648671     2  0.4842     0.6820 0.224 0.776 0.0
#> GSM648678     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648679     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648681     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648686     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648689     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648690     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648691     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648693     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648700     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648630     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648632     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648639     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648640     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648668     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648676     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648692     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648694     3  0.0000     0.9941 0.000 0.000 1.0
#> GSM648699     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648701     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648673     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648677     2  0.0000     0.9804 0.000 1.000 0.0
#> GSM648687     1  0.0000     0.9277 1.000 0.000 0.0
#> GSM648688     3  0.0000     0.9941 0.000 0.000 1.0

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM648605     3  0.2060      0.914 0.000 0.052 0.932 0.016
#> GSM648618     1  0.0000      0.948 1.000 0.000 0.000 0.000
#> GSM648620     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648646     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648649     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648675     4  0.1118      0.942 0.000 0.036 0.000 0.964
#> GSM648682     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648698     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648708     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648628     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648595     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648635     2  0.1637      0.936 0.000 0.940 0.000 0.060
#> GSM648645     4  0.0592      0.919 0.016 0.000 0.000 0.984
#> GSM648647     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648667     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648695     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648704     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648706     2  0.0592      0.962 0.000 0.984 0.000 0.016
#> GSM648593     2  0.1940      0.923 0.000 0.924 0.000 0.076
#> GSM648594     4  0.0921      0.939 0.000 0.028 0.000 0.972
#> GSM648600     2  0.0469      0.965 0.000 0.988 0.000 0.012
#> GSM648621     2  0.6514      0.114 0.408 0.516 0.000 0.076
#> GSM648622     1  0.0000      0.948 1.000 0.000 0.000 0.000
#> GSM648623     1  0.0000      0.948 1.000 0.000 0.000 0.000
#> GSM648636     2  0.1716      0.933 0.000 0.936 0.000 0.064
#> GSM648655     2  0.2011      0.919 0.000 0.920 0.000 0.080
#> GSM648661     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648664     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648683     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648685     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648702     2  0.1792      0.929 0.000 0.932 0.000 0.068
#> GSM648597     4  0.0592      0.919 0.016 0.000 0.000 0.984
#> GSM648603     1  0.2408      0.918 0.896 0.000 0.000 0.104
#> GSM648606     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648613     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648619     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648654     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648663     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648670     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648707     1  0.0000      0.948 1.000 0.000 0.000 0.000
#> GSM648615     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648643     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648650     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648656     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648715     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648598     4  0.0657      0.930 0.004 0.012 0.000 0.984
#> GSM648601     1  0.2704      0.905 0.876 0.000 0.000 0.124
#> GSM648602     1  0.2469      0.916 0.892 0.000 0.000 0.108
#> GSM648604     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648614     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648624     1  0.0000      0.948 1.000 0.000 0.000 0.000
#> GSM648625     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648629     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648634     2  0.2149      0.912 0.000 0.912 0.000 0.088
#> GSM648648     4  0.1302      0.937 0.000 0.044 0.000 0.956
#> GSM648651     1  0.0000      0.948 1.000 0.000 0.000 0.000
#> GSM648657     4  0.1118      0.942 0.000 0.036 0.000 0.964
#> GSM648660     4  0.0592      0.933 0.000 0.016 0.000 0.984
#> GSM648697     1  0.0000      0.948 1.000 0.000 0.000 0.000
#> GSM648710     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648591     4  0.2469      0.847 0.108 0.000 0.000 0.892
#> GSM648592     2  0.2281      0.904 0.000 0.904 0.000 0.096
#> GSM648607     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648611     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648612     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648616     1  0.3863      0.863 0.828 0.028 0.000 0.144
#> GSM648617     2  0.0817      0.958 0.000 0.976 0.000 0.024
#> GSM648626     1  0.2589      0.911 0.884 0.000 0.000 0.116
#> GSM648711     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648712     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648713     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648714     3  0.0592      0.973 0.000 0.000 0.984 0.016
#> GSM648716     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648717     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648590     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648596     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648642     2  0.0592      0.962 0.000 0.984 0.000 0.016
#> GSM648696     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648705     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648718     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648599     1  0.2647      0.908 0.880 0.000 0.000 0.120
#> GSM648608     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648609     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648610     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648633     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648644     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648652     4  0.2973      0.800 0.000 0.144 0.000 0.856
#> GSM648653     4  0.4817      0.265 0.388 0.000 0.000 0.612
#> GSM648658     4  0.0657      0.924 0.012 0.004 0.000 0.984
#> GSM648659     2  0.1716      0.933 0.000 0.936 0.000 0.064
#> GSM648662     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648665     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648666     1  0.0000      0.948 1.000 0.000 0.000 0.000
#> GSM648680     4  0.1389      0.933 0.000 0.048 0.000 0.952
#> GSM648684     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648709     2  0.0817      0.958 0.000 0.976 0.000 0.024
#> GSM648719     4  0.1118      0.942 0.000 0.036 0.000 0.964
#> GSM648627     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648637     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648638     3  0.5364      0.341 0.000 0.392 0.592 0.016
#> GSM648641     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648672     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648674     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648703     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648631     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648669     4  0.1302      0.937 0.000 0.044 0.000 0.956
#> GSM648671     4  0.1118      0.942 0.000 0.036 0.000 0.964
#> GSM648678     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648679     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648681     2  0.1716      0.933 0.000 0.936 0.000 0.064
#> GSM648686     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648689     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648690     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648691     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648693     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648700     4  0.1118      0.942 0.000 0.036 0.000 0.964
#> GSM648630     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648632     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648639     2  0.0469      0.965 0.000 0.988 0.000 0.012
#> GSM648640     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648668     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648676     2  0.1637      0.936 0.000 0.940 0.000 0.060
#> GSM648692     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648694     3  0.0000      0.987 0.000 0.000 1.000 0.000
#> GSM648699     4  0.1118      0.942 0.000 0.036 0.000 0.964
#> GSM648701     2  0.1474      0.941 0.000 0.948 0.000 0.052
#> GSM648673     4  0.1302      0.937 0.000 0.044 0.000 0.956
#> GSM648677     2  0.0000      0.972 0.000 1.000 0.000 0.000
#> GSM648687     1  0.0000      0.948 1.000 0.000 0.000 0.000
#> GSM648688     3  0.0000      0.987 0.000 0.000 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM648605     4  0.4909      0.281 0.008 0.012 0.472 0.508 0.000
#> GSM648618     5  0.4305      0.745 0.000 0.000 0.000 0.488 0.512
#> GSM648620     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648646     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648649     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648675     1  0.0451      0.871 0.988 0.008 0.000 0.000 0.004
#> GSM648682     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648698     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648708     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648628     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648595     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648635     2  0.0963      0.906 0.036 0.964 0.000 0.000 0.000
#> GSM648645     1  0.0404      0.867 0.988 0.000 0.000 0.000 0.012
#> GSM648647     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648667     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648695     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648704     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648706     4  0.4560     -0.163 0.008 0.484 0.000 0.508 0.000
#> GSM648593     2  0.1121      0.899 0.044 0.956 0.000 0.000 0.000
#> GSM648594     1  0.0404      0.867 0.988 0.000 0.000 0.000 0.012
#> GSM648600     2  0.3966      0.503 0.000 0.664 0.000 0.000 0.336
#> GSM648621     5  0.2732      0.507 0.000 0.160 0.000 0.000 0.840
#> GSM648622     5  0.4305      0.745 0.000 0.000 0.000 0.488 0.512
#> GSM648623     5  0.4305      0.745 0.000 0.000 0.000 0.488 0.512
#> GSM648636     2  0.0963      0.906 0.036 0.964 0.000 0.000 0.000
#> GSM648655     2  0.1121      0.899 0.044 0.956 0.000 0.000 0.000
#> GSM648661     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648664     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648683     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648685     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648702     2  0.1043      0.903 0.040 0.960 0.000 0.000 0.000
#> GSM648597     1  0.3452      0.682 0.756 0.000 0.000 0.000 0.244
#> GSM648603     5  0.0000      0.693 0.000 0.000 0.000 0.000 1.000
#> GSM648606     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648613     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648619     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648654     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648663     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648670     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648707     5  0.4305      0.745 0.000 0.000 0.000 0.488 0.512
#> GSM648615     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648643     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648650     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648656     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648715     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648598     1  0.4305      0.298 0.512 0.000 0.000 0.000 0.488
#> GSM648601     5  0.0000      0.693 0.000 0.000 0.000 0.000 1.000
#> GSM648602     5  0.0000      0.693 0.000 0.000 0.000 0.000 1.000
#> GSM648604     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648614     3  0.3424      0.523 0.000 0.000 0.760 0.240 0.000
#> GSM648624     5  0.4305      0.745 0.000 0.000 0.000 0.488 0.512
#> GSM648625     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648629     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648634     2  0.4450      0.236 0.004 0.508 0.000 0.000 0.488
#> GSM648648     1  0.0404      0.869 0.988 0.012 0.000 0.000 0.000
#> GSM648651     5  0.4305      0.745 0.000 0.000 0.000 0.488 0.512
#> GSM648657     1  0.0451      0.871 0.988 0.008 0.000 0.000 0.004
#> GSM648660     1  0.3452      0.682 0.756 0.000 0.000 0.000 0.244
#> GSM648697     5  0.4305      0.745 0.000 0.000 0.000 0.488 0.512
#> GSM648710     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648591     1  0.1281      0.840 0.956 0.000 0.000 0.032 0.012
#> GSM648592     2  0.1124      0.904 0.036 0.960 0.000 0.000 0.004
#> GSM648607     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648611     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648612     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648616     5  0.0290      0.687 0.000 0.008 0.000 0.000 0.992
#> GSM648617     2  0.4304      0.251 0.000 0.516 0.000 0.000 0.484
#> GSM648626     5  0.0000      0.693 0.000 0.000 0.000 0.000 1.000
#> GSM648711     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648712     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648713     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648714     3  0.4278     -0.298 0.000 0.000 0.548 0.452 0.000
#> GSM648716     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648717     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648590     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648596     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648642     2  0.3700      0.587 0.008 0.752 0.000 0.240 0.000
#> GSM648696     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648705     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648718     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648599     5  0.0000      0.693 0.000 0.000 0.000 0.000 1.000
#> GSM648608     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648609     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648610     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648633     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648644     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648652     1  0.4300      0.100 0.524 0.476 0.000 0.000 0.000
#> GSM648653     5  0.2852      0.489 0.172 0.000 0.000 0.000 0.828
#> GSM648658     1  0.0404      0.867 0.988 0.000 0.000 0.000 0.012
#> GSM648659     2  0.0963      0.906 0.036 0.964 0.000 0.000 0.000
#> GSM648662     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648665     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648666     5  0.4305      0.745 0.000 0.000 0.000 0.488 0.512
#> GSM648680     1  0.3274      0.616 0.780 0.220 0.000 0.000 0.000
#> GSM648684     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648709     2  0.4305      0.242 0.000 0.512 0.000 0.000 0.488
#> GSM648719     1  0.0290      0.871 0.992 0.008 0.000 0.000 0.000
#> GSM648627     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648637     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648638     4  0.5687      0.401 0.008 0.060 0.424 0.508 0.000
#> GSM648641     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648672     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648674     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648703     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648631     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648669     1  0.0451      0.870 0.988 0.008 0.000 0.004 0.000
#> GSM648671     1  0.0451      0.870 0.988 0.008 0.000 0.004 0.000
#> GSM648678     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648679     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648681     2  0.0963      0.906 0.036 0.964 0.000 0.000 0.000
#> GSM648686     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648689     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648690     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648691     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648693     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648700     1  0.0290      0.871 0.992 0.008 0.000 0.000 0.000
#> GSM648630     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648632     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648639     2  0.3999      0.490 0.000 0.656 0.000 0.000 0.344
#> GSM648640     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648668     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648676     2  0.0703      0.914 0.024 0.976 0.000 0.000 0.000
#> GSM648692     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648694     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM648699     1  0.0451      0.870 0.988 0.008 0.000 0.004 0.000
#> GSM648701     2  0.0609      0.917 0.020 0.980 0.000 0.000 0.000
#> GSM648673     1  0.0451      0.870 0.988 0.008 0.000 0.004 0.000
#> GSM648677     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM648687     5  0.4305      0.745 0.000 0.000 0.000 0.488 0.512
#> GSM648688     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM648605     4  0.1410     0.5685 0.000 0.008 0.044 0.944 0.004 0.000
#> GSM648618     1  0.0000     1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648620     2  0.1059     0.9336 0.000 0.964 0.000 0.016 0.016 0.004
#> GSM648646     2  0.0000     0.9502 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648649     2  0.0000     0.9502 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648675     6  0.1340     0.8314 0.000 0.004 0.000 0.008 0.040 0.948
#> GSM648682     2  0.1059     0.9336 0.000 0.964 0.000 0.016 0.016 0.004
#> GSM648698     2  0.0964     0.9359 0.000 0.968 0.000 0.016 0.012 0.004
#> GSM648708     2  0.1059     0.9336 0.000 0.964 0.000 0.016 0.016 0.004
#> GSM648628     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648595     2  0.0000     0.9502 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648635     2  0.2728     0.8482 0.000 0.864 0.000 0.004 0.032 0.100
#> GSM648645     6  0.1152     0.8318 0.000 0.000 0.000 0.004 0.044 0.952
#> GSM648647     2  0.0000     0.9502 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648667     2  0.0000     0.9502 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648695     2  0.0964     0.9359 0.000 0.968 0.000 0.016 0.012 0.004
#> GSM648704     2  0.0000     0.9502 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648706     4  0.1700     0.5566 0.000 0.080 0.000 0.916 0.004 0.000
#> GSM648593     2  0.3114     0.8112 0.000 0.832 0.000 0.004 0.036 0.128
#> GSM648594     6  0.1226     0.8324 0.000 0.004 0.000 0.004 0.040 0.952
#> GSM648600     5  0.4344     0.2821 0.000 0.424 0.000 0.016 0.556 0.004
#> GSM648621     5  0.1340     0.8227 0.040 0.008 0.000 0.004 0.948 0.000
#> GSM648622     1  0.0000     1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648623     1  0.0000     1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648636     2  0.2101     0.8766 0.000 0.892 0.000 0.004 0.004 0.100
#> GSM648655     2  0.2445     0.8530 0.000 0.868 0.000 0.004 0.008 0.120
#> GSM648661     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648664     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648683     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648685     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648702     2  0.2261     0.8690 0.000 0.884 0.000 0.004 0.008 0.104
#> GSM648597     6  0.4093     0.2342 0.000 0.000 0.000 0.008 0.476 0.516
#> GSM648603     5  0.1663     0.8107 0.088 0.000 0.000 0.000 0.912 0.000
#> GSM648606     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648613     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648619     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648654     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648663     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648670     2  0.0000     0.9502 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648707     1  0.0000     1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648615     2  0.1059     0.9336 0.000 0.964 0.000 0.016 0.016 0.004
#> GSM648643     2  0.0000     0.9502 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648650     2  0.0000     0.9502 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648656     2  0.0000     0.9502 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648715     2  0.0000     0.9502 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648598     5  0.1049     0.8005 0.000 0.000 0.000 0.008 0.960 0.032
#> GSM648601     5  0.1141     0.8235 0.052 0.000 0.000 0.000 0.948 0.000
#> GSM648602     5  0.1501     0.8173 0.076 0.000 0.000 0.000 0.924 0.000
#> GSM648604     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648614     3  0.3351     0.5542 0.000 0.000 0.712 0.288 0.000 0.000
#> GSM648624     1  0.0000     1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648625     2  0.1059     0.9336 0.000 0.964 0.000 0.016 0.016 0.004
#> GSM648629     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648634     5  0.0993     0.8049 0.000 0.000 0.000 0.012 0.964 0.024
#> GSM648648     6  0.1226     0.8325 0.000 0.004 0.000 0.004 0.040 0.952
#> GSM648651     1  0.0000     1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648657     6  0.1226     0.8325 0.000 0.004 0.000 0.004 0.040 0.952
#> GSM648660     6  0.4095     0.2218 0.000 0.000 0.000 0.008 0.480 0.512
#> GSM648697     1  0.0000     1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648710     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648591     6  0.3041     0.7324 0.088 0.000 0.000 0.036 0.020 0.856
#> GSM648592     2  0.3165     0.8164 0.000 0.836 0.000 0.008 0.040 0.116
#> GSM648607     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648611     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648612     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648616     5  0.1141     0.8235 0.052 0.000 0.000 0.000 0.948 0.000
#> GSM648617     5  0.2886     0.7074 0.000 0.144 0.000 0.016 0.836 0.004
#> GSM648626     5  0.1444     0.8193 0.072 0.000 0.000 0.000 0.928 0.000
#> GSM648711     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648712     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648713     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648714     4  0.3717     0.2940 0.000 0.000 0.384 0.616 0.000 0.000
#> GSM648716     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648717     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648590     2  0.0000     0.9502 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648596     2  0.0000     0.9502 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648642     4  0.3864     0.0699 0.000 0.480 0.000 0.520 0.000 0.000
#> GSM648696     2  0.1059     0.9336 0.000 0.964 0.000 0.016 0.016 0.004
#> GSM648705     2  0.0146     0.9490 0.000 0.996 0.000 0.004 0.000 0.000
#> GSM648718     2  0.0000     0.9502 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648599     5  0.1444     0.8193 0.072 0.000 0.000 0.000 0.928 0.000
#> GSM648608     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648609     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648610     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648633     2  0.0146     0.9490 0.000 0.996 0.000 0.004 0.000 0.000
#> GSM648644     2  0.0000     0.9502 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648652     2  0.4347     0.5410 0.000 0.668 0.000 0.004 0.040 0.288
#> GSM648653     5  0.0922     0.8053 0.004 0.000 0.000 0.004 0.968 0.024
#> GSM648658     6  0.1152     0.8318 0.000 0.000 0.000 0.004 0.044 0.952
#> GSM648659     2  0.1949     0.8865 0.000 0.904 0.000 0.004 0.004 0.088
#> GSM648662     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648665     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648666     1  0.0000     1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648680     6  0.4863     0.1013 0.000 0.440 0.000 0.008 0.040 0.512
#> GSM648684     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648709     5  0.3622     0.5922 0.000 0.236 0.000 0.016 0.744 0.004
#> GSM648719     6  0.1226     0.8325 0.000 0.004 0.000 0.004 0.040 0.952
#> GSM648627     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648637     2  0.0964     0.9359 0.000 0.968 0.000 0.016 0.012 0.004
#> GSM648638     4  0.1485     0.5765 0.000 0.024 0.028 0.944 0.004 0.000
#> GSM648641     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648672     2  0.0000     0.9502 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648674     2  0.0146     0.9490 0.000 0.996 0.000 0.004 0.000 0.000
#> GSM648703     2  0.0000     0.9502 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648631     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648669     6  0.1552     0.8107 0.000 0.004 0.000 0.036 0.020 0.940
#> GSM648671     6  0.1552     0.8084 0.004 0.000 0.000 0.036 0.020 0.940
#> GSM648678     2  0.0000     0.9502 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648679     2  0.0000     0.9502 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648681     2  0.2213     0.8727 0.000 0.888 0.000 0.004 0.008 0.100
#> GSM648686     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648689     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648690     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648691     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648693     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648700     6  0.0508     0.8240 0.000 0.004 0.000 0.012 0.000 0.984
#> GSM648630     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648632     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648639     5  0.3855     0.5289 0.000 0.276 0.000 0.016 0.704 0.004
#> GSM648640     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648668     2  0.0000     0.9502 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648676     2  0.1674     0.9027 0.000 0.924 0.000 0.004 0.004 0.068
#> GSM648692     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648694     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648699     6  0.1552     0.8107 0.000 0.004 0.000 0.036 0.020 0.940
#> GSM648701     2  0.0935     0.9315 0.000 0.964 0.000 0.004 0.000 0.032
#> GSM648673     6  0.1552     0.8107 0.000 0.004 0.000 0.036 0.020 0.940
#> GSM648677     2  0.0000     0.9502 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648687     1  0.0000     1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648688     3  0.0000     0.9923 0.000 0.000 1.000 0.000 0.000 0.000

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-ATC-skmeans-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-ATC-skmeans-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-ATC-skmeans-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-ATC-skmeans-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-ATC-skmeans-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-ATC-skmeans-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-ATC-skmeans-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-ATC-skmeans-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-ATC-skmeans-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-ATC-skmeans-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-ATC-skmeans-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-ATC-skmeans-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-ATC-skmeans-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-ATC-skmeans-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-ATC-skmeans-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-ATC-skmeans-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-ATC-skmeans-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-ATC-skmeans-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-ATC-skmeans-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-ATC-skmeans-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk ATC-skmeans-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-ATC-skmeans-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-ATC-skmeans-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-ATC-skmeans-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-ATC-skmeans-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-ATC-skmeans-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk ATC-skmeans-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>               n disease.state(p) development.stage(p) other(p) k
#> ATC:skmeans 127           0.4263               0.7514 4.09e-05 2
#> ATC:skmeans 128           0.0708               0.5676 5.22e-07 3
#> ATC:skmeans 127           0.3472               0.5657 4.42e-07 4
#> ATC:skmeans 119           0.2500               0.3469 7.31e-08 5
#> ATC:skmeans 124           0.4141               0.0934 4.48e-07 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


ATC:pam**

The object with results only for a single top-value method and a single partition method can be extracted as:

res = res_list["ATC", "pam"]
# you can also extract it by
# res = res_list["ATC:pam"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 130 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#>   Subgroups are detected by 'pam' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 6.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk ATC-pam-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk ATC-pam-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           0.969       0.988         0.4531 0.549   0.549
#> 3 3 0.787           0.933       0.949         0.3999 0.790   0.626
#> 4 4 0.782           0.784       0.837         0.1035 0.940   0.838
#> 5 5 0.946           0.918       0.965         0.1054 0.834   0.534
#> 6 6 0.957           0.927       0.960         0.0306 0.951   0.794

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 6
#> attr(,"optional")
#> [1] 2 5

There is also optional best \(k\) = 2 5 that is worth to check.

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM648605     2   0.000      0.988 0.000 1.000
#> GSM648618     1   0.980      0.271 0.584 0.416
#> GSM648620     2   0.000      0.988 0.000 1.000
#> GSM648646     2   0.000      0.988 0.000 1.000
#> GSM648649     2   0.000      0.988 0.000 1.000
#> GSM648675     2   0.000      0.988 0.000 1.000
#> GSM648682     2   0.000      0.988 0.000 1.000
#> GSM648698     2   0.000      0.988 0.000 1.000
#> GSM648708     2   0.000      0.988 0.000 1.000
#> GSM648628     1   0.000      0.985 1.000 0.000
#> GSM648595     2   0.000      0.988 0.000 1.000
#> GSM648635     2   0.000      0.988 0.000 1.000
#> GSM648645     2   0.000      0.988 0.000 1.000
#> GSM648647     2   0.000      0.988 0.000 1.000
#> GSM648667     2   0.000      0.988 0.000 1.000
#> GSM648695     2   0.000      0.988 0.000 1.000
#> GSM648704     2   0.000      0.988 0.000 1.000
#> GSM648706     2   0.000      0.988 0.000 1.000
#> GSM648593     2   0.000      0.988 0.000 1.000
#> GSM648594     2   0.000      0.988 0.000 1.000
#> GSM648600     2   0.000      0.988 0.000 1.000
#> GSM648621     2   0.000      0.988 0.000 1.000
#> GSM648622     2   0.000      0.988 0.000 1.000
#> GSM648623     2   0.000      0.988 0.000 1.000
#> GSM648636     2   0.000      0.988 0.000 1.000
#> GSM648655     2   0.000      0.988 0.000 1.000
#> GSM648661     1   0.000      0.985 1.000 0.000
#> GSM648664     1   0.000      0.985 1.000 0.000
#> GSM648683     1   0.000      0.985 1.000 0.000
#> GSM648685     1   0.000      0.985 1.000 0.000
#> GSM648702     2   0.000      0.988 0.000 1.000
#> GSM648597     2   0.000      0.988 0.000 1.000
#> GSM648603     2   0.000      0.988 0.000 1.000
#> GSM648606     1   0.000      0.985 1.000 0.000
#> GSM648613     1   0.000      0.985 1.000 0.000
#> GSM648619     1   0.000      0.985 1.000 0.000
#> GSM648654     1   0.000      0.985 1.000 0.000
#> GSM648663     1   0.000      0.985 1.000 0.000
#> GSM648670     2   0.000      0.988 0.000 1.000
#> GSM648707     2   0.994      0.160 0.456 0.544
#> GSM648615     2   0.000      0.988 0.000 1.000
#> GSM648643     2   0.000      0.988 0.000 1.000
#> GSM648650     2   0.000      0.988 0.000 1.000
#> GSM648656     2   0.000      0.988 0.000 1.000
#> GSM648715     2   0.000      0.988 0.000 1.000
#> GSM648598     2   0.000      0.988 0.000 1.000
#> GSM648601     2   0.000      0.988 0.000 1.000
#> GSM648602     2   0.000      0.988 0.000 1.000
#> GSM648604     1   0.000      0.985 1.000 0.000
#> GSM648614     1   0.000      0.985 1.000 0.000
#> GSM648624     2   0.000      0.988 0.000 1.000
#> GSM648625     2   0.000      0.988 0.000 1.000
#> GSM648629     1   0.000      0.985 1.000 0.000
#> GSM648634     2   0.000      0.988 0.000 1.000
#> GSM648648     2   0.000      0.988 0.000 1.000
#> GSM648651     2   0.671      0.784 0.176 0.824
#> GSM648657     2   0.000      0.988 0.000 1.000
#> GSM648660     2   0.000      0.988 0.000 1.000
#> GSM648697     2   0.000      0.988 0.000 1.000
#> GSM648710     1   0.000      0.985 1.000 0.000
#> GSM648591     2   0.000      0.988 0.000 1.000
#> GSM648592     2   0.000      0.988 0.000 1.000
#> GSM648607     1   0.000      0.985 1.000 0.000
#> GSM648611     1   0.000      0.985 1.000 0.000
#> GSM648612     1   0.000      0.985 1.000 0.000
#> GSM648616     2   0.000      0.988 0.000 1.000
#> GSM648617     2   0.000      0.988 0.000 1.000
#> GSM648626     2   0.000      0.988 0.000 1.000
#> GSM648711     1   0.000      0.985 1.000 0.000
#> GSM648712     1   0.000      0.985 1.000 0.000
#> GSM648713     1   0.000      0.985 1.000 0.000
#> GSM648714     1   0.760      0.711 0.780 0.220
#> GSM648716     1   0.000      0.985 1.000 0.000
#> GSM648717     1   0.000      0.985 1.000 0.000
#> GSM648590     2   0.000      0.988 0.000 1.000
#> GSM648596     2   0.000      0.988 0.000 1.000
#> GSM648642     2   0.000      0.988 0.000 1.000
#> GSM648696     2   0.000      0.988 0.000 1.000
#> GSM648705     2   0.000      0.988 0.000 1.000
#> GSM648718     2   0.000      0.988 0.000 1.000
#> GSM648599     2   0.000      0.988 0.000 1.000
#> GSM648608     1   0.000      0.985 1.000 0.000
#> GSM648609     1   0.000      0.985 1.000 0.000
#> GSM648610     1   0.000      0.985 1.000 0.000
#> GSM648633     2   0.000      0.988 0.000 1.000
#> GSM648644     2   0.000      0.988 0.000 1.000
#> GSM648652     2   0.000      0.988 0.000 1.000
#> GSM648653     2   0.000      0.988 0.000 1.000
#> GSM648658     2   0.000      0.988 0.000 1.000
#> GSM648659     2   0.000      0.988 0.000 1.000
#> GSM648662     1   0.000      0.985 1.000 0.000
#> GSM648665     1   0.000      0.985 1.000 0.000
#> GSM648666     2   0.644      0.801 0.164 0.836
#> GSM648680     2   0.000      0.988 0.000 1.000
#> GSM648684     1   0.000      0.985 1.000 0.000
#> GSM648709     2   0.000      0.988 0.000 1.000
#> GSM648719     2   0.000      0.988 0.000 1.000
#> GSM648627     1   0.000      0.985 1.000 0.000
#> GSM648637     2   0.000      0.988 0.000 1.000
#> GSM648638     2   0.000      0.988 0.000 1.000
#> GSM648641     1   0.000      0.985 1.000 0.000
#> GSM648672     2   0.000      0.988 0.000 1.000
#> GSM648674     2   0.000      0.988 0.000 1.000
#> GSM648703     2   0.000      0.988 0.000 1.000
#> GSM648631     1   0.000      0.985 1.000 0.000
#> GSM648669     2   0.000      0.988 0.000 1.000
#> GSM648671     2   0.000      0.988 0.000 1.000
#> GSM648678     2   0.000      0.988 0.000 1.000
#> GSM648679     2   0.000      0.988 0.000 1.000
#> GSM648681     2   0.000      0.988 0.000 1.000
#> GSM648686     1   0.000      0.985 1.000 0.000
#> GSM648689     1   0.000      0.985 1.000 0.000
#> GSM648690     1   0.000      0.985 1.000 0.000
#> GSM648691     1   0.000      0.985 1.000 0.000
#> GSM648693     1   0.000      0.985 1.000 0.000
#> GSM648700     2   0.000      0.988 0.000 1.000
#> GSM648630     1   0.000      0.985 1.000 0.000
#> GSM648632     1   0.000      0.985 1.000 0.000
#> GSM648639     2   0.000      0.988 0.000 1.000
#> GSM648640     1   0.000      0.985 1.000 0.000
#> GSM648668     2   0.000      0.988 0.000 1.000
#> GSM648676     2   0.000      0.988 0.000 1.000
#> GSM648692     1   0.000      0.985 1.000 0.000
#> GSM648694     1   0.000      0.985 1.000 0.000
#> GSM648699     2   0.000      0.988 0.000 1.000
#> GSM648701     2   0.000      0.988 0.000 1.000
#> GSM648673     2   0.000      0.988 0.000 1.000
#> GSM648677     2   0.000      0.988 0.000 1.000
#> GSM648687     2   0.644      0.801 0.164 0.836
#> GSM648688     1   0.000      0.985 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM648605     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648618     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648620     1  0.4002      0.901 0.840 0.160 0.000
#> GSM648646     2  0.0000      0.977 0.000 1.000 0.000
#> GSM648649     1  0.4796      0.843 0.780 0.220 0.000
#> GSM648675     1  0.3816      0.908 0.852 0.148 0.000
#> GSM648682     2  0.0000      0.977 0.000 1.000 0.000
#> GSM648698     2  0.0000      0.977 0.000 1.000 0.000
#> GSM648708     1  0.3879      0.905 0.848 0.152 0.000
#> GSM648628     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648595     2  0.0000      0.977 0.000 1.000 0.000
#> GSM648635     1  0.3879      0.905 0.848 0.152 0.000
#> GSM648645     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648647     2  0.0000      0.977 0.000 1.000 0.000
#> GSM648667     2  0.0000      0.977 0.000 1.000 0.000
#> GSM648695     2  0.0000      0.977 0.000 1.000 0.000
#> GSM648704     2  0.0000      0.977 0.000 1.000 0.000
#> GSM648706     1  0.5905      0.636 0.648 0.352 0.000
#> GSM648593     1  0.3879      0.905 0.848 0.152 0.000
#> GSM648594     1  0.3752      0.908 0.856 0.144 0.000
#> GSM648600     1  0.3816      0.908 0.852 0.148 0.000
#> GSM648621     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648622     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648623     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648636     1  0.3816      0.908 0.852 0.148 0.000
#> GSM648655     1  0.3816      0.908 0.852 0.148 0.000
#> GSM648661     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648664     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648683     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648685     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648702     1  0.3941      0.903 0.844 0.156 0.000
#> GSM648597     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648603     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648606     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648613     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648619     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648654     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648663     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648670     2  0.4702      0.679 0.212 0.788 0.000
#> GSM648707     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648615     1  0.5733      0.691 0.676 0.324 0.000
#> GSM648643     2  0.0000      0.977 0.000 1.000 0.000
#> GSM648650     2  0.0000      0.977 0.000 1.000 0.000
#> GSM648656     2  0.0000      0.977 0.000 1.000 0.000
#> GSM648715     2  0.0000      0.977 0.000 1.000 0.000
#> GSM648598     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648601     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648602     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648604     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648614     3  0.4702      0.754 0.212 0.000 0.788
#> GSM648624     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648625     1  0.4062      0.898 0.836 0.164 0.000
#> GSM648629     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648634     1  0.3816      0.908 0.852 0.148 0.000
#> GSM648648     1  0.3816      0.908 0.852 0.148 0.000
#> GSM648651     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648657     1  0.3816      0.908 0.852 0.148 0.000
#> GSM648660     1  0.3752      0.908 0.856 0.144 0.000
#> GSM648697     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648710     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648591     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648592     1  0.3816      0.908 0.852 0.148 0.000
#> GSM648607     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648611     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648612     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648616     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648617     1  0.3816      0.908 0.852 0.148 0.000
#> GSM648626     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648711     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648712     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648713     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648714     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648716     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648717     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648590     2  0.0000      0.977 0.000 1.000 0.000
#> GSM648596     2  0.0000      0.977 0.000 1.000 0.000
#> GSM648642     1  0.3816      0.908 0.852 0.148 0.000
#> GSM648696     1  0.4002      0.901 0.840 0.160 0.000
#> GSM648705     1  0.4235      0.888 0.824 0.176 0.000
#> GSM648718     2  0.0000      0.977 0.000 1.000 0.000
#> GSM648599     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648608     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648609     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648610     3  0.0237      0.991 0.004 0.000 0.996
#> GSM648633     1  0.3941      0.903 0.844 0.156 0.000
#> GSM648644     2  0.0000      0.977 0.000 1.000 0.000
#> GSM648652     1  0.3816      0.908 0.852 0.148 0.000
#> GSM648653     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648658     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648659     1  0.4002      0.901 0.840 0.160 0.000
#> GSM648662     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648665     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648666     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648680     1  0.3816      0.908 0.852 0.148 0.000
#> GSM648684     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648709     1  0.3816      0.908 0.852 0.148 0.000
#> GSM648719     1  0.3192      0.905 0.888 0.112 0.000
#> GSM648627     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648637     2  0.0000      0.977 0.000 1.000 0.000
#> GSM648638     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648641     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648672     2  0.0000      0.977 0.000 1.000 0.000
#> GSM648674     2  0.0000      0.977 0.000 1.000 0.000
#> GSM648703     2  0.0000      0.977 0.000 1.000 0.000
#> GSM648631     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648669     1  0.3816      0.908 0.852 0.148 0.000
#> GSM648671     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648678     2  0.0000      0.977 0.000 1.000 0.000
#> GSM648679     2  0.0000      0.977 0.000 1.000 0.000
#> GSM648681     1  0.4002      0.901 0.840 0.160 0.000
#> GSM648686     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648689     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648690     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648691     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648693     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648700     1  0.3816      0.908 0.852 0.148 0.000
#> GSM648630     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648632     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648639     1  0.3816      0.908 0.852 0.148 0.000
#> GSM648640     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648668     2  0.0000      0.977 0.000 1.000 0.000
#> GSM648676     2  0.5327      0.550 0.272 0.728 0.000
#> GSM648692     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648694     3  0.0000      0.995 0.000 0.000 1.000
#> GSM648699     1  0.3816      0.908 0.852 0.148 0.000
#> GSM648701     1  0.5431      0.757 0.716 0.284 0.000
#> GSM648673     1  0.3816      0.908 0.852 0.148 0.000
#> GSM648677     2  0.0000      0.977 0.000 1.000 0.000
#> GSM648687     1  0.0000      0.891 1.000 0.000 0.000
#> GSM648688     3  0.0000      0.995 0.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM648605     1  0.0000     0.7166 1.000 0.000 0.000 0.000
#> GSM648618     1  0.3444     0.4874 0.816 0.000 0.000 0.184
#> GSM648620     1  0.5150     0.7865 0.596 0.008 0.396 0.000
#> GSM648646     2  0.0000     0.8238 0.000 1.000 0.000 0.000
#> GSM648649     1  0.5150     0.7865 0.596 0.008 0.396 0.000
#> GSM648675     1  0.4843     0.7908 0.604 0.000 0.396 0.000
#> GSM648682     2  0.0000     0.8238 0.000 1.000 0.000 0.000
#> GSM648698     2  0.4843     0.6143 0.000 0.604 0.396 0.000
#> GSM648708     1  0.5016     0.7888 0.600 0.004 0.396 0.000
#> GSM648628     3  0.4843     0.8732 0.000 0.000 0.604 0.396
#> GSM648595     2  0.4356     0.6936 0.000 0.708 0.292 0.000
#> GSM648635     1  0.5016     0.7888 0.600 0.004 0.396 0.000
#> GSM648645     1  0.0000     0.7166 1.000 0.000 0.000 0.000
#> GSM648647     2  0.4624     0.6616 0.000 0.660 0.340 0.000
#> GSM648667     2  0.0000     0.8238 0.000 1.000 0.000 0.000
#> GSM648695     2  0.0000     0.8238 0.000 1.000 0.000 0.000
#> GSM648704     2  0.0000     0.8238 0.000 1.000 0.000 0.000
#> GSM648706     1  0.7609     0.5036 0.404 0.200 0.396 0.000
#> GSM648593     1  0.5016     0.7888 0.600 0.004 0.396 0.000
#> GSM648594     1  0.4804     0.7898 0.616 0.000 0.384 0.000
#> GSM648600     1  0.4843     0.7908 0.604 0.000 0.396 0.000
#> GSM648621     1  0.0000     0.7166 1.000 0.000 0.000 0.000
#> GSM648622     1  0.0000     0.7166 1.000 0.000 0.000 0.000
#> GSM648623     1  0.0000     0.7166 1.000 0.000 0.000 0.000
#> GSM648636     1  0.4843     0.7908 0.604 0.000 0.396 0.000
#> GSM648655     1  0.4843     0.7908 0.604 0.000 0.396 0.000
#> GSM648661     4  0.0000     0.9399 0.000 0.000 0.000 1.000
#> GSM648664     4  0.0000     0.9399 0.000 0.000 0.000 1.000
#> GSM648683     4  0.0000     0.9399 0.000 0.000 0.000 1.000
#> GSM648685     4  0.0000     0.9399 0.000 0.000 0.000 1.000
#> GSM648702     1  0.5150     0.7865 0.596 0.008 0.396 0.000
#> GSM648597     1  0.0000     0.7166 1.000 0.000 0.000 0.000
#> GSM648603     1  0.0000     0.7166 1.000 0.000 0.000 0.000
#> GSM648606     4  0.0000     0.9399 0.000 0.000 0.000 1.000
#> GSM648613     4  0.0000     0.9399 0.000 0.000 0.000 1.000
#> GSM648619     4  0.0000     0.9399 0.000 0.000 0.000 1.000
#> GSM648654     4  0.0921     0.9053 0.000 0.000 0.028 0.972
#> GSM648663     4  0.0000     0.9399 0.000 0.000 0.000 1.000
#> GSM648670     2  0.7648     0.0834 0.208 0.396 0.396 0.000
#> GSM648707     1  0.0000     0.7166 1.000 0.000 0.000 0.000
#> GSM648615     1  0.5571     0.7718 0.580 0.024 0.396 0.000
#> GSM648643     2  0.0000     0.8238 0.000 1.000 0.000 0.000
#> GSM648650     2  0.4843     0.6143 0.000 0.604 0.396 0.000
#> GSM648656     2  0.0000     0.8238 0.000 1.000 0.000 0.000
#> GSM648715     2  0.4250     0.7022 0.000 0.724 0.276 0.000
#> GSM648598     1  0.0000     0.7166 1.000 0.000 0.000 0.000
#> GSM648601     1  0.0000     0.7166 1.000 0.000 0.000 0.000
#> GSM648602     1  0.0000     0.7166 1.000 0.000 0.000 0.000
#> GSM648604     4  0.0000     0.9399 0.000 0.000 0.000 1.000
#> GSM648614     4  0.4843     0.3149 0.396 0.000 0.000 0.604
#> GSM648624     1  0.0000     0.7166 1.000 0.000 0.000 0.000
#> GSM648625     1  0.5150     0.7865 0.596 0.008 0.396 0.000
#> GSM648629     4  0.0000     0.9399 0.000 0.000 0.000 1.000
#> GSM648634     1  0.4843     0.7908 0.604 0.000 0.396 0.000
#> GSM648648     1  0.4843     0.7908 0.604 0.000 0.396 0.000
#> GSM648651     1  0.0000     0.7166 1.000 0.000 0.000 0.000
#> GSM648657     1  0.4843     0.7908 0.604 0.000 0.396 0.000
#> GSM648660     1  0.4830     0.7907 0.608 0.000 0.392 0.000
#> GSM648697     1  0.0000     0.7166 1.000 0.000 0.000 0.000
#> GSM648710     4  0.0000     0.9399 0.000 0.000 0.000 1.000
#> GSM648591     1  0.0000     0.7166 1.000 0.000 0.000 0.000
#> GSM648592     1  0.4843     0.7908 0.604 0.000 0.396 0.000
#> GSM648607     4  0.0000     0.9399 0.000 0.000 0.000 1.000
#> GSM648611     3  0.4843     0.8732 0.000 0.000 0.604 0.396
#> GSM648612     4  0.0000     0.9399 0.000 0.000 0.000 1.000
#> GSM648616     1  0.0000     0.7166 1.000 0.000 0.000 0.000
#> GSM648617     1  0.4843     0.7908 0.604 0.000 0.396 0.000
#> GSM648626     1  0.0000     0.7166 1.000 0.000 0.000 0.000
#> GSM648711     4  0.1022     0.8997 0.000 0.000 0.032 0.968
#> GSM648712     4  0.0000     0.9399 0.000 0.000 0.000 1.000
#> GSM648713     4  0.0000     0.9399 0.000 0.000 0.000 1.000
#> GSM648714     4  0.4855     0.3099 0.400 0.000 0.000 0.600
#> GSM648716     4  0.1118     0.8937 0.000 0.000 0.036 0.964
#> GSM648717     4  0.0000     0.9399 0.000 0.000 0.000 1.000
#> GSM648590     2  0.4790     0.6323 0.000 0.620 0.380 0.000
#> GSM648596     2  0.0000     0.8238 0.000 1.000 0.000 0.000
#> GSM648642     1  0.4843     0.7908 0.604 0.000 0.396 0.000
#> GSM648696     1  0.5150     0.7865 0.596 0.008 0.396 0.000
#> GSM648705     1  0.5150     0.7865 0.596 0.008 0.396 0.000
#> GSM648718     2  0.4843     0.6143 0.000 0.604 0.396 0.000
#> GSM648599     1  0.0000     0.7166 1.000 0.000 0.000 0.000
#> GSM648608     4  0.0000     0.9399 0.000 0.000 0.000 1.000
#> GSM648609     4  0.0000     0.9399 0.000 0.000 0.000 1.000
#> GSM648610     4  0.0188     0.9343 0.004 0.000 0.000 0.996
#> GSM648633     1  0.5150     0.7865 0.596 0.008 0.396 0.000
#> GSM648644     2  0.0000     0.8238 0.000 1.000 0.000 0.000
#> GSM648652     1  0.4843     0.7908 0.604 0.000 0.396 0.000
#> GSM648653     1  0.0000     0.7166 1.000 0.000 0.000 0.000
#> GSM648658     1  0.0000     0.7166 1.000 0.000 0.000 0.000
#> GSM648659     1  0.5150     0.7865 0.596 0.008 0.396 0.000
#> GSM648662     4  0.0000     0.9399 0.000 0.000 0.000 1.000
#> GSM648665     4  0.0000     0.9399 0.000 0.000 0.000 1.000
#> GSM648666     1  0.0000     0.7166 1.000 0.000 0.000 0.000
#> GSM648680     1  0.4843     0.7908 0.604 0.000 0.396 0.000
#> GSM648684     4  0.0000     0.9399 0.000 0.000 0.000 1.000
#> GSM648709     1  0.4843     0.7908 0.604 0.000 0.396 0.000
#> GSM648719     1  0.4277     0.7689 0.720 0.000 0.280 0.000
#> GSM648627     4  0.0469     0.9261 0.000 0.000 0.012 0.988
#> GSM648637     2  0.0000     0.8238 0.000 1.000 0.000 0.000
#> GSM648638     1  0.0188     0.7172 0.996 0.000 0.004 0.000
#> GSM648641     4  0.0000     0.9399 0.000 0.000 0.000 1.000
#> GSM648672     2  0.0000     0.8238 0.000 1.000 0.000 0.000
#> GSM648674     2  0.0000     0.8238 0.000 1.000 0.000 0.000
#> GSM648703     2  0.0000     0.8238 0.000 1.000 0.000 0.000
#> GSM648631     3  0.4843     0.8732 0.000 0.000 0.604 0.396
#> GSM648669     1  0.4843     0.7908 0.604 0.000 0.396 0.000
#> GSM648671     1  0.0000     0.7166 1.000 0.000 0.000 0.000
#> GSM648678     2  0.0000     0.8238 0.000 1.000 0.000 0.000
#> GSM648679     2  0.4134     0.7107 0.000 0.740 0.260 0.000
#> GSM648681     1  0.5150     0.7865 0.596 0.008 0.396 0.000
#> GSM648686     3  0.4843     0.8732 0.000 0.000 0.604 0.396
#> GSM648689     3  0.4855     0.8667 0.000 0.000 0.600 0.400
#> GSM648690     3  0.4843     0.8732 0.000 0.000 0.604 0.396
#> GSM648691     3  0.4843     0.8732 0.000 0.000 0.604 0.396
#> GSM648693     3  0.4843     0.8732 0.000 0.000 0.604 0.396
#> GSM648700     1  0.4843     0.7908 0.604 0.000 0.396 0.000
#> GSM648630     3  0.4843     0.8732 0.000 0.000 0.604 0.396
#> GSM648632     3  0.4843     0.8732 0.000 0.000 0.604 0.396
#> GSM648639     1  0.4843     0.7908 0.604 0.000 0.396 0.000
#> GSM648640     4  0.0000     0.9399 0.000 0.000 0.000 1.000
#> GSM648668     2  0.0000     0.8238 0.000 1.000 0.000 0.000
#> GSM648676     3  0.7835    -0.4401 0.268 0.336 0.396 0.000
#> GSM648692     3  0.4843     0.8732 0.000 0.000 0.604 0.396
#> GSM648694     3  0.4843     0.8732 0.000 0.000 0.604 0.396
#> GSM648699     1  0.4843     0.7908 0.604 0.000 0.396 0.000
#> GSM648701     1  0.5376     0.7797 0.588 0.016 0.396 0.000
#> GSM648673     1  0.4843     0.7908 0.604 0.000 0.396 0.000
#> GSM648677     2  0.0000     0.8238 0.000 1.000 0.000 0.000
#> GSM648687     1  0.0000     0.7166 1.000 0.000 0.000 0.000
#> GSM648688     3  0.4843     0.8732 0.000 0.000 0.604 0.396

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM648605     5  0.1410      0.884 0.000 0.000 0.000 0.060 0.940
#> GSM648618     5  0.0000      0.954 0.000 0.000 0.000 0.000 1.000
#> GSM648620     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648646     2  0.0000      0.947 0.000 1.000 0.000 0.000 0.000
#> GSM648649     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648675     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648682     2  0.0000      0.947 0.000 1.000 0.000 0.000 0.000
#> GSM648698     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648708     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648628     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM648595     4  0.2074      0.882 0.000 0.104 0.000 0.896 0.000
#> GSM648635     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648645     5  0.0000      0.954 0.000 0.000 0.000 0.000 1.000
#> GSM648647     2  0.4101      0.437 0.000 0.628 0.000 0.372 0.000
#> GSM648667     2  0.0000      0.947 0.000 1.000 0.000 0.000 0.000
#> GSM648695     2  0.0000      0.947 0.000 1.000 0.000 0.000 0.000
#> GSM648704     2  0.0000      0.947 0.000 1.000 0.000 0.000 0.000
#> GSM648706     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648593     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648594     4  0.0404      0.975 0.000 0.000 0.000 0.988 0.012
#> GSM648600     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648621     5  0.0000      0.954 0.000 0.000 0.000 0.000 1.000
#> GSM648622     5  0.0000      0.954 0.000 0.000 0.000 0.000 1.000
#> GSM648623     5  0.0000      0.954 0.000 0.000 0.000 0.000 1.000
#> GSM648636     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648655     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648661     1  0.3336      0.731 0.772 0.000 0.228 0.000 0.000
#> GSM648664     1  0.0000      0.912 1.000 0.000 0.000 0.000 0.000
#> GSM648683     1  0.0000      0.912 1.000 0.000 0.000 0.000 0.000
#> GSM648685     1  0.0000      0.912 1.000 0.000 0.000 0.000 0.000
#> GSM648702     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648597     5  0.0000      0.954 0.000 0.000 0.000 0.000 1.000
#> GSM648603     5  0.0000      0.954 0.000 0.000 0.000 0.000 1.000
#> GSM648606     1  0.0000      0.912 1.000 0.000 0.000 0.000 0.000
#> GSM648613     1  0.0000      0.912 1.000 0.000 0.000 0.000 0.000
#> GSM648619     1  0.0000      0.912 1.000 0.000 0.000 0.000 0.000
#> GSM648654     1  0.4201      0.449 0.592 0.000 0.408 0.000 0.000
#> GSM648663     1  0.0000      0.912 1.000 0.000 0.000 0.000 0.000
#> GSM648670     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648707     5  0.0000      0.954 0.000 0.000 0.000 0.000 1.000
#> GSM648615     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648643     2  0.0000      0.947 0.000 1.000 0.000 0.000 0.000
#> GSM648650     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648656     2  0.0000      0.947 0.000 1.000 0.000 0.000 0.000
#> GSM648715     2  0.3707      0.599 0.000 0.716 0.000 0.284 0.000
#> GSM648598     5  0.0000      0.954 0.000 0.000 0.000 0.000 1.000
#> GSM648601     5  0.0000      0.954 0.000 0.000 0.000 0.000 1.000
#> GSM648602     5  0.0000      0.954 0.000 0.000 0.000 0.000 1.000
#> GSM648604     1  0.0000      0.912 1.000 0.000 0.000 0.000 0.000
#> GSM648614     1  0.0000      0.912 1.000 0.000 0.000 0.000 0.000
#> GSM648624     5  0.0000      0.954 0.000 0.000 0.000 0.000 1.000
#> GSM648625     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648629     1  0.0000      0.912 1.000 0.000 0.000 0.000 0.000
#> GSM648634     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648648     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648651     5  0.0000      0.954 0.000 0.000 0.000 0.000 1.000
#> GSM648657     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648660     4  0.0162      0.983 0.000 0.000 0.000 0.996 0.004
#> GSM648697     5  0.0000      0.954 0.000 0.000 0.000 0.000 1.000
#> GSM648710     1  0.3074      0.763 0.804 0.000 0.196 0.000 0.000
#> GSM648591     5  0.0000      0.954 0.000 0.000 0.000 0.000 1.000
#> GSM648592     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648607     1  0.0000      0.912 1.000 0.000 0.000 0.000 0.000
#> GSM648611     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM648612     1  0.0000      0.912 1.000 0.000 0.000 0.000 0.000
#> GSM648616     5  0.0000      0.954 0.000 0.000 0.000 0.000 1.000
#> GSM648617     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648626     5  0.0000      0.954 0.000 0.000 0.000 0.000 1.000
#> GSM648711     1  0.4201      0.449 0.592 0.000 0.408 0.000 0.000
#> GSM648712     1  0.0000      0.912 1.000 0.000 0.000 0.000 0.000
#> GSM648713     1  0.0000      0.912 1.000 0.000 0.000 0.000 0.000
#> GSM648714     5  0.4294      0.110 0.468 0.000 0.000 0.000 0.532
#> GSM648716     1  0.4201      0.449 0.592 0.000 0.408 0.000 0.000
#> GSM648717     1  0.0000      0.912 1.000 0.000 0.000 0.000 0.000
#> GSM648590     4  0.2891      0.778 0.000 0.176 0.000 0.824 0.000
#> GSM648596     2  0.0000      0.947 0.000 1.000 0.000 0.000 0.000
#> GSM648642     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648696     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648705     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648718     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648599     5  0.0000      0.954 0.000 0.000 0.000 0.000 1.000
#> GSM648608     1  0.0000      0.912 1.000 0.000 0.000 0.000 0.000
#> GSM648609     1  0.0000      0.912 1.000 0.000 0.000 0.000 0.000
#> GSM648610     1  0.0000      0.912 1.000 0.000 0.000 0.000 0.000
#> GSM648633     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648644     2  0.0000      0.947 0.000 1.000 0.000 0.000 0.000
#> GSM648652     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648653     5  0.0000      0.954 0.000 0.000 0.000 0.000 1.000
#> GSM648658     5  0.0000      0.954 0.000 0.000 0.000 0.000 1.000
#> GSM648659     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648662     1  0.0000      0.912 1.000 0.000 0.000 0.000 0.000
#> GSM648665     1  0.0000      0.912 1.000 0.000 0.000 0.000 0.000
#> GSM648666     5  0.0000      0.954 0.000 0.000 0.000 0.000 1.000
#> GSM648680     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648684     1  0.0000      0.912 1.000 0.000 0.000 0.000 0.000
#> GSM648709     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648719     4  0.2230      0.860 0.000 0.000 0.000 0.884 0.116
#> GSM648627     1  0.4182      0.466 0.600 0.000 0.400 0.000 0.000
#> GSM648637     2  0.0000      0.947 0.000 1.000 0.000 0.000 0.000
#> GSM648638     5  0.4182      0.328 0.000 0.000 0.000 0.400 0.600
#> GSM648641     1  0.1544      0.870 0.932 0.000 0.068 0.000 0.000
#> GSM648672     2  0.0000      0.947 0.000 1.000 0.000 0.000 0.000
#> GSM648674     2  0.0000      0.947 0.000 1.000 0.000 0.000 0.000
#> GSM648703     2  0.0000      0.947 0.000 1.000 0.000 0.000 0.000
#> GSM648631     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM648669     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648671     5  0.0000      0.954 0.000 0.000 0.000 0.000 1.000
#> GSM648678     2  0.0000      0.947 0.000 1.000 0.000 0.000 0.000
#> GSM648679     4  0.2516      0.837 0.000 0.140 0.000 0.860 0.000
#> GSM648681     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648686     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM648689     3  0.0162      0.995 0.004 0.000 0.996 0.000 0.000
#> GSM648690     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM648691     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM648693     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM648700     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648630     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM648632     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM648639     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648640     1  0.3366      0.726 0.768 0.000 0.232 0.000 0.000
#> GSM648668     2  0.0000      0.947 0.000 1.000 0.000 0.000 0.000
#> GSM648676     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648692     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM648694     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM648699     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648701     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648673     4  0.0000      0.986 0.000 0.000 0.000 1.000 0.000
#> GSM648677     2  0.0000      0.947 0.000 1.000 0.000 0.000 0.000
#> GSM648687     5  0.0000      0.954 0.000 0.000 0.000 0.000 1.000
#> GSM648688     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM648605     1  0.4985     0.5296 0.628 0.000 0.012 0.288 0.072 0.000
#> GSM648618     4  0.0000     1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648620     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648646     2  0.0000     0.9425 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648649     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648675     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648682     2  0.0000     0.9425 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648698     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648708     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648628     5  0.2300     0.8670 0.000 0.000 0.144 0.000 0.856 0.000
#> GSM648595     6  0.1863     0.8848 0.000 0.104 0.000 0.000 0.000 0.896
#> GSM648635     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648645     4  0.0000     1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648647     2  0.3684     0.4375 0.000 0.628 0.000 0.000 0.000 0.372
#> GSM648667     2  0.0000     0.9425 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648695     2  0.0000     0.9425 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648704     2  0.0000     0.9425 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648706     6  0.1802     0.9149 0.000 0.000 0.012 0.000 0.072 0.916
#> GSM648593     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648594     6  0.0363     0.9724 0.000 0.000 0.000 0.012 0.000 0.988
#> GSM648600     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648621     4  0.0000     1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648622     4  0.0000     1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648623     4  0.0000     1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648636     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648655     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648661     5  0.1531     0.9198 0.004 0.000 0.068 0.000 0.928 0.000
#> GSM648664     1  0.2003     0.8379 0.884 0.000 0.000 0.000 0.116 0.000
#> GSM648683     1  0.0000     0.8803 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648685     1  0.0000     0.8803 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648702     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648597     4  0.0000     1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648603     4  0.0000     1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648606     1  0.0000     0.8803 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648613     1  0.1663     0.8600 0.912 0.000 0.000 0.000 0.088 0.000
#> GSM648619     5  0.1610     0.8927 0.084 0.000 0.000 0.000 0.916 0.000
#> GSM648654     5  0.1444     0.9192 0.000 0.000 0.072 0.000 0.928 0.000
#> GSM648663     1  0.1610     0.8620 0.916 0.000 0.000 0.000 0.084 0.000
#> GSM648670     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648707     4  0.0000     1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648615     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648643     2  0.0000     0.9425 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648650     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648656     2  0.0000     0.9425 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648715     2  0.3330     0.5623 0.000 0.716 0.000 0.000 0.000 0.284
#> GSM648598     4  0.0000     1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648601     4  0.0000     1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648602     4  0.0000     1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648604     1  0.1610     0.8620 0.916 0.000 0.000 0.000 0.084 0.000
#> GSM648614     1  0.1802     0.8338 0.916 0.000 0.012 0.000 0.072 0.000
#> GSM648624     4  0.0000     1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648625     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648629     5  0.1610     0.8927 0.084 0.000 0.000 0.000 0.916 0.000
#> GSM648634     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648648     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648651     4  0.0000     1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648657     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648660     6  0.0146     0.9791 0.000 0.000 0.000 0.004 0.000 0.996
#> GSM648697     4  0.0000     1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648710     5  0.1625     0.9190 0.012 0.000 0.060 0.000 0.928 0.000
#> GSM648591     4  0.0000     1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648592     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648607     5  0.2219     0.8510 0.136 0.000 0.000 0.000 0.864 0.000
#> GSM648611     5  0.2562     0.8391 0.000 0.000 0.172 0.000 0.828 0.000
#> GSM648612     1  0.3864     0.0275 0.520 0.000 0.000 0.000 0.480 0.000
#> GSM648616     4  0.0000     1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648617     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648626     4  0.0000     1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648711     5  0.1444     0.9192 0.000 0.000 0.072 0.000 0.928 0.000
#> GSM648712     5  0.1610     0.8927 0.084 0.000 0.000 0.000 0.916 0.000
#> GSM648713     5  0.2219     0.8510 0.136 0.000 0.000 0.000 0.864 0.000
#> GSM648714     1  0.1802     0.8338 0.916 0.000 0.012 0.000 0.072 0.000
#> GSM648716     5  0.1444     0.9192 0.000 0.000 0.072 0.000 0.928 0.000
#> GSM648717     1  0.0000     0.8803 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648590     6  0.2597     0.7810 0.000 0.176 0.000 0.000 0.000 0.824
#> GSM648596     2  0.0000     0.9425 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648642     6  0.1802     0.9149 0.000 0.000 0.012 0.000 0.072 0.916
#> GSM648696     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648705     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648718     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648599     4  0.0000     1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648608     1  0.1663     0.8600 0.912 0.000 0.000 0.000 0.088 0.000
#> GSM648609     1  0.1663     0.8600 0.912 0.000 0.000 0.000 0.088 0.000
#> GSM648610     1  0.0000     0.8803 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648633     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648644     2  0.0000     0.9425 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648652     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648653     4  0.0000     1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648658     4  0.0000     1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648659     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648662     1  0.0000     0.8803 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648665     1  0.0000     0.8803 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648666     4  0.0000     1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648680     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648684     1  0.0000     0.8803 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648709     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648719     6  0.2003     0.8591 0.000 0.000 0.000 0.116 0.000 0.884
#> GSM648627     5  0.1444     0.9192 0.000 0.000 0.072 0.000 0.928 0.000
#> GSM648637     2  0.0000     0.9425 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648638     1  0.4949     0.5443 0.636 0.000 0.012 0.280 0.072 0.000
#> GSM648641     5  0.1531     0.9008 0.068 0.000 0.004 0.000 0.928 0.000
#> GSM648672     2  0.0000     0.9425 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648674     2  0.0000     0.9425 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648703     2  0.0000     0.9425 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648631     3  0.0363     1.0000 0.000 0.000 0.988 0.000 0.012 0.000
#> GSM648669     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648671     4  0.0000     1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648678     2  0.0000     0.9425 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648679     6  0.2260     0.8402 0.000 0.140 0.000 0.000 0.000 0.860
#> GSM648681     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648686     5  0.3288     0.7070 0.000 0.000 0.276 0.000 0.724 0.000
#> GSM648689     5  0.2003     0.8918 0.000 0.000 0.116 0.000 0.884 0.000
#> GSM648690     3  0.0363     1.0000 0.000 0.000 0.988 0.000 0.012 0.000
#> GSM648691     3  0.0363     1.0000 0.000 0.000 0.988 0.000 0.012 0.000
#> GSM648693     3  0.0363     1.0000 0.000 0.000 0.988 0.000 0.012 0.000
#> GSM648700     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648630     3  0.0363     1.0000 0.000 0.000 0.988 0.000 0.012 0.000
#> GSM648632     3  0.0363     1.0000 0.000 0.000 0.988 0.000 0.012 0.000
#> GSM648639     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648640     5  0.1531     0.9198 0.004 0.000 0.068 0.000 0.928 0.000
#> GSM648668     2  0.0000     0.9425 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648676     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648692     3  0.0363     1.0000 0.000 0.000 0.988 0.000 0.012 0.000
#> GSM648694     3  0.0363     1.0000 0.000 0.000 0.988 0.000 0.012 0.000
#> GSM648699     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648701     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648673     6  0.0000     0.9824 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648677     2  0.0000     0.9425 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM648687     4  0.0000     1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM648688     3  0.0363     1.0000 0.000 0.000 0.988 0.000 0.012 0.000

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-ATC-pam-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-ATC-pam-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-ATC-pam-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-ATC-pam-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-ATC-pam-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-ATC-pam-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-ATC-pam-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-ATC-pam-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-ATC-pam-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-ATC-pam-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-ATC-pam-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-ATC-pam-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-ATC-pam-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-ATC-pam-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-ATC-pam-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-ATC-pam-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-ATC-pam-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-ATC-pam-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)
#> Error in mat[ceiling(1:nr/h_ratio), ceiling(1:nc/w_ratio), drop = FALSE]: subscript out of bounds

plot of chunk tab-ATC-pam-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-ATC-pam-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk ATC-pam-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-ATC-pam-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-ATC-pam-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-ATC-pam-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-ATC-pam-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-ATC-pam-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk ATC-pam-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>           n disease.state(p) development.stage(p) other(p) k
#> ATC:pam 128         4.49e-01                0.231 8.41e-06 2
#> ATC:pam 130         9.46e-02                0.200 8.30e-09 3
#> ATC:pam 125         3.75e-07                0.221 1.46e-14 4
#> ATC:pam 123         5.31e-07                0.317 1.49e-10 5
#> ATC:pam 128         6.67e-07                0.236 2.25e-12 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


ATC:mclust**

The object with results only for a single top-value method and a single partition method can be extracted as:

res = res_list["ATC", "mclust"]
# you can also extract it by
# res = res_list["ATC:mclust"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 130 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#>   Subgroups are detected by 'mclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 3.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk ATC-mclust-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk ATC-mclust-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           1.000       1.000         0.4658 0.535   0.535
#> 3 3 1.000           0.991       0.982         0.4067 0.805   0.636
#> 4 4 0.893           0.860       0.940         0.0964 0.953   0.861
#> 5 5 0.790           0.704       0.830         0.0813 0.887   0.628
#> 6 6 0.771           0.682       0.813         0.0285 0.931   0.714

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 3
#> attr(,"optional")
#> [1] 2

There is also optional best \(k\) = 2 that is worth to check.

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette p1 p2
#> GSM648605     1       0          1  1  0
#> GSM648618     2       0          1  0  1
#> GSM648620     2       0          1  0  1
#> GSM648646     2       0          1  0  1
#> GSM648649     2       0          1  0  1
#> GSM648675     2       0          1  0  1
#> GSM648682     2       0          1  0  1
#> GSM648698     2       0          1  0  1
#> GSM648708     2       0          1  0  1
#> GSM648628     1       0          1  1  0
#> GSM648595     2       0          1  0  1
#> GSM648635     2       0          1  0  1
#> GSM648645     2       0          1  0  1
#> GSM648647     2       0          1  0  1
#> GSM648667     2       0          1  0  1
#> GSM648695     2       0          1  0  1
#> GSM648704     2       0          1  0  1
#> GSM648706     1       0          1  1  0
#> GSM648593     2       0          1  0  1
#> GSM648594     2       0          1  0  1
#> GSM648600     2       0          1  0  1
#> GSM648621     2       0          1  0  1
#> GSM648622     2       0          1  0  1
#> GSM648623     2       0          1  0  1
#> GSM648636     2       0          1  0  1
#> GSM648655     2       0          1  0  1
#> GSM648661     1       0          1  1  0
#> GSM648664     1       0          1  1  0
#> GSM648683     1       0          1  1  0
#> GSM648685     1       0          1  1  0
#> GSM648702     2       0          1  0  1
#> GSM648597     2       0          1  0  1
#> GSM648603     2       0          1  0  1
#> GSM648606     1       0          1  1  0
#> GSM648613     1       0          1  1  0
#> GSM648619     1       0          1  1  0
#> GSM648654     1       0          1  1  0
#> GSM648663     1       0          1  1  0
#> GSM648670     2       0          1  0  1
#> GSM648707     2       0          1  0  1
#> GSM648615     2       0          1  0  1
#> GSM648643     2       0          1  0  1
#> GSM648650     2       0          1  0  1
#> GSM648656     2       0          1  0  1
#> GSM648715     2       0          1  0  1
#> GSM648598     2       0          1  0  1
#> GSM648601     2       0          1  0  1
#> GSM648602     2       0          1  0  1
#> GSM648604     1       0          1  1  0
#> GSM648614     1       0          1  1  0
#> GSM648624     2       0          1  0  1
#> GSM648625     2       0          1  0  1
#> GSM648629     1       0          1  1  0
#> GSM648634     2       0          1  0  1
#> GSM648648     2       0          1  0  1
#> GSM648651     2       0          1  0  1
#> GSM648657     2       0          1  0  1
#> GSM648660     2       0          1  0  1
#> GSM648697     2       0          1  0  1
#> GSM648710     1       0          1  1  0
#> GSM648591     2       0          1  0  1
#> GSM648592     2       0          1  0  1
#> GSM648607     1       0          1  1  0
#> GSM648611     1       0          1  1  0
#> GSM648612     1       0          1  1  0
#> GSM648616     2       0          1  0  1
#> GSM648617     2       0          1  0  1
#> GSM648626     2       0          1  0  1
#> GSM648711     1       0          1  1  0
#> GSM648712     1       0          1  1  0
#> GSM648713     1       0          1  1  0
#> GSM648714     1       0          1  1  0
#> GSM648716     1       0          1  1  0
#> GSM648717     1       0          1  1  0
#> GSM648590     2       0          1  0  1
#> GSM648596     2       0          1  0  1
#> GSM648642     1       0          1  1  0
#> GSM648696     2       0          1  0  1
#> GSM648705     2       0          1  0  1
#> GSM648718     2       0          1  0  1
#> GSM648599     2       0          1  0  1
#> GSM648608     1       0          1  1  0
#> GSM648609     1       0          1  1  0
#> GSM648610     1       0          1  1  0
#> GSM648633     2       0          1  0  1
#> GSM648644     2       0          1  0  1
#> GSM648652     2       0          1  0  1
#> GSM648653     2       0          1  0  1
#> GSM648658     2       0          1  0  1
#> GSM648659     2       0          1  0  1
#> GSM648662     1       0          1  1  0
#> GSM648665     1       0          1  1  0
#> GSM648666     2       0          1  0  1
#> GSM648680     2       0          1  0  1
#> GSM648684     1       0          1  1  0
#> GSM648709     2       0          1  0  1
#> GSM648719     2       0          1  0  1
#> GSM648627     1       0          1  1  0
#> GSM648637     2       0          1  0  1
#> GSM648638     1       0          1  1  0
#> GSM648641     1       0          1  1  0
#> GSM648672     2       0          1  0  1
#> GSM648674     2       0          1  0  1
#> GSM648703     2       0          1  0  1
#> GSM648631     1       0          1  1  0
#> GSM648669     2       0          1  0  1
#> GSM648671     2       0          1  0  1
#> GSM648678     2       0          1  0  1
#> GSM648679     2       0          1  0  1
#> GSM648681     2       0          1  0  1
#> GSM648686     1       0          1  1  0
#> GSM648689     1       0          1  1  0
#> GSM648690     1       0          1  1  0
#> GSM648691     1       0          1  1  0
#> GSM648693     1       0          1  1  0
#> GSM648700     2       0          1  0  1
#> GSM648630     1       0          1  1  0
#> GSM648632     1       0          1  1  0
#> GSM648639     2       0          1  0  1
#> GSM648640     1       0          1  1  0
#> GSM648668     2       0          1  0  1
#> GSM648676     2       0          1  0  1
#> GSM648692     1       0          1  1  0
#> GSM648694     1       0          1  1  0
#> GSM648699     2       0          1  0  1
#> GSM648701     2       0          1  0  1
#> GSM648673     2       0          1  0  1
#> GSM648677     2       0          1  0  1
#> GSM648687     2       0          1  0  1
#> GSM648688     1       0          1  1  0

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM648605     3  0.1529      0.981 0.040 0.000 0.960
#> GSM648618     1  0.1643      0.998 0.956 0.044 0.000
#> GSM648620     1  0.1529      0.997 0.960 0.040 0.000
#> GSM648646     2  0.0237      0.994 0.004 0.996 0.000
#> GSM648649     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648675     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648682     1  0.1529      0.997 0.960 0.040 0.000
#> GSM648698     1  0.1643      0.995 0.956 0.044 0.000
#> GSM648708     1  0.1529      0.997 0.960 0.040 0.000
#> GSM648628     3  0.0000      0.989 0.000 0.000 1.000
#> GSM648595     2  0.0237      0.994 0.004 0.996 0.000
#> GSM648635     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648645     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648647     2  0.0237      0.994 0.004 0.996 0.000
#> GSM648667     2  0.0237      0.994 0.004 0.996 0.000
#> GSM648695     1  0.1529      0.997 0.960 0.040 0.000
#> GSM648704     2  0.0237      0.994 0.004 0.996 0.000
#> GSM648706     3  0.1529      0.981 0.040 0.000 0.960
#> GSM648593     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648594     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648600     1  0.1529      0.997 0.960 0.040 0.000
#> GSM648621     1  0.1643      0.998 0.956 0.044 0.000
#> GSM648622     1  0.1643      0.998 0.956 0.044 0.000
#> GSM648623     1  0.1643      0.998 0.956 0.044 0.000
#> GSM648636     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648655     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648661     3  0.1411      0.982 0.036 0.000 0.964
#> GSM648664     3  0.1529      0.981 0.040 0.000 0.960
#> GSM648683     3  0.0000      0.989 0.000 0.000 1.000
#> GSM648685     3  0.0000      0.989 0.000 0.000 1.000
#> GSM648702     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648597     2  0.3192      0.869 0.112 0.888 0.000
#> GSM648603     1  0.1643      0.998 0.956 0.044 0.000
#> GSM648606     3  0.0237      0.988 0.004 0.000 0.996
#> GSM648613     3  0.1529      0.981 0.040 0.000 0.960
#> GSM648619     3  0.0000      0.989 0.000 0.000 1.000
#> GSM648654     3  0.0892      0.986 0.020 0.000 0.980
#> GSM648663     3  0.1411      0.982 0.036 0.000 0.964
#> GSM648670     2  0.0237      0.994 0.004 0.996 0.000
#> GSM648707     1  0.1643      0.998 0.956 0.044 0.000
#> GSM648615     1  0.1529      0.997 0.960 0.040 0.000
#> GSM648643     2  0.0237      0.994 0.004 0.996 0.000
#> GSM648650     2  0.0237      0.994 0.004 0.996 0.000
#> GSM648656     2  0.0237      0.994 0.004 0.996 0.000
#> GSM648715     2  0.0237      0.994 0.004 0.996 0.000
#> GSM648598     1  0.1643      0.998 0.956 0.044 0.000
#> GSM648601     1  0.1643      0.998 0.956 0.044 0.000
#> GSM648602     1  0.1643      0.998 0.956 0.044 0.000
#> GSM648604     3  0.0000      0.989 0.000 0.000 1.000
#> GSM648614     3  0.1529      0.981 0.040 0.000 0.960
#> GSM648624     1  0.1643      0.998 0.956 0.044 0.000
#> GSM648625     1  0.1529      0.997 0.960 0.040 0.000
#> GSM648629     3  0.0000      0.989 0.000 0.000 1.000
#> GSM648634     1  0.1643      0.998 0.956 0.044 0.000
#> GSM648648     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648651     1  0.1643      0.998 0.956 0.044 0.000
#> GSM648657     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648660     2  0.1860      0.942 0.052 0.948 0.000
#> GSM648697     1  0.1643      0.998 0.956 0.044 0.000
#> GSM648710     3  0.0000      0.989 0.000 0.000 1.000
#> GSM648591     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648592     2  0.0237      0.992 0.004 0.996 0.000
#> GSM648607     3  0.0000      0.989 0.000 0.000 1.000
#> GSM648611     3  0.0000      0.989 0.000 0.000 1.000
#> GSM648612     3  0.0000      0.989 0.000 0.000 1.000
#> GSM648616     1  0.1643      0.998 0.956 0.044 0.000
#> GSM648617     1  0.1529      0.997 0.960 0.040 0.000
#> GSM648626     1  0.1643      0.998 0.956 0.044 0.000
#> GSM648711     3  0.0000      0.989 0.000 0.000 1.000
#> GSM648712     3  0.0000      0.989 0.000 0.000 1.000
#> GSM648713     3  0.0000      0.989 0.000 0.000 1.000
#> GSM648714     3  0.1529      0.981 0.040 0.000 0.960
#> GSM648716     3  0.0000      0.989 0.000 0.000 1.000
#> GSM648717     3  0.0892      0.986 0.020 0.000 0.980
#> GSM648590     2  0.0237      0.994 0.004 0.996 0.000
#> GSM648596     2  0.0237      0.994 0.004 0.996 0.000
#> GSM648642     3  0.1529      0.981 0.040 0.000 0.960
#> GSM648696     1  0.1529      0.997 0.960 0.040 0.000
#> GSM648705     2  0.0237      0.994 0.004 0.996 0.000
#> GSM648718     2  0.0237      0.994 0.004 0.996 0.000
#> GSM648599     1  0.1643      0.998 0.956 0.044 0.000
#> GSM648608     3  0.0000      0.989 0.000 0.000 1.000
#> GSM648609     3  0.0000      0.989 0.000 0.000 1.000
#> GSM648610     3  0.0000      0.989 0.000 0.000 1.000
#> GSM648633     2  0.0237      0.994 0.004 0.996 0.000
#> GSM648644     2  0.0237      0.994 0.004 0.996 0.000
#> GSM648652     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648653     1  0.1643      0.998 0.956 0.044 0.000
#> GSM648658     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648659     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648662     3  0.1411      0.982 0.036 0.000 0.964
#> GSM648665     3  0.1411      0.982 0.036 0.000 0.964
#> GSM648666     1  0.1643      0.998 0.956 0.044 0.000
#> GSM648680     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648684     3  0.0000      0.989 0.000 0.000 1.000
#> GSM648709     1  0.1529      0.997 0.960 0.040 0.000
#> GSM648719     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648627     3  0.0000      0.989 0.000 0.000 1.000
#> GSM648637     1  0.1643      0.995 0.956 0.044 0.000
#> GSM648638     3  0.1529      0.981 0.040 0.000 0.960
#> GSM648641     3  0.1411      0.982 0.036 0.000 0.964
#> GSM648672     2  0.0237      0.994 0.004 0.996 0.000
#> GSM648674     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648703     2  0.0237      0.994 0.004 0.996 0.000
#> GSM648631     3  0.0000      0.989 0.000 0.000 1.000
#> GSM648669     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648671     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648678     2  0.0237      0.994 0.004 0.996 0.000
#> GSM648679     2  0.0237      0.994 0.004 0.996 0.000
#> GSM648681     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648686     3  0.1411      0.982 0.036 0.000 0.964
#> GSM648689     3  0.1411      0.982 0.036 0.000 0.964
#> GSM648690     3  0.1411      0.982 0.036 0.000 0.964
#> GSM648691     3  0.0000      0.989 0.000 0.000 1.000
#> GSM648693     3  0.0000      0.989 0.000 0.000 1.000
#> GSM648700     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648630     3  0.0000      0.989 0.000 0.000 1.000
#> GSM648632     3  0.0000      0.989 0.000 0.000 1.000
#> GSM648639     1  0.1529      0.997 0.960 0.040 0.000
#> GSM648640     3  0.1529      0.981 0.040 0.000 0.960
#> GSM648668     2  0.0237      0.994 0.004 0.996 0.000
#> GSM648676     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648692     3  0.0237      0.988 0.004 0.000 0.996
#> GSM648694     3  0.0237      0.988 0.004 0.000 0.996
#> GSM648699     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648701     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648673     2  0.0000      0.995 0.000 1.000 0.000
#> GSM648677     2  0.0237      0.994 0.004 0.996 0.000
#> GSM648687     1  0.1643      0.998 0.956 0.044 0.000
#> GSM648688     3  0.0000      0.989 0.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM648605     4  0.1474     0.8890 0.000 0.000 0.052 0.948
#> GSM648618     1  0.0000     0.9830 1.000 0.000 0.000 0.000
#> GSM648620     1  0.0188     0.9824 0.996 0.000 0.000 0.004
#> GSM648646     2  0.3311     0.8546 0.000 0.828 0.000 0.172
#> GSM648649     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648675     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648682     1  0.0188     0.9824 0.996 0.000 0.000 0.004
#> GSM648698     1  0.0188     0.9824 0.996 0.000 0.000 0.004
#> GSM648708     1  0.0188     0.9824 0.996 0.000 0.000 0.004
#> GSM648628     3  0.0000     0.8456 0.000 0.000 1.000 0.000
#> GSM648595     2  0.0592     0.9661 0.000 0.984 0.000 0.016
#> GSM648635     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648645     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648647     2  0.1389     0.9552 0.000 0.952 0.000 0.048
#> GSM648667     2  0.1389     0.9552 0.000 0.952 0.000 0.048
#> GSM648695     1  0.0336     0.9793 0.992 0.000 0.000 0.008
#> GSM648704     2  0.3311     0.8546 0.000 0.828 0.000 0.172
#> GSM648706     4  0.1474     0.8890 0.000 0.000 0.052 0.948
#> GSM648593     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648594     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648600     1  0.0188     0.9824 0.996 0.000 0.000 0.004
#> GSM648621     1  0.0188     0.9824 0.996 0.000 0.000 0.004
#> GSM648622     1  0.0000     0.9830 1.000 0.000 0.000 0.000
#> GSM648623     1  0.0000     0.9830 1.000 0.000 0.000 0.000
#> GSM648636     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648655     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648661     3  0.4193     0.5477 0.000 0.000 0.732 0.268
#> GSM648664     3  0.4977     0.1025 0.000 0.000 0.540 0.460
#> GSM648683     3  0.0000     0.8456 0.000 0.000 1.000 0.000
#> GSM648685     3  0.0000     0.8456 0.000 0.000 1.000 0.000
#> GSM648702     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648597     2  0.2589     0.8559 0.116 0.884 0.000 0.000
#> GSM648603     1  0.0000     0.9830 1.000 0.000 0.000 0.000
#> GSM648606     4  0.2973     0.8296 0.000 0.000 0.144 0.856
#> GSM648613     4  0.3610     0.7713 0.000 0.000 0.200 0.800
#> GSM648619     3  0.0000     0.8456 0.000 0.000 1.000 0.000
#> GSM648654     3  0.1474     0.8088 0.000 0.000 0.948 0.052
#> GSM648663     3  0.4977     0.1025 0.000 0.000 0.540 0.460
#> GSM648670     2  0.0188     0.9693 0.000 0.996 0.000 0.004
#> GSM648707     1  0.0000     0.9830 1.000 0.000 0.000 0.000
#> GSM648615     1  0.0188     0.9824 0.996 0.000 0.000 0.004
#> GSM648643     2  0.1389     0.9552 0.000 0.952 0.000 0.048
#> GSM648650     2  0.0188     0.9693 0.000 0.996 0.000 0.004
#> GSM648656     2  0.3311     0.8546 0.000 0.828 0.000 0.172
#> GSM648715     2  0.1389     0.9552 0.000 0.952 0.000 0.048
#> GSM648598     1  0.0000     0.9830 1.000 0.000 0.000 0.000
#> GSM648601     1  0.0000     0.9830 1.000 0.000 0.000 0.000
#> GSM648602     1  0.0000     0.9830 1.000 0.000 0.000 0.000
#> GSM648604     3  0.0000     0.8456 0.000 0.000 1.000 0.000
#> GSM648614     4  0.1474     0.8890 0.000 0.000 0.052 0.948
#> GSM648624     1  0.0000     0.9830 1.000 0.000 0.000 0.000
#> GSM648625     1  0.0188     0.9824 0.996 0.000 0.000 0.004
#> GSM648629     3  0.0188     0.8434 0.000 0.000 0.996 0.004
#> GSM648634     1  0.0000     0.9830 1.000 0.000 0.000 0.000
#> GSM648648     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648651     1  0.0000     0.9830 1.000 0.000 0.000 0.000
#> GSM648657     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648660     2  0.1940     0.9034 0.076 0.924 0.000 0.000
#> GSM648697     1  0.0000     0.9830 1.000 0.000 0.000 0.000
#> GSM648710     3  0.0000     0.8456 0.000 0.000 1.000 0.000
#> GSM648591     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648592     2  0.0817     0.9541 0.024 0.976 0.000 0.000
#> GSM648607     3  0.0000     0.8456 0.000 0.000 1.000 0.000
#> GSM648611     3  0.0000     0.8456 0.000 0.000 1.000 0.000
#> GSM648612     3  0.0000     0.8456 0.000 0.000 1.000 0.000
#> GSM648616     1  0.0000     0.9830 1.000 0.000 0.000 0.000
#> GSM648617     1  0.0188     0.9824 0.996 0.000 0.000 0.004
#> GSM648626     1  0.0000     0.9830 1.000 0.000 0.000 0.000
#> GSM648711     3  0.0000     0.8456 0.000 0.000 1.000 0.000
#> GSM648712     3  0.0000     0.8456 0.000 0.000 1.000 0.000
#> GSM648713     3  0.0000     0.8456 0.000 0.000 1.000 0.000
#> GSM648714     4  0.1474     0.8890 0.000 0.000 0.052 0.948
#> GSM648716     3  0.0000     0.8456 0.000 0.000 1.000 0.000
#> GSM648717     4  0.1474     0.8890 0.000 0.000 0.052 0.948
#> GSM648590     2  0.1118     0.9598 0.000 0.964 0.000 0.036
#> GSM648596     2  0.3172     0.8664 0.000 0.840 0.000 0.160
#> GSM648642     4  0.1474     0.8890 0.000 0.000 0.052 0.948
#> GSM648696     1  0.0188     0.9824 0.996 0.000 0.000 0.004
#> GSM648705     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648718     2  0.1118     0.9598 0.000 0.964 0.000 0.036
#> GSM648599     1  0.0000     0.9830 1.000 0.000 0.000 0.000
#> GSM648608     3  0.0000     0.8456 0.000 0.000 1.000 0.000
#> GSM648609     3  0.0000     0.8456 0.000 0.000 1.000 0.000
#> GSM648610     3  0.0000     0.8456 0.000 0.000 1.000 0.000
#> GSM648633     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648644     2  0.3311     0.8546 0.000 0.828 0.000 0.172
#> GSM648652     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648653     1  0.0188     0.9824 0.996 0.000 0.000 0.004
#> GSM648658     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648659     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648662     4  0.4992     0.0512 0.000 0.000 0.476 0.524
#> GSM648665     3  0.4977     0.1025 0.000 0.000 0.540 0.460
#> GSM648666     1  0.0000     0.9830 1.000 0.000 0.000 0.000
#> GSM648680     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648684     3  0.0000     0.8456 0.000 0.000 1.000 0.000
#> GSM648709     1  0.0000     0.9830 1.000 0.000 0.000 0.000
#> GSM648719     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648627     3  0.0336     0.8410 0.000 0.000 0.992 0.008
#> GSM648637     1  0.4985     0.1311 0.532 0.000 0.000 0.468
#> GSM648638     4  0.1474     0.8890 0.000 0.000 0.052 0.948
#> GSM648641     3  0.4977     0.1025 0.000 0.000 0.540 0.460
#> GSM648672     2  0.1389     0.9552 0.000 0.952 0.000 0.048
#> GSM648674     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648703     2  0.1389     0.9552 0.000 0.952 0.000 0.048
#> GSM648631     3  0.0000     0.8456 0.000 0.000 1.000 0.000
#> GSM648669     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648671     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648678     2  0.1389     0.9552 0.000 0.952 0.000 0.048
#> GSM648679     2  0.1211     0.9583 0.000 0.960 0.000 0.040
#> GSM648681     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648686     3  0.4977     0.1025 0.000 0.000 0.540 0.460
#> GSM648689     3  0.4977     0.1025 0.000 0.000 0.540 0.460
#> GSM648690     3  0.4977     0.1025 0.000 0.000 0.540 0.460
#> GSM648691     3  0.0000     0.8456 0.000 0.000 1.000 0.000
#> GSM648693     3  0.0000     0.8456 0.000 0.000 1.000 0.000
#> GSM648700     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648630     3  0.0707     0.8327 0.000 0.000 0.980 0.020
#> GSM648632     3  0.0000     0.8456 0.000 0.000 1.000 0.000
#> GSM648639     1  0.0188     0.9824 0.996 0.000 0.000 0.004
#> GSM648640     4  0.3610     0.7713 0.000 0.000 0.200 0.800
#> GSM648668     2  0.1389     0.9552 0.000 0.952 0.000 0.048
#> GSM648676     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648692     3  0.4500     0.4391 0.000 0.000 0.684 0.316
#> GSM648694     3  0.4679     0.3701 0.000 0.000 0.648 0.352
#> GSM648699     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648701     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648673     2  0.0000     0.9701 0.000 1.000 0.000 0.000
#> GSM648677     2  0.1389     0.9552 0.000 0.952 0.000 0.048
#> GSM648687     1  0.0000     0.9830 1.000 0.000 0.000 0.000
#> GSM648688     3  0.0000     0.8456 0.000 0.000 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM648605     3  0.2648    0.73018 0.152 0.000 0.848 0.000 0.000
#> GSM648618     5  0.0000    0.97496 0.000 0.000 0.000 0.000 1.000
#> GSM648620     5  0.1364    0.96096 0.000 0.012 0.036 0.000 0.952
#> GSM648646     2  0.0510    0.66638 0.000 0.984 0.000 0.016 0.000
#> GSM648649     4  0.3561    0.54863 0.000 0.260 0.000 0.740 0.000
#> GSM648675     4  0.4249    0.37189 0.000 0.432 0.000 0.568 0.000
#> GSM648682     5  0.1469    0.95906 0.000 0.016 0.036 0.000 0.948
#> GSM648698     5  0.1469    0.95906 0.000 0.016 0.036 0.000 0.948
#> GSM648708     5  0.1251    0.96274 0.000 0.008 0.036 0.000 0.956
#> GSM648628     1  0.0510    0.90857 0.984 0.000 0.016 0.000 0.000
#> GSM648595     2  0.4101    0.43239 0.000 0.628 0.000 0.372 0.000
#> GSM648635     4  0.4256    0.36319 0.000 0.436 0.000 0.564 0.000
#> GSM648645     4  0.4242    0.37733 0.000 0.428 0.000 0.572 0.000
#> GSM648647     2  0.2732    0.72258 0.000 0.840 0.000 0.160 0.000
#> GSM648667     2  0.3730    0.61260 0.000 0.712 0.000 0.288 0.000
#> GSM648695     5  0.1469    0.95906 0.000 0.016 0.036 0.000 0.948
#> GSM648704     2  0.0510    0.66638 0.000 0.984 0.000 0.016 0.000
#> GSM648706     3  0.3141    0.72725 0.152 0.016 0.832 0.000 0.000
#> GSM648593     4  0.0290    0.59984 0.000 0.008 0.000 0.992 0.000
#> GSM648594     4  0.4249    0.37189 0.000 0.432 0.000 0.568 0.000
#> GSM648600     5  0.0880    0.96708 0.000 0.000 0.032 0.000 0.968
#> GSM648621     5  0.0000    0.97496 0.000 0.000 0.000 0.000 1.000
#> GSM648622     5  0.0000    0.97496 0.000 0.000 0.000 0.000 1.000
#> GSM648623     5  0.0000    0.97496 0.000 0.000 0.000 0.000 1.000
#> GSM648636     4  0.3661    0.54057 0.000 0.276 0.000 0.724 0.000
#> GSM648655     4  0.1043    0.60326 0.000 0.040 0.000 0.960 0.000
#> GSM648661     1  0.4060    0.00289 0.640 0.000 0.360 0.000 0.000
#> GSM648664     3  0.4305    0.49592 0.488 0.000 0.512 0.000 0.000
#> GSM648683     1  0.0000    0.91427 1.000 0.000 0.000 0.000 0.000
#> GSM648685     1  0.0000    0.91427 1.000 0.000 0.000 0.000 0.000
#> GSM648702     4  0.3876    0.50721 0.000 0.316 0.000 0.684 0.000
#> GSM648597     2  0.6465   -0.01306 0.000 0.440 0.000 0.376 0.184
#> GSM648603     5  0.0000    0.97496 0.000 0.000 0.000 0.000 1.000
#> GSM648606     3  0.2648    0.73018 0.152 0.000 0.848 0.000 0.000
#> GSM648613     3  0.2773    0.72860 0.164 0.000 0.836 0.000 0.000
#> GSM648619     1  0.0162    0.91200 0.996 0.000 0.004 0.000 0.000
#> GSM648654     1  0.2891    0.65435 0.824 0.000 0.176 0.000 0.000
#> GSM648663     3  0.4305    0.49592 0.488 0.000 0.512 0.000 0.000
#> GSM648670     4  0.4538    0.31639 0.000 0.452 0.000 0.540 0.008
#> GSM648707     5  0.0000    0.97496 0.000 0.000 0.000 0.000 1.000
#> GSM648615     5  0.1124    0.96435 0.000 0.004 0.036 0.000 0.960
#> GSM648643     2  0.3305    0.66713 0.000 0.776 0.000 0.224 0.000
#> GSM648650     4  0.4283    0.31563 0.000 0.456 0.000 0.544 0.000
#> GSM648656     2  0.0510    0.66638 0.000 0.984 0.000 0.016 0.000
#> GSM648715     2  0.2605    0.72128 0.000 0.852 0.000 0.148 0.000
#> GSM648598     5  0.0000    0.97496 0.000 0.000 0.000 0.000 1.000
#> GSM648601     5  0.0000    0.97496 0.000 0.000 0.000 0.000 1.000
#> GSM648602     5  0.0000    0.97496 0.000 0.000 0.000 0.000 1.000
#> GSM648604     1  0.0000    0.91427 1.000 0.000 0.000 0.000 0.000
#> GSM648614     3  0.2648    0.73018 0.152 0.000 0.848 0.000 0.000
#> GSM648624     5  0.0000    0.97496 0.000 0.000 0.000 0.000 1.000
#> GSM648625     5  0.1364    0.96096 0.000 0.012 0.036 0.000 0.952
#> GSM648629     1  0.0162    0.91200 0.996 0.000 0.004 0.000 0.000
#> GSM648634     5  0.0000    0.97496 0.000 0.000 0.000 0.000 1.000
#> GSM648648     4  0.0000    0.59634 0.000 0.000 0.000 1.000 0.000
#> GSM648651     5  0.0000    0.97496 0.000 0.000 0.000 0.000 1.000
#> GSM648657     4  0.3336    0.56211 0.000 0.228 0.000 0.772 0.000
#> GSM648660     4  0.6102    0.07896 0.000 0.436 0.000 0.440 0.124
#> GSM648697     5  0.0000    0.97496 0.000 0.000 0.000 0.000 1.000
#> GSM648710     1  0.0162    0.91269 0.996 0.000 0.004 0.000 0.000
#> GSM648591     4  0.0000    0.59634 0.000 0.000 0.000 1.000 0.000
#> GSM648592     4  0.5019    0.30677 0.000 0.436 0.000 0.532 0.032
#> GSM648607     1  0.0000    0.91427 1.000 0.000 0.000 0.000 0.000
#> GSM648611     1  0.2329    0.83131 0.876 0.000 0.124 0.000 0.000
#> GSM648612     1  0.0162    0.91269 0.996 0.000 0.004 0.000 0.000
#> GSM648616     5  0.0000    0.97496 0.000 0.000 0.000 0.000 1.000
#> GSM648617     5  0.0880    0.96708 0.000 0.000 0.032 0.000 0.968
#> GSM648626     5  0.0000    0.97496 0.000 0.000 0.000 0.000 1.000
#> GSM648711     1  0.0000    0.91427 1.000 0.000 0.000 0.000 0.000
#> GSM648712     1  0.0000    0.91427 1.000 0.000 0.000 0.000 0.000
#> GSM648713     1  0.0162    0.91269 0.996 0.000 0.004 0.000 0.000
#> GSM648714     3  0.2648    0.73018 0.152 0.000 0.848 0.000 0.000
#> GSM648716     1  0.0000    0.91427 1.000 0.000 0.000 0.000 0.000
#> GSM648717     3  0.2648    0.73018 0.152 0.000 0.848 0.000 0.000
#> GSM648590     2  0.3949    0.54596 0.000 0.668 0.000 0.332 0.000
#> GSM648596     2  0.0703    0.67071 0.000 0.976 0.000 0.024 0.000
#> GSM648642     3  0.4540    0.52978 0.020 0.340 0.640 0.000 0.000
#> GSM648696     5  0.1124    0.96435 0.000 0.004 0.036 0.000 0.960
#> GSM648705     4  0.4249    0.37109 0.000 0.432 0.000 0.568 0.000
#> GSM648718     2  0.3983    0.52771 0.000 0.660 0.000 0.340 0.000
#> GSM648599     5  0.0000    0.97496 0.000 0.000 0.000 0.000 1.000
#> GSM648608     1  0.0000    0.91427 1.000 0.000 0.000 0.000 0.000
#> GSM648609     1  0.0000    0.91427 1.000 0.000 0.000 0.000 0.000
#> GSM648610     1  0.0000    0.91427 1.000 0.000 0.000 0.000 0.000
#> GSM648633     4  0.4283    0.31611 0.000 0.456 0.000 0.544 0.000
#> GSM648644     2  0.0510    0.66638 0.000 0.984 0.000 0.016 0.000
#> GSM648652     4  0.3661    0.53955 0.000 0.276 0.000 0.724 0.000
#> GSM648653     5  0.0000    0.97496 0.000 0.000 0.000 0.000 1.000
#> GSM648658     4  0.4256    0.36319 0.000 0.436 0.000 0.564 0.000
#> GSM648659     4  0.4283    0.31588 0.000 0.456 0.000 0.544 0.000
#> GSM648662     3  0.4182    0.60870 0.400 0.000 0.600 0.000 0.000
#> GSM648665     3  0.4305    0.49592 0.488 0.000 0.512 0.000 0.000
#> GSM648666     5  0.0000    0.97496 0.000 0.000 0.000 0.000 1.000
#> GSM648680     4  0.4235    0.38535 0.000 0.424 0.000 0.576 0.000
#> GSM648684     1  0.0000    0.91427 1.000 0.000 0.000 0.000 0.000
#> GSM648709     5  0.0290    0.97327 0.000 0.000 0.008 0.000 0.992
#> GSM648719     4  0.0404    0.60089 0.000 0.012 0.000 0.988 0.000
#> GSM648627     1  0.0510    0.90857 0.984 0.000 0.016 0.000 0.000
#> GSM648637     5  0.4610    0.40466 0.000 0.016 0.388 0.000 0.596
#> GSM648638     3  0.2648    0.73018 0.152 0.000 0.848 0.000 0.000
#> GSM648641     3  0.4101    0.52802 0.372 0.000 0.628 0.000 0.000
#> GSM648672     2  0.2690    0.72294 0.000 0.844 0.000 0.156 0.000
#> GSM648674     4  0.0000    0.59634 0.000 0.000 0.000 1.000 0.000
#> GSM648703     2  0.3999    0.52306 0.000 0.656 0.000 0.344 0.000
#> GSM648631     1  0.2280    0.83211 0.880 0.000 0.120 0.000 0.000
#> GSM648669     4  0.0609    0.59195 0.000 0.020 0.000 0.980 0.000
#> GSM648671     4  0.0880    0.58477 0.000 0.032 0.000 0.968 0.000
#> GSM648678     2  0.2690    0.72294 0.000 0.844 0.000 0.156 0.000
#> GSM648679     2  0.4015    0.50592 0.000 0.652 0.000 0.348 0.000
#> GSM648681     4  0.0290    0.59956 0.000 0.008 0.000 0.992 0.000
#> GSM648686     3  0.4101    0.52802 0.372 0.000 0.628 0.000 0.000
#> GSM648689     3  0.4101    0.52802 0.372 0.000 0.628 0.000 0.000
#> GSM648690     3  0.4101    0.52802 0.372 0.000 0.628 0.000 0.000
#> GSM648691     1  0.2280    0.83211 0.880 0.000 0.120 0.000 0.000
#> GSM648693     1  0.2280    0.83211 0.880 0.000 0.120 0.000 0.000
#> GSM648700     4  0.3039    0.51756 0.000 0.192 0.000 0.808 0.000
#> GSM648630     1  0.3003    0.76621 0.812 0.000 0.188 0.000 0.000
#> GSM648632     1  0.2280    0.83211 0.880 0.000 0.120 0.000 0.000
#> GSM648639     5  0.0880    0.96708 0.000 0.000 0.032 0.000 0.968
#> GSM648640     3  0.1197    0.67769 0.048 0.000 0.952 0.000 0.000
#> GSM648668     2  0.2813    0.71951 0.000 0.832 0.000 0.168 0.000
#> GSM648676     4  0.0000    0.59634 0.000 0.000 0.000 1.000 0.000
#> GSM648692     3  0.4278    0.11149 0.452 0.000 0.548 0.000 0.000
#> GSM648694     3  0.4126    0.29631 0.380 0.000 0.620 0.000 0.000
#> GSM648699     4  0.0609    0.59182 0.000 0.020 0.000 0.980 0.000
#> GSM648701     4  0.3109    0.53306 0.000 0.200 0.000 0.800 0.000
#> GSM648673     4  0.1671    0.54817 0.000 0.076 0.000 0.924 0.000
#> GSM648677     2  0.3424    0.65360 0.000 0.760 0.000 0.240 0.000
#> GSM648687     5  0.0000    0.97496 0.000 0.000 0.000 0.000 1.000
#> GSM648688     1  0.2329    0.83131 0.876 0.000 0.124 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM648605     5  0.1327     0.6734 0.000 0.000 0.064 0.000 0.936 0.000
#> GSM648618     1  0.0260     0.9308 0.992 0.000 0.000 0.008 0.000 0.000
#> GSM648620     1  0.3225     0.8852 0.828 0.080 0.000 0.092 0.000 0.000
#> GSM648646     2  0.2454     0.8253 0.000 0.840 0.000 0.000 0.000 0.160
#> GSM648649     6  0.4785     0.4786 0.000 0.120 0.000 0.216 0.000 0.664
#> GSM648675     6  0.0000     0.6298 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM648682     1  0.3366     0.8831 0.824 0.080 0.000 0.092 0.004 0.000
#> GSM648698     1  0.3277     0.8831 0.824 0.084 0.000 0.092 0.000 0.000
#> GSM648708     1  0.3225     0.8852 0.828 0.080 0.000 0.092 0.000 0.000
#> GSM648628     3  0.1245     0.8814 0.000 0.016 0.952 0.032 0.000 0.000
#> GSM648595     6  0.2491     0.5909 0.000 0.164 0.000 0.000 0.000 0.836
#> GSM648635     6  0.2389     0.6200 0.000 0.128 0.000 0.008 0.000 0.864
#> GSM648645     6  0.0937     0.6050 0.000 0.000 0.000 0.040 0.000 0.960
#> GSM648647     6  0.3765     0.1975 0.000 0.404 0.000 0.000 0.000 0.596
#> GSM648667     2  0.3833     0.3584 0.000 0.556 0.000 0.000 0.000 0.444
#> GSM648695     1  0.3225     0.8852 0.828 0.080 0.000 0.092 0.000 0.000
#> GSM648704     2  0.2454     0.8253 0.000 0.840 0.000 0.000 0.000 0.160
#> GSM648706     5  0.2571     0.6595 0.000 0.060 0.064 0.000 0.876 0.000
#> GSM648593     6  0.3584     0.2241 0.000 0.004 0.000 0.308 0.000 0.688
#> GSM648594     6  0.0820     0.6328 0.000 0.016 0.000 0.012 0.000 0.972
#> GSM648600     1  0.2912     0.8946 0.852 0.076 0.000 0.072 0.000 0.000
#> GSM648621     1  0.0405     0.9324 0.988 0.008 0.000 0.004 0.000 0.000
#> GSM648622     1  0.0146     0.9322 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM648623     1  0.0146     0.9322 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM648636     6  0.2531     0.5482 0.000 0.012 0.000 0.132 0.000 0.856
#> GSM648655     6  0.3565     0.2363 0.000 0.004 0.000 0.304 0.000 0.692
#> GSM648661     3  0.6454    -0.2232 0.000 0.068 0.496 0.128 0.308 0.000
#> GSM648664     5  0.6869     0.4936 0.000 0.076 0.368 0.168 0.388 0.000
#> GSM648683     3  0.0000     0.8967 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648685     3  0.0000     0.8967 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648702     6  0.3453     0.5456 0.000 0.044 0.000 0.164 0.000 0.792
#> GSM648597     6  0.4216     0.5064 0.084 0.148 0.000 0.012 0.000 0.756
#> GSM648603     1  0.0146     0.9322 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM648606     5  0.1610     0.6771 0.000 0.000 0.084 0.000 0.916 0.000
#> GSM648613     5  0.2378     0.6756 0.000 0.000 0.152 0.000 0.848 0.000
#> GSM648619     3  0.0000     0.8967 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648654     3  0.4775     0.5711 0.000 0.052 0.732 0.080 0.136 0.000
#> GSM648663     5  0.6521     0.5456 0.000 0.060 0.360 0.136 0.444 0.000
#> GSM648670     6  0.4187     0.5972 0.012 0.156 0.000 0.076 0.000 0.756
#> GSM648707     1  0.0146     0.9322 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM648615     1  0.3123     0.8886 0.836 0.076 0.000 0.088 0.000 0.000
#> GSM648643     2  0.3838     0.4399 0.000 0.552 0.000 0.000 0.000 0.448
#> GSM648650     6  0.2613     0.6138 0.000 0.140 0.000 0.012 0.000 0.848
#> GSM648656     2  0.2595     0.8243 0.000 0.836 0.000 0.004 0.000 0.160
#> GSM648715     6  0.3804     0.1298 0.000 0.424 0.000 0.000 0.000 0.576
#> GSM648598     1  0.0405     0.9327 0.988 0.008 0.000 0.004 0.000 0.000
#> GSM648601     1  0.0000     0.9327 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648602     1  0.0000     0.9327 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648604     3  0.0000     0.8967 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648614     5  0.1327     0.6734 0.000 0.000 0.064 0.000 0.936 0.000
#> GSM648624     1  0.0146     0.9322 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM648625     1  0.3225     0.8852 0.828 0.080 0.000 0.092 0.000 0.000
#> GSM648629     3  0.1245     0.8814 0.000 0.016 0.952 0.032 0.000 0.000
#> GSM648634     1  0.0458     0.9318 0.984 0.016 0.000 0.000 0.000 0.000
#> GSM648648     6  0.3584     0.2207 0.000 0.004 0.000 0.308 0.000 0.688
#> GSM648651     1  0.0146     0.9322 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM648657     6  0.3508     0.2661 0.000 0.004 0.000 0.292 0.000 0.704
#> GSM648660     6  0.3521     0.5728 0.036 0.148 0.000 0.012 0.000 0.804
#> GSM648697     1  0.0000     0.9327 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648710     3  0.0000     0.8967 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648591     4  0.3360     0.9066 0.000 0.004 0.000 0.732 0.000 0.264
#> GSM648592     6  0.2482     0.6058 0.000 0.148 0.000 0.004 0.000 0.848
#> GSM648607     3  0.0000     0.8967 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648611     3  0.2724     0.8465 0.000 0.016 0.876 0.032 0.076 0.000
#> GSM648612     3  0.0146     0.8950 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM648616     1  0.0603     0.9313 0.980 0.016 0.000 0.004 0.000 0.000
#> GSM648617     1  0.2190     0.9099 0.900 0.060 0.000 0.040 0.000 0.000
#> GSM648626     1  0.0000     0.9327 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648711     3  0.0000     0.8967 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648712     3  0.0000     0.8967 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648713     3  0.0000     0.8967 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648714     5  0.1327     0.6734 0.000 0.000 0.064 0.000 0.936 0.000
#> GSM648716     3  0.0000     0.8967 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648717     5  0.1663     0.6778 0.000 0.000 0.088 0.000 0.912 0.000
#> GSM648590     6  0.3672     0.2882 0.000 0.368 0.000 0.000 0.000 0.632
#> GSM648596     2  0.2454     0.8253 0.000 0.840 0.000 0.000 0.000 0.160
#> GSM648642     5  0.5160     0.4560 0.000 0.396 0.060 0.012 0.532 0.000
#> GSM648696     1  0.3225     0.8852 0.828 0.080 0.000 0.092 0.000 0.000
#> GSM648705     6  0.2362     0.6133 0.000 0.136 0.000 0.004 0.000 0.860
#> GSM648718     6  0.3695     0.2755 0.000 0.376 0.000 0.000 0.000 0.624
#> GSM648599     1  0.0000     0.9327 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM648608     3  0.0000     0.8967 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648609     3  0.0000     0.8967 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648610     3  0.0000     0.8967 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648633     6  0.2520     0.6037 0.000 0.152 0.000 0.004 0.000 0.844
#> GSM648644     2  0.2595     0.8243 0.000 0.836 0.000 0.004 0.000 0.160
#> GSM648652     6  0.2402     0.5151 0.000 0.004 0.000 0.140 0.000 0.856
#> GSM648653     1  0.0291     0.9329 0.992 0.004 0.000 0.004 0.000 0.000
#> GSM648658     6  0.1124     0.6422 0.000 0.036 0.000 0.008 0.000 0.956
#> GSM648659     6  0.1500     0.6433 0.000 0.052 0.000 0.012 0.000 0.936
#> GSM648662     5  0.6446     0.5699 0.000 0.056 0.340 0.136 0.468 0.000
#> GSM648665     5  0.6850     0.4981 0.000 0.076 0.368 0.164 0.392 0.000
#> GSM648666     1  0.0146     0.9322 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM648680     6  0.1341     0.6285 0.000 0.024 0.000 0.028 0.000 0.948
#> GSM648684     3  0.0000     0.8967 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648709     1  0.0458     0.9318 0.984 0.016 0.000 0.000 0.000 0.000
#> GSM648719     6  0.3619     0.1996 0.000 0.004 0.000 0.316 0.000 0.680
#> GSM648627     3  0.1245     0.8814 0.000 0.016 0.952 0.032 0.000 0.000
#> GSM648637     1  0.6084     0.4191 0.528 0.060 0.000 0.092 0.320 0.000
#> GSM648638     5  0.1327     0.6734 0.000 0.000 0.064 0.000 0.936 0.000
#> GSM648641     5  0.6442     0.5511 0.000 0.060 0.316 0.136 0.488 0.000
#> GSM648672     6  0.3765     0.1975 0.000 0.404 0.000 0.000 0.000 0.596
#> GSM648674     6  0.3619     0.2120 0.000 0.004 0.000 0.316 0.000 0.680
#> GSM648703     6  0.3499     0.3610 0.000 0.320 0.000 0.000 0.000 0.680
#> GSM648631     3  0.2724     0.8465 0.000 0.016 0.876 0.032 0.076 0.000
#> GSM648669     4  0.4270     0.9049 0.000 0.052 0.000 0.684 0.000 0.264
#> GSM648671     4  0.3564     0.9116 0.000 0.012 0.000 0.724 0.000 0.264
#> GSM648678     6  0.3765     0.1975 0.000 0.404 0.000 0.000 0.000 0.596
#> GSM648679     6  0.3563     0.3553 0.000 0.336 0.000 0.000 0.000 0.664
#> GSM648681     6  0.3468     0.2674 0.000 0.004 0.000 0.284 0.000 0.712
#> GSM648686     5  0.6411     0.5511 0.000 0.060 0.304 0.136 0.500 0.000
#> GSM648689     5  0.6411     0.5511 0.000 0.060 0.304 0.136 0.500 0.000
#> GSM648690     5  0.6411     0.5511 0.000 0.060 0.304 0.136 0.500 0.000
#> GSM648691     3  0.2724     0.8465 0.000 0.016 0.876 0.032 0.076 0.000
#> GSM648693     3  0.2724     0.8465 0.000 0.016 0.876 0.032 0.076 0.000
#> GSM648700     4  0.4578     0.7721 0.000 0.056 0.000 0.624 0.000 0.320
#> GSM648630     3  0.3424     0.7917 0.000 0.016 0.816 0.032 0.136 0.000
#> GSM648632     3  0.2724     0.8465 0.000 0.016 0.876 0.032 0.076 0.000
#> GSM648639     1  0.3123     0.8886 0.836 0.076 0.000 0.088 0.000 0.000
#> GSM648640     5  0.1663     0.6530 0.000 0.000 0.088 0.000 0.912 0.000
#> GSM648668     6  0.3765     0.1975 0.000 0.404 0.000 0.000 0.000 0.596
#> GSM648676     6  0.3802     0.2099 0.000 0.012 0.000 0.312 0.000 0.676
#> GSM648692     3  0.4927     0.0852 0.000 0.016 0.484 0.032 0.468 0.000
#> GSM648694     5  0.4832    -0.0114 0.000 0.012 0.440 0.032 0.516 0.000
#> GSM648699     4  0.3490     0.9092 0.000 0.008 0.000 0.724 0.000 0.268
#> GSM648701     6  0.2706     0.5457 0.000 0.036 0.000 0.104 0.000 0.860
#> GSM648673     4  0.4814     0.8693 0.000 0.100 0.000 0.644 0.000 0.256
#> GSM648677     2  0.3647     0.6424 0.000 0.640 0.000 0.000 0.000 0.360
#> GSM648687     1  0.0146     0.9322 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM648688     3  0.2724     0.8465 0.000 0.016 0.876 0.032 0.076 0.000

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-ATC-mclust-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-ATC-mclust-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-ATC-mclust-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-ATC-mclust-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-ATC-mclust-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-ATC-mclust-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-ATC-mclust-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-ATC-mclust-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-ATC-mclust-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-ATC-mclust-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-ATC-mclust-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-ATC-mclust-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-ATC-mclust-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-ATC-mclust-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-ATC-mclust-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-ATC-mclust-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-ATC-mclust-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-ATC-mclust-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-ATC-mclust-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-ATC-mclust-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk ATC-mclust-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-ATC-mclust-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-ATC-mclust-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-ATC-mclust-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-ATC-mclust-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-ATC-mclust-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk ATC-mclust-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>              n disease.state(p) development.stage(p) other(p) k
#> ATC:mclust 130         0.413232                0.669 5.46e-04 2
#> ATC:mclust 130         0.070115                0.479 4.39e-04 3
#> ATC:mclust 119         0.104139                0.589 4.51e-04 4
#> ATC:mclust 108         0.012479                0.747 7.32e-07 5
#> ATC:mclust 103         0.000155                0.366 1.23e-05 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


ATC:NMF**

The object with results only for a single top-value method and a single partition method can be extracted as:

res = res_list["ATC", "NMF"]
# you can also extract it by
# res = res_list["ATC:NMF"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 130 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#>   Subgroups are detected by 'NMF' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk ATC-NMF-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk ATC-NMF-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           0.965       0.986         0.4127 0.590   0.590
#> 3 3 0.776           0.860       0.930         0.5842 0.723   0.537
#> 4 4 0.697           0.742       0.861         0.1008 0.883   0.678
#> 5 5 0.622           0.616       0.794         0.0661 0.842   0.528
#> 6 6 0.713           0.629       0.811         0.0336 0.875   0.573

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 2

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM648605     2  0.0000      0.988 0.000 1.000
#> GSM648618     2  0.0000      0.988 0.000 1.000
#> GSM648620     2  0.0000      0.988 0.000 1.000
#> GSM648646     2  0.0000      0.988 0.000 1.000
#> GSM648649     2  0.0000      0.988 0.000 1.000
#> GSM648675     2  0.0000      0.988 0.000 1.000
#> GSM648682     2  0.0000      0.988 0.000 1.000
#> GSM648698     2  0.0000      0.988 0.000 1.000
#> GSM648708     2  0.0000      0.988 0.000 1.000
#> GSM648628     1  0.0000      0.980 1.000 0.000
#> GSM648595     2  0.0000      0.988 0.000 1.000
#> GSM648635     2  0.0000      0.988 0.000 1.000
#> GSM648645     2  0.0000      0.988 0.000 1.000
#> GSM648647     2  0.0000      0.988 0.000 1.000
#> GSM648667     2  0.0000      0.988 0.000 1.000
#> GSM648695     2  0.0000      0.988 0.000 1.000
#> GSM648704     2  0.0000      0.988 0.000 1.000
#> GSM648706     2  0.0000      0.988 0.000 1.000
#> GSM648593     2  0.0000      0.988 0.000 1.000
#> GSM648594     2  0.0000      0.988 0.000 1.000
#> GSM648600     2  0.0000      0.988 0.000 1.000
#> GSM648621     2  0.0000      0.988 0.000 1.000
#> GSM648622     2  0.0000      0.988 0.000 1.000
#> GSM648623     2  0.0000      0.988 0.000 1.000
#> GSM648636     2  0.0000      0.988 0.000 1.000
#> GSM648655     2  0.0000      0.988 0.000 1.000
#> GSM648661     1  0.0000      0.980 1.000 0.000
#> GSM648664     1  0.0000      0.980 1.000 0.000
#> GSM648683     1  0.8955      0.554 0.688 0.312
#> GSM648685     2  0.9881      0.206 0.436 0.564
#> GSM648702     2  0.0000      0.988 0.000 1.000
#> GSM648597     2  0.0000      0.988 0.000 1.000
#> GSM648603     2  0.0000      0.988 0.000 1.000
#> GSM648606     1  0.6438      0.803 0.836 0.164
#> GSM648613     1  0.0000      0.980 1.000 0.000
#> GSM648619     1  0.0000      0.980 1.000 0.000
#> GSM648654     1  0.0000      0.980 1.000 0.000
#> GSM648663     1  0.0000      0.980 1.000 0.000
#> GSM648670     2  0.0000      0.988 0.000 1.000
#> GSM648707     2  0.0000      0.988 0.000 1.000
#> GSM648615     2  0.0000      0.988 0.000 1.000
#> GSM648643     2  0.0000      0.988 0.000 1.000
#> GSM648650     2  0.0000      0.988 0.000 1.000
#> GSM648656     2  0.0000      0.988 0.000 1.000
#> GSM648715     2  0.0000      0.988 0.000 1.000
#> GSM648598     2  0.0000      0.988 0.000 1.000
#> GSM648601     2  0.0000      0.988 0.000 1.000
#> GSM648602     2  0.0000      0.988 0.000 1.000
#> GSM648604     1  0.0376      0.976 0.996 0.004
#> GSM648614     2  0.0000      0.988 0.000 1.000
#> GSM648624     2  0.0000      0.988 0.000 1.000
#> GSM648625     2  0.0000      0.988 0.000 1.000
#> GSM648629     1  0.0000      0.980 1.000 0.000
#> GSM648634     2  0.0000      0.988 0.000 1.000
#> GSM648648     2  0.0000      0.988 0.000 1.000
#> GSM648651     2  0.0000      0.988 0.000 1.000
#> GSM648657     2  0.0000      0.988 0.000 1.000
#> GSM648660     2  0.0000      0.988 0.000 1.000
#> GSM648697     2  0.0000      0.988 0.000 1.000
#> GSM648710     1  0.0000      0.980 1.000 0.000
#> GSM648591     2  0.0000      0.988 0.000 1.000
#> GSM648592     2  0.0000      0.988 0.000 1.000
#> GSM648607     1  0.0000      0.980 1.000 0.000
#> GSM648611     1  0.0000      0.980 1.000 0.000
#> GSM648612     1  0.0000      0.980 1.000 0.000
#> GSM648616     2  0.0000      0.988 0.000 1.000
#> GSM648617     2  0.0000      0.988 0.000 1.000
#> GSM648626     2  0.0000      0.988 0.000 1.000
#> GSM648711     1  0.0000      0.980 1.000 0.000
#> GSM648712     1  0.0000      0.980 1.000 0.000
#> GSM648713     1  0.0000      0.980 1.000 0.000
#> GSM648714     2  0.0000      0.988 0.000 1.000
#> GSM648716     1  0.0000      0.980 1.000 0.000
#> GSM648717     1  0.0000      0.980 1.000 0.000
#> GSM648590     2  0.0000      0.988 0.000 1.000
#> GSM648596     2  0.0000      0.988 0.000 1.000
#> GSM648642     2  0.0000      0.988 0.000 1.000
#> GSM648696     2  0.0000      0.988 0.000 1.000
#> GSM648705     2  0.0000      0.988 0.000 1.000
#> GSM648718     2  0.0000      0.988 0.000 1.000
#> GSM648599     2  0.0000      0.988 0.000 1.000
#> GSM648608     1  0.0000      0.980 1.000 0.000
#> GSM648609     1  0.0000      0.980 1.000 0.000
#> GSM648610     2  0.0000      0.988 0.000 1.000
#> GSM648633     2  0.0000      0.988 0.000 1.000
#> GSM648644     2  0.0000      0.988 0.000 1.000
#> GSM648652     2  0.0000      0.988 0.000 1.000
#> GSM648653     2  0.0000      0.988 0.000 1.000
#> GSM648658     2  0.0000      0.988 0.000 1.000
#> GSM648659     2  0.0000      0.988 0.000 1.000
#> GSM648662     2  0.6343      0.799 0.160 0.840
#> GSM648665     1  0.7745      0.709 0.772 0.228
#> GSM648666     2  0.0000      0.988 0.000 1.000
#> GSM648680     2  0.0000      0.988 0.000 1.000
#> GSM648684     2  0.9933      0.152 0.452 0.548
#> GSM648709     2  0.0000      0.988 0.000 1.000
#> GSM648719     2  0.0000      0.988 0.000 1.000
#> GSM648627     1  0.0000      0.980 1.000 0.000
#> GSM648637     2  0.0000      0.988 0.000 1.000
#> GSM648638     2  0.0000      0.988 0.000 1.000
#> GSM648641     1  0.0000      0.980 1.000 0.000
#> GSM648672     2  0.0000      0.988 0.000 1.000
#> GSM648674     2  0.0000      0.988 0.000 1.000
#> GSM648703     2  0.0000      0.988 0.000 1.000
#> GSM648631     1  0.0000      0.980 1.000 0.000
#> GSM648669     2  0.0000      0.988 0.000 1.000
#> GSM648671     2  0.0000      0.988 0.000 1.000
#> GSM648678     2  0.0000      0.988 0.000 1.000
#> GSM648679     2  0.0000      0.988 0.000 1.000
#> GSM648681     2  0.0000      0.988 0.000 1.000
#> GSM648686     1  0.0000      0.980 1.000 0.000
#> GSM648689     1  0.0000      0.980 1.000 0.000
#> GSM648690     1  0.0000      0.980 1.000 0.000
#> GSM648691     1  0.0000      0.980 1.000 0.000
#> GSM648693     1  0.0000      0.980 1.000 0.000
#> GSM648700     2  0.0000      0.988 0.000 1.000
#> GSM648630     1  0.0000      0.980 1.000 0.000
#> GSM648632     1  0.0000      0.980 1.000 0.000
#> GSM648639     2  0.0000      0.988 0.000 1.000
#> GSM648640     1  0.0000      0.980 1.000 0.000
#> GSM648668     2  0.0000      0.988 0.000 1.000
#> GSM648676     2  0.0000      0.988 0.000 1.000
#> GSM648692     1  0.0000      0.980 1.000 0.000
#> GSM648694     1  0.0000      0.980 1.000 0.000
#> GSM648699     2  0.0000      0.988 0.000 1.000
#> GSM648701     2  0.0000      0.988 0.000 1.000
#> GSM648673     2  0.0000      0.988 0.000 1.000
#> GSM648677     2  0.0000      0.988 0.000 1.000
#> GSM648687     2  0.0000      0.988 0.000 1.000
#> GSM648688     1  0.0000      0.980 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM648605     2  0.0000      0.844 0.000 1.000 0.000
#> GSM648618     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648620     2  0.4931      0.743 0.232 0.768 0.000
#> GSM648646     2  0.0000      0.844 0.000 1.000 0.000
#> GSM648649     2  0.6140      0.491 0.404 0.596 0.000
#> GSM648675     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648682     2  0.4346      0.780 0.184 0.816 0.000
#> GSM648698     2  0.3340      0.817 0.120 0.880 0.000
#> GSM648708     2  0.5810      0.620 0.336 0.664 0.000
#> GSM648628     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648595     2  0.3267      0.819 0.116 0.884 0.000
#> GSM648635     1  0.4842      0.683 0.776 0.224 0.000
#> GSM648645     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648647     2  0.0000      0.844 0.000 1.000 0.000
#> GSM648667     2  0.1411      0.844 0.036 0.964 0.000
#> GSM648695     2  0.1643      0.844 0.044 0.956 0.000
#> GSM648704     2  0.0000      0.844 0.000 1.000 0.000
#> GSM648706     2  0.0000      0.844 0.000 1.000 0.000
#> GSM648593     1  0.4121      0.779 0.832 0.168 0.000
#> GSM648594     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648600     1  0.4504      0.733 0.804 0.196 0.000
#> GSM648621     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648622     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648623     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648636     1  0.4291      0.760 0.820 0.180 0.000
#> GSM648655     1  0.3192      0.850 0.888 0.112 0.000
#> GSM648661     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648664     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648683     3  0.2711      0.879 0.088 0.000 0.912
#> GSM648685     3  0.5905      0.438 0.352 0.000 0.648
#> GSM648702     2  0.6280      0.348 0.460 0.540 0.000
#> GSM648597     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648603     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648606     3  0.5098      0.686 0.000 0.248 0.752
#> GSM648613     3  0.0747      0.956 0.000 0.016 0.984
#> GSM648619     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648654     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648663     3  0.2356      0.912 0.000 0.072 0.928
#> GSM648670     2  0.5327      0.705 0.272 0.728 0.000
#> GSM648707     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648615     2  0.5178      0.721 0.256 0.744 0.000
#> GSM648643     2  0.0237      0.844 0.004 0.996 0.000
#> GSM648650     2  0.4654      0.763 0.208 0.792 0.000
#> GSM648656     2  0.0000      0.844 0.000 1.000 0.000
#> GSM648715     2  0.0592      0.845 0.012 0.988 0.000
#> GSM648598     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648601     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648602     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648604     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648614     2  0.0000      0.844 0.000 1.000 0.000
#> GSM648624     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648625     2  0.5431      0.691 0.284 0.716 0.000
#> GSM648629     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648634     1  0.0237      0.947 0.996 0.004 0.000
#> GSM648648     1  0.0747      0.939 0.984 0.016 0.000
#> GSM648651     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648657     1  0.0237      0.947 0.996 0.004 0.000
#> GSM648660     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648697     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648710     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648591     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648592     1  0.2165      0.901 0.936 0.064 0.000
#> GSM648607     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648611     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648612     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648616     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648617     1  0.1860      0.912 0.948 0.052 0.000
#> GSM648626     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648711     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648712     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648713     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648714     2  0.0000      0.844 0.000 1.000 0.000
#> GSM648716     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648717     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648590     2  0.2261      0.838 0.068 0.932 0.000
#> GSM648596     2  0.0237      0.844 0.004 0.996 0.000
#> GSM648642     2  0.0000      0.844 0.000 1.000 0.000
#> GSM648696     2  0.5968      0.572 0.364 0.636 0.000
#> GSM648705     2  0.5529      0.677 0.296 0.704 0.000
#> GSM648718     2  0.2711      0.831 0.088 0.912 0.000
#> GSM648599     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648608     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648609     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648610     2  0.7600      0.561 0.344 0.600 0.056
#> GSM648633     2  0.6252      0.393 0.444 0.556 0.000
#> GSM648644     2  0.0000      0.844 0.000 1.000 0.000
#> GSM648652     1  0.1643      0.918 0.956 0.044 0.000
#> GSM648653     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648658     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648659     2  0.6307      0.259 0.488 0.512 0.000
#> GSM648662     2  0.0592      0.837 0.000 0.988 0.012
#> GSM648665     3  0.3619      0.846 0.000 0.136 0.864
#> GSM648666     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648680     1  0.0237      0.947 0.996 0.004 0.000
#> GSM648684     3  0.4808      0.747 0.188 0.008 0.804
#> GSM648709     1  0.5178      0.615 0.744 0.256 0.000
#> GSM648719     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648627     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648637     2  0.0000      0.844 0.000 1.000 0.000
#> GSM648638     2  0.0000      0.844 0.000 1.000 0.000
#> GSM648641     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648672     2  0.0000      0.844 0.000 1.000 0.000
#> GSM648674     2  0.5650      0.656 0.312 0.688 0.000
#> GSM648703     2  0.1643      0.843 0.044 0.956 0.000
#> GSM648631     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648669     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648671     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648678     2  0.0000      0.844 0.000 1.000 0.000
#> GSM648679     2  0.1964      0.841 0.056 0.944 0.000
#> GSM648681     1  0.5706      0.448 0.680 0.320 0.000
#> GSM648686     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648689     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648690     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648691     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648693     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648700     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648630     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648632     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648639     1  0.2356      0.894 0.928 0.072 0.000
#> GSM648640     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648668     2  0.0747      0.845 0.016 0.984 0.000
#> GSM648676     1  0.4346      0.752 0.816 0.184 0.000
#> GSM648692     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648694     3  0.0000      0.969 0.000 0.000 1.000
#> GSM648699     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648701     2  0.6291      0.322 0.468 0.532 0.000
#> GSM648673     1  0.0237      0.947 0.996 0.004 0.000
#> GSM648677     2  0.1163      0.845 0.028 0.972 0.000
#> GSM648687     1  0.0000      0.949 1.000 0.000 0.000
#> GSM648688     3  0.0000      0.969 0.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM648605     2  0.1557      0.699 0.000 0.944 0.000 0.056
#> GSM648618     1  0.0707      0.853 0.980 0.020 0.000 0.000
#> GSM648620     2  0.1978      0.713 0.068 0.928 0.000 0.004
#> GSM648646     2  0.4356      0.454 0.000 0.708 0.000 0.292
#> GSM648649     2  0.5411      0.442 0.312 0.656 0.000 0.032
#> GSM648675     1  0.2011      0.857 0.920 0.000 0.000 0.080
#> GSM648682     2  0.1389      0.715 0.048 0.952 0.000 0.000
#> GSM648698     2  0.1520      0.718 0.024 0.956 0.000 0.020
#> GSM648708     2  0.3142      0.682 0.132 0.860 0.000 0.008
#> GSM648628     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648595     4  0.6071      0.181 0.044 0.452 0.000 0.504
#> GSM648635     1  0.2329      0.859 0.916 0.012 0.000 0.072
#> GSM648645     1  0.1940      0.857 0.924 0.000 0.000 0.076
#> GSM648647     4  0.2976      0.646 0.008 0.120 0.000 0.872
#> GSM648667     2  0.4382      0.469 0.000 0.704 0.000 0.296
#> GSM648695     2  0.1284      0.717 0.024 0.964 0.000 0.012
#> GSM648704     2  0.3873      0.560 0.000 0.772 0.000 0.228
#> GSM648706     2  0.3074      0.634 0.000 0.848 0.000 0.152
#> GSM648593     1  0.2654      0.853 0.888 0.004 0.000 0.108
#> GSM648594     1  0.2149      0.855 0.912 0.000 0.000 0.088
#> GSM648600     2  0.4356      0.508 0.292 0.708 0.000 0.000
#> GSM648621     1  0.4382      0.551 0.704 0.296 0.000 0.000
#> GSM648622     1  0.0817      0.852 0.976 0.024 0.000 0.000
#> GSM648623     1  0.1118      0.848 0.964 0.036 0.000 0.000
#> GSM648636     1  0.2868      0.840 0.864 0.000 0.000 0.136
#> GSM648655     1  0.2814      0.842 0.868 0.000 0.000 0.132
#> GSM648661     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648664     3  0.0188      0.957 0.000 0.000 0.996 0.004
#> GSM648683     3  0.2670      0.875 0.040 0.052 0.908 0.000
#> GSM648685     3  0.6167      0.547 0.124 0.208 0.668 0.000
#> GSM648702     1  0.5365      0.681 0.692 0.044 0.000 0.264
#> GSM648597     1  0.0707      0.858 0.980 0.000 0.000 0.020
#> GSM648603     1  0.1637      0.839 0.940 0.060 0.000 0.000
#> GSM648606     2  0.2589      0.611 0.000 0.884 0.116 0.000
#> GSM648613     3  0.2011      0.889 0.000 0.080 0.920 0.000
#> GSM648619     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648654     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648663     3  0.2530      0.869 0.000 0.000 0.888 0.112
#> GSM648670     2  0.4701      0.626 0.164 0.780 0.000 0.056
#> GSM648707     1  0.1022      0.850 0.968 0.032 0.000 0.000
#> GSM648615     2  0.1661      0.716 0.052 0.944 0.000 0.004
#> GSM648643     2  0.3873      0.571 0.000 0.772 0.000 0.228
#> GSM648650     2  0.7128      0.165 0.152 0.528 0.000 0.320
#> GSM648656     2  0.3610      0.592 0.000 0.800 0.000 0.200
#> GSM648715     4  0.4122      0.643 0.004 0.236 0.000 0.760
#> GSM648598     1  0.1940      0.829 0.924 0.076 0.000 0.000
#> GSM648601     1  0.2530      0.804 0.888 0.112 0.000 0.000
#> GSM648602     1  0.2469      0.807 0.892 0.108 0.000 0.000
#> GSM648604     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648614     2  0.2149      0.684 0.000 0.912 0.000 0.088
#> GSM648624     1  0.0817      0.852 0.976 0.024 0.000 0.000
#> GSM648625     2  0.2149      0.707 0.088 0.912 0.000 0.000
#> GSM648629     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648634     1  0.4164      0.613 0.736 0.264 0.000 0.000
#> GSM648648     1  0.3400      0.818 0.820 0.000 0.000 0.180
#> GSM648651     1  0.0336      0.855 0.992 0.008 0.000 0.000
#> GSM648657     1  0.2760      0.842 0.872 0.000 0.000 0.128
#> GSM648660     1  0.1004      0.859 0.972 0.004 0.000 0.024
#> GSM648697     1  0.0592      0.854 0.984 0.016 0.000 0.000
#> GSM648710     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648591     1  0.3311      0.822 0.828 0.000 0.000 0.172
#> GSM648592     1  0.2611      0.826 0.896 0.096 0.000 0.008
#> GSM648607     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648611     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648612     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648616     1  0.3074      0.767 0.848 0.152 0.000 0.000
#> GSM648617     2  0.4941      0.284 0.436 0.564 0.000 0.000
#> GSM648626     1  0.3266      0.749 0.832 0.168 0.000 0.000
#> GSM648711     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648712     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648713     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648714     2  0.1474      0.699 0.000 0.948 0.000 0.052
#> GSM648716     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648717     3  0.4933      0.284 0.000 0.432 0.568 0.000
#> GSM648590     4  0.3881      0.664 0.016 0.172 0.000 0.812
#> GSM648596     2  0.4431      0.437 0.000 0.696 0.000 0.304
#> GSM648642     4  0.4661      0.516 0.000 0.348 0.000 0.652
#> GSM648696     2  0.2216      0.704 0.092 0.908 0.000 0.000
#> GSM648705     4  0.7773      0.295 0.284 0.284 0.000 0.432
#> GSM648718     4  0.4761      0.655 0.044 0.192 0.000 0.764
#> GSM648599     1  0.2530      0.804 0.888 0.112 0.000 0.000
#> GSM648608     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648609     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648610     2  0.2469      0.696 0.108 0.892 0.000 0.000
#> GSM648633     1  0.5862      0.655 0.704 0.148 0.000 0.148
#> GSM648644     2  0.3907      0.553 0.000 0.768 0.000 0.232
#> GSM648652     1  0.2530      0.849 0.888 0.000 0.000 0.112
#> GSM648653     1  0.0921      0.852 0.972 0.028 0.000 0.000
#> GSM648658     1  0.1867      0.857 0.928 0.000 0.000 0.072
#> GSM648659     1  0.5407      0.344 0.504 0.012 0.000 0.484
#> GSM648662     4  0.6949      0.129 0.000 0.112 0.408 0.480
#> GSM648665     3  0.2345      0.876 0.000 0.000 0.900 0.100
#> GSM648666     1  0.0336      0.855 0.992 0.008 0.000 0.000
#> GSM648680     1  0.2081      0.856 0.916 0.000 0.000 0.084
#> GSM648684     3  0.4776      0.717 0.060 0.164 0.776 0.000
#> GSM648709     2  0.4164      0.546 0.264 0.736 0.000 0.000
#> GSM648719     1  0.2647      0.845 0.880 0.000 0.000 0.120
#> GSM648627     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648637     2  0.0779      0.715 0.016 0.980 0.000 0.004
#> GSM648638     2  0.1867      0.690 0.000 0.928 0.000 0.072
#> GSM648641     3  0.0188      0.957 0.000 0.000 0.996 0.004
#> GSM648672     4  0.3356      0.662 0.000 0.176 0.000 0.824
#> GSM648674     2  0.6881      0.359 0.236 0.592 0.000 0.172
#> GSM648703     4  0.5163      0.204 0.004 0.480 0.000 0.516
#> GSM648631     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648669     1  0.4193      0.747 0.732 0.000 0.000 0.268
#> GSM648671     1  0.3610      0.808 0.800 0.000 0.000 0.200
#> GSM648678     4  0.4564      0.547 0.000 0.328 0.000 0.672
#> GSM648679     4  0.3497      0.643 0.024 0.124 0.000 0.852
#> GSM648681     1  0.3306      0.835 0.840 0.004 0.000 0.156
#> GSM648686     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648689     3  0.0188      0.957 0.000 0.000 0.996 0.004
#> GSM648690     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648691     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648693     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648700     1  0.3400      0.819 0.820 0.000 0.000 0.180
#> GSM648630     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648632     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648639     2  0.3873      0.591 0.228 0.772 0.000 0.000
#> GSM648640     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648668     4  0.4088      0.646 0.004 0.232 0.000 0.764
#> GSM648676     1  0.3172      0.830 0.840 0.000 0.000 0.160
#> GSM648692     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648694     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM648699     1  0.3942      0.780 0.764 0.000 0.000 0.236
#> GSM648701     4  0.5165     -0.358 0.484 0.004 0.000 0.512
#> GSM648673     1  0.4916      0.518 0.576 0.000 0.000 0.424
#> GSM648677     2  0.2469      0.684 0.000 0.892 0.000 0.108
#> GSM648687     1  0.1867      0.831 0.928 0.072 0.000 0.000
#> GSM648688     3  0.0000      0.959 0.000 0.000 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM648605     2  0.0510     0.5852 0.000 0.984 0.000 0.000 0.016
#> GSM648618     1  0.1628     0.7883 0.936 0.000 0.000 0.056 0.008
#> GSM648620     2  0.4033     0.5356 0.212 0.760 0.000 0.024 0.004
#> GSM648646     2  0.5292     0.3875 0.004 0.580 0.000 0.368 0.048
#> GSM648649     4  0.6384     0.1474 0.152 0.360 0.000 0.484 0.004
#> GSM648675     4  0.4734     0.4739 0.372 0.000 0.000 0.604 0.024
#> GSM648682     2  0.2517     0.5874 0.104 0.884 0.000 0.008 0.004
#> GSM648698     2  0.3774     0.5692 0.160 0.804 0.000 0.028 0.008
#> GSM648708     2  0.4860     0.4410 0.292 0.664 0.000 0.040 0.004
#> GSM648628     3  0.0000     0.8703 0.000 0.000 1.000 0.000 0.000
#> GSM648595     4  0.5681     0.5434 0.072 0.196 0.000 0.684 0.048
#> GSM648635     4  0.4773     0.6107 0.312 0.008 0.000 0.656 0.024
#> GSM648645     1  0.5104     0.4575 0.648 0.000 0.000 0.284 0.068
#> GSM648647     4  0.3736     0.5927 0.000 0.052 0.000 0.808 0.140
#> GSM648667     2  0.5616     0.2241 0.020 0.508 0.000 0.436 0.036
#> GSM648695     2  0.1041     0.5977 0.032 0.964 0.000 0.004 0.000
#> GSM648704     2  0.5106     0.3802 0.004 0.588 0.000 0.372 0.036
#> GSM648706     2  0.2423     0.5518 0.000 0.896 0.000 0.024 0.080
#> GSM648593     4  0.4233     0.7143 0.208 0.000 0.000 0.748 0.044
#> GSM648594     4  0.5176     0.1960 0.468 0.000 0.000 0.492 0.040
#> GSM648600     1  0.5106     0.3020 0.564 0.400 0.000 0.032 0.004
#> GSM648621     1  0.3934     0.7109 0.796 0.160 0.000 0.036 0.008
#> GSM648622     1  0.3106     0.7313 0.844 0.000 0.000 0.024 0.132
#> GSM648623     1  0.1549     0.7931 0.944 0.000 0.000 0.040 0.016
#> GSM648636     4  0.3196     0.7414 0.192 0.000 0.000 0.804 0.004
#> GSM648655     4  0.3266     0.7364 0.200 0.000 0.000 0.796 0.004
#> GSM648661     3  0.2852     0.7314 0.000 0.000 0.828 0.000 0.172
#> GSM648664     3  0.3969     0.5316 0.000 0.000 0.692 0.004 0.304
#> GSM648683     3  0.6903     0.3762 0.120 0.096 0.588 0.000 0.196
#> GSM648685     3  0.8526     0.0620 0.136 0.164 0.464 0.040 0.196
#> GSM648702     4  0.3257     0.7410 0.112 0.012 0.000 0.852 0.024
#> GSM648597     1  0.3736     0.6855 0.808 0.000 0.000 0.140 0.052
#> GSM648603     1  0.2387     0.7911 0.908 0.004 0.000 0.040 0.048
#> GSM648606     2  0.3400     0.4685 0.004 0.840 0.116 0.000 0.040
#> GSM648613     3  0.2408     0.7932 0.000 0.092 0.892 0.000 0.016
#> GSM648619     3  0.0290     0.8685 0.000 0.000 0.992 0.000 0.008
#> GSM648654     3  0.0609     0.8640 0.000 0.000 0.980 0.000 0.020
#> GSM648663     5  0.4451     0.5684 0.000 0.000 0.248 0.040 0.712
#> GSM648670     2  0.6065     0.4120 0.132 0.560 0.000 0.304 0.004
#> GSM648707     1  0.1579     0.7896 0.944 0.000 0.000 0.032 0.024
#> GSM648615     2  0.2462     0.5886 0.112 0.880 0.000 0.008 0.000
#> GSM648643     2  0.5225     0.2579 0.020 0.540 0.000 0.424 0.016
#> GSM648650     4  0.5324     0.5298 0.076 0.224 0.000 0.684 0.016
#> GSM648656     2  0.4752     0.4890 0.004 0.684 0.000 0.272 0.040
#> GSM648715     4  0.4509     0.5946 0.012 0.108 0.000 0.776 0.104
#> GSM648598     1  0.3355     0.7635 0.856 0.012 0.000 0.048 0.084
#> GSM648601     1  0.2768     0.7911 0.896 0.040 0.000 0.040 0.024
#> GSM648602     1  0.2420     0.7930 0.912 0.036 0.000 0.036 0.016
#> GSM648604     3  0.3880     0.7076 0.044 0.004 0.800 0.000 0.152
#> GSM648614     2  0.2813     0.4836 0.000 0.832 0.000 0.000 0.168
#> GSM648624     1  0.2900     0.7482 0.864 0.000 0.000 0.028 0.108
#> GSM648625     2  0.4007     0.5331 0.220 0.756 0.000 0.020 0.004
#> GSM648629     3  0.0000     0.8703 0.000 0.000 1.000 0.000 0.000
#> GSM648634     1  0.3669     0.7454 0.828 0.116 0.000 0.008 0.048
#> GSM648648     4  0.3795     0.7080 0.192 0.000 0.000 0.780 0.028
#> GSM648651     1  0.1648     0.7917 0.940 0.000 0.000 0.040 0.020
#> GSM648657     4  0.5238     0.1672 0.472 0.000 0.000 0.484 0.044
#> GSM648660     1  0.4155     0.6819 0.780 0.000 0.000 0.144 0.076
#> GSM648697     1  0.2278     0.7713 0.908 0.000 0.000 0.032 0.060
#> GSM648710     3  0.0703     0.8651 0.000 0.000 0.976 0.000 0.024
#> GSM648591     4  0.5084     0.4841 0.332 0.000 0.000 0.616 0.052
#> GSM648592     1  0.4901     0.5820 0.700 0.040 0.000 0.244 0.016
#> GSM648607     3  0.0880     0.8621 0.000 0.000 0.968 0.000 0.032
#> GSM648611     3  0.0162     0.8697 0.000 0.000 0.996 0.000 0.004
#> GSM648612     3  0.0880     0.8634 0.000 0.000 0.968 0.000 0.032
#> GSM648616     1  0.2853     0.7837 0.884 0.068 0.000 0.040 0.008
#> GSM648617     1  0.4625     0.6042 0.712 0.244 0.000 0.036 0.008
#> GSM648626     1  0.2938     0.7796 0.876 0.084 0.000 0.032 0.008
#> GSM648711     3  0.0290     0.8694 0.000 0.000 0.992 0.000 0.008
#> GSM648712     3  0.1484     0.8488 0.008 0.000 0.944 0.000 0.048
#> GSM648713     3  0.0609     0.8663 0.000 0.000 0.980 0.000 0.020
#> GSM648714     2  0.1121     0.5711 0.000 0.956 0.000 0.000 0.044
#> GSM648716     3  0.0000     0.8703 0.000 0.000 1.000 0.000 0.000
#> GSM648717     2  0.5157    -0.1115 0.000 0.520 0.440 0.000 0.040
#> GSM648590     4  0.3902     0.6416 0.016 0.068 0.000 0.824 0.092
#> GSM648596     2  0.5289     0.2573 0.004 0.528 0.000 0.428 0.040
#> GSM648642     5  0.6705     0.0697 0.000 0.292 0.000 0.280 0.428
#> GSM648696     2  0.4142     0.5053 0.252 0.728 0.000 0.016 0.004
#> GSM648705     4  0.4320     0.6930 0.088 0.076 0.000 0.804 0.032
#> GSM648718     4  0.3605     0.6688 0.024 0.056 0.000 0.848 0.072
#> GSM648599     1  0.3241     0.7810 0.872 0.040 0.000 0.036 0.052
#> GSM648608     3  0.2813     0.7856 0.024 0.000 0.868 0.000 0.108
#> GSM648609     3  0.1809     0.8385 0.012 0.000 0.928 0.000 0.060
#> GSM648610     2  0.5885     0.3108 0.152 0.632 0.004 0.004 0.208
#> GSM648633     4  0.4483     0.7117 0.156 0.064 0.000 0.768 0.012
#> GSM648644     2  0.5217     0.3916 0.004 0.588 0.000 0.364 0.044
#> GSM648652     4  0.4221     0.6815 0.236 0.000 0.000 0.732 0.032
#> GSM648653     1  0.3197     0.7266 0.836 0.000 0.000 0.024 0.140
#> GSM648658     1  0.4955     0.5143 0.680 0.000 0.000 0.248 0.072
#> GSM648659     4  0.2482     0.7295 0.084 0.000 0.000 0.892 0.024
#> GSM648662     5  0.4040     0.5685 0.004 0.076 0.028 0.064 0.828
#> GSM648665     5  0.5123     0.4658 0.024 0.000 0.276 0.032 0.668
#> GSM648666     1  0.1597     0.7906 0.940 0.000 0.000 0.048 0.012
#> GSM648680     1  0.5202     0.2711 0.596 0.000 0.000 0.348 0.056
#> GSM648684     3  0.7132     0.2991 0.060 0.180 0.556 0.004 0.200
#> GSM648709     1  0.5218     0.2246 0.536 0.424 0.000 0.036 0.004
#> GSM648719     4  0.5694     0.0715 0.460 0.000 0.000 0.460 0.080
#> GSM648627     3  0.0162     0.8694 0.000 0.000 0.996 0.000 0.004
#> GSM648637     2  0.0771     0.5945 0.020 0.976 0.000 0.004 0.000
#> GSM648638     2  0.1197     0.5704 0.000 0.952 0.000 0.000 0.048
#> GSM648641     3  0.4307    -0.0700 0.000 0.000 0.500 0.000 0.500
#> GSM648672     4  0.4185     0.6080 0.008 0.084 0.000 0.796 0.112
#> GSM648674     4  0.5240     0.6667 0.136 0.152 0.000 0.704 0.008
#> GSM648703     4  0.5237     0.4868 0.032 0.244 0.000 0.684 0.040
#> GSM648631     3  0.0000     0.8703 0.000 0.000 1.000 0.000 0.000
#> GSM648669     4  0.3055     0.7357 0.144 0.000 0.000 0.840 0.016
#> GSM648671     4  0.4360     0.7093 0.184 0.000 0.000 0.752 0.064
#> GSM648678     4  0.5020     0.5057 0.004 0.180 0.000 0.712 0.104
#> GSM648679     4  0.3426     0.6739 0.032 0.040 0.000 0.860 0.068
#> GSM648681     4  0.3583     0.7436 0.168 0.016 0.000 0.808 0.008
#> GSM648686     3  0.2605     0.7568 0.000 0.000 0.852 0.000 0.148
#> GSM648689     3  0.4045     0.4010 0.000 0.000 0.644 0.000 0.356
#> GSM648690     3  0.1851     0.8162 0.000 0.000 0.912 0.000 0.088
#> GSM648691     3  0.0000     0.8703 0.000 0.000 1.000 0.000 0.000
#> GSM648693     3  0.0000     0.8703 0.000 0.000 1.000 0.000 0.000
#> GSM648700     4  0.3970     0.7174 0.156 0.000 0.000 0.788 0.056
#> GSM648630     3  0.0000     0.8703 0.000 0.000 1.000 0.000 0.000
#> GSM648632     3  0.0000     0.8703 0.000 0.000 1.000 0.000 0.000
#> GSM648639     1  0.5384     0.2405 0.536 0.416 0.000 0.040 0.008
#> GSM648640     3  0.0703     0.8660 0.000 0.000 0.976 0.000 0.024
#> GSM648668     4  0.4350     0.6194 0.016 0.104 0.000 0.792 0.088
#> GSM648676     4  0.3768     0.7436 0.156 0.020 0.000 0.808 0.016
#> GSM648692     3  0.0000     0.8703 0.000 0.000 1.000 0.000 0.000
#> GSM648694     3  0.0000     0.8703 0.000 0.000 1.000 0.000 0.000
#> GSM648699     4  0.4036     0.7188 0.144 0.000 0.000 0.788 0.068
#> GSM648701     4  0.2871     0.7312 0.088 0.004 0.000 0.876 0.032
#> GSM648673     4  0.3477     0.7174 0.112 0.000 0.000 0.832 0.056
#> GSM648677     2  0.4846     0.3437 0.020 0.588 0.000 0.388 0.004
#> GSM648687     1  0.1913     0.7921 0.932 0.016 0.000 0.044 0.008
#> GSM648688     3  0.0000     0.8703 0.000 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM648605     2  0.1629     0.6884 0.004 0.940 0.000 0.004 0.028 0.024
#> GSM648618     1  0.1152     0.7397 0.952 0.000 0.000 0.004 0.000 0.044
#> GSM648620     1  0.4062     0.1701 0.552 0.440 0.000 0.000 0.000 0.008
#> GSM648646     4  0.4118     0.4149 0.000 0.396 0.000 0.592 0.004 0.008
#> GSM648649     4  0.4056     0.7249 0.056 0.144 0.000 0.776 0.000 0.024
#> GSM648675     4  0.5065     0.5330 0.192 0.000 0.000 0.636 0.000 0.172
#> GSM648682     2  0.4138     0.5373 0.276 0.692 0.000 0.020 0.000 0.012
#> GSM648698     2  0.5093     0.3399 0.372 0.560 0.000 0.052 0.000 0.016
#> GSM648708     1  0.4061     0.4367 0.664 0.316 0.000 0.012 0.000 0.008
#> GSM648628     3  0.0000     0.8789 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648595     4  0.1728     0.7979 0.004 0.064 0.000 0.924 0.000 0.008
#> GSM648635     4  0.3585     0.7358 0.048 0.004 0.000 0.792 0.000 0.156
#> GSM648645     6  0.5944     0.2657 0.304 0.000 0.000 0.244 0.000 0.452
#> GSM648647     4  0.0976     0.8051 0.000 0.016 0.000 0.968 0.008 0.008
#> GSM648667     4  0.3767     0.6112 0.004 0.276 0.000 0.708 0.000 0.012
#> GSM648695     2  0.2402     0.6929 0.084 0.888 0.000 0.020 0.000 0.008
#> GSM648704     4  0.4039     0.3556 0.000 0.424 0.000 0.568 0.000 0.008
#> GSM648706     2  0.2510     0.6680 0.000 0.892 0.000 0.024 0.060 0.024
#> GSM648593     4  0.3088     0.7406 0.020 0.000 0.000 0.808 0.000 0.172
#> GSM648594     4  0.5714     0.2502 0.184 0.000 0.000 0.496 0.000 0.320
#> GSM648600     1  0.2945     0.6822 0.824 0.156 0.000 0.000 0.000 0.020
#> GSM648621     1  0.1802     0.7325 0.916 0.072 0.000 0.000 0.000 0.012
#> GSM648622     1  0.3578     0.5135 0.660 0.000 0.000 0.000 0.000 0.340
#> GSM648623     1  0.1958     0.7179 0.896 0.000 0.000 0.004 0.000 0.100
#> GSM648636     4  0.1225     0.8011 0.012 0.000 0.000 0.952 0.000 0.036
#> GSM648655     4  0.1572     0.7989 0.028 0.000 0.000 0.936 0.000 0.036
#> GSM648661     3  0.3620     0.3965 0.000 0.000 0.648 0.000 0.352 0.000
#> GSM648664     5  0.4482     0.3230 0.000 0.000 0.384 0.000 0.580 0.036
#> GSM648683     6  0.5645     0.3513 0.020 0.104 0.160 0.000 0.044 0.672
#> GSM648685     6  0.2802     0.4130 0.016 0.100 0.004 0.004 0.008 0.868
#> GSM648702     4  0.1010     0.8041 0.004 0.000 0.000 0.960 0.000 0.036
#> GSM648597     6  0.4684     0.1863 0.372 0.000 0.000 0.052 0.000 0.576
#> GSM648603     1  0.2377     0.7238 0.868 0.000 0.000 0.004 0.004 0.124
#> GSM648606     2  0.3996     0.5323 0.000 0.776 0.112 0.000 0.008 0.104
#> GSM648613     3  0.2566     0.7921 0.000 0.112 0.868 0.000 0.008 0.012
#> GSM648619     3  0.0363     0.8753 0.000 0.000 0.988 0.000 0.012 0.000
#> GSM648654     3  0.0865     0.8621 0.000 0.000 0.964 0.000 0.036 0.000
#> GSM648663     5  0.0790     0.6508 0.000 0.000 0.032 0.000 0.968 0.000
#> GSM648670     4  0.6045     0.2767 0.164 0.288 0.000 0.524 0.000 0.024
#> GSM648707     1  0.1958     0.7158 0.896 0.000 0.000 0.004 0.000 0.100
#> GSM648615     2  0.4190     0.4893 0.304 0.668 0.000 0.012 0.000 0.016
#> GSM648643     4  0.3713     0.6108 0.000 0.284 0.000 0.704 0.004 0.008
#> GSM648650     4  0.1584     0.8012 0.008 0.064 0.000 0.928 0.000 0.000
#> GSM648656     2  0.4158     0.0439 0.004 0.572 0.000 0.416 0.000 0.008
#> GSM648715     4  0.1590     0.8009 0.000 0.048 0.000 0.936 0.008 0.008
#> GSM648598     1  0.3937     0.3373 0.572 0.004 0.000 0.000 0.000 0.424
#> GSM648601     1  0.0520     0.7474 0.984 0.008 0.000 0.000 0.000 0.008
#> GSM648602     1  0.1080     0.7472 0.960 0.004 0.000 0.004 0.000 0.032
#> GSM648604     6  0.4863    -0.0759 0.000 0.040 0.440 0.000 0.008 0.512
#> GSM648614     2  0.3986     0.3651 0.000 0.664 0.000 0.000 0.316 0.020
#> GSM648624     1  0.3309     0.5748 0.720 0.000 0.000 0.000 0.000 0.280
#> GSM648625     1  0.4212     0.1966 0.560 0.424 0.000 0.000 0.000 0.016
#> GSM648629     3  0.0405     0.8779 0.000 0.000 0.988 0.000 0.004 0.008
#> GSM648634     1  0.3319     0.7037 0.800 0.036 0.000 0.000 0.000 0.164
#> GSM648648     4  0.3285     0.7425 0.064 0.000 0.000 0.820 0.000 0.116
#> GSM648651     1  0.2070     0.7147 0.892 0.000 0.000 0.008 0.000 0.100
#> GSM648657     4  0.4503     0.6165 0.108 0.000 0.000 0.700 0.000 0.192
#> GSM648660     6  0.3715     0.4496 0.188 0.000 0.000 0.048 0.000 0.764
#> GSM648697     1  0.2823     0.6327 0.796 0.000 0.000 0.000 0.000 0.204
#> GSM648710     3  0.2069     0.8449 0.000 0.020 0.908 0.000 0.004 0.068
#> GSM648591     4  0.4575     0.6133 0.124 0.000 0.000 0.696 0.000 0.180
#> GSM648592     1  0.6417    -0.1801 0.340 0.012 0.000 0.336 0.000 0.312
#> GSM648607     3  0.2060     0.8371 0.000 0.016 0.900 0.000 0.000 0.084
#> GSM648611     3  0.0000     0.8789 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648612     3  0.2206     0.8392 0.000 0.024 0.904 0.000 0.008 0.064
#> GSM648616     1  0.0458     0.7460 0.984 0.016 0.000 0.000 0.000 0.000
#> GSM648617     1  0.2218     0.7155 0.884 0.104 0.000 0.000 0.000 0.012
#> GSM648626     1  0.1624     0.7489 0.936 0.020 0.000 0.004 0.000 0.040
#> GSM648711     3  0.0858     0.8715 0.000 0.000 0.968 0.000 0.004 0.028
#> GSM648712     3  0.3361     0.7373 0.000 0.020 0.788 0.000 0.004 0.188
#> GSM648713     3  0.2034     0.8447 0.000 0.024 0.912 0.000 0.004 0.060
#> GSM648714     2  0.2138     0.6733 0.000 0.908 0.000 0.004 0.036 0.052
#> GSM648716     3  0.0146     0.8785 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM648717     3  0.4841     0.2592 0.000 0.412 0.536 0.000 0.004 0.048
#> GSM648590     4  0.0520     0.8061 0.000 0.008 0.000 0.984 0.008 0.000
#> GSM648596     4  0.3690     0.5777 0.000 0.308 0.000 0.684 0.000 0.008
#> GSM648642     5  0.5839     0.0326 0.000 0.236 0.000 0.276 0.488 0.000
#> GSM648696     1  0.4116     0.2326 0.572 0.416 0.000 0.000 0.000 0.012
#> GSM648705     4  0.1167     0.8086 0.008 0.020 0.000 0.960 0.000 0.012
#> GSM648718     4  0.1261     0.8052 0.004 0.028 0.000 0.956 0.004 0.008
#> GSM648599     1  0.1411     0.7459 0.936 0.004 0.000 0.000 0.000 0.060
#> GSM648608     3  0.4605     0.4220 0.000 0.032 0.596 0.000 0.008 0.364
#> GSM648609     3  0.4291     0.6403 0.000 0.040 0.708 0.000 0.012 0.240
#> GSM648610     6  0.6000     0.2405 0.044 0.272 0.000 0.000 0.124 0.560
#> GSM648633     4  0.1059     0.8084 0.016 0.016 0.000 0.964 0.000 0.004
#> GSM648644     4  0.4072     0.2943 0.000 0.448 0.000 0.544 0.000 0.008
#> GSM648652     4  0.2726     0.7655 0.032 0.000 0.000 0.856 0.000 0.112
#> GSM648653     1  0.3823     0.3400 0.564 0.000 0.000 0.000 0.000 0.436
#> GSM648658     6  0.5818     0.3310 0.296 0.000 0.000 0.160 0.012 0.532
#> GSM648659     4  0.0547     0.8047 0.000 0.000 0.000 0.980 0.000 0.020
#> GSM648662     5  0.1572     0.6204 0.000 0.036 0.000 0.000 0.936 0.028
#> GSM648665     5  0.3441     0.6359 0.004 0.012 0.060 0.000 0.832 0.092
#> GSM648666     1  0.1387     0.7348 0.932 0.000 0.000 0.000 0.000 0.068
#> GSM648680     4  0.5475     0.1426 0.124 0.000 0.000 0.460 0.000 0.416
#> GSM648684     6  0.6588     0.2354 0.004 0.132 0.196 0.000 0.112 0.556
#> GSM648709     1  0.2631     0.6898 0.840 0.152 0.000 0.000 0.000 0.008
#> GSM648719     4  0.5253     0.4101 0.128 0.000 0.000 0.576 0.000 0.296
#> GSM648627     3  0.0146     0.8785 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM648637     2  0.2036     0.6963 0.064 0.912 0.000 0.016 0.000 0.008
#> GSM648638     2  0.2214     0.6576 0.000 0.888 0.000 0.000 0.016 0.096
#> GSM648641     5  0.2378     0.6685 0.000 0.000 0.152 0.000 0.848 0.000
#> GSM648672     4  0.1230     0.8042 0.000 0.028 0.000 0.956 0.008 0.008
#> GSM648674     4  0.1382     0.8082 0.008 0.036 0.000 0.948 0.000 0.008
#> GSM648703     4  0.2062     0.7891 0.004 0.088 0.000 0.900 0.000 0.008
#> GSM648631     3  0.0000     0.8789 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648669     4  0.2070     0.7922 0.048 0.000 0.000 0.908 0.000 0.044
#> GSM648671     4  0.3513     0.7357 0.084 0.000 0.000 0.812 0.004 0.100
#> GSM648678     4  0.2056     0.7878 0.000 0.080 0.000 0.904 0.004 0.012
#> GSM648679     4  0.0405     0.8061 0.000 0.008 0.000 0.988 0.000 0.004
#> GSM648681     4  0.0891     0.8047 0.008 0.000 0.000 0.968 0.000 0.024
#> GSM648686     3  0.3695     0.3366 0.000 0.000 0.624 0.000 0.376 0.000
#> GSM648689     5  0.2996     0.6218 0.000 0.000 0.228 0.000 0.772 0.000
#> GSM648690     3  0.2762     0.6946 0.000 0.000 0.804 0.000 0.196 0.000
#> GSM648691     3  0.0000     0.8789 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648693     3  0.0000     0.8789 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648700     4  0.3703     0.7199 0.072 0.000 0.000 0.792 0.004 0.132
#> GSM648630     3  0.0000     0.8789 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648632     3  0.0000     0.8789 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648639     1  0.2572     0.6982 0.852 0.136 0.000 0.000 0.000 0.012
#> GSM648640     3  0.0622     0.8746 0.000 0.012 0.980 0.000 0.000 0.008
#> GSM648668     4  0.1606     0.7992 0.000 0.056 0.000 0.932 0.004 0.008
#> GSM648676     4  0.0993     0.8042 0.012 0.000 0.000 0.964 0.000 0.024
#> GSM648692     3  0.0000     0.8789 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648694     3  0.0000     0.8789 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM648699     4  0.3995     0.7369 0.080 0.000 0.000 0.800 0.048 0.072
#> GSM648701     4  0.1074     0.8055 0.012 0.000 0.000 0.960 0.000 0.028
#> GSM648673     4  0.2036     0.7943 0.028 0.000 0.000 0.916 0.008 0.048
#> GSM648677     4  0.3833     0.5266 0.000 0.344 0.000 0.648 0.000 0.008
#> GSM648687     1  0.0653     0.7446 0.980 0.004 0.000 0.004 0.000 0.012
#> GSM648688     3  0.0000     0.8789 0.000 0.000 1.000 0.000 0.000 0.000

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-ATC-NMF-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-ATC-NMF-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-ATC-NMF-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-ATC-NMF-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-ATC-NMF-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-ATC-NMF-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-ATC-NMF-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-ATC-NMF-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-ATC-NMF-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-ATC-NMF-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-ATC-NMF-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-ATC-NMF-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-ATC-NMF-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-ATC-NMF-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-ATC-NMF-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-ATC-NMF-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-ATC-NMF-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-ATC-NMF-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-ATC-NMF-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-ATC-NMF-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk ATC-NMF-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-ATC-NMF-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-ATC-NMF-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-ATC-NMF-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-ATC-NMF-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-ATC-NMF-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk ATC-NMF-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>           n disease.state(p) development.stage(p) other(p) k
#> ATC:NMF 128           0.1434              0.15426 7.09e-06 2
#> ATC:NMF 123           0.1974              0.01069 9.97e-12 3
#> ATC:NMF 116           0.1035              0.15361 9.33e-08 4
#> ATC:NMF  97           0.0089              0.00163 3.21e-08 5
#> ATC:NMF  97           0.1403              0.02148 1.45e-06 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.

Session info

sessionInfo()
#> R version 3.6.0 (2019-04-26)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: CentOS Linux 7 (Core)
#> 
#> Matrix products: default
#> BLAS:   /usr/lib64/libblas.so.3.4.2
#> LAPACK: /usr/lib64/liblapack.so.3.4.2
#> 
#> locale:
#>  [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C               LC_TIME=en_GB.UTF-8       
#>  [4] LC_COLLATE=en_GB.UTF-8     LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8   
#>  [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
#> [10] LC_TELEPHONE=C             LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       
#> 
#> attached base packages:
#> [1] grid      stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> other attached packages:
#> [1] genefilter_1.66.0    ComplexHeatmap_2.3.1 markdown_1.1         knitr_1.26          
#> [5] GetoptLong_0.1.7     cola_1.3.2          
#> 
#> loaded via a namespace (and not attached):
#>  [1] circlize_0.4.8       shape_1.4.4          xfun_0.11            slam_0.1-46         
#>  [5] lattice_0.20-38      splines_3.6.0        colorspace_1.4-1     vctrs_0.2.0         
#>  [9] stats4_3.6.0         blob_1.2.0           XML_3.98-1.20        survival_2.44-1.1   
#> [13] rlang_0.4.2          pillar_1.4.2         DBI_1.0.0            BiocGenerics_0.30.0 
#> [17] bit64_0.9-7          RColorBrewer_1.1-2   matrixStats_0.55.0   stringr_1.4.0       
#> [21] GlobalOptions_0.1.1  evaluate_0.14        memoise_1.1.0        Biobase_2.44.0      
#> [25] IRanges_2.18.3       parallel_3.6.0       AnnotationDbi_1.46.1 highr_0.8           
#> [29] Rcpp_1.0.3           xtable_1.8-4         backports_1.1.5      S4Vectors_0.22.1    
#> [33] annotate_1.62.0      skmeans_0.2-11       bit_1.1-14           microbenchmark_1.4-7
#> [37] brew_1.0-6           impute_1.58.0        rjson_0.2.20         png_0.1-7           
#> [41] digest_0.6.23        stringi_1.4.3        polyclip_1.10-0      clue_0.3-57         
#> [45] tools_3.6.0          bitops_1.0-6         magrittr_1.5         eulerr_6.0.0        
#> [49] RCurl_1.95-4.12      RSQLite_2.1.4        tibble_2.1.3         cluster_2.1.0       
#> [53] crayon_1.3.4         pkgconfig_2.0.3      zeallot_0.1.0        Matrix_1.2-17       
#> [57] xml2_1.2.2           httr_1.4.1           R6_2.4.1             mclust_5.4.5        
#> [61] compiler_3.6.0