cola Report for GDS4129

Date: 2019-12-25 21:10:41 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 120 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   120

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 3 1.000 0.985 0.992 ** 2
ATC:kmeans 2 1.000 0.989 0.996 **
ATC:skmeans 2 1.000 0.999 1.000 **
ATC:pam 2 1.000 0.998 0.999 **
ATC:mclust 5 1.000 0.966 0.984 ** 2
ATC:NMF 2 1.000 1.000 1.000 **
MAD:skmeans 2 0.948 0.936 0.975 *
SD:skmeans 2 0.931 0.936 0.974 *
SD:kmeans 2 0.931 0.903 0.956 *
MAD:kmeans 2 0.922 0.913 0.950 *
SD:NMF 2 0.897 0.928 0.970
MAD:NMF 2 0.897 0.923 0.968
SD:pam 3 0.690 0.797 0.911
CV:mclust 6 0.601 0.593 0.722
MAD:hclust 2 0.533 0.790 0.896
SD:hclust 2 0.519 0.724 0.887
MAD:mclust 2 0.508 0.921 0.924
CV:kmeans 2 0.505 0.858 0.910
SD:mclust 2 0.495 0.902 0.901
CV:NMF 2 0.480 0.830 0.907
MAD:pam 3 0.420 0.690 0.827
CV:skmeans 2 0.369 0.719 0.861
CV:pam 2 0.118 0.551 0.776
CV:hclust 3 0.048 0.470 0.700

**: 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.897           0.928       0.970          0.500 0.499   0.499
#> CV:NMF      2 0.480           0.830       0.907          0.501 0.497   0.497
#> MAD:NMF     2 0.897           0.923       0.968          0.500 0.501   0.501
#> ATC:NMF     2 1.000           1.000       1.000          0.505 0.496   0.496
#> SD:skmeans  2 0.931           0.936       0.974          0.504 0.496   0.496
#> CV:skmeans  2 0.369           0.719       0.861          0.504 0.496   0.496
#> MAD:skmeans 2 0.948           0.936       0.975          0.504 0.496   0.496
#> ATC:skmeans 2 1.000           0.999       1.000          0.505 0.496   0.496
#> SD:mclust   2 0.495           0.902       0.901          0.495 0.496   0.496
#> CV:mclust   2 0.327           0.494       0.751          0.477 0.576   0.576
#> MAD:mclust  2 0.508           0.921       0.924          0.504 0.496   0.496
#> ATC:mclust  2 1.000           1.000       1.000          0.505 0.496   0.496
#> SD:kmeans   2 0.931           0.903       0.956          0.502 0.497   0.497
#> CV:kmeans   2 0.505           0.858       0.910          0.496 0.498   0.498
#> MAD:kmeans  2 0.922           0.913       0.950          0.503 0.498   0.498
#> ATC:kmeans  2 1.000           0.989       0.996          0.505 0.496   0.496
#> SD:pam      2 0.468           0.708       0.866          0.450 0.532   0.532
#> CV:pam      2 0.118           0.551       0.776          0.474 0.532   0.532
#> MAD:pam     2 0.139           0.445       0.698          0.475 0.523   0.523
#> ATC:pam     2 1.000           0.998       0.999          0.505 0.496   0.496
#> SD:hclust   2 0.519           0.724       0.887          0.474 0.505   0.505
#> CV:hclust   2 0.183           0.831       0.813          0.203 0.967   0.967
#> MAD:hclust  2 0.533           0.790       0.896          0.482 0.496   0.496
#> ATC:hclust  2 1.000           1.000       1.000          0.505 0.496   0.496
get_stats(res_list, k = 3)
#>             k  1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      3 0.5763           0.720       0.855          0.290 0.801   0.620
#> CV:NMF      3 0.3611           0.503       0.722          0.308 0.749   0.536
#> MAD:NMF     3 0.5623           0.684       0.847          0.324 0.748   0.538
#> ATC:NMF     3 0.7597           0.733       0.883          0.188 0.943   0.885
#> SD:skmeans  3 0.7631           0.817       0.904          0.294 0.800   0.616
#> CV:skmeans  3 0.1942           0.446       0.647          0.319 0.812   0.647
#> MAD:skmeans 3 0.6083           0.746       0.786          0.303 0.806   0.625
#> ATC:skmeans 3 0.8265           0.914       0.914          0.147 0.948   0.895
#> SD:mclust   3 0.3951           0.673       0.788          0.195 0.951   0.901
#> CV:mclust   3 0.3571           0.297       0.629          0.258 0.570   0.410
#> MAD:mclust  3 0.5811           0.659       0.824          0.184 0.992   0.983
#> ATC:mclust  3 0.7871           0.931       0.931          0.130 0.955   0.908
#> SD:kmeans   3 0.5685           0.680       0.824          0.273 0.798   0.615
#> CV:kmeans   3 0.4732           0.574       0.768          0.249 0.961   0.923
#> MAD:kmeans  3 0.5114           0.585       0.741          0.277 0.913   0.826
#> ATC:kmeans  3 0.6781           0.610       0.772          0.229 0.961   0.922
#> SD:pam      3 0.6896           0.797       0.911          0.458 0.714   0.506
#> CV:pam      3 0.2070           0.529       0.736          0.367 0.713   0.508
#> MAD:pam     3 0.4200           0.690       0.827          0.388 0.675   0.453
#> ATC:pam     3 0.7223           0.883       0.827          0.243 0.866   0.731
#> SD:hclust   3 0.4684           0.632       0.823          0.180 0.948   0.897
#> CV:hclust   3 0.0478           0.470       0.700          0.771 0.906   0.903
#> MAD:hclust  3 0.5358           0.748       0.868          0.176 0.942   0.882
#> ATC:hclust  3 1.0000           0.985       0.992          0.123 0.936   0.870
get_stats(res_list, k = 4)
#>             k  1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      4 0.5612           0.625       0.789         0.1318 0.882   0.683
#> CV:NMF      4 0.3849           0.448       0.644         0.1228 0.859   0.613
#> MAD:NMF     4 0.4822           0.512       0.738         0.1018 0.791   0.481
#> ATC:NMF     4 0.6260           0.720       0.849         0.0611 0.914   0.817
#> SD:skmeans  4 0.5925           0.665       0.800         0.1186 0.927   0.794
#> CV:skmeans  4 0.1978           0.242       0.456         0.1272 0.867   0.676
#> MAD:skmeans 4 0.4782           0.559       0.726         0.1337 0.878   0.657
#> ATC:skmeans 4 0.8715           0.922       0.950         0.1966 0.874   0.716
#> SD:mclust   4 0.6092           0.794       0.803         0.2514 0.751   0.472
#> CV:mclust   4 0.4408           0.505       0.726         0.1444 0.703   0.460
#> MAD:mclust  4 0.6673           0.858       0.857         0.2379 0.748   0.488
#> ATC:mclust  4 0.6789           0.801       0.779         0.2206 0.768   0.507
#> SD:kmeans   4 0.5333           0.599       0.725         0.1242 0.854   0.617
#> CV:kmeans   4 0.4887           0.361       0.671         0.1346 0.830   0.637
#> MAD:kmeans  4 0.5201           0.298       0.576         0.1311 0.756   0.472
#> ATC:kmeans  4 0.6392           0.685       0.730         0.1207 0.804   0.578
#> SD:pam      4 0.7317           0.744       0.886         0.0803 0.951   0.858
#> CV:pam      4 0.3468           0.469       0.705         0.1378 0.798   0.498
#> MAD:pam     4 0.4859           0.558       0.713         0.1248 0.845   0.583
#> ATC:pam     4 0.8938           0.879       0.945         0.1872 0.871   0.659
#> SD:hclust   4 0.5361           0.597       0.806         0.1186 0.798   0.612
#> CV:hclust   4 0.0792           0.576       0.676         0.3378 0.568   0.518
#> MAD:hclust  4 0.4872           0.565       0.711         0.1491 0.845   0.672
#> ATC:hclust  4 0.8238           0.735       0.883         0.1751 0.898   0.763
get_stats(res_list, k = 5)
#>             k  1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      5 0.5229           0.517       0.719         0.0504 0.855   0.556
#> CV:NMF      5 0.4271           0.317       0.564         0.0729 0.840   0.499
#> MAD:NMF     5 0.4943           0.485       0.706         0.0691 0.829   0.465
#> ATC:NMF     5 0.6319           0.713       0.841         0.0360 0.947   0.879
#> SD:skmeans  5 0.5724           0.486       0.657         0.0647 0.913   0.724
#> CV:skmeans  5 0.2619           0.207       0.457         0.0659 0.770   0.405
#> MAD:skmeans 5 0.4818           0.428       0.613         0.0634 0.919   0.706
#> ATC:skmeans 5 0.8874           0.914       0.925         0.1009 0.914   0.730
#> SD:mclust   5 0.7294           0.826       0.857         0.0641 0.866   0.541
#> CV:mclust   5 0.5762           0.495       0.728         0.0707 0.813   0.512
#> MAD:mclust  5 0.6973           0.677       0.834         0.0561 0.904   0.655
#> ATC:mclust  5 1.0000           0.966       0.984         0.0825 0.983   0.934
#> SD:kmeans   5 0.6232           0.683       0.772         0.0619 0.918   0.725
#> CV:kmeans   5 0.5133           0.504       0.694         0.0764 0.878   0.634
#> MAD:kmeans  5 0.5611           0.457       0.646         0.0707 0.783   0.375
#> ATC:kmeans  5 0.6775           0.740       0.729         0.0813 0.907   0.678
#> SD:pam      5 0.6749           0.566       0.801         0.0816 0.908   0.708
#> CV:pam      5 0.4311           0.473       0.679         0.0669 0.919   0.698
#> MAD:pam     5 0.6038           0.613       0.785         0.0756 0.893   0.612
#> ATC:pam     5 0.8575           0.845       0.927         0.0349 0.977   0.911
#> SD:hclust   5 0.6038           0.662       0.800         0.1272 0.822   0.575
#> CV:hclust   5 0.0998           0.544       0.698         0.1902 0.953   0.905
#> MAD:hclust  5 0.5038           0.596       0.716         0.0979 0.885   0.686
#> ATC:hclust  5 0.7170           0.606       0.793         0.0689 0.964   0.897
get_stats(res_list, k = 6)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      6 0.531           0.410       0.628         0.0428 0.926   0.710
#> CV:NMF      6 0.473           0.299       0.524         0.0444 0.828   0.405
#> MAD:NMF     6 0.510           0.329       0.608         0.0497 0.949   0.779
#> ATC:NMF     6 0.595           0.589       0.800         0.0423 0.977   0.946
#> SD:skmeans  6 0.596           0.430       0.636         0.0442 0.925   0.730
#> CV:skmeans  6 0.340           0.221       0.437         0.0426 0.904   0.622
#> MAD:skmeans 6 0.512           0.391       0.580         0.0402 0.947   0.773
#> ATC:skmeans 6 0.872           0.879       0.912         0.0471 0.954   0.810
#> SD:mclust   6 0.732           0.684       0.771         0.0322 0.931   0.702
#> CV:mclust   6 0.601           0.593       0.722         0.0689 0.888   0.578
#> MAD:mclust  6 0.720           0.710       0.814         0.0367 0.938   0.741
#> ATC:mclust  6 0.769           0.707       0.843         0.0559 0.924   0.710
#> SD:kmeans   6 0.646           0.458       0.725         0.0465 0.978   0.912
#> CV:kmeans   6 0.558           0.508       0.677         0.0464 0.913   0.663
#> MAD:kmeans  6 0.618           0.548       0.658         0.0411 0.898   0.586
#> ATC:kmeans  6 0.661           0.744       0.766         0.0610 0.959   0.803
#> SD:pam      6 0.750           0.743       0.871         0.0628 0.904   0.629
#> CV:pam      6 0.479           0.391       0.656         0.0287 0.980   0.906
#> MAD:pam     6 0.682           0.638       0.808         0.0361 0.959   0.797
#> ATC:pam     6 0.886           0.851       0.916         0.0355 0.945   0.777
#> SD:hclust   6 0.606           0.612       0.774         0.0517 0.970   0.891
#> CV:hclust   6 0.142           0.461       0.670         0.0993 0.940   0.874
#> MAD:hclust  6 0.537           0.627       0.706         0.0524 0.960   0.852
#> ATC:hclust  6 0.716           0.625       0.763         0.0575 0.873   0.633

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 agent(p) individual(p) k
#> SD:NMF      114 1.00e+00      1.11e-05 2
#> CV:NMF      114 9.87e-01      2.30e-05 2
#> MAD:NMF     116 1.00e+00      2.31e-05 2
#> ATC:NMF     120 4.67e-27      1.00e+00 2
#> SD:skmeans  116 1.00e+00      9.49e-06 2
#> CV:skmeans  109 9.20e-01      2.01e-05 2
#> MAD:skmeans 115 1.00e+00      8.53e-06 2
#> ATC:skmeans 120 4.67e-27      1.00e+00 2
#> SD:mclust   120 4.67e-27      1.00e+00 2
#> CV:mclust    69 1.00e+00      3.59e-04 2
#> MAD:mclust  120 4.67e-27      1.00e+00 2
#> ATC:mclust  120 4.67e-27      1.00e+00 2
#> SD:kmeans   112 1.00e+00      8.99e-06 2
#> CV:kmeans   119 9.23e-01      1.05e-05 2
#> MAD:kmeans  116 1.00e+00      6.52e-06 2
#> ATC:kmeans  119 7.74e-27      1.00e+00 2
#> SD:pam      107 1.02e-03      1.94e-02 2
#> CV:pam       84 1.00e+00      4.84e-03 2
#> MAD:pam      87 1.84e-07      2.38e-01 2
#> ATC:pam     120 4.67e-27      1.00e+00 2
#> SD:hclust   102 1.00e+00      2.01e-05 2
#> CV:hclust   116 1.00e+00      6.52e-06 2
#> MAD:hclust  108 1.00e+00      1.24e-05 2
#> ATC:hclust  120 4.67e-27      1.00e+00 2
test_to_known_factors(res_list, k = 3)
#>               n agent(p) individual(p) k
#> SD:NMF      102 2.69e-01      6.56e-07 3
#> CV:NMF       72 9.60e-01      2.82e-05 3
#> MAD:NMF     101 4.46e-10      2.67e-01 3
#> ATC:NMF      99 1.87e-22      1.00e+00 3
#> SD:skmeans  112 9.37e-01      1.77e-09 3
#> CV:skmeans   60 5.85e-01      1.03e-04 3
#> MAD:skmeans 116 1.27e-14      4.30e-01 3
#> ATC:skmeans 120 8.76e-27      1.00e+00 3
#> SD:mclust   116 4.78e-25      8.07e-01 3
#> CV:mclust    31 1.00e+00      1.35e-02 3
#> MAD:mclust  110 7.26e-25      1.00e+00 3
#> ATC:mclust  120 8.76e-27      1.00e+00 3
#> SD:kmeans    89 9.36e-01      4.67e-08 3
#> CV:kmeans    86 8.82e-01      2.25e-04 3
#> MAD:kmeans  101 8.39e-02      5.75e-08 3
#> ATC:kmeans  105 1.58e-23      1.00e+00 3
#> SD:pam      105 4.30e-04      2.81e-04 3
#> CV:pam       81 6.01e-01      8.58e-04 3
#> MAD:pam     105 3.58e-13      4.65e-01 3
#> ATC:pam     118 2.38e-26      1.00e+00 3
#> SD:hclust    96 1.00e+00      1.07e-08 3
#> CV:hclust    70 1.00e+00      4.01e-04 3
#> MAD:hclust  108 1.00e+00      1.61e-09 3
#> ATC:hclust  120 8.76e-27      1.00e+00 3
test_to_known_factors(res_list, k = 4)
#>               n agent(p) individual(p) k
#> SD:NMF       94 5.29e-04      1.17e-04 4
#> CV:NMF       57 7.84e-01      2.24e-05 4
#> MAD:NMF      71 3.32e-06      4.73e-03 4
#> ATC:NMF     104 2.61e-23      5.00e-01 4
#> SD:skmeans  102 1.00e+00      9.61e-13 4
#> CV:skmeans   12       NA            NA 4
#> MAD:skmeans  90 2.19e-19      9.52e-01 4
#> ATC:skmeans 119 1.27e-25      1.00e+00 4
#> SD:mclust   119 1.27e-25      1.00e+00 4
#> CV:mclust    77 9.99e-01      4.92e-09 4
#> MAD:mclust  119 1.27e-25      1.00e+00 4
#> ATC:mclust  111 6.69e-24      9.98e-01 4
#> SD:kmeans    88 1.00e+00      2.57e-11 4
#> CV:kmeans    56 9.57e-01      1.31e-05 4
#> MAD:kmeans   41 1.25e-09      6.19e-01 4
#> ATC:kmeans  113 2.48e-24      9.99e-01 4
#> SD:pam      103 7.57e-04      1.30e-06 4
#> CV:pam       63 6.11e-01      5.77e-03 4
#> MAD:pam      85 4.15e-13      4.42e-01 4
#> ATC:pam     115 9.21e-25      9.98e-01 4
#> SD:hclust    78 1.00e+00      2.70e-10 4
#> CV:hclust    96 9.96e-01      3.34e-11 4
#> MAD:hclust   68 1.00e+00      9.01e-07 4
#> ATC:hclust   99 2.55e-21      9.88e-01 4
test_to_known_factors(res_list, k = 5)
#>               n agent(p) individual(p) k
#> SD:NMF       69 4.95e-01      1.02e-07 5
#> CV:NMF       32 7.39e-01      2.20e-02 5
#> MAD:NMF      65 2.39e-01      1.79e-05 5
#> ATC:NMF     105 1.58e-23      4.78e-01 5
#> SD:skmeans   69 1.00e+00      3.59e-04 5
#> CV:skmeans    0       NA            NA 5
#> MAD:skmeans  55 1.14e-12      7.66e-01 5
#> ATC:skmeans 118 1.43e-24      9.97e-01 5
#> SD:mclust   113 9.48e-21      4.43e-01 5
#> CV:mclust    86 9.98e-01      5.88e-13 5
#> MAD:mclust   96 1.13e-20      9.97e-01 5
#> ATC:mclust  119 8.73e-25      9.97e-01 5
#> SD:kmeans   104 1.00e+00      1.26e-16 5
#> CV:kmeans    76 9.86e-01      1.29e-09 5
#> MAD:kmeans   59 9.61e-13      1.82e-01 5
#> ATC:kmeans  111 4.45e-23      9.88e-01 5
#> SD:pam       78 5.91e-05      1.05e-03 5
#> CV:pam       63 7.88e-01      5.35e-05 5
#> MAD:pam      94 2.01e-11      1.62e-01 5
#> ATC:pam     117 2.34e-24      9.96e-01 5
#> SD:hclust    98 1.00e+00      8.18e-16 5
#> CV:hclust    86 1.00e+00      5.88e-13 5
#> MAD:hclust   83 9.99e-01      1.81e-13 5
#> ATC:hclust   93 3.03e-19      9.97e-01 5
test_to_known_factors(res_list, k = 6)
#>               n agent(p) individual(p) k
#> SD:NMF       47 9.82e-01      1.11e-03 6
#> CV:NMF       13 1.00e+00      7.21e-02 6
#> MAD:NMF      38 4.34e-01      1.19e-03 6
#> ATC:NMF      90 1.76e-20      1.00e+00 6
#> SD:skmeans   54 9.07e-03      3.93e-05 6
#> CV:skmeans    0       NA            NA 6
#> MAD:skmeans  48 3.78e-11      6.32e-01 6
#> ATC:skmeans 115 3.59e-23      9.92e-01 6
#> SD:mclust   106 2.87e-21      9.87e-01 6
#> CV:mclust    96 9.99e-01      3.65e-18 6
#> MAD:mclust  109 6.67e-22      9.89e-01 6
#> ATC:mclust   99 1.61e-20      8.19e-01 6
#> SD:kmeans    62 7.47e-01      2.68e-10 6
#> CV:kmeans    81 9.97e-01      1.66e-14 6
#> MAD:kmeans   74 4.71e-11      2.06e-04 6
#> ATC:kmeans  111 2.52e-22      9.58e-01 6
#> SD:pam      108 1.39e-07      4.44e-05 6
#> CV:pam       47 8.37e-01      7.83e-04 6
#> MAD:pam      93 6.14e-10      5.15e-03 6
#> ATC:pam     113 9.51e-23      9.88e-01 6
#> SD:hclust    92 1.00e+00      2.88e-18 6
#> CV:hclust    61 8.78e-01      1.09e-08 6
#> MAD:hclust   95 1.00e+00      2.21e-18 6
#> ATC:hclust  102 2.00e-20      9.97e-01 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 120 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.519           0.724       0.887         0.4738 0.505   0.505
#> 3 3 0.468           0.632       0.823         0.1795 0.948   0.897
#> 4 4 0.536           0.597       0.806         0.1186 0.798   0.612
#> 5 5 0.604           0.662       0.800         0.1272 0.822   0.575
#> 6 6 0.606           0.612       0.774         0.0517 0.970   0.891

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
#> GSM486735     2  0.3733     0.8269 0.072 0.928
#> GSM486737     2  0.0672     0.8550 0.008 0.992
#> GSM486739     2  0.5737     0.7849 0.136 0.864
#> GSM486741     2  0.0672     0.8550 0.008 0.992
#> GSM486743     2  0.1414     0.8521 0.020 0.980
#> GSM486745     2  0.5737     0.7849 0.136 0.864
#> GSM486747     1  0.8608     0.5899 0.716 0.284
#> GSM486749     2  0.0672     0.8550 0.008 0.992
#> GSM486751     1  0.8955     0.5405 0.688 0.312
#> GSM486753     2  0.0938     0.8537 0.012 0.988
#> GSM486755     2  0.0672     0.8550 0.008 0.992
#> GSM486757     1  0.6148     0.7627 0.848 0.152
#> GSM486759     1  0.0376     0.8683 0.996 0.004
#> GSM486761     1  0.0000     0.8681 1.000 0.000
#> GSM486763     1  0.2236     0.8568 0.964 0.036
#> GSM486765     1  0.0000     0.8681 1.000 0.000
#> GSM486767     1  0.9970     0.1088 0.532 0.468
#> GSM486769     2  0.2948     0.8362 0.052 0.948
#> GSM486771     2  0.0938     0.8549 0.012 0.988
#> GSM486773     2  0.9996     0.0351 0.488 0.512
#> GSM486775     1  0.0000     0.8681 1.000 0.000
#> GSM486777     1  0.0000     0.8681 1.000 0.000
#> GSM486779     2  0.0938     0.8539 0.012 0.988
#> GSM486781     2  0.9954     0.1385 0.460 0.540
#> GSM486783     2  0.0672     0.8550 0.008 0.992
#> GSM486785     1  0.0000     0.8681 1.000 0.000
#> GSM486787     1  0.0376     0.8683 0.996 0.004
#> GSM486789     2  0.1184     0.8531 0.016 0.984
#> GSM486791     1  0.2043     0.8585 0.968 0.032
#> GSM486793     1  0.0000     0.8681 1.000 0.000
#> GSM486795     1  0.8443     0.6227 0.728 0.272
#> GSM486797     1  0.9686     0.3546 0.604 0.396
#> GSM486799     1  0.0000     0.8681 1.000 0.000
#> GSM486801     1  0.0376     0.8683 0.996 0.004
#> GSM486803     1  0.0938     0.8659 0.988 0.012
#> GSM486805     1  0.9998     0.0181 0.508 0.492
#> GSM486807     1  0.0376     0.8679 0.996 0.004
#> GSM486809     2  0.6887     0.7367 0.184 0.816
#> GSM486811     1  0.0000     0.8681 1.000 0.000
#> GSM486813     2  0.0672     0.8550 0.008 0.992
#> GSM486815     1  0.0000     0.8681 1.000 0.000
#> GSM486817     1  0.9661     0.3644 0.608 0.392
#> GSM486819     1  0.8555     0.6067 0.720 0.280
#> GSM486822     2  0.0672     0.8550 0.008 0.992
#> GSM486824     1  0.0938     0.8657 0.988 0.012
#> GSM486828     2  0.9988     0.0665 0.480 0.520
#> GSM486831     1  0.0376     0.8683 0.996 0.004
#> GSM486833     1  0.9754     0.3202 0.592 0.408
#> GSM486835     1  0.0376     0.8683 0.996 0.004
#> GSM486837     2  0.8081     0.6408 0.248 0.752
#> GSM486839     1  0.0000     0.8681 1.000 0.000
#> GSM486841     1  0.0000     0.8681 1.000 0.000
#> GSM486843     1  0.2603     0.8482 0.956 0.044
#> GSM486845     2  0.9954     0.1391 0.460 0.540
#> GSM486847     1  0.0000     0.8681 1.000 0.000
#> GSM486849     2  0.0672     0.8550 0.008 0.992
#> GSM486851     1  0.2043     0.8585 0.968 0.032
#> GSM486853     2  0.0672     0.8550 0.008 0.992
#> GSM486855     2  0.0672     0.8550 0.008 0.992
#> GSM486857     2  0.8608     0.5814 0.284 0.716
#> GSM486736     2  0.3733     0.8269 0.072 0.928
#> GSM486738     2  0.0672     0.8550 0.008 0.992
#> GSM486740     2  0.5737     0.7849 0.136 0.864
#> GSM486742     2  0.0672     0.8550 0.008 0.992
#> GSM486744     2  0.1414     0.8521 0.020 0.980
#> GSM486746     2  0.5737     0.7849 0.136 0.864
#> GSM486748     1  0.8608     0.5899 0.716 0.284
#> GSM486750     2  0.0672     0.8550 0.008 0.992
#> GSM486752     1  0.8955     0.5405 0.688 0.312
#> GSM486754     2  0.0938     0.8537 0.012 0.988
#> GSM486756     2  0.0672     0.8550 0.008 0.992
#> GSM486758     1  0.6148     0.7627 0.848 0.152
#> GSM486760     1  0.0376     0.8683 0.996 0.004
#> GSM486762     1  0.0000     0.8681 1.000 0.000
#> GSM486764     1  0.2236     0.8568 0.964 0.036
#> GSM486766     1  0.0000     0.8681 1.000 0.000
#> GSM486768     1  0.9970     0.1088 0.532 0.468
#> GSM486770     2  0.2948     0.8362 0.052 0.948
#> GSM486772     2  0.0938     0.8549 0.012 0.988
#> GSM486774     2  0.9996     0.0351 0.488 0.512
#> GSM486776     1  0.0000     0.8681 1.000 0.000
#> GSM486778     1  0.0000     0.8681 1.000 0.000
#> GSM486780     2  0.0938     0.8539 0.012 0.988
#> GSM486782     2  0.9954     0.1385 0.460 0.540
#> GSM486784     2  0.0672     0.8550 0.008 0.992
#> GSM486786     1  0.0000     0.8681 1.000 0.000
#> GSM486788     1  0.0376     0.8683 0.996 0.004
#> GSM486790     2  0.1184     0.8531 0.016 0.984
#> GSM486792     1  0.2043     0.8585 0.968 0.032
#> GSM486794     1  0.0000     0.8681 1.000 0.000
#> GSM486796     1  0.8443     0.6227 0.728 0.272
#> GSM486798     1  0.9686     0.3546 0.604 0.396
#> GSM486800     1  0.0000     0.8681 1.000 0.000
#> GSM486802     1  0.0376     0.8683 0.996 0.004
#> GSM486804     1  0.0938     0.8659 0.988 0.012
#> GSM486806     1  0.9998     0.0181 0.508 0.492
#> GSM486808     1  0.0376     0.8679 0.996 0.004
#> GSM486810     2  0.6887     0.7367 0.184 0.816
#> GSM486812     1  0.0000     0.8681 1.000 0.000
#> GSM486814     2  0.0672     0.8550 0.008 0.992
#> GSM486816     1  0.0000     0.8681 1.000 0.000
#> GSM486818     1  0.9661     0.3644 0.608 0.392
#> GSM486821     1  0.8555     0.6067 0.720 0.280
#> GSM486823     2  0.0672     0.8550 0.008 0.992
#> GSM486826     1  0.0938     0.8657 0.988 0.012
#> GSM486830     2  0.9988     0.0665 0.480 0.520
#> GSM486832     1  0.0376     0.8683 0.996 0.004
#> GSM486834     1  0.9754     0.3202 0.592 0.408
#> GSM486836     1  0.0376     0.8683 0.996 0.004
#> GSM486838     2  0.8081     0.6408 0.248 0.752
#> GSM486840     1  0.0000     0.8681 1.000 0.000
#> GSM486842     1  0.0000     0.8681 1.000 0.000
#> GSM486844     1  0.2603     0.8482 0.956 0.044
#> GSM486846     2  0.9954     0.1391 0.460 0.540
#> GSM486848     1  0.0000     0.8681 1.000 0.000
#> GSM486850     2  0.0672     0.8550 0.008 0.992
#> GSM486852     1  0.2043     0.8585 0.968 0.032
#> GSM486854     2  0.0672     0.8550 0.008 0.992
#> GSM486856     2  0.0672     0.8550 0.008 0.992
#> GSM486858     2  0.8608     0.5814 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
#> GSM486735     2  0.5905    0.61547 0.000 0.648 0.352
#> GSM486737     2  0.1643    0.75626 0.000 0.956 0.044
#> GSM486739     2  0.6542    0.68566 0.060 0.736 0.204
#> GSM486741     2  0.2959    0.74711 0.000 0.900 0.100
#> GSM486743     2  0.3715    0.75086 0.004 0.868 0.128
#> GSM486745     2  0.6495    0.68767 0.060 0.740 0.200
#> GSM486747     1  0.6597    0.51710 0.696 0.268 0.036
#> GSM486749     2  0.3340    0.73904 0.000 0.880 0.120
#> GSM486751     1  0.6998    0.48385 0.664 0.292 0.044
#> GSM486753     2  0.3340    0.75066 0.000 0.880 0.120
#> GSM486755     2  0.2165    0.75562 0.000 0.936 0.064
#> GSM486757     1  0.5136    0.64556 0.824 0.132 0.044
#> GSM486759     1  0.0237    0.77509 0.996 0.004 0.000
#> GSM486761     1  0.0000    0.77465 1.000 0.000 0.000
#> GSM486763     3  0.5465    0.99269 0.288 0.000 0.712
#> GSM486765     1  0.0000    0.77465 1.000 0.000 0.000
#> GSM486767     1  0.9252    0.05051 0.448 0.396 0.156
#> GSM486769     2  0.5760    0.63685 0.000 0.672 0.328
#> GSM486771     2  0.1399    0.75917 0.004 0.968 0.028
#> GSM486773     2  0.8637    0.00338 0.444 0.456 0.100
#> GSM486775     1  0.0000    0.77465 1.000 0.000 0.000
#> GSM486777     1  0.0237    0.77198 0.996 0.000 0.004
#> GSM486779     2  0.1878    0.75342 0.004 0.952 0.044
#> GSM486781     2  0.8316    0.09312 0.424 0.496 0.080
#> GSM486783     2  0.1643    0.75442 0.000 0.956 0.044
#> GSM486785     1  0.0000    0.77465 1.000 0.000 0.000
#> GSM486787     1  0.0475    0.77418 0.992 0.004 0.004
#> GSM486789     2  0.3686    0.74619 0.000 0.860 0.140
#> GSM486791     3  0.5529    0.99236 0.296 0.000 0.704
#> GSM486793     1  0.0237    0.77198 0.996 0.000 0.004
#> GSM486795     1  0.6585    0.52338 0.712 0.244 0.044
#> GSM486797     1  0.8179    0.34681 0.564 0.352 0.084
#> GSM486799     1  0.0000    0.77465 1.000 0.000 0.000
#> GSM486801     1  0.0237    0.77509 0.996 0.004 0.000
#> GSM486803     1  0.0829    0.77101 0.984 0.012 0.004
#> GSM486805     1  0.8404    0.02762 0.464 0.452 0.084
#> GSM486807     1  0.0475    0.77312 0.992 0.004 0.004
#> GSM486809     2  0.6771    0.49600 0.012 0.548 0.440
#> GSM486811     1  0.0000    0.77465 1.000 0.000 0.000
#> GSM486813     2  0.1643    0.75442 0.000 0.956 0.044
#> GSM486815     1  0.0237    0.77198 0.996 0.000 0.004
#> GSM486817     1  0.7710    0.35787 0.576 0.368 0.056
#> GSM486819     1  0.9673   -0.20551 0.400 0.212 0.388
#> GSM486822     2  0.5016    0.68441 0.000 0.760 0.240
#> GSM486824     1  0.0592    0.77158 0.988 0.012 0.000
#> GSM486828     2  0.8398    0.03588 0.440 0.476 0.084
#> GSM486831     1  0.0475    0.77418 0.992 0.004 0.004
#> GSM486833     1  0.8196    0.32958 0.560 0.356 0.084
#> GSM486835     1  0.0475    0.77418 0.992 0.004 0.004
#> GSM486837     2  0.6402    0.56556 0.236 0.724 0.040
#> GSM486839     1  0.0000    0.77465 1.000 0.000 0.000
#> GSM486841     1  0.0000    0.77465 1.000 0.000 0.000
#> GSM486843     1  0.1878    0.74985 0.952 0.044 0.004
#> GSM486845     2  0.8113    0.08783 0.428 0.504 0.068
#> GSM486847     1  0.0000    0.77465 1.000 0.000 0.000
#> GSM486849     2  0.0892    0.75860 0.000 0.980 0.020
#> GSM486851     3  0.5497    0.99473 0.292 0.000 0.708
#> GSM486853     2  0.1529    0.75541 0.000 0.960 0.040
#> GSM486855     2  0.1411    0.75611 0.000 0.964 0.036
#> GSM486857     2  0.6632    0.51927 0.272 0.692 0.036
#> GSM486736     2  0.5905    0.61547 0.000 0.648 0.352
#> GSM486738     2  0.1643    0.75626 0.000 0.956 0.044
#> GSM486740     2  0.6542    0.68566 0.060 0.736 0.204
#> GSM486742     2  0.2959    0.74711 0.000 0.900 0.100
#> GSM486744     2  0.3715    0.75086 0.004 0.868 0.128
#> GSM486746     2  0.6495    0.68767 0.060 0.740 0.200
#> GSM486748     1  0.6597    0.51710 0.696 0.268 0.036
#> GSM486750     2  0.3340    0.73904 0.000 0.880 0.120
#> GSM486752     1  0.6998    0.48385 0.664 0.292 0.044
#> GSM486754     2  0.3340    0.75066 0.000 0.880 0.120
#> GSM486756     2  0.2165    0.75562 0.000 0.936 0.064
#> GSM486758     1  0.5136    0.64556 0.824 0.132 0.044
#> GSM486760     1  0.0237    0.77509 0.996 0.004 0.000
#> GSM486762     1  0.0000    0.77465 1.000 0.000 0.000
#> GSM486764     3  0.5465    0.99269 0.288 0.000 0.712
#> GSM486766     1  0.0000    0.77465 1.000 0.000 0.000
#> GSM486768     1  0.9252    0.05051 0.448 0.396 0.156
#> GSM486770     2  0.5760    0.63685 0.000 0.672 0.328
#> GSM486772     2  0.1399    0.75917 0.004 0.968 0.028
#> GSM486774     2  0.8637    0.00338 0.444 0.456 0.100
#> GSM486776     1  0.0000    0.77465 1.000 0.000 0.000
#> GSM486778     1  0.0237    0.77198 0.996 0.000 0.004
#> GSM486780     2  0.1878    0.75342 0.004 0.952 0.044
#> GSM486782     2  0.8316    0.09312 0.424 0.496 0.080
#> GSM486784     2  0.1643    0.75442 0.000 0.956 0.044
#> GSM486786     1  0.0000    0.77465 1.000 0.000 0.000
#> GSM486788     1  0.0475    0.77418 0.992 0.004 0.004
#> GSM486790     2  0.3686    0.74619 0.000 0.860 0.140
#> GSM486792     3  0.5529    0.99236 0.296 0.000 0.704
#> GSM486794     1  0.0237    0.77198 0.996 0.000 0.004
#> GSM486796     1  0.6585    0.52338 0.712 0.244 0.044
#> GSM486798     1  0.8179    0.34681 0.564 0.352 0.084
#> GSM486800     1  0.0000    0.77465 1.000 0.000 0.000
#> GSM486802     1  0.0237    0.77509 0.996 0.004 0.000
#> GSM486804     1  0.0829    0.77101 0.984 0.012 0.004
#> GSM486806     1  0.8404    0.02762 0.464 0.452 0.084
#> GSM486808     1  0.0475    0.77312 0.992 0.004 0.004
#> GSM486810     2  0.6771    0.49600 0.012 0.548 0.440
#> GSM486812     1  0.0000    0.77465 1.000 0.000 0.000
#> GSM486814     2  0.1643    0.75442 0.000 0.956 0.044
#> GSM486816     1  0.0237    0.77198 0.996 0.000 0.004
#> GSM486818     1  0.7710    0.35787 0.576 0.368 0.056
#> GSM486821     1  0.9673   -0.20551 0.400 0.212 0.388
#> GSM486823     2  0.5016    0.68441 0.000 0.760 0.240
#> GSM486826     1  0.0592    0.77158 0.988 0.012 0.000
#> GSM486830     2  0.8398    0.03588 0.440 0.476 0.084
#> GSM486832     1  0.0475    0.77418 0.992 0.004 0.004
#> GSM486834     1  0.8196    0.32958 0.560 0.356 0.084
#> GSM486836     1  0.0475    0.77418 0.992 0.004 0.004
#> GSM486838     2  0.6402    0.56556 0.236 0.724 0.040
#> GSM486840     1  0.0000    0.77465 1.000 0.000 0.000
#> GSM486842     1  0.0000    0.77465 1.000 0.000 0.000
#> GSM486844     1  0.1878    0.74985 0.952 0.044 0.004
#> GSM486846     2  0.8113    0.08783 0.428 0.504 0.068
#> GSM486848     1  0.0000    0.77465 1.000 0.000 0.000
#> GSM486850     2  0.0892    0.75860 0.000 0.980 0.020
#> GSM486852     3  0.5497    0.99473 0.292 0.000 0.708
#> GSM486854     2  0.1529    0.75541 0.000 0.960 0.040
#> GSM486856     2  0.1411    0.75611 0.000 0.964 0.036
#> GSM486858     2  0.6632    0.51927 0.272 0.692 0.036

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM486735     4  0.2198      0.551 0.000 0.008 0.072 0.920
#> GSM486737     2  0.2589      0.674 0.000 0.884 0.000 0.116
#> GSM486739     4  0.7342      0.486 0.036 0.336 0.080 0.548
#> GSM486741     2  0.4843      0.124 0.000 0.604 0.000 0.396
#> GSM486743     4  0.5143      0.412 0.004 0.456 0.000 0.540
#> GSM486745     4  0.7356      0.481 0.036 0.340 0.080 0.544
#> GSM486747     1  0.6172      0.612 0.692 0.208 0.016 0.084
#> GSM486749     4  0.4977      0.239 0.000 0.460 0.000 0.540
#> GSM486751     1  0.6598      0.580 0.660 0.228 0.024 0.088
#> GSM486753     4  0.4948      0.443 0.000 0.440 0.000 0.560
#> GSM486755     2  0.4040      0.466 0.000 0.752 0.000 0.248
#> GSM486757     1  0.4630      0.703 0.820 0.096 0.020 0.064
#> GSM486759     1  0.0188      0.783 0.996 0.004 0.000 0.000
#> GSM486761     1  0.0000      0.783 1.000 0.000 0.000 0.000
#> GSM486763     3  0.0336      0.762 0.000 0.000 0.992 0.008
#> GSM486765     1  0.0000      0.783 1.000 0.000 0.000 0.000
#> GSM486767     1  0.9189      0.217 0.416 0.292 0.104 0.188
#> GSM486769     4  0.2060      0.560 0.000 0.016 0.052 0.932
#> GSM486771     2  0.1902      0.724 0.004 0.932 0.000 0.064
#> GSM486773     1  0.8369      0.234 0.436 0.344 0.036 0.184
#> GSM486775     1  0.0000      0.783 1.000 0.000 0.000 0.000
#> GSM486777     1  0.0188      0.781 0.996 0.000 0.004 0.000
#> GSM486779     2  0.1489      0.722 0.000 0.952 0.004 0.044
#> GSM486781     1  0.7958      0.179 0.424 0.384 0.016 0.176
#> GSM486783     2  0.0336      0.747 0.000 0.992 0.000 0.008
#> GSM486785     1  0.0000      0.783 1.000 0.000 0.000 0.000
#> GSM486787     1  0.0376      0.782 0.992 0.004 0.004 0.000
#> GSM486789     4  0.4866      0.489 0.000 0.404 0.000 0.596
#> GSM486791     3  0.0376      0.762 0.004 0.000 0.992 0.004
#> GSM486793     1  0.0188      0.781 0.996 0.000 0.004 0.000
#> GSM486795     1  0.5677      0.615 0.708 0.232 0.016 0.044
#> GSM486797     1  0.7648      0.450 0.556 0.280 0.032 0.132
#> GSM486799     1  0.0000      0.783 1.000 0.000 0.000 0.000
#> GSM486801     1  0.0188      0.783 0.996 0.004 0.000 0.000
#> GSM486803     1  0.0657      0.781 0.984 0.012 0.004 0.000
#> GSM486805     1  0.8275      0.270 0.456 0.344 0.040 0.160
#> GSM486807     1  0.0376      0.782 0.992 0.000 0.004 0.004
#> GSM486809     4  0.3768      0.464 0.000 0.008 0.184 0.808
#> GSM486811     1  0.0000      0.783 1.000 0.000 0.000 0.000
#> GSM486813     2  0.0336      0.747 0.000 0.992 0.000 0.008
#> GSM486815     1  0.0188      0.781 0.996 0.000 0.004 0.000
#> GSM486817     1  0.7171      0.451 0.568 0.320 0.028 0.084
#> GSM486819     3  0.9101      0.206 0.276 0.136 0.448 0.140
#> GSM486822     4  0.2281      0.589 0.000 0.096 0.000 0.904
#> GSM486824     1  0.0469      0.781 0.988 0.012 0.000 0.000
#> GSM486828     1  0.8153      0.209 0.432 0.372 0.028 0.168
#> GSM486831     1  0.0376      0.782 0.992 0.004 0.004 0.000
#> GSM486833     1  0.7613      0.433 0.548 0.300 0.032 0.120
#> GSM486835     1  0.0376      0.782 0.992 0.004 0.004 0.000
#> GSM486837     2  0.6464      0.359 0.236 0.644 0.004 0.116
#> GSM486839     1  0.0000      0.783 1.000 0.000 0.000 0.000
#> GSM486841     1  0.0000      0.783 1.000 0.000 0.000 0.000
#> GSM486843     1  0.1635      0.766 0.948 0.044 0.008 0.000
#> GSM486845     1  0.7678      0.165 0.428 0.412 0.012 0.148
#> GSM486847     1  0.0000      0.783 1.000 0.000 0.000 0.000
#> GSM486849     2  0.1389      0.736 0.000 0.952 0.000 0.048
#> GSM486851     3  0.0188      0.762 0.000 0.000 0.996 0.004
#> GSM486853     2  0.0469      0.747 0.000 0.988 0.000 0.012
#> GSM486855     2  0.0817      0.741 0.000 0.976 0.000 0.024
#> GSM486857     2  0.6650      0.314 0.272 0.612 0.004 0.112
#> GSM486736     4  0.2198      0.551 0.000 0.008 0.072 0.920
#> GSM486738     2  0.2589      0.674 0.000 0.884 0.000 0.116
#> GSM486740     4  0.7342      0.486 0.036 0.336 0.080 0.548
#> GSM486742     2  0.4843      0.124 0.000 0.604 0.000 0.396
#> GSM486744     4  0.5143      0.412 0.004 0.456 0.000 0.540
#> GSM486746     4  0.7356      0.481 0.036 0.340 0.080 0.544
#> GSM486748     1  0.6172      0.612 0.692 0.208 0.016 0.084
#> GSM486750     4  0.4977      0.239 0.000 0.460 0.000 0.540
#> GSM486752     1  0.6598      0.580 0.660 0.228 0.024 0.088
#> GSM486754     4  0.4948      0.443 0.000 0.440 0.000 0.560
#> GSM486756     2  0.4040      0.466 0.000 0.752 0.000 0.248
#> GSM486758     1  0.4630      0.703 0.820 0.096 0.020 0.064
#> GSM486760     1  0.0188      0.783 0.996 0.004 0.000 0.000
#> GSM486762     1  0.0000      0.783 1.000 0.000 0.000 0.000
#> GSM486764     3  0.0336      0.762 0.000 0.000 0.992 0.008
#> GSM486766     1  0.0000      0.783 1.000 0.000 0.000 0.000
#> GSM486768     1  0.9189      0.217 0.416 0.292 0.104 0.188
#> GSM486770     4  0.2060      0.560 0.000 0.016 0.052 0.932
#> GSM486772     2  0.1902      0.724 0.004 0.932 0.000 0.064
#> GSM486774     1  0.8369      0.234 0.436 0.344 0.036 0.184
#> GSM486776     1  0.0000      0.783 1.000 0.000 0.000 0.000
#> GSM486778     1  0.0188      0.781 0.996 0.000 0.004 0.000
#> GSM486780     2  0.1489      0.722 0.000 0.952 0.004 0.044
#> GSM486782     1  0.7958      0.179 0.424 0.384 0.016 0.176
#> GSM486784     2  0.0336      0.747 0.000 0.992 0.000 0.008
#> GSM486786     1  0.0000      0.783 1.000 0.000 0.000 0.000
#> GSM486788     1  0.0376      0.782 0.992 0.004 0.004 0.000
#> GSM486790     4  0.4866      0.489 0.000 0.404 0.000 0.596
#> GSM486792     3  0.0376      0.762 0.004 0.000 0.992 0.004
#> GSM486794     1  0.0188      0.781 0.996 0.000 0.004 0.000
#> GSM486796     1  0.5677      0.615 0.708 0.232 0.016 0.044
#> GSM486798     1  0.7648      0.450 0.556 0.280 0.032 0.132
#> GSM486800     1  0.0000      0.783 1.000 0.000 0.000 0.000
#> GSM486802     1  0.0188      0.783 0.996 0.004 0.000 0.000
#> GSM486804     1  0.0657      0.781 0.984 0.012 0.004 0.000
#> GSM486806     1  0.8275      0.270 0.456 0.344 0.040 0.160
#> GSM486808     1  0.0376      0.782 0.992 0.000 0.004 0.004
#> GSM486810     4  0.3768      0.464 0.000 0.008 0.184 0.808
#> GSM486812     1  0.0000      0.783 1.000 0.000 0.000 0.000
#> GSM486814     2  0.0336      0.747 0.000 0.992 0.000 0.008
#> GSM486816     1  0.0188      0.781 0.996 0.000 0.004 0.000
#> GSM486818     1  0.7171      0.451 0.568 0.320 0.028 0.084
#> GSM486821     3  0.9101      0.206 0.276 0.136 0.448 0.140
#> GSM486823     4  0.2281      0.589 0.000 0.096 0.000 0.904
#> GSM486826     1  0.0469      0.781 0.988 0.012 0.000 0.000
#> GSM486830     1  0.8153      0.209 0.432 0.372 0.028 0.168
#> GSM486832     1  0.0376      0.782 0.992 0.004 0.004 0.000
#> GSM486834     1  0.7613      0.433 0.548 0.300 0.032 0.120
#> GSM486836     1  0.0376      0.782 0.992 0.004 0.004 0.000
#> GSM486838     2  0.6464      0.359 0.236 0.644 0.004 0.116
#> GSM486840     1  0.0000      0.783 1.000 0.000 0.000 0.000
#> GSM486842     1  0.0000      0.783 1.000 0.000 0.000 0.000
#> GSM486844     1  0.1635      0.766 0.948 0.044 0.008 0.000
#> GSM486846     1  0.7678      0.165 0.428 0.412 0.012 0.148
#> GSM486848     1  0.0000      0.783 1.000 0.000 0.000 0.000
#> GSM486850     2  0.1389      0.736 0.000 0.952 0.000 0.048
#> GSM486852     3  0.0188      0.762 0.000 0.000 0.996 0.004
#> GSM486854     2  0.0469      0.747 0.000 0.988 0.000 0.012
#> GSM486856     2  0.0817      0.741 0.000 0.976 0.000 0.024
#> GSM486858     2  0.6650      0.314 0.272 0.612 0.004 0.112

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM486735     4  0.3419     0.6093 0.000 0.000 0.180 0.804 0.016
#> GSM486737     2  0.2824     0.7800 0.000 0.864 0.020 0.116 0.000
#> GSM486739     3  0.6561    -0.2843 0.000 0.096 0.472 0.400 0.032
#> GSM486741     2  0.4930     0.3454 0.000 0.580 0.032 0.388 0.000
#> GSM486743     4  0.6649     0.4879 0.000 0.284 0.268 0.448 0.000
#> GSM486745     3  0.6600    -0.2802 0.000 0.100 0.468 0.400 0.032
#> GSM486747     1  0.5363    -0.0262 0.548 0.040 0.404 0.008 0.000
#> GSM486749     4  0.5137     0.0964 0.000 0.424 0.040 0.536 0.000
#> GSM486751     1  0.5574    -0.1971 0.504 0.044 0.440 0.012 0.000
#> GSM486753     4  0.6596     0.5130 0.000 0.256 0.280 0.464 0.000
#> GSM486755     2  0.5373     0.5137 0.000 0.652 0.112 0.236 0.000
#> GSM486757     1  0.4235     0.5039 0.656 0.000 0.336 0.008 0.000
#> GSM486759     1  0.0404     0.8863 0.988 0.000 0.012 0.000 0.000
#> GSM486761     1  0.0880     0.8760 0.968 0.000 0.032 0.000 0.000
#> GSM486763     5  0.0963     0.9741 0.000 0.000 0.036 0.000 0.964
#> GSM486765     1  0.0000     0.8868 1.000 0.000 0.000 0.000 0.000
#> GSM486767     3  0.5433     0.6708 0.192 0.028 0.716 0.024 0.040
#> GSM486769     4  0.2237     0.5945 0.000 0.004 0.084 0.904 0.008
#> GSM486771     2  0.3289     0.7621 0.000 0.844 0.108 0.048 0.000
#> GSM486773     3  0.4996     0.7029 0.204 0.052 0.720 0.024 0.000
#> GSM486775     1  0.0000     0.8868 1.000 0.000 0.000 0.000 0.000
#> GSM486777     1  0.1205     0.8653 0.956 0.000 0.040 0.004 0.000
#> GSM486779     2  0.2067     0.7875 0.000 0.920 0.048 0.032 0.000
#> GSM486781     3  0.5295     0.7002 0.192 0.092 0.700 0.016 0.000
#> GSM486783     2  0.0579     0.8343 0.000 0.984 0.008 0.008 0.000
#> GSM486785     1  0.0000     0.8868 1.000 0.000 0.000 0.000 0.000
#> GSM486787     1  0.0963     0.8797 0.964 0.000 0.036 0.000 0.000
#> GSM486789     4  0.6463     0.5398 0.000 0.212 0.300 0.488 0.000
#> GSM486791     5  0.0324     0.9838 0.004 0.000 0.004 0.000 0.992
#> GSM486793     1  0.1502     0.8519 0.940 0.000 0.056 0.004 0.000
#> GSM486795     1  0.5726     0.2942 0.604 0.080 0.304 0.012 0.000
#> GSM486797     3  0.5241     0.5918 0.356 0.040 0.596 0.008 0.000
#> GSM486799     1  0.0162     0.8860 0.996 0.000 0.004 0.000 0.000
#> GSM486801     1  0.0703     0.8837 0.976 0.000 0.024 0.000 0.000
#> GSM486803     1  0.1197     0.8726 0.952 0.000 0.048 0.000 0.000
#> GSM486805     3  0.5145     0.7056 0.224 0.052 0.700 0.024 0.000
#> GSM486807     1  0.0671     0.8851 0.980 0.000 0.016 0.004 0.000
#> GSM486809     4  0.5004     0.5330 0.000 0.000 0.216 0.692 0.092
#> GSM486811     1  0.0290     0.8860 0.992 0.000 0.008 0.000 0.000
#> GSM486813     2  0.0693     0.8333 0.000 0.980 0.008 0.012 0.000
#> GSM486815     1  0.1704     0.8435 0.928 0.000 0.068 0.004 0.000
#> GSM486817     3  0.5220     0.6105 0.340 0.036 0.612 0.012 0.000
#> GSM486819     3  0.5889     0.2079 0.104 0.000 0.504 0.000 0.392
#> GSM486822     4  0.2473     0.6032 0.000 0.072 0.032 0.896 0.000
#> GSM486824     1  0.0963     0.8789 0.964 0.000 0.036 0.000 0.000
#> GSM486828     3  0.5354     0.7066 0.208 0.080 0.692 0.020 0.000
#> GSM486831     1  0.0963     0.8797 0.964 0.000 0.036 0.000 0.000
#> GSM486833     3  0.5046     0.6318 0.328 0.020 0.632 0.020 0.000
#> GSM486835     1  0.0963     0.8797 0.964 0.000 0.036 0.000 0.000
#> GSM486837     3  0.6064     0.3907 0.096 0.392 0.504 0.008 0.000
#> GSM486839     1  0.0000     0.8868 1.000 0.000 0.000 0.000 0.000
#> GSM486841     1  0.0162     0.8860 0.996 0.000 0.004 0.000 0.000
#> GSM486843     1  0.2179     0.8210 0.896 0.004 0.100 0.000 0.000
#> GSM486845     3  0.5553     0.6968 0.204 0.124 0.664 0.008 0.000
#> GSM486847     1  0.0000     0.8868 1.000 0.000 0.000 0.000 0.000
#> GSM486849     2  0.2473     0.8055 0.000 0.896 0.072 0.032 0.000
#> GSM486851     5  0.0162     0.9844 0.000 0.000 0.004 0.000 0.996
#> GSM486853     2  0.0798     0.8347 0.000 0.976 0.016 0.008 0.000
#> GSM486855     2  0.1357     0.8237 0.000 0.948 0.048 0.004 0.000
#> GSM486857     3  0.6480     0.4626 0.124 0.372 0.488 0.016 0.000
#> GSM486736     4  0.3419     0.6093 0.000 0.000 0.180 0.804 0.016
#> GSM486738     2  0.2824     0.7800 0.000 0.864 0.020 0.116 0.000
#> GSM486740     3  0.6561    -0.2843 0.000 0.096 0.472 0.400 0.032
#> GSM486742     2  0.4930     0.3454 0.000 0.580 0.032 0.388 0.000
#> GSM486744     4  0.6649     0.4879 0.000 0.284 0.268 0.448 0.000
#> GSM486746     3  0.6600    -0.2802 0.000 0.100 0.468 0.400 0.032
#> GSM486748     1  0.5363    -0.0262 0.548 0.040 0.404 0.008 0.000
#> GSM486750     4  0.5137     0.0964 0.000 0.424 0.040 0.536 0.000
#> GSM486752     1  0.5574    -0.1971 0.504 0.044 0.440 0.012 0.000
#> GSM486754     4  0.6596     0.5130 0.000 0.256 0.280 0.464 0.000
#> GSM486756     2  0.5373     0.5137 0.000 0.652 0.112 0.236 0.000
#> GSM486758     1  0.4235     0.5039 0.656 0.000 0.336 0.008 0.000
#> GSM486760     1  0.0404     0.8863 0.988 0.000 0.012 0.000 0.000
#> GSM486762     1  0.0880     0.8760 0.968 0.000 0.032 0.000 0.000
#> GSM486764     5  0.0963     0.9741 0.000 0.000 0.036 0.000 0.964
#> GSM486766     1  0.0000     0.8868 1.000 0.000 0.000 0.000 0.000
#> GSM486768     3  0.5433     0.6708 0.192 0.028 0.716 0.024 0.040
#> GSM486770     4  0.2237     0.5945 0.000 0.004 0.084 0.904 0.008
#> GSM486772     2  0.3289     0.7621 0.000 0.844 0.108 0.048 0.000
#> GSM486774     3  0.4996     0.7029 0.204 0.052 0.720 0.024 0.000
#> GSM486776     1  0.0000     0.8868 1.000 0.000 0.000 0.000 0.000
#> GSM486778     1  0.1205     0.8653 0.956 0.000 0.040 0.004 0.000
#> GSM486780     2  0.2067     0.7875 0.000 0.920 0.048 0.032 0.000
#> GSM486782     3  0.5295     0.7002 0.192 0.092 0.700 0.016 0.000
#> GSM486784     2  0.0579     0.8343 0.000 0.984 0.008 0.008 0.000
#> GSM486786     1  0.0000     0.8868 1.000 0.000 0.000 0.000 0.000
#> GSM486788     1  0.0963     0.8797 0.964 0.000 0.036 0.000 0.000
#> GSM486790     4  0.6463     0.5398 0.000 0.212 0.300 0.488 0.000
#> GSM486792     5  0.0324     0.9838 0.004 0.000 0.004 0.000 0.992
#> GSM486794     1  0.1502     0.8519 0.940 0.000 0.056 0.004 0.000
#> GSM486796     1  0.5726     0.2942 0.604 0.080 0.304 0.012 0.000
#> GSM486798     3  0.5241     0.5918 0.356 0.040 0.596 0.008 0.000
#> GSM486800     1  0.0162     0.8860 0.996 0.000 0.004 0.000 0.000
#> GSM486802     1  0.0703     0.8837 0.976 0.000 0.024 0.000 0.000
#> GSM486804     1  0.1197     0.8726 0.952 0.000 0.048 0.000 0.000
#> GSM486806     3  0.5145     0.7056 0.224 0.052 0.700 0.024 0.000
#> GSM486808     1  0.0671     0.8851 0.980 0.000 0.016 0.004 0.000
#> GSM486810     4  0.5004     0.5330 0.000 0.000 0.216 0.692 0.092
#> GSM486812     1  0.0290     0.8860 0.992 0.000 0.008 0.000 0.000
#> GSM486814     2  0.0693     0.8333 0.000 0.980 0.008 0.012 0.000
#> GSM486816     1  0.1704     0.8435 0.928 0.000 0.068 0.004 0.000
#> GSM486818     3  0.5220     0.6105 0.340 0.036 0.612 0.012 0.000
#> GSM486821     3  0.5889     0.2079 0.104 0.000 0.504 0.000 0.392
#> GSM486823     4  0.2473     0.6032 0.000 0.072 0.032 0.896 0.000
#> GSM486826     1  0.0963     0.8789 0.964 0.000 0.036 0.000 0.000
#> GSM486830     3  0.5354     0.7066 0.208 0.080 0.692 0.020 0.000
#> GSM486832     1  0.0963     0.8797 0.964 0.000 0.036 0.000 0.000
#> GSM486834     3  0.5046     0.6318 0.328 0.020 0.632 0.020 0.000
#> GSM486836     1  0.0963     0.8797 0.964 0.000 0.036 0.000 0.000
#> GSM486838     3  0.6064     0.3907 0.096 0.392 0.504 0.008 0.000
#> GSM486840     1  0.0000     0.8868 1.000 0.000 0.000 0.000 0.000
#> GSM486842     1  0.0162     0.8860 0.996 0.000 0.004 0.000 0.000
#> GSM486844     1  0.2179     0.8210 0.896 0.004 0.100 0.000 0.000
#> GSM486846     3  0.5553     0.6968 0.204 0.124 0.664 0.008 0.000
#> GSM486848     1  0.0000     0.8868 1.000 0.000 0.000 0.000 0.000
#> GSM486850     2  0.2473     0.8055 0.000 0.896 0.072 0.032 0.000
#> GSM486852     5  0.0162     0.9844 0.000 0.000 0.004 0.000 0.996
#> GSM486854     2  0.0798     0.8347 0.000 0.976 0.016 0.008 0.000
#> GSM486856     2  0.1357     0.8237 0.000 0.948 0.048 0.004 0.000
#> GSM486858     3  0.6480     0.4626 0.124 0.372 0.488 0.016 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
#> GSM486735     6  0.4819     0.2163 0.000 0.000 0.416 0.056 0.000 0.528
#> GSM486737     2  0.2847     0.7474 0.000 0.852 0.016 0.012 0.000 0.120
#> GSM486739     4  0.7269    -0.4668 0.000 0.072 0.352 0.376 0.016 0.184
#> GSM486741     2  0.4585     0.2871 0.000 0.564 0.016 0.016 0.000 0.404
#> GSM486743     3  0.7718     0.6271 0.000 0.236 0.272 0.224 0.000 0.268
#> GSM486745     4  0.7305    -0.4658 0.000 0.076 0.352 0.372 0.016 0.184
#> GSM486747     1  0.4732    -0.1517 0.488 0.016 0.020 0.476 0.000 0.000
#> GSM486749     6  0.5015     0.1470 0.000 0.404 0.032 0.024 0.000 0.540
#> GSM486751     4  0.4791     0.2562 0.444 0.020 0.020 0.516 0.000 0.000
#> GSM486753     3  0.7679     0.6493 0.000 0.204 0.296 0.228 0.000 0.272
#> GSM486755     2  0.6040     0.4238 0.000 0.604 0.080 0.124 0.000 0.192
#> GSM486757     1  0.6062     0.0829 0.396 0.000 0.268 0.336 0.000 0.000
#> GSM486759     1  0.0713     0.8681 0.972 0.000 0.000 0.028 0.000 0.000
#> GSM486761     1  0.1765     0.8488 0.924 0.000 0.052 0.024 0.000 0.000
#> GSM486763     5  0.1765     0.9304 0.000 0.000 0.096 0.000 0.904 0.000
#> GSM486765     1  0.0363     0.8694 0.988 0.000 0.012 0.000 0.000 0.000
#> GSM486767     4  0.4334     0.6194 0.100 0.012 0.080 0.784 0.020 0.004
#> GSM486769     6  0.2800     0.5005 0.000 0.004 0.100 0.036 0.000 0.860
#> GSM486771     2  0.3656     0.7233 0.000 0.808 0.048 0.124 0.000 0.020
#> GSM486773     4  0.3181     0.6589 0.112 0.028 0.020 0.840 0.000 0.000
#> GSM486775     1  0.0363     0.8694 0.988 0.000 0.012 0.000 0.000 0.000
#> GSM486777     1  0.2165     0.8103 0.884 0.000 0.108 0.008 0.000 0.000
#> GSM486779     2  0.2978     0.7219 0.000 0.860 0.072 0.056 0.000 0.012
#> GSM486781     4  0.3355     0.6537 0.100 0.064 0.008 0.828 0.000 0.000
#> GSM486783     2  0.0717     0.8079 0.000 0.976 0.000 0.016 0.000 0.008
#> GSM486785     1  0.0000     0.8702 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486787     1  0.1204     0.8581 0.944 0.000 0.000 0.056 0.000 0.000
#> GSM486789     3  0.7550     0.6319 0.000 0.160 0.336 0.232 0.000 0.272
#> GSM486791     5  0.0260     0.9641 0.000 0.000 0.008 0.000 0.992 0.000
#> GSM486793     1  0.2909     0.7756 0.836 0.000 0.136 0.028 0.000 0.000
#> GSM486795     1  0.5520     0.2283 0.556 0.064 0.036 0.344 0.000 0.000
#> GSM486797     4  0.4162     0.6100 0.264 0.020 0.016 0.700 0.000 0.000
#> GSM486799     1  0.0146     0.8707 0.996 0.000 0.004 0.000 0.000 0.000
#> GSM486801     1  0.0937     0.8645 0.960 0.000 0.000 0.040 0.000 0.000
#> GSM486803     1  0.1913     0.8366 0.908 0.000 0.012 0.080 0.000 0.000
#> GSM486805     4  0.3657     0.6637 0.128 0.028 0.036 0.808 0.000 0.000
#> GSM486807     1  0.0725     0.8706 0.976 0.000 0.012 0.012 0.000 0.000
#> GSM486809     3  0.5123    -0.2881 0.000 0.000 0.528 0.056 0.012 0.404
#> GSM486811     1  0.0547     0.8684 0.980 0.000 0.020 0.000 0.000 0.000
#> GSM486813     2  0.0820     0.8067 0.000 0.972 0.000 0.012 0.000 0.016
#> GSM486815     1  0.3652     0.7104 0.768 0.000 0.188 0.044 0.000 0.000
#> GSM486817     4  0.4592     0.6223 0.232 0.012 0.064 0.692 0.000 0.000
#> GSM486819     4  0.6040     0.1939 0.072 0.000 0.064 0.492 0.372 0.000
#> GSM486822     6  0.1701     0.5064 0.000 0.072 0.000 0.008 0.000 0.920
#> GSM486824     1  0.0865     0.8668 0.964 0.000 0.000 0.036 0.000 0.000
#> GSM486828     4  0.3817     0.6620 0.120 0.056 0.024 0.800 0.000 0.000
#> GSM486831     1  0.1267     0.8561 0.940 0.000 0.000 0.060 0.000 0.000
#> GSM486833     4  0.4368     0.6256 0.224 0.004 0.056 0.712 0.000 0.004
#> GSM486835     1  0.1267     0.8561 0.940 0.000 0.000 0.060 0.000 0.000
#> GSM486837     4  0.5209     0.3795 0.048 0.356 0.020 0.572 0.000 0.004
#> GSM486839     1  0.0000     0.8702 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486841     1  0.0291     0.8703 0.992 0.000 0.004 0.004 0.000 0.000
#> GSM486843     1  0.2755     0.7705 0.844 0.004 0.012 0.140 0.000 0.000
#> GSM486845     4  0.3611     0.6503 0.108 0.096 0.000 0.796 0.000 0.000
#> GSM486847     1  0.0000     0.8702 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486849     2  0.2863     0.7710 0.000 0.864 0.036 0.088 0.000 0.012
#> GSM486851     5  0.0146     0.9645 0.000 0.000 0.004 0.000 0.996 0.000
#> GSM486853     2  0.0972     0.8084 0.000 0.964 0.000 0.028 0.000 0.008
#> GSM486855     2  0.2189     0.7859 0.000 0.904 0.032 0.060 0.000 0.004
#> GSM486857     4  0.5085     0.4116 0.048 0.340 0.016 0.592 0.000 0.004
#> GSM486736     6  0.4819     0.2163 0.000 0.000 0.416 0.056 0.000 0.528
#> GSM486738     2  0.2847     0.7474 0.000 0.852 0.016 0.012 0.000 0.120
#> GSM486740     4  0.7269    -0.4668 0.000 0.072 0.352 0.376 0.016 0.184
#> GSM486742     2  0.4585     0.2871 0.000 0.564 0.016 0.016 0.000 0.404
#> GSM486744     3  0.7718     0.6271 0.000 0.236 0.272 0.224 0.000 0.268
#> GSM486746     4  0.7305    -0.4658 0.000 0.076 0.352 0.372 0.016 0.184
#> GSM486748     1  0.4732    -0.1517 0.488 0.016 0.020 0.476 0.000 0.000
#> GSM486750     6  0.5015     0.1470 0.000 0.404 0.032 0.024 0.000 0.540
#> GSM486752     4  0.4791     0.2562 0.444 0.020 0.020 0.516 0.000 0.000
#> GSM486754     3  0.7679     0.6493 0.000 0.204 0.296 0.228 0.000 0.272
#> GSM486756     2  0.6040     0.4238 0.000 0.604 0.080 0.124 0.000 0.192
#> GSM486758     1  0.6062     0.0829 0.396 0.000 0.268 0.336 0.000 0.000
#> GSM486760     1  0.0713     0.8681 0.972 0.000 0.000 0.028 0.000 0.000
#> GSM486762     1  0.1765     0.8488 0.924 0.000 0.052 0.024 0.000 0.000
#> GSM486764     5  0.1765     0.9304 0.000 0.000 0.096 0.000 0.904 0.000
#> GSM486766     1  0.0363     0.8694 0.988 0.000 0.012 0.000 0.000 0.000
#> GSM486768     4  0.4334     0.6194 0.100 0.012 0.080 0.784 0.020 0.004
#> GSM486770     6  0.2800     0.5005 0.000 0.004 0.100 0.036 0.000 0.860
#> GSM486772     2  0.3656     0.7233 0.000 0.808 0.048 0.124 0.000 0.020
#> GSM486774     4  0.3181     0.6589 0.112 0.028 0.020 0.840 0.000 0.000
#> GSM486776     1  0.0363     0.8694 0.988 0.000 0.012 0.000 0.000 0.000
#> GSM486778     1  0.2165     0.8103 0.884 0.000 0.108 0.008 0.000 0.000
#> GSM486780     2  0.2978     0.7219 0.000 0.860 0.072 0.056 0.000 0.012
#> GSM486782     4  0.3355     0.6537 0.100 0.064 0.008 0.828 0.000 0.000
#> GSM486784     2  0.0717     0.8079 0.000 0.976 0.000 0.016 0.000 0.008
#> GSM486786     1  0.0000     0.8702 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486788     1  0.1204     0.8581 0.944 0.000 0.000 0.056 0.000 0.000
#> GSM486790     3  0.7550     0.6319 0.000 0.160 0.336 0.232 0.000 0.272
#> GSM486792     5  0.0260     0.9641 0.000 0.000 0.008 0.000 0.992 0.000
#> GSM486794     1  0.2909     0.7756 0.836 0.000 0.136 0.028 0.000 0.000
#> GSM486796     1  0.5520     0.2283 0.556 0.064 0.036 0.344 0.000 0.000
#> GSM486798     4  0.4162     0.6100 0.264 0.020 0.016 0.700 0.000 0.000
#> GSM486800     1  0.0146     0.8707 0.996 0.000 0.004 0.000 0.000 0.000
#> GSM486802     1  0.0937     0.8645 0.960 0.000 0.000 0.040 0.000 0.000
#> GSM486804     1  0.1913     0.8366 0.908 0.000 0.012 0.080 0.000 0.000
#> GSM486806     4  0.3657     0.6637 0.128 0.028 0.036 0.808 0.000 0.000
#> GSM486808     1  0.0725     0.8706 0.976 0.000 0.012 0.012 0.000 0.000
#> GSM486810     3  0.5123    -0.2881 0.000 0.000 0.528 0.056 0.012 0.404
#> GSM486812     1  0.0547     0.8684 0.980 0.000 0.020 0.000 0.000 0.000
#> GSM486814     2  0.0820     0.8067 0.000 0.972 0.000 0.012 0.000 0.016
#> GSM486816     1  0.3652     0.7104 0.768 0.000 0.188 0.044 0.000 0.000
#> GSM486818     4  0.4592     0.6223 0.232 0.012 0.064 0.692 0.000 0.000
#> GSM486821     4  0.6040     0.1939 0.072 0.000 0.064 0.492 0.372 0.000
#> GSM486823     6  0.1701     0.5064 0.000 0.072 0.000 0.008 0.000 0.920
#> GSM486826     1  0.0865     0.8668 0.964 0.000 0.000 0.036 0.000 0.000
#> GSM486830     4  0.3817     0.6620 0.120 0.056 0.024 0.800 0.000 0.000
#> GSM486832     1  0.1267     0.8561 0.940 0.000 0.000 0.060 0.000 0.000
#> GSM486834     4  0.4368     0.6256 0.224 0.004 0.056 0.712 0.000 0.004
#> GSM486836     1  0.1267     0.8561 0.940 0.000 0.000 0.060 0.000 0.000
#> GSM486838     4  0.5209     0.3795 0.048 0.356 0.020 0.572 0.000 0.004
#> GSM486840     1  0.0000     0.8702 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486842     1  0.0291     0.8703 0.992 0.000 0.004 0.004 0.000 0.000
#> GSM486844     1  0.2755     0.7705 0.844 0.004 0.012 0.140 0.000 0.000
#> GSM486846     4  0.3611     0.6503 0.108 0.096 0.000 0.796 0.000 0.000
#> GSM486848     1  0.0000     0.8702 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486850     2  0.2863     0.7710 0.000 0.864 0.036 0.088 0.000 0.012
#> GSM486852     5  0.0146     0.9645 0.000 0.000 0.004 0.000 0.996 0.000
#> GSM486854     2  0.0972     0.8084 0.000 0.964 0.000 0.028 0.000 0.008
#> GSM486856     2  0.2189     0.7859 0.000 0.904 0.032 0.060 0.000 0.004
#> GSM486858     4  0.5085     0.4116 0.048 0.340 0.016 0.592 0.000 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-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)

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 agent(p) individual(p) k
#> SD:hclust 102        1      2.01e-05 2
#> SD:hclust  96        1      1.07e-08 3
#> SD:hclust  78        1      2.70e-10 4
#> SD:hclust  98        1      8.18e-16 5
#> SD:hclust  92        1      2.88e-18 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 120 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 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-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.931           0.903       0.956         0.5024 0.497   0.497
#> 3 3 0.569           0.680       0.824         0.2726 0.798   0.615
#> 4 4 0.533           0.599       0.725         0.1242 0.854   0.617
#> 5 5 0.623           0.683       0.772         0.0619 0.918   0.725
#> 6 6 0.646           0.458       0.725         0.0465 0.978   0.912

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
#> GSM486735     2  0.1414     0.9779 0.020 0.980
#> GSM486737     2  0.1414     0.9779 0.020 0.980
#> GSM486739     2  0.1414     0.9779 0.020 0.980
#> GSM486741     2  0.1414     0.9779 0.020 0.980
#> GSM486743     2  0.1414     0.9779 0.020 0.980
#> GSM486745     2  0.1414     0.9779 0.020 0.980
#> GSM486747     1  0.0000     0.9318 1.000 0.000
#> GSM486749     2  0.1414     0.9779 0.020 0.980
#> GSM486751     1  0.0000     0.9318 1.000 0.000
#> GSM486753     2  0.1414     0.9779 0.020 0.980
#> GSM486755     2  0.1414     0.9779 0.020 0.980
#> GSM486757     1  0.0000     0.9318 1.000 0.000
#> GSM486759     1  0.0000     0.9318 1.000 0.000
#> GSM486761     1  0.0000     0.9318 1.000 0.000
#> GSM486763     1  0.7376     0.7278 0.792 0.208
#> GSM486765     1  0.0000     0.9318 1.000 0.000
#> GSM486767     2  0.1414     0.9779 0.020 0.980
#> GSM486769     2  0.1414     0.9779 0.020 0.980
#> GSM486771     2  0.1414     0.9779 0.020 0.980
#> GSM486773     2  0.1414     0.9779 0.020 0.980
#> GSM486775     1  0.0000     0.9318 1.000 0.000
#> GSM486777     1  0.0000     0.9318 1.000 0.000
#> GSM486779     2  0.1414     0.9779 0.020 0.980
#> GSM486781     2  0.1414     0.9779 0.020 0.980
#> GSM486783     2  0.1414     0.9779 0.020 0.980
#> GSM486785     1  0.0000     0.9318 1.000 0.000
#> GSM486787     1  0.0000     0.9318 1.000 0.000
#> GSM486789     2  0.1414     0.9779 0.020 0.980
#> GSM486791     1  0.0000     0.9318 1.000 0.000
#> GSM486793     1  0.0000     0.9318 1.000 0.000
#> GSM486795     1  0.2603     0.9031 0.956 0.044
#> GSM486797     1  0.9552     0.4290 0.624 0.376
#> GSM486799     1  0.0000     0.9318 1.000 0.000
#> GSM486801     1  0.0000     0.9318 1.000 0.000
#> GSM486803     1  0.0000     0.9318 1.000 0.000
#> GSM486805     2  0.4431     0.9035 0.092 0.908
#> GSM486807     1  0.0000     0.9318 1.000 0.000
#> GSM486809     2  0.1414     0.9779 0.020 0.980
#> GSM486811     1  0.0000     0.9318 1.000 0.000
#> GSM486813     2  0.1414     0.9779 0.020 0.980
#> GSM486815     1  0.0000     0.9318 1.000 0.000
#> GSM486817     1  0.9983     0.1438 0.524 0.476
#> GSM486819     1  0.9996     0.1007 0.512 0.488
#> GSM486822     2  0.1414     0.9779 0.020 0.980
#> GSM486824     1  0.0000     0.9318 1.000 0.000
#> GSM486828     2  0.1414     0.9779 0.020 0.980
#> GSM486831     1  0.0000     0.9318 1.000 0.000
#> GSM486833     1  0.9710     0.3722 0.600 0.400
#> GSM486835     1  0.0000     0.9318 1.000 0.000
#> GSM486837     2  0.1414     0.9779 0.020 0.980
#> GSM486839     1  0.0000     0.9318 1.000 0.000
#> GSM486841     1  0.0000     0.9318 1.000 0.000
#> GSM486843     1  0.0000     0.9318 1.000 0.000
#> GSM486845     2  0.1414     0.9779 0.020 0.980
#> GSM486847     1  0.0000     0.9318 1.000 0.000
#> GSM486849     2  0.1414     0.9779 0.020 0.980
#> GSM486851     1  0.0000     0.9318 1.000 0.000
#> GSM486853     2  0.1414     0.9779 0.020 0.980
#> GSM486855     2  0.1414     0.9779 0.020 0.980
#> GSM486857     2  0.1414     0.9779 0.020 0.980
#> GSM486736     2  0.0000     0.9782 0.000 1.000
#> GSM486738     2  0.0000     0.9782 0.000 1.000
#> GSM486740     2  0.0000     0.9782 0.000 1.000
#> GSM486742     2  0.0000     0.9782 0.000 1.000
#> GSM486744     2  0.0000     0.9782 0.000 1.000
#> GSM486746     2  0.0000     0.9782 0.000 1.000
#> GSM486748     1  0.1414     0.9318 0.980 0.020
#> GSM486750     2  0.0000     0.9782 0.000 1.000
#> GSM486752     1  0.1414     0.9318 0.980 0.020
#> GSM486754     2  0.0000     0.9782 0.000 1.000
#> GSM486756     2  0.0000     0.9782 0.000 1.000
#> GSM486758     1  0.1414     0.9318 0.980 0.020
#> GSM486760     1  0.1414     0.9318 0.980 0.020
#> GSM486762     1  0.1414     0.9318 0.980 0.020
#> GSM486764     1  0.7745     0.7278 0.772 0.228
#> GSM486766     1  0.1414     0.9318 0.980 0.020
#> GSM486768     2  0.0000     0.9782 0.000 1.000
#> GSM486770     2  0.0000     0.9782 0.000 1.000
#> GSM486772     2  0.0000     0.9782 0.000 1.000
#> GSM486774     2  0.0000     0.9782 0.000 1.000
#> GSM486776     1  0.1414     0.9318 0.980 0.020
#> GSM486778     1  0.1414     0.9318 0.980 0.020
#> GSM486780     2  0.0000     0.9782 0.000 1.000
#> GSM486782     2  0.0000     0.9782 0.000 1.000
#> GSM486784     2  0.0000     0.9782 0.000 1.000
#> GSM486786     1  0.1414     0.9318 0.980 0.020
#> GSM486788     1  0.1414     0.9318 0.980 0.020
#> GSM486790     2  0.0000     0.9782 0.000 1.000
#> GSM486792     1  0.1414     0.9318 0.980 0.020
#> GSM486794     1  0.1414     0.9318 0.980 0.020
#> GSM486796     1  0.3274     0.9064 0.940 0.060
#> GSM486798     1  0.9909     0.3091 0.556 0.444
#> GSM486800     1  0.1414     0.9318 0.980 0.020
#> GSM486802     1  0.1414     0.9318 0.980 0.020
#> GSM486804     1  0.1414     0.9318 0.980 0.020
#> GSM486806     2  0.0376     0.9759 0.004 0.996
#> GSM486808     1  0.1414     0.9318 0.980 0.020
#> GSM486810     2  0.0000     0.9782 0.000 1.000
#> GSM486812     1  0.1414     0.9318 0.980 0.020
#> GSM486814     2  0.0000     0.9782 0.000 1.000
#> GSM486816     1  0.1414     0.9318 0.980 0.020
#> GSM486818     1  0.9850     0.3507 0.572 0.428
#> GSM486821     2  0.9977    -0.0537 0.472 0.528
#> GSM486823     2  0.0000     0.9782 0.000 1.000
#> GSM486826     1  0.1414     0.9318 0.980 0.020
#> GSM486830     2  0.0000     0.9782 0.000 1.000
#> GSM486832     1  0.1414     0.9318 0.980 0.020
#> GSM486834     1  0.9866     0.3418 0.568 0.432
#> GSM486836     1  0.1414     0.9318 0.980 0.020
#> GSM486838     2  0.0000     0.9782 0.000 1.000
#> GSM486840     1  0.1414     0.9318 0.980 0.020
#> GSM486842     1  0.1414     0.9318 0.980 0.020
#> GSM486844     1  0.1414     0.9318 0.980 0.020
#> GSM486846     2  0.0000     0.9782 0.000 1.000
#> GSM486848     1  0.1414     0.9318 0.980 0.020
#> GSM486850     2  0.0000     0.9782 0.000 1.000
#> GSM486852     1  0.1414     0.9318 0.980 0.020
#> GSM486854     2  0.0000     0.9782 0.000 1.000
#> GSM486856     2  0.0000     0.9782 0.000 1.000
#> GSM486858     2  0.0000     0.9782 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
#> GSM486735     1  0.6274      0.161 0.544 0.456 0.000
#> GSM486737     2  0.1411      0.809 0.036 0.964 0.000
#> GSM486739     1  0.5968      0.413 0.636 0.364 0.000
#> GSM486741     2  0.1753      0.804 0.048 0.952 0.000
#> GSM486743     2  0.0747      0.820 0.016 0.984 0.000
#> GSM486745     1  0.6180      0.393 0.584 0.416 0.000
#> GSM486747     3  0.4399      0.740 0.188 0.000 0.812
#> GSM486749     2  0.3340      0.777 0.120 0.880 0.000
#> GSM486751     3  0.7159      0.197 0.448 0.024 0.528
#> GSM486753     2  0.3686      0.759 0.140 0.860 0.000
#> GSM486755     2  0.3038      0.786 0.104 0.896 0.000
#> GSM486757     3  0.6299      0.230 0.476 0.000 0.524
#> GSM486759     3  0.0892      0.880 0.020 0.000 0.980
#> GSM486761     3  0.1163      0.879 0.028 0.000 0.972
#> GSM486763     1  0.5407      0.538 0.804 0.040 0.156
#> GSM486765     3  0.0592      0.881 0.012 0.000 0.988
#> GSM486767     1  0.6204      0.430 0.576 0.424 0.000
#> GSM486769     2  0.6215      0.226 0.428 0.572 0.000
#> GSM486771     2  0.0747      0.818 0.016 0.984 0.000
#> GSM486773     1  0.6215      0.416 0.572 0.428 0.000
#> GSM486775     3  0.0424      0.881 0.008 0.000 0.992
#> GSM486777     3  0.2356      0.862 0.072 0.000 0.928
#> GSM486779     2  0.2165      0.790 0.064 0.936 0.000
#> GSM486781     2  0.5529      0.511 0.296 0.704 0.000
#> GSM486783     2  0.0237      0.819 0.004 0.996 0.000
#> GSM486785     3  0.1031      0.880 0.024 0.000 0.976
#> GSM486787     3  0.0892      0.880 0.020 0.000 0.980
#> GSM486789     2  0.4931      0.650 0.232 0.768 0.000
#> GSM486791     3  0.6252      0.340 0.444 0.000 0.556
#> GSM486793     3  0.2625      0.858 0.084 0.000 0.916
#> GSM486795     3  0.7727      0.370 0.336 0.064 0.600
#> GSM486797     1  0.9585      0.432 0.456 0.212 0.332
#> GSM486799     3  0.0892      0.880 0.020 0.000 0.980
#> GSM486801     3  0.1031      0.880 0.024 0.000 0.976
#> GSM486803     3  0.1163      0.879 0.028 0.000 0.972
#> GSM486805     1  0.8044      0.531 0.600 0.312 0.088
#> GSM486807     3  0.1031      0.879 0.024 0.000 0.976
#> GSM486809     1  0.5560      0.473 0.700 0.300 0.000
#> GSM486811     3  0.1031      0.880 0.024 0.000 0.976
#> GSM486813     2  0.0237      0.819 0.004 0.996 0.000
#> GSM486815     3  0.2356      0.862 0.072 0.000 0.928
#> GSM486817     1  0.9582      0.497 0.472 0.228 0.300
#> GSM486819     1  0.5263      0.576 0.828 0.088 0.084
#> GSM486822     2  0.5254      0.606 0.264 0.736 0.000
#> GSM486824     3  0.0892      0.880 0.020 0.000 0.980
#> GSM486828     1  0.6180      0.437 0.584 0.416 0.000
#> GSM486831     3  0.1163      0.879 0.028 0.000 0.972
#> GSM486833     1  0.8290      0.571 0.632 0.164 0.204
#> GSM486835     3  0.1163      0.879 0.028 0.000 0.972
#> GSM486837     2  0.4555      0.627 0.200 0.800 0.000
#> GSM486839     3  0.0892      0.880 0.020 0.000 0.980
#> GSM486841     3  0.0892      0.880 0.020 0.000 0.980
#> GSM486843     3  0.1163      0.879 0.028 0.000 0.972
#> GSM486845     2  0.4931      0.598 0.232 0.768 0.000
#> GSM486847     3  0.0892      0.880 0.020 0.000 0.980
#> GSM486849     2  0.0592      0.818 0.012 0.988 0.000
#> GSM486851     1  0.5650      0.326 0.688 0.000 0.312
#> GSM486853     2  0.0424      0.819 0.008 0.992 0.000
#> GSM486855     2  0.1964      0.794 0.056 0.944 0.000
#> GSM486857     2  0.4504      0.629 0.196 0.804 0.000
#> GSM486736     1  0.6274      0.161 0.544 0.456 0.000
#> GSM486738     2  0.1411      0.809 0.036 0.964 0.000
#> GSM486740     1  0.5968      0.413 0.636 0.364 0.000
#> GSM486742     2  0.1753      0.804 0.048 0.952 0.000
#> GSM486744     2  0.0424      0.820 0.008 0.992 0.000
#> GSM486746     1  0.6180      0.393 0.584 0.416 0.000
#> GSM486748     3  0.4931      0.736 0.212 0.004 0.784
#> GSM486750     2  0.3340      0.777 0.120 0.880 0.000
#> GSM486752     3  0.7063      0.241 0.464 0.020 0.516
#> GSM486754     2  0.3192      0.781 0.112 0.888 0.000
#> GSM486756     2  0.3038      0.786 0.104 0.896 0.000
#> GSM486758     3  0.6309      0.237 0.500 0.000 0.500
#> GSM486760     3  0.1643      0.880 0.044 0.000 0.956
#> GSM486762     3  0.1860      0.880 0.052 0.000 0.948
#> GSM486764     1  0.4676      0.539 0.848 0.040 0.112
#> GSM486766     3  0.1753      0.880 0.048 0.000 0.952
#> GSM486768     1  0.6204      0.430 0.576 0.424 0.000
#> GSM486770     2  0.6215      0.226 0.428 0.572 0.000
#> GSM486772     2  0.0747      0.818 0.016 0.984 0.000
#> GSM486774     1  0.6215      0.416 0.572 0.428 0.000
#> GSM486776     3  0.1643      0.880 0.044 0.000 0.956
#> GSM486778     3  0.2878      0.864 0.096 0.000 0.904
#> GSM486780     2  0.2165      0.790 0.064 0.936 0.000
#> GSM486782     2  0.5497      0.521 0.292 0.708 0.000
#> GSM486784     2  0.0237      0.819 0.004 0.996 0.000
#> GSM486786     3  0.1753      0.880 0.048 0.000 0.952
#> GSM486788     3  0.1643      0.880 0.044 0.000 0.956
#> GSM486790     2  0.4931      0.650 0.232 0.768 0.000
#> GSM486792     3  0.6307      0.342 0.488 0.000 0.512
#> GSM486794     3  0.3116      0.860 0.108 0.000 0.892
#> GSM486796     3  0.7841      0.375 0.360 0.064 0.576
#> GSM486798     1  0.9519      0.461 0.484 0.224 0.292
#> GSM486800     3  0.1643      0.880 0.044 0.000 0.956
#> GSM486802     3  0.1753      0.880 0.048 0.000 0.952
#> GSM486804     3  0.1860      0.880 0.052 0.000 0.948
#> GSM486806     1  0.6832      0.479 0.604 0.376 0.020
#> GSM486808     3  0.1753      0.880 0.048 0.000 0.952
#> GSM486810     1  0.5560      0.473 0.700 0.300 0.000
#> GSM486812     3  0.1753      0.880 0.048 0.000 0.952
#> GSM486814     2  0.0237      0.819 0.004 0.996 0.000
#> GSM486816     3  0.2878      0.864 0.096 0.000 0.904
#> GSM486818     1  0.9461      0.488 0.496 0.224 0.280
#> GSM486821     1  0.4289      0.577 0.868 0.092 0.040
#> GSM486823     2  0.5254      0.606 0.264 0.736 0.000
#> GSM486826     3  0.1643      0.880 0.044 0.000 0.956
#> GSM486830     1  0.6180      0.437 0.584 0.416 0.000
#> GSM486832     3  0.1860      0.880 0.052 0.000 0.948
#> GSM486834     1  0.8028      0.569 0.656 0.168 0.176
#> GSM486836     3  0.1860      0.880 0.052 0.000 0.948
#> GSM486838     2  0.4883      0.612 0.208 0.788 0.004
#> GSM486840     3  0.1643      0.880 0.044 0.000 0.956
#> GSM486842     3  0.1643      0.880 0.044 0.000 0.956
#> GSM486844     3  0.1860      0.880 0.052 0.000 0.948
#> GSM486846     2  0.4931      0.598 0.232 0.768 0.000
#> GSM486848     3  0.1643      0.880 0.044 0.000 0.956
#> GSM486850     2  0.0592      0.818 0.012 0.988 0.000
#> GSM486852     1  0.5291      0.326 0.732 0.000 0.268
#> GSM486854     2  0.0424      0.819 0.008 0.992 0.000
#> GSM486856     2  0.1964      0.794 0.056 0.944 0.000
#> GSM486858     2  0.4291      0.653 0.180 0.820 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM486735     4  0.5913     0.5263 0.124 0.180 0.000 0.696
#> GSM486737     2  0.2714     0.6639 0.004 0.884 0.000 0.112
#> GSM486739     4  0.6756     0.5115 0.252 0.148 0.000 0.600
#> GSM486741     2  0.2814     0.6485 0.000 0.868 0.000 0.132
#> GSM486743     2  0.1854     0.7139 0.048 0.940 0.000 0.012
#> GSM486745     4  0.7416     0.2402 0.392 0.168 0.000 0.440
#> GSM486747     3  0.5558     0.0222 0.432 0.000 0.548 0.020
#> GSM486749     2  0.5442     0.4404 0.040 0.672 0.000 0.288
#> GSM486751     1  0.5758     0.5541 0.696 0.028 0.248 0.028
#> GSM486753     2  0.6444     0.3541 0.104 0.612 0.000 0.284
#> GSM486755     2  0.4988     0.5319 0.036 0.728 0.000 0.236
#> GSM486757     1  0.6419     0.4707 0.640 0.016 0.276 0.068
#> GSM486759     3  0.1388     0.8899 0.028 0.000 0.960 0.012
#> GSM486761     3  0.2124     0.8805 0.068 0.000 0.924 0.008
#> GSM486763     4  0.5790     0.3501 0.304 0.004 0.044 0.648
#> GSM486765     3  0.0817     0.8948 0.024 0.000 0.976 0.000
#> GSM486767     1  0.6595     0.5001 0.628 0.212 0.000 0.160
#> GSM486769     4  0.5964     0.4774 0.096 0.228 0.000 0.676
#> GSM486771     2  0.1488     0.7157 0.032 0.956 0.000 0.012
#> GSM486773     1  0.6118     0.5371 0.672 0.208 0.000 0.120
#> GSM486775     3  0.0592     0.8972 0.016 0.000 0.984 0.000
#> GSM486777     3  0.3471     0.8392 0.072 0.000 0.868 0.060
#> GSM486779     2  0.3245     0.6815 0.100 0.872 0.000 0.028
#> GSM486781     1  0.6762     0.3206 0.536 0.360 0.000 0.104
#> GSM486783     2  0.0336     0.7137 0.008 0.992 0.000 0.000
#> GSM486785     3  0.1584     0.8884 0.036 0.000 0.952 0.012
#> GSM486787     3  0.1488     0.8893 0.032 0.000 0.956 0.012
#> GSM486789     2  0.7003    -0.0165 0.116 0.460 0.000 0.424
#> GSM486791     4  0.7853     0.1248 0.292 0.000 0.308 0.400
#> GSM486793     3  0.4022     0.8166 0.096 0.000 0.836 0.068
#> GSM486795     1  0.6707     0.5055 0.592 0.052 0.328 0.028
#> GSM486797     1  0.5854     0.6152 0.724 0.096 0.168 0.012
#> GSM486799     3  0.1151     0.8900 0.024 0.000 0.968 0.008
#> GSM486801     3  0.1706     0.8879 0.036 0.000 0.948 0.016
#> GSM486803     3  0.1888     0.8858 0.044 0.000 0.940 0.016
#> GSM486805     1  0.5771     0.6114 0.748 0.128 0.100 0.024
#> GSM486807     3  0.2198     0.8801 0.072 0.000 0.920 0.008
#> GSM486809     4  0.5633     0.5521 0.184 0.100 0.000 0.716
#> GSM486811     3  0.1356     0.8893 0.032 0.000 0.960 0.008
#> GSM486813     2  0.0469     0.7145 0.012 0.988 0.000 0.000
#> GSM486815     3  0.3761     0.8306 0.080 0.000 0.852 0.068
#> GSM486817     1  0.6272     0.6234 0.700 0.132 0.152 0.016
#> GSM486819     1  0.7089     0.0715 0.512 0.036 0.052 0.400
#> GSM486822     4  0.6209    -0.0160 0.052 0.456 0.000 0.492
#> GSM486824     3  0.1706     0.8890 0.036 0.000 0.948 0.016
#> GSM486828     1  0.5889     0.5535 0.688 0.212 0.000 0.100
#> GSM486831     3  0.1798     0.8868 0.040 0.000 0.944 0.016
#> GSM486833     1  0.5576     0.5973 0.768 0.056 0.128 0.048
#> GSM486835     3  0.1888     0.8858 0.044 0.000 0.940 0.016
#> GSM486837     2  0.5731     0.0783 0.428 0.544 0.000 0.028
#> GSM486839     3  0.1151     0.8904 0.024 0.000 0.968 0.008
#> GSM486841     3  0.1209     0.8895 0.032 0.000 0.964 0.004
#> GSM486843     3  0.2142     0.8820 0.056 0.000 0.928 0.016
#> GSM486845     2  0.5764    -0.0249 0.452 0.520 0.000 0.028
#> GSM486847     3  0.1297     0.8893 0.016 0.000 0.964 0.020
#> GSM486849     2  0.1305     0.7147 0.036 0.960 0.000 0.004
#> GSM486851     4  0.6911     0.2775 0.304 0.000 0.136 0.560
#> GSM486853     2  0.0336     0.7137 0.008 0.992 0.000 0.000
#> GSM486855     2  0.3143     0.6824 0.100 0.876 0.000 0.024
#> GSM486857     2  0.5279     0.1670 0.400 0.588 0.000 0.012
#> GSM486736     4  0.5923     0.5263 0.128 0.176 0.000 0.696
#> GSM486738     2  0.3325     0.6640 0.024 0.864 0.000 0.112
#> GSM486740     4  0.6747     0.5117 0.264 0.140 0.000 0.596
#> GSM486742     2  0.3501     0.6488 0.020 0.848 0.000 0.132
#> GSM486744     2  0.2101     0.7160 0.060 0.928 0.000 0.012
#> GSM486746     4  0.7282     0.2396 0.416 0.148 0.000 0.436
#> GSM486748     1  0.5281    -0.0418 0.528 0.000 0.464 0.008
#> GSM486750     2  0.5815     0.4412 0.060 0.652 0.000 0.288
#> GSM486752     1  0.4486     0.5450 0.784 0.008 0.188 0.020
#> GSM486754     2  0.6592     0.3703 0.116 0.600 0.000 0.284
#> GSM486756     2  0.5386     0.5326 0.056 0.708 0.000 0.236
#> GSM486758     1  0.5292     0.4600 0.724 0.000 0.216 0.060
#> GSM486760     3  0.2799     0.8910 0.108 0.000 0.884 0.008
#> GSM486762     3  0.3208     0.8808 0.148 0.000 0.848 0.004
#> GSM486764     4  0.5540     0.3531 0.320 0.004 0.028 0.648
#> GSM486766     3  0.2647     0.8892 0.120 0.000 0.880 0.000
#> GSM486768     1  0.6388     0.5004 0.652 0.192 0.000 0.156
#> GSM486770     4  0.6010     0.4770 0.104 0.220 0.000 0.676
#> GSM486772     2  0.1854     0.7163 0.048 0.940 0.000 0.012
#> GSM486774     1  0.5889     0.5374 0.696 0.188 0.000 0.116
#> GSM486776     3  0.2469     0.8913 0.108 0.000 0.892 0.000
#> GSM486778     3  0.4562     0.8432 0.152 0.000 0.792 0.056
#> GSM486780     2  0.3542     0.6814 0.120 0.852 0.000 0.028
#> GSM486782     1  0.6649     0.3198 0.560 0.340 0.000 0.100
#> GSM486784     2  0.0921     0.7137 0.028 0.972 0.000 0.000
#> GSM486786     3  0.2918     0.8893 0.116 0.000 0.876 0.008
#> GSM486788     3  0.2859     0.8905 0.112 0.000 0.880 0.008
#> GSM486790     2  0.7187    -0.0149 0.136 0.440 0.000 0.424
#> GSM486792     4  0.7835     0.1246 0.336 0.000 0.268 0.396
#> GSM486794     3  0.4979     0.8211 0.176 0.000 0.760 0.064
#> GSM486796     1  0.5684     0.5063 0.696 0.032 0.252 0.020
#> GSM486798     1  0.4362     0.6151 0.828 0.076 0.088 0.008
#> GSM486800     3  0.2593     0.8908 0.104 0.000 0.892 0.004
#> GSM486802     3  0.3047     0.8896 0.116 0.000 0.872 0.012
#> GSM486804     3  0.3161     0.8877 0.124 0.000 0.864 0.012
#> GSM486806     1  0.4256     0.6084 0.824 0.132 0.012 0.032
#> GSM486808     3  0.3257     0.8807 0.152 0.000 0.844 0.004
#> GSM486810     4  0.5632     0.5520 0.196 0.092 0.000 0.712
#> GSM486812     3  0.2714     0.8901 0.112 0.000 0.884 0.004
#> GSM486814     2  0.1022     0.7145 0.032 0.968 0.000 0.000
#> GSM486816     3  0.4804     0.8342 0.160 0.000 0.776 0.064
#> GSM486818     1  0.4852     0.6218 0.800 0.112 0.076 0.012
#> GSM486821     1  0.6389     0.0782 0.544 0.032 0.020 0.404
#> GSM486823     4  0.6330    -0.0172 0.060 0.448 0.000 0.492
#> GSM486826     3  0.3047     0.8902 0.116 0.000 0.872 0.012
#> GSM486830     1  0.5653     0.5537 0.712 0.192 0.000 0.096
#> GSM486832     3  0.3105     0.8887 0.120 0.000 0.868 0.012
#> GSM486834     1  0.4015     0.6002 0.860 0.036 0.056 0.048
#> GSM486836     3  0.3161     0.8877 0.124 0.000 0.864 0.012
#> GSM486838     2  0.5688     0.0499 0.464 0.512 0.000 0.024
#> GSM486840     3  0.2593     0.8912 0.104 0.000 0.892 0.004
#> GSM486842     3  0.2530     0.8903 0.112 0.000 0.888 0.000
#> GSM486844     3  0.3324     0.8839 0.136 0.000 0.852 0.012
#> GSM486846     2  0.5693    -0.0102 0.472 0.504 0.000 0.024
#> GSM486848     3  0.2861     0.8902 0.096 0.000 0.888 0.016
#> GSM486850     2  0.1743     0.7148 0.056 0.940 0.000 0.004
#> GSM486852     4  0.6794     0.2779 0.328 0.000 0.116 0.556
#> GSM486854     2  0.0921     0.7137 0.028 0.972 0.000 0.000
#> GSM486856     2  0.3441     0.6824 0.120 0.856 0.000 0.024
#> GSM486858     2  0.5220     0.1676 0.424 0.568 0.000 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
#> GSM486735     4  0.4507      0.662 0.000 0.120 0.044 0.788 0.048
#> GSM486737     2  0.2685      0.751 0.000 0.880 0.000 0.092 0.028
#> GSM486739     4  0.6233      0.558 0.000 0.068 0.188 0.648 0.096
#> GSM486741     2  0.3085      0.735 0.000 0.852 0.000 0.116 0.032
#> GSM486743     2  0.3485      0.746 0.000 0.852 0.072 0.060 0.016
#> GSM486745     4  0.6901      0.388 0.000 0.100 0.360 0.484 0.056
#> GSM486747     3  0.5912      0.382 0.248 0.000 0.628 0.020 0.104
#> GSM486749     2  0.5301      0.282 0.000 0.576 0.024 0.380 0.020
#> GSM486751     3  0.4456      0.619 0.048 0.024 0.804 0.016 0.108
#> GSM486753     2  0.6136      0.183 0.000 0.536 0.076 0.364 0.024
#> GSM486755     2  0.5523      0.503 0.000 0.652 0.044 0.268 0.036
#> GSM486757     3  0.6173      0.404 0.056 0.020 0.628 0.032 0.264
#> GSM486759     1  0.4267      0.833 0.784 0.000 0.092 0.004 0.120
#> GSM486761     1  0.5283      0.814 0.720 0.000 0.112 0.024 0.144
#> GSM486763     5  0.5297      0.716 0.008 0.000 0.060 0.292 0.640
#> GSM486765     1  0.4503      0.832 0.776 0.000 0.096 0.012 0.116
#> GSM486767     3  0.4886      0.638 0.000 0.072 0.756 0.140 0.032
#> GSM486769     4  0.4062      0.673 0.000 0.168 0.028 0.788 0.016
#> GSM486771     2  0.1483      0.788 0.000 0.952 0.028 0.012 0.008
#> GSM486773     3  0.4076      0.689 0.000 0.076 0.812 0.096 0.016
#> GSM486775     1  0.3906      0.838 0.812 0.000 0.080 0.004 0.104
#> GSM486777     1  0.6099      0.705 0.600 0.000 0.100 0.024 0.276
#> GSM486779     2  0.4004      0.706 0.000 0.824 0.080 0.028 0.068
#> GSM486781     3  0.4535      0.679 0.000 0.128 0.772 0.088 0.012
#> GSM486783     2  0.0451      0.786 0.000 0.988 0.008 0.000 0.004
#> GSM486785     1  0.4960      0.819 0.740 0.000 0.100 0.016 0.144
#> GSM486787     1  0.4267      0.833 0.784 0.000 0.092 0.004 0.120
#> GSM486789     4  0.6135      0.514 0.000 0.296 0.120 0.572 0.012
#> GSM486791     5  0.5742      0.670 0.116 0.000 0.056 0.128 0.700
#> GSM486793     1  0.6484      0.639 0.548 0.000 0.100 0.036 0.316
#> GSM486795     3  0.6170      0.473 0.148 0.024 0.664 0.016 0.148
#> GSM486797     3  0.3460      0.664 0.024 0.036 0.860 0.004 0.076
#> GSM486799     1  0.3849      0.834 0.808 0.000 0.080 0.000 0.112
#> GSM486801     1  0.4267      0.833 0.784 0.000 0.092 0.004 0.120
#> GSM486803     1  0.4640      0.829 0.764 0.000 0.096 0.012 0.128
#> GSM486805     3  0.2547      0.700 0.012 0.036 0.912 0.028 0.012
#> GSM486807     1  0.4939      0.826 0.744 0.000 0.116 0.016 0.124
#> GSM486809     4  0.4985      0.493 0.000 0.044 0.056 0.748 0.152
#> GSM486811     1  0.5079      0.815 0.728 0.000 0.100 0.016 0.156
#> GSM486813     2  0.0798      0.786 0.000 0.976 0.008 0.000 0.016
#> GSM486815     1  0.6322      0.658 0.568 0.000 0.088 0.036 0.308
#> GSM486817     3  0.2927      0.694 0.024 0.040 0.892 0.004 0.040
#> GSM486819     5  0.6863      0.507 0.004 0.008 0.348 0.192 0.448
#> GSM486822     4  0.5136      0.469 0.000 0.332 0.016 0.624 0.028
#> GSM486824     1  0.4583      0.833 0.776 0.000 0.084 0.020 0.120
#> GSM486828     3  0.3947      0.691 0.000 0.072 0.824 0.084 0.020
#> GSM486831     1  0.4267      0.833 0.784 0.000 0.092 0.004 0.120
#> GSM486833     3  0.3359      0.684 0.008 0.028 0.868 0.024 0.072
#> GSM486835     1  0.4595      0.830 0.768 0.000 0.096 0.012 0.124
#> GSM486837     3  0.5564      0.555 0.000 0.328 0.596 0.008 0.068
#> GSM486839     1  0.4013      0.836 0.804 0.000 0.084 0.004 0.108
#> GSM486841     1  0.4450      0.832 0.780 0.000 0.092 0.012 0.116
#> GSM486843     1  0.4640      0.829 0.764 0.000 0.096 0.012 0.128
#> GSM486845     3  0.5287      0.606 0.000 0.292 0.648 0.028 0.032
#> GSM486847     1  0.4228      0.836 0.796 0.000 0.076 0.012 0.116
#> GSM486849     2  0.2171      0.782 0.000 0.924 0.032 0.016 0.028
#> GSM486851     5  0.5586      0.741 0.032 0.000 0.060 0.248 0.660
#> GSM486853     2  0.1393      0.784 0.000 0.956 0.012 0.008 0.024
#> GSM486855     2  0.3689      0.711 0.000 0.836 0.084 0.012 0.068
#> GSM486857     3  0.5369      0.552 0.000 0.344 0.600 0.012 0.044
#> GSM486736     4  0.4507      0.662 0.000 0.120 0.044 0.788 0.048
#> GSM486738     2  0.3052      0.751 0.000 0.868 0.008 0.092 0.032
#> GSM486740     4  0.6233      0.558 0.000 0.068 0.188 0.648 0.096
#> GSM486742     2  0.3446      0.736 0.000 0.840 0.008 0.116 0.036
#> GSM486744     2  0.3748      0.757 0.000 0.836 0.088 0.056 0.020
#> GSM486746     4  0.6544      0.388 0.000 0.072 0.396 0.484 0.048
#> GSM486748     3  0.4863      0.423 0.384 0.000 0.592 0.016 0.008
#> GSM486750     2  0.5532      0.282 0.000 0.564 0.032 0.380 0.024
#> GSM486752     3  0.4453      0.617 0.192 0.000 0.756 0.020 0.032
#> GSM486754     2  0.6211      0.205 0.000 0.532 0.076 0.364 0.028
#> GSM486756     2  0.5723      0.503 0.000 0.640 0.052 0.268 0.040
#> GSM486758     3  0.6511      0.428 0.208 0.000 0.596 0.036 0.160
#> GSM486760     1  0.1074      0.834 0.968 0.000 0.012 0.004 0.016
#> GSM486762     1  0.2617      0.816 0.904 0.000 0.036 0.028 0.032
#> GSM486764     5  0.5843      0.716 0.040 0.000 0.052 0.292 0.616
#> GSM486766     1  0.1314      0.831 0.960 0.000 0.016 0.012 0.012
#> GSM486768     3  0.4353      0.639 0.000 0.044 0.788 0.140 0.028
#> GSM486770     4  0.4062      0.673 0.000 0.168 0.028 0.788 0.016
#> GSM486772     2  0.2069      0.788 0.000 0.924 0.052 0.012 0.012
#> GSM486774     3  0.3412      0.688 0.000 0.048 0.848 0.096 0.008
#> GSM486776     1  0.0727      0.835 0.980 0.000 0.004 0.004 0.012
#> GSM486778     1  0.4235      0.708 0.776 0.000 0.024 0.024 0.176
#> GSM486780     2  0.4440      0.706 0.000 0.792 0.108 0.028 0.072
#> GSM486782     3  0.4037      0.680 0.000 0.096 0.808 0.088 0.008
#> GSM486784     2  0.1251      0.786 0.000 0.956 0.036 0.000 0.008
#> GSM486786     1  0.2151      0.820 0.924 0.000 0.020 0.016 0.040
#> GSM486788     1  0.1314      0.832 0.960 0.000 0.012 0.012 0.016
#> GSM486790     4  0.6253      0.514 0.000 0.284 0.128 0.572 0.016
#> GSM486792     5  0.6087      0.671 0.164 0.000 0.048 0.128 0.660
#> GSM486794     1  0.4862      0.642 0.724 0.000 0.028 0.036 0.212
#> GSM486796     3  0.5252      0.480 0.324 0.000 0.624 0.016 0.036
#> GSM486798     3  0.3821      0.663 0.144 0.008 0.816 0.012 0.020
#> GSM486800     1  0.0451      0.835 0.988 0.000 0.004 0.000 0.008
#> GSM486802     1  0.1314      0.832 0.960 0.000 0.012 0.012 0.016
#> GSM486804     1  0.1612      0.828 0.948 0.000 0.024 0.012 0.016
#> GSM486806     3  0.2834      0.703 0.060 0.012 0.888 0.040 0.000
#> GSM486808     1  0.2244      0.825 0.920 0.000 0.040 0.024 0.016
#> GSM486810     4  0.4985      0.493 0.000 0.044 0.056 0.748 0.152
#> GSM486812     1  0.2374      0.816 0.912 0.000 0.020 0.016 0.052
#> GSM486814     2  0.1568      0.786 0.000 0.944 0.036 0.000 0.020
#> GSM486816     1  0.4661      0.661 0.736 0.000 0.020 0.036 0.208
#> GSM486818     3  0.3400      0.694 0.104 0.012 0.852 0.004 0.028
#> GSM486821     5  0.6987      0.506 0.020 0.000 0.352 0.192 0.436
#> GSM486823     4  0.5208      0.469 0.000 0.328 0.020 0.624 0.028
#> GSM486826     1  0.1597      0.832 0.948 0.000 0.008 0.020 0.024
#> GSM486830     3  0.3171      0.692 0.000 0.044 0.864 0.084 0.008
#> GSM486832     1  0.1314      0.832 0.960 0.000 0.016 0.012 0.012
#> GSM486834     3  0.3553      0.689 0.072 0.000 0.852 0.028 0.048
#> GSM486836     1  0.1518      0.830 0.952 0.000 0.020 0.012 0.016
#> GSM486838     3  0.5789      0.563 0.012 0.284 0.628 0.012 0.064
#> GSM486840     1  0.0854      0.836 0.976 0.000 0.008 0.004 0.012
#> GSM486842     1  0.1095      0.834 0.968 0.000 0.012 0.012 0.008
#> GSM486844     1  0.1710      0.827 0.944 0.000 0.024 0.012 0.020
#> GSM486846     3  0.5034      0.606 0.000 0.260 0.684 0.028 0.028
#> GSM486848     1  0.1173      0.835 0.964 0.000 0.004 0.012 0.020
#> GSM486850     2  0.2778      0.782 0.000 0.892 0.060 0.016 0.032
#> GSM486852     5  0.6046      0.741 0.064 0.000 0.056 0.248 0.632
#> GSM486854     2  0.2116      0.784 0.000 0.924 0.040 0.008 0.028
#> GSM486856     2  0.4120      0.711 0.000 0.804 0.112 0.012 0.072
#> GSM486858     3  0.5194      0.547 0.000 0.316 0.632 0.012 0.040

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM486735     6  0.4095     0.6263 0.000 0.036 0.016 0.028 0.128 0.792
#> GSM486737     2  0.4157     0.7139 0.000 0.788 0.072 0.004 0.032 0.104
#> GSM486739     6  0.5645     0.5346 0.000 0.024 0.012 0.148 0.172 0.644
#> GSM486741     2  0.4444     0.6979 0.000 0.764 0.084 0.008 0.024 0.120
#> GSM486743     2  0.4164     0.7232 0.000 0.796 0.036 0.056 0.012 0.100
#> GSM486745     6  0.6580     0.3718 0.000 0.052 0.036 0.328 0.076 0.508
#> GSM486747     4  0.5579     0.3587 0.132 0.000 0.352 0.512 0.004 0.000
#> GSM486749     2  0.5799     0.1026 0.000 0.452 0.064 0.020 0.016 0.448
#> GSM486751     4  0.5001     0.5372 0.036 0.000 0.296 0.636 0.024 0.008
#> GSM486753     6  0.5909    -0.0172 0.000 0.436 0.036 0.052 0.016 0.460
#> GSM486755     2  0.5771     0.4428 0.000 0.584 0.044 0.036 0.028 0.308
#> GSM486757     4  0.5781     0.3895 0.032 0.000 0.392 0.508 0.056 0.012
#> GSM486759     1  0.3634     0.2235 0.696 0.000 0.296 0.008 0.000 0.000
#> GSM486761     1  0.4699    -0.4250 0.496 0.000 0.468 0.028 0.008 0.000
#> GSM486763     5  0.4006     0.7087 0.000 0.000 0.048 0.044 0.792 0.116
#> GSM486765     1  0.3899    -0.0745 0.592 0.000 0.404 0.000 0.004 0.000
#> GSM486767     4  0.4949     0.5976 0.000 0.044 0.044 0.744 0.040 0.128
#> GSM486769     6  0.3406     0.6472 0.000 0.060 0.032 0.016 0.040 0.852
#> GSM486771     2  0.3041     0.7629 0.000 0.872 0.020 0.028 0.020 0.060
#> GSM486773     4  0.3733     0.6544 0.000 0.024 0.040 0.824 0.016 0.096
#> GSM486775     1  0.3871     0.2107 0.676 0.000 0.308 0.000 0.016 0.000
#> GSM486777     1  0.5302    -0.6976 0.468 0.000 0.456 0.004 0.064 0.008
#> GSM486779     2  0.4903     0.6741 0.000 0.748 0.112 0.076 0.032 0.032
#> GSM486781     4  0.4168     0.6520 0.000 0.064 0.032 0.804 0.024 0.076
#> GSM486783     2  0.1439     0.7736 0.000 0.952 0.016 0.012 0.012 0.008
#> GSM486785     1  0.4067    -0.2252 0.548 0.000 0.444 0.000 0.008 0.000
#> GSM486787     1  0.3703     0.2274 0.688 0.000 0.304 0.004 0.004 0.000
#> GSM486789     6  0.4759     0.6070 0.000 0.184 0.012 0.076 0.012 0.716
#> GSM486791     5  0.4963     0.6827 0.056 0.000 0.140 0.044 0.736 0.024
#> GSM486793     3  0.5986     0.9001 0.392 0.000 0.488 0.028 0.080 0.012
#> GSM486795     4  0.6641     0.3312 0.120 0.016 0.376 0.452 0.024 0.012
#> GSM486797     4  0.4313     0.6346 0.008 0.016 0.196 0.748 0.020 0.012
#> GSM486799     1  0.3861     0.1399 0.640 0.000 0.352 0.000 0.000 0.008
#> GSM486801     1  0.3809     0.2271 0.684 0.000 0.304 0.008 0.004 0.000
#> GSM486803     1  0.4399     0.1609 0.616 0.000 0.352 0.028 0.004 0.000
#> GSM486805     4  0.3364     0.6705 0.000 0.020 0.104 0.840 0.012 0.024
#> GSM486807     1  0.4269    -0.0741 0.568 0.000 0.412 0.020 0.000 0.000
#> GSM486809     6  0.4585     0.5386 0.000 0.016 0.020 0.028 0.224 0.712
#> GSM486811     1  0.4184    -0.2459 0.556 0.000 0.432 0.000 0.008 0.004
#> GSM486813     2  0.2145     0.7704 0.000 0.916 0.040 0.012 0.028 0.004
#> GSM486815     3  0.6008     0.8987 0.396 0.000 0.476 0.020 0.096 0.012
#> GSM486817     4  0.3865     0.6651 0.016 0.020 0.116 0.816 0.016 0.016
#> GSM486819     5  0.6181     0.3762 0.008 0.012 0.048 0.388 0.492 0.052
#> GSM486822     6  0.4941     0.5789 0.000 0.172 0.064 0.008 0.040 0.716
#> GSM486824     1  0.4528     0.2021 0.632 0.000 0.328 0.016 0.024 0.000
#> GSM486828     4  0.3381     0.6594 0.000 0.032 0.032 0.852 0.016 0.068
#> GSM486831     1  0.3915     0.2194 0.680 0.000 0.304 0.008 0.008 0.000
#> GSM486833     4  0.3911     0.6454 0.000 0.004 0.172 0.776 0.024 0.024
#> GSM486835     1  0.4074     0.2109 0.656 0.000 0.324 0.016 0.004 0.000
#> GSM486837     4  0.6427     0.4905 0.000 0.260 0.128 0.552 0.032 0.028
#> GSM486839     1  0.4008     0.2096 0.672 0.000 0.308 0.000 0.016 0.004
#> GSM486841     1  0.3797    -0.1115 0.580 0.000 0.420 0.000 0.000 0.000
#> GSM486843     1  0.4315     0.1759 0.624 0.000 0.348 0.024 0.004 0.000
#> GSM486845     4  0.5518     0.5666 0.000 0.220 0.072 0.656 0.028 0.024
#> GSM486847     1  0.4315     0.1357 0.624 0.000 0.348 0.000 0.024 0.004
#> GSM486849     2  0.3342     0.7629 0.000 0.856 0.052 0.048 0.016 0.028
#> GSM486851     5  0.3912     0.7315 0.004 0.000 0.072 0.044 0.812 0.068
#> GSM486853     2  0.2177     0.7715 0.000 0.916 0.044 0.016 0.012 0.012
#> GSM486855     2  0.4848     0.6699 0.000 0.752 0.100 0.088 0.028 0.032
#> GSM486857     4  0.5645     0.5430 0.000 0.252 0.080 0.624 0.024 0.020
#> GSM486736     6  0.4095     0.6263 0.000 0.036 0.016 0.028 0.128 0.792
#> GSM486738     2  0.4084     0.7138 0.000 0.792 0.072 0.004 0.028 0.104
#> GSM486740     6  0.5637     0.5345 0.000 0.020 0.012 0.164 0.164 0.640
#> GSM486742     2  0.4365     0.6979 0.000 0.768 0.084 0.008 0.020 0.120
#> GSM486744     2  0.3997     0.7240 0.000 0.800 0.028 0.076 0.004 0.092
#> GSM486746     6  0.6303     0.3711 0.000 0.044 0.024 0.356 0.072 0.504
#> GSM486748     4  0.5597     0.4010 0.344 0.000 0.104 0.536 0.016 0.000
#> GSM486750     2  0.5789     0.1025 0.000 0.452 0.064 0.024 0.012 0.448
#> GSM486752     4  0.5239     0.5316 0.192 0.000 0.116 0.664 0.028 0.000
#> GSM486754     6  0.5795    -0.0585 0.000 0.444 0.036 0.056 0.008 0.456
#> GSM486756     2  0.5702     0.4425 0.000 0.588 0.044 0.036 0.024 0.308
#> GSM486758     4  0.6601     0.3881 0.192 0.000 0.204 0.536 0.060 0.008
#> GSM486760     1  0.0779     0.4727 0.976 0.000 0.008 0.008 0.008 0.000
#> GSM486762     1  0.3777     0.2512 0.756 0.000 0.208 0.028 0.008 0.000
#> GSM486764     5  0.4042     0.7067 0.012 0.000 0.020 0.056 0.796 0.116
#> GSM486766     1  0.2402     0.3753 0.856 0.000 0.140 0.000 0.004 0.000
#> GSM486768     4  0.4107     0.5996 0.000 0.036 0.012 0.792 0.036 0.124
#> GSM486770     6  0.3406     0.6472 0.000 0.060 0.032 0.016 0.040 0.852
#> GSM486772     2  0.2911     0.7635 0.000 0.876 0.012 0.048 0.012 0.052
#> GSM486774     4  0.2822     0.6554 0.000 0.016 0.012 0.872 0.012 0.088
#> GSM486776     1  0.1719     0.4539 0.924 0.000 0.060 0.000 0.016 0.000
#> GSM486778     1  0.4469     0.0919 0.724 0.000 0.192 0.004 0.072 0.008
#> GSM486780     2  0.4765     0.6769 0.000 0.752 0.104 0.096 0.024 0.024
#> GSM486782     4  0.3441     0.6528 0.000 0.064 0.008 0.840 0.016 0.072
#> GSM486784     2  0.1431     0.7736 0.000 0.952 0.016 0.016 0.008 0.008
#> GSM486786     1  0.2743     0.3389 0.828 0.000 0.164 0.000 0.008 0.000
#> GSM486788     1  0.1138     0.4718 0.960 0.000 0.024 0.004 0.012 0.000
#> GSM486790     6  0.4731     0.6070 0.000 0.180 0.012 0.084 0.008 0.716
#> GSM486792     5  0.4976     0.6851 0.108 0.000 0.076 0.048 0.744 0.024
#> GSM486794     1  0.5647    -0.1131 0.628 0.000 0.240 0.032 0.088 0.012
#> GSM486796     4  0.6271     0.3309 0.368 0.012 0.100 0.488 0.028 0.004
#> GSM486798     4  0.4600     0.6134 0.108 0.008 0.096 0.760 0.024 0.004
#> GSM486800     1  0.1584     0.4529 0.928 0.000 0.064 0.000 0.000 0.008
#> GSM486802     1  0.1251     0.4711 0.956 0.000 0.024 0.008 0.012 0.000
#> GSM486804     1  0.2680     0.4217 0.880 0.000 0.060 0.048 0.012 0.000
#> GSM486806     4  0.2807     0.6727 0.016 0.012 0.056 0.888 0.008 0.020
#> GSM486808     1  0.3002     0.3950 0.836 0.000 0.136 0.020 0.008 0.000
#> GSM486810     6  0.4630     0.5386 0.000 0.016 0.020 0.032 0.220 0.712
#> GSM486812     1  0.2925     0.3313 0.832 0.000 0.148 0.000 0.016 0.004
#> GSM486814     2  0.2159     0.7704 0.000 0.916 0.040 0.016 0.024 0.004
#> GSM486816     1  0.5581    -0.1239 0.624 0.000 0.244 0.020 0.100 0.012
#> GSM486818     4  0.3319     0.6644 0.056 0.012 0.048 0.860 0.016 0.008
#> GSM486821     5  0.5669     0.3621 0.016 0.008 0.012 0.420 0.496 0.048
#> GSM486823     6  0.4941     0.5789 0.000 0.172 0.064 0.008 0.040 0.716
#> GSM486826     1  0.2400     0.4493 0.896 0.000 0.064 0.016 0.024 0.000
#> GSM486830     4  0.2307     0.6604 0.000 0.024 0.000 0.900 0.012 0.064
#> GSM486832     1  0.1364     0.4698 0.952 0.000 0.020 0.012 0.016 0.000
#> GSM486834     4  0.3671     0.6485 0.032 0.000 0.096 0.828 0.028 0.016
#> GSM486836     1  0.1838     0.4592 0.928 0.000 0.040 0.020 0.012 0.000
#> GSM486838     4  0.6128     0.4897 0.004 0.256 0.112 0.584 0.024 0.020
#> GSM486840     1  0.1464     0.4617 0.944 0.000 0.036 0.000 0.016 0.004
#> GSM486842     1  0.2389     0.3803 0.864 0.000 0.128 0.000 0.008 0.000
#> GSM486844     1  0.2546     0.4304 0.888 0.000 0.060 0.040 0.012 0.000
#> GSM486846     4  0.4968     0.5661 0.000 0.220 0.048 0.692 0.020 0.020
#> GSM486848     1  0.2320     0.4375 0.892 0.000 0.080 0.000 0.024 0.004
#> GSM486850     2  0.3163     0.7642 0.000 0.860 0.044 0.068 0.008 0.020
#> GSM486852     5  0.3863     0.7328 0.032 0.000 0.020 0.056 0.824 0.068
#> GSM486854     2  0.2164     0.7716 0.000 0.916 0.044 0.020 0.008 0.012
#> GSM486856     2  0.4683     0.6728 0.000 0.756 0.092 0.108 0.020 0.024
#> GSM486858     4  0.5065     0.5343 0.000 0.260 0.056 0.656 0.016 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-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)

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 agent(p) individual(p) k
#> SD:kmeans 112    1.000      8.99e-06 2
#> SD:kmeans  89    0.936      4.67e-08 3
#> SD:kmeans  88    1.000      2.57e-11 4
#> SD:kmeans 104    1.000      1.26e-16 5
#> SD:kmeans  62    0.747      2.68e-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.


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 120 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 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-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.931           0.936       0.974         0.5043 0.496   0.496
#> 3 3 0.763           0.817       0.904         0.2941 0.800   0.616
#> 4 4 0.592           0.665       0.800         0.1186 0.927   0.794
#> 5 5 0.572           0.486       0.657         0.0647 0.913   0.724
#> 6 6 0.596           0.430       0.636         0.0442 0.925   0.730

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
#> GSM486735     2  0.0000      0.983 0.000 1.000
#> GSM486737     2  0.0000      0.983 0.000 1.000
#> GSM486739     2  0.0000      0.983 0.000 1.000
#> GSM486741     2  0.0000      0.983 0.000 1.000
#> GSM486743     2  0.0000      0.983 0.000 1.000
#> GSM486745     2  0.0000      0.983 0.000 1.000
#> GSM486747     1  0.0000      0.963 1.000 0.000
#> GSM486749     2  0.0000      0.983 0.000 1.000
#> GSM486751     1  0.0376      0.959 0.996 0.004
#> GSM486753     2  0.0000      0.983 0.000 1.000
#> GSM486755     2  0.0000      0.983 0.000 1.000
#> GSM486757     1  0.0000      0.963 1.000 0.000
#> GSM486759     1  0.0000      0.963 1.000 0.000
#> GSM486761     1  0.0000      0.963 1.000 0.000
#> GSM486763     1  0.7056      0.754 0.808 0.192
#> GSM486765     1  0.0000      0.963 1.000 0.000
#> GSM486767     2  0.0000      0.983 0.000 1.000
#> GSM486769     2  0.0000      0.983 0.000 1.000
#> GSM486771     2  0.0000      0.983 0.000 1.000
#> GSM486773     2  0.0000      0.983 0.000 1.000
#> GSM486775     1  0.0000      0.963 1.000 0.000
#> GSM486777     1  0.0000      0.963 1.000 0.000
#> GSM486779     2  0.0000      0.983 0.000 1.000
#> GSM486781     2  0.0000      0.983 0.000 1.000
#> GSM486783     2  0.0000      0.983 0.000 1.000
#> GSM486785     1  0.0000      0.963 1.000 0.000
#> GSM486787     1  0.0000      0.963 1.000 0.000
#> GSM486789     2  0.0000      0.983 0.000 1.000
#> GSM486791     1  0.0000      0.963 1.000 0.000
#> GSM486793     1  0.0000      0.963 1.000 0.000
#> GSM486795     1  0.0376      0.959 0.996 0.004
#> GSM486797     1  0.7602      0.719 0.780 0.220
#> GSM486799     1  0.0000      0.963 1.000 0.000
#> GSM486801     1  0.0000      0.963 1.000 0.000
#> GSM486803     1  0.0000      0.963 1.000 0.000
#> GSM486805     2  0.0672      0.975 0.008 0.992
#> GSM486807     1  0.0000      0.963 1.000 0.000
#> GSM486809     2  0.0000      0.983 0.000 1.000
#> GSM486811     1  0.0000      0.963 1.000 0.000
#> GSM486813     2  0.0000      0.983 0.000 1.000
#> GSM486815     1  0.0000      0.963 1.000 0.000
#> GSM486817     2  0.9552      0.373 0.376 0.624
#> GSM486819     2  0.9087      0.511 0.324 0.676
#> GSM486822     2  0.0000      0.983 0.000 1.000
#> GSM486824     1  0.0000      0.963 1.000 0.000
#> GSM486828     2  0.0000      0.983 0.000 1.000
#> GSM486831     1  0.0000      0.963 1.000 0.000
#> GSM486833     1  0.9248      0.505 0.660 0.340
#> GSM486835     1  0.0000      0.963 1.000 0.000
#> GSM486837     2  0.0000      0.983 0.000 1.000
#> GSM486839     1  0.0000      0.963 1.000 0.000
#> GSM486841     1  0.0000      0.963 1.000 0.000
#> GSM486843     1  0.0000      0.963 1.000 0.000
#> GSM486845     2  0.0000      0.983 0.000 1.000
#> GSM486847     1  0.0000      0.963 1.000 0.000
#> GSM486849     2  0.0000      0.983 0.000 1.000
#> GSM486851     1  0.0000      0.963 1.000 0.000
#> GSM486853     2  0.0000      0.983 0.000 1.000
#> GSM486855     2  0.0000      0.983 0.000 1.000
#> GSM486857     2  0.0000      0.983 0.000 1.000
#> GSM486736     2  0.0000      0.983 0.000 1.000
#> GSM486738     2  0.0000      0.983 0.000 1.000
#> GSM486740     2  0.0000      0.983 0.000 1.000
#> GSM486742     2  0.0000      0.983 0.000 1.000
#> GSM486744     2  0.0000      0.983 0.000 1.000
#> GSM486746     2  0.0000      0.983 0.000 1.000
#> GSM486748     1  0.0000      0.963 1.000 0.000
#> GSM486750     2  0.0000      0.983 0.000 1.000
#> GSM486752     1  0.0000      0.963 1.000 0.000
#> GSM486754     2  0.0000      0.983 0.000 1.000
#> GSM486756     2  0.0000      0.983 0.000 1.000
#> GSM486758     1  0.0000      0.963 1.000 0.000
#> GSM486760     1  0.0000      0.963 1.000 0.000
#> GSM486762     1  0.0000      0.963 1.000 0.000
#> GSM486764     1  0.7056      0.754 0.808 0.192
#> GSM486766     1  0.0000      0.963 1.000 0.000
#> GSM486768     2  0.0000      0.983 0.000 1.000
#> GSM486770     2  0.0000      0.983 0.000 1.000
#> GSM486772     2  0.0000      0.983 0.000 1.000
#> GSM486774     2  0.0000      0.983 0.000 1.000
#> GSM486776     1  0.0000      0.963 1.000 0.000
#> GSM486778     1  0.0000      0.963 1.000 0.000
#> GSM486780     2  0.0000      0.983 0.000 1.000
#> GSM486782     2  0.0000      0.983 0.000 1.000
#> GSM486784     2  0.0000      0.983 0.000 1.000
#> GSM486786     1  0.0000      0.963 1.000 0.000
#> GSM486788     1  0.0000      0.963 1.000 0.000
#> GSM486790     2  0.0000      0.983 0.000 1.000
#> GSM486792     1  0.0000      0.963 1.000 0.000
#> GSM486794     1  0.0000      0.963 1.000 0.000
#> GSM486796     1  0.0376      0.959 0.996 0.004
#> GSM486798     1  0.9460      0.453 0.636 0.364
#> GSM486800     1  0.0000      0.963 1.000 0.000
#> GSM486802     1  0.0000      0.963 1.000 0.000
#> GSM486804     1  0.0000      0.963 1.000 0.000
#> GSM486806     2  0.0000      0.983 0.000 1.000
#> GSM486808     1  0.0000      0.963 1.000 0.000
#> GSM486810     2  0.0000      0.983 0.000 1.000
#> GSM486812     1  0.0000      0.963 1.000 0.000
#> GSM486814     2  0.0000      0.983 0.000 1.000
#> GSM486816     1  0.0000      0.963 1.000 0.000
#> GSM486818     1  0.9954      0.169 0.540 0.460
#> GSM486821     2  0.7883      0.680 0.236 0.764
#> GSM486823     2  0.0000      0.983 0.000 1.000
#> GSM486826     1  0.0000      0.963 1.000 0.000
#> GSM486830     2  0.0000      0.983 0.000 1.000
#> GSM486832     1  0.0000      0.963 1.000 0.000
#> GSM486834     1  0.9710      0.361 0.600 0.400
#> GSM486836     1  0.0000      0.963 1.000 0.000
#> GSM486838     2  0.0000      0.983 0.000 1.000
#> GSM486840     1  0.0000      0.963 1.000 0.000
#> GSM486842     1  0.0000      0.963 1.000 0.000
#> GSM486844     1  0.0000      0.963 1.000 0.000
#> GSM486846     2  0.0000      0.983 0.000 1.000
#> GSM486848     1  0.0000      0.963 1.000 0.000
#> GSM486850     2  0.0000      0.983 0.000 1.000
#> GSM486852     1  0.0000      0.963 1.000 0.000
#> GSM486854     2  0.0000      0.983 0.000 1.000
#> GSM486856     2  0.0000      0.983 0.000 1.000
#> GSM486858     2  0.0000      0.983 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
#> GSM486735     1  0.2959     0.8227 0.900 0.100 0.000
#> GSM486737     2  0.0237     0.9084 0.004 0.996 0.000
#> GSM486739     1  0.2796     0.8242 0.908 0.092 0.000
#> GSM486741     2  0.0237     0.9084 0.004 0.996 0.000
#> GSM486743     2  0.0424     0.9076 0.008 0.992 0.000
#> GSM486745     1  0.2959     0.8237 0.900 0.100 0.000
#> GSM486747     3  0.2711     0.9079 0.088 0.000 0.912
#> GSM486749     2  0.2261     0.8783 0.068 0.932 0.000
#> GSM486751     3  0.5681     0.7373 0.236 0.016 0.748
#> GSM486753     2  0.4235     0.7743 0.176 0.824 0.000
#> GSM486755     2  0.1964     0.8867 0.056 0.944 0.000
#> GSM486757     3  0.6169     0.5313 0.360 0.004 0.636
#> GSM486759     3  0.1643     0.9316 0.044 0.000 0.956
#> GSM486761     3  0.1643     0.9316 0.044 0.000 0.956
#> GSM486763     1  0.2116     0.8136 0.948 0.040 0.012
#> GSM486765     3  0.1529     0.9321 0.040 0.000 0.960
#> GSM486767     1  0.4399     0.7635 0.812 0.188 0.000
#> GSM486769     1  0.4002     0.7883 0.840 0.160 0.000
#> GSM486771     2  0.0237     0.9086 0.004 0.996 0.000
#> GSM486773     1  0.4291     0.7451 0.820 0.180 0.000
#> GSM486775     3  0.1411     0.9324 0.036 0.000 0.964
#> GSM486777     3  0.1753     0.9302 0.048 0.000 0.952
#> GSM486779     2  0.0000     0.9088 0.000 1.000 0.000
#> GSM486781     2  0.5016     0.7175 0.240 0.760 0.000
#> GSM486783     2  0.0000     0.9088 0.000 1.000 0.000
#> GSM486785     3  0.1753     0.9302 0.048 0.000 0.952
#> GSM486787     3  0.1529     0.9321 0.040 0.000 0.960
#> GSM486789     2  0.5760     0.5143 0.328 0.672 0.000
#> GSM486791     1  0.6126     0.2301 0.600 0.000 0.400
#> GSM486793     3  0.1643     0.9316 0.044 0.000 0.956
#> GSM486795     3  0.6775     0.7287 0.112 0.144 0.744
#> GSM486797     1  0.9299     0.0298 0.432 0.160 0.408
#> GSM486799     3  0.1643     0.9316 0.044 0.000 0.956
#> GSM486801     3  0.1643     0.9316 0.044 0.000 0.956
#> GSM486803     3  0.1753     0.9302 0.048 0.000 0.952
#> GSM486805     1  0.5905     0.6798 0.772 0.184 0.044
#> GSM486807     3  0.1643     0.9316 0.044 0.000 0.956
#> GSM486809     1  0.2796     0.8241 0.908 0.092 0.000
#> GSM486811     3  0.1643     0.9316 0.044 0.000 0.956
#> GSM486813     2  0.0000     0.9088 0.000 1.000 0.000
#> GSM486815     3  0.1643     0.9316 0.044 0.000 0.956
#> GSM486817     2  0.9951    -0.0572 0.324 0.380 0.296
#> GSM486819     1  0.1999     0.8040 0.952 0.012 0.036
#> GSM486822     2  0.5138     0.6599 0.252 0.748 0.000
#> GSM486824     3  0.1753     0.9302 0.048 0.000 0.952
#> GSM486828     1  0.2711     0.8140 0.912 0.088 0.000
#> GSM486831     3  0.1753     0.9302 0.048 0.000 0.952
#> GSM486833     1  0.0475     0.8028 0.992 0.004 0.004
#> GSM486835     3  0.1643     0.9316 0.044 0.000 0.956
#> GSM486837     2  0.1860     0.8806 0.052 0.948 0.000
#> GSM486839     3  0.1643     0.9316 0.044 0.000 0.956
#> GSM486841     3  0.1643     0.9316 0.044 0.000 0.956
#> GSM486843     3  0.1643     0.9316 0.044 0.000 0.956
#> GSM486845     2  0.2165     0.8845 0.064 0.936 0.000
#> GSM486847     3  0.1643     0.9316 0.044 0.000 0.956
#> GSM486849     2  0.0000     0.9088 0.000 1.000 0.000
#> GSM486851     1  0.2959     0.7674 0.900 0.000 0.100
#> GSM486853     2  0.0000     0.9088 0.000 1.000 0.000
#> GSM486855     2  0.0000     0.9088 0.000 1.000 0.000
#> GSM486857     2  0.1860     0.8861 0.052 0.948 0.000
#> GSM486736     1  0.2959     0.8227 0.900 0.100 0.000
#> GSM486738     2  0.0237     0.9092 0.004 0.996 0.000
#> GSM486740     1  0.2796     0.8242 0.908 0.092 0.000
#> GSM486742     2  0.0237     0.9092 0.004 0.996 0.000
#> GSM486744     2  0.0237     0.9092 0.004 0.996 0.000
#> GSM486746     1  0.2878     0.8237 0.904 0.096 0.000
#> GSM486748     3  0.1411     0.9129 0.036 0.000 0.964
#> GSM486750     2  0.2066     0.8848 0.060 0.940 0.000
#> GSM486752     3  0.2796     0.8723 0.092 0.000 0.908
#> GSM486754     2  0.3267     0.8399 0.116 0.884 0.000
#> GSM486756     2  0.1529     0.8966 0.040 0.960 0.000
#> GSM486758     3  0.4555     0.7420 0.200 0.000 0.800
#> GSM486760     3  0.0000     0.9326 0.000 0.000 1.000
#> GSM486762     3  0.0000     0.9326 0.000 0.000 1.000
#> GSM486764     1  0.3356     0.8146 0.908 0.036 0.056
#> GSM486766     3  0.0000     0.9326 0.000 0.000 1.000
#> GSM486768     1  0.5733     0.5640 0.676 0.324 0.000
#> GSM486770     1  0.4121     0.7818 0.832 0.168 0.000
#> GSM486772     2  0.0237     0.9092 0.004 0.996 0.000
#> GSM486774     1  0.5859     0.4682 0.656 0.344 0.000
#> GSM486776     3  0.0000     0.9326 0.000 0.000 1.000
#> GSM486778     3  0.0000     0.9326 0.000 0.000 1.000
#> GSM486780     2  0.0237     0.9092 0.004 0.996 0.000
#> GSM486782     2  0.4654     0.7657 0.208 0.792 0.000
#> GSM486784     2  0.0237     0.9092 0.004 0.996 0.000
#> GSM486786     3  0.0000     0.9326 0.000 0.000 1.000
#> GSM486788     3  0.0000     0.9326 0.000 0.000 1.000
#> GSM486790     2  0.5431     0.6032 0.284 0.716 0.000
#> GSM486792     1  0.6291     0.1530 0.532 0.000 0.468
#> GSM486794     3  0.0000     0.9326 0.000 0.000 1.000
#> GSM486796     3  0.3528     0.8444 0.016 0.092 0.892
#> GSM486798     3  0.9806    -0.0543 0.292 0.276 0.432
#> GSM486800     3  0.0000     0.9326 0.000 0.000 1.000
#> GSM486802     3  0.0000     0.9326 0.000 0.000 1.000
#> GSM486804     3  0.0000     0.9326 0.000 0.000 1.000
#> GSM486806     1  0.7636     0.2608 0.556 0.396 0.048
#> GSM486808     3  0.0237     0.9312 0.004 0.000 0.996
#> GSM486810     1  0.2796     0.8242 0.908 0.092 0.000
#> GSM486812     3  0.0000     0.9326 0.000 0.000 1.000
#> GSM486814     2  0.0237     0.9092 0.004 0.996 0.000
#> GSM486816     3  0.0000     0.9326 0.000 0.000 1.000
#> GSM486818     3  0.9574     0.0656 0.292 0.232 0.476
#> GSM486821     1  0.3456     0.8149 0.904 0.036 0.060
#> GSM486823     2  0.5058     0.6768 0.244 0.756 0.000
#> GSM486826     3  0.0000     0.9326 0.000 0.000 1.000
#> GSM486830     1  0.3532     0.8041 0.884 0.108 0.008
#> GSM486832     3  0.0000     0.9326 0.000 0.000 1.000
#> GSM486834     1  0.2063     0.8057 0.948 0.008 0.044
#> GSM486836     3  0.0000     0.9326 0.000 0.000 1.000
#> GSM486838     2  0.2636     0.8715 0.048 0.932 0.020
#> GSM486840     3  0.0000     0.9326 0.000 0.000 1.000
#> GSM486842     3  0.0000     0.9326 0.000 0.000 1.000
#> GSM486844     3  0.0000     0.9326 0.000 0.000 1.000
#> GSM486846     2  0.1643     0.8887 0.044 0.956 0.000
#> GSM486848     3  0.0000     0.9326 0.000 0.000 1.000
#> GSM486850     2  0.0237     0.9092 0.004 0.996 0.000
#> GSM486852     1  0.3619     0.7726 0.864 0.000 0.136
#> GSM486854     2  0.0237     0.9092 0.004 0.996 0.000
#> GSM486856     2  0.0237     0.9092 0.004 0.996 0.000
#> GSM486858     2  0.1643     0.8887 0.044 0.956 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM486735     4  0.1635     0.6845 0.008 0.044 0.000 0.948
#> GSM486737     2  0.1938     0.8265 0.012 0.936 0.000 0.052
#> GSM486739     4  0.1510     0.6884 0.028 0.016 0.000 0.956
#> GSM486741     2  0.2101     0.8260 0.012 0.928 0.000 0.060
#> GSM486743     2  0.3117     0.8206 0.028 0.880 0.000 0.092
#> GSM486745     4  0.3128     0.6772 0.076 0.040 0.000 0.884
#> GSM486747     1  0.4989    -0.2181 0.528 0.000 0.472 0.000
#> GSM486749     2  0.4617     0.7578 0.032 0.764 0.000 0.204
#> GSM486751     1  0.5121     0.5800 0.772 0.004 0.128 0.096
#> GSM486753     2  0.5812     0.6048 0.048 0.624 0.000 0.328
#> GSM486755     2  0.4365     0.7686 0.028 0.784 0.000 0.188
#> GSM486757     1  0.4898     0.5295 0.780 0.000 0.116 0.104
#> GSM486759     3  0.3444     0.8170 0.184 0.000 0.816 0.000
#> GSM486761     3  0.4356     0.7567 0.292 0.000 0.708 0.000
#> GSM486763     4  0.4283     0.5899 0.256 0.000 0.004 0.740
#> GSM486765     3  0.3400     0.8223 0.180 0.000 0.820 0.000
#> GSM486767     4  0.4780     0.6357 0.116 0.096 0.000 0.788
#> GSM486769     4  0.2928     0.6462 0.012 0.108 0.000 0.880
#> GSM486771     2  0.2443     0.8259 0.024 0.916 0.000 0.060
#> GSM486773     4  0.6101     0.1921 0.388 0.052 0.000 0.560
#> GSM486775     3  0.3219     0.8202 0.164 0.000 0.836 0.000
#> GSM486777     3  0.4535     0.7530 0.292 0.000 0.704 0.004
#> GSM486779     2  0.1913     0.8201 0.040 0.940 0.000 0.020
#> GSM486781     2  0.7717     0.2887 0.288 0.448 0.000 0.264
#> GSM486783     2  0.1059     0.8248 0.012 0.972 0.000 0.016
#> GSM486785     3  0.3837     0.8040 0.224 0.000 0.776 0.000
#> GSM486787     3  0.3356     0.8169 0.176 0.000 0.824 0.000
#> GSM486789     2  0.6197     0.3633 0.052 0.508 0.000 0.440
#> GSM486791     4  0.7227     0.1690 0.368 0.000 0.148 0.484
#> GSM486793     3  0.4855     0.6867 0.352 0.000 0.644 0.004
#> GSM486795     3  0.8190     0.1433 0.368 0.144 0.448 0.040
#> GSM486797     1  0.6008     0.5574 0.744 0.112 0.044 0.100
#> GSM486799     3  0.3400     0.8158 0.180 0.000 0.820 0.000
#> GSM486801     3  0.3528     0.8110 0.192 0.000 0.808 0.000
#> GSM486803     3  0.4072     0.7713 0.252 0.000 0.748 0.000
#> GSM486805     1  0.5302     0.4594 0.720 0.044 0.004 0.232
#> GSM486807     3  0.3907     0.7987 0.232 0.000 0.768 0.000
#> GSM486809     4  0.2002     0.6889 0.044 0.020 0.000 0.936
#> GSM486811     3  0.3837     0.8032 0.224 0.000 0.776 0.000
#> GSM486813     2  0.1297     0.8245 0.016 0.964 0.000 0.020
#> GSM486815     3  0.4509     0.7621 0.288 0.000 0.708 0.004
#> GSM486817     1  0.7919     0.5253 0.608 0.120 0.120 0.152
#> GSM486819     4  0.4707     0.6001 0.236 0.012 0.008 0.744
#> GSM486822     2  0.5323     0.5879 0.020 0.628 0.000 0.352
#> GSM486824     3  0.3356     0.8152 0.176 0.000 0.824 0.000
#> GSM486828     4  0.6755     0.0722 0.448 0.092 0.000 0.460
#> GSM486831     3  0.3870     0.8058 0.208 0.000 0.788 0.004
#> GSM486833     1  0.4372     0.4162 0.728 0.000 0.004 0.268
#> GSM486835     3  0.3668     0.8141 0.188 0.000 0.808 0.004
#> GSM486837     2  0.4936     0.5730 0.280 0.700 0.000 0.020
#> GSM486839     3  0.3444     0.8104 0.184 0.000 0.816 0.000
#> GSM486841     3  0.3726     0.8062 0.212 0.000 0.788 0.000
#> GSM486843     3  0.3610     0.8065 0.200 0.000 0.800 0.000
#> GSM486845     2  0.5309     0.7094 0.164 0.744 0.000 0.092
#> GSM486847     3  0.3444     0.8146 0.184 0.000 0.816 0.000
#> GSM486849     2  0.1520     0.8252 0.024 0.956 0.000 0.020
#> GSM486851     4  0.5161     0.5195 0.300 0.000 0.024 0.676
#> GSM486853     2  0.1411     0.8247 0.020 0.960 0.000 0.020
#> GSM486855     2  0.1388     0.8199 0.028 0.960 0.000 0.012
#> GSM486857     2  0.4375     0.7237 0.180 0.788 0.000 0.032
#> GSM486736     4  0.1824     0.6810 0.004 0.060 0.000 0.936
#> GSM486738     2  0.1389     0.8268 0.000 0.952 0.000 0.048
#> GSM486740     4  0.1624     0.6889 0.028 0.020 0.000 0.952
#> GSM486742     2  0.1489     0.8266 0.004 0.952 0.000 0.044
#> GSM486744     2  0.2489     0.8218 0.020 0.912 0.000 0.068
#> GSM486746     4  0.3004     0.6774 0.048 0.060 0.000 0.892
#> GSM486748     3  0.5189     0.0379 0.372 0.012 0.616 0.000
#> GSM486750     2  0.4426     0.7479 0.024 0.772 0.000 0.204
#> GSM486752     1  0.6188     0.5634 0.596 0.012 0.352 0.040
#> GSM486754     2  0.5078     0.6800 0.028 0.700 0.000 0.272
#> GSM486756     2  0.3946     0.7794 0.020 0.812 0.000 0.168
#> GSM486758     1  0.6825     0.5332 0.556 0.008 0.348 0.088
#> GSM486760     3  0.0188     0.8170 0.004 0.000 0.996 0.000
#> GSM486762     3  0.1867     0.8010 0.072 0.000 0.928 0.000
#> GSM486764     4  0.4781     0.6004 0.212 0.000 0.036 0.752
#> GSM486766     3  0.0817     0.8162 0.024 0.000 0.976 0.000
#> GSM486768     4  0.5690     0.5368 0.084 0.216 0.000 0.700
#> GSM486770     4  0.2918     0.6456 0.008 0.116 0.000 0.876
#> GSM486772     2  0.1706     0.8266 0.016 0.948 0.000 0.036
#> GSM486774     4  0.7568     0.0383 0.380 0.168 0.004 0.448
#> GSM486776     3  0.0336     0.8199 0.008 0.000 0.992 0.000
#> GSM486778     3  0.2675     0.7923 0.100 0.000 0.892 0.008
#> GSM486780     2  0.0895     0.8202 0.020 0.976 0.000 0.004
#> GSM486782     2  0.7293     0.4301 0.248 0.536 0.000 0.216
#> GSM486784     2  0.0336     0.8217 0.008 0.992 0.000 0.000
#> GSM486786     3  0.1389     0.8238 0.048 0.000 0.952 0.000
#> GSM486788     3  0.0000     0.8182 0.000 0.000 1.000 0.000
#> GSM486790     2  0.6114     0.3937 0.048 0.524 0.000 0.428
#> GSM486792     4  0.7538     0.1811 0.248 0.000 0.260 0.492
#> GSM486794     3  0.3401     0.7471 0.152 0.000 0.840 0.008
#> GSM486796     3  0.6747     0.2960 0.184 0.136 0.660 0.020
#> GSM486798     1  0.8648     0.5061 0.528 0.168 0.192 0.112
#> GSM486800     3  0.0336     0.8178 0.008 0.000 0.992 0.000
#> GSM486802     3  0.0188     0.8170 0.004 0.000 0.996 0.000
#> GSM486804     3  0.1474     0.7966 0.052 0.000 0.948 0.000
#> GSM486806     1  0.8526     0.3514 0.508 0.124 0.096 0.272
#> GSM486808     3  0.2011     0.7913 0.080 0.000 0.920 0.000
#> GSM486810     4  0.2214     0.6894 0.044 0.028 0.000 0.928
#> GSM486812     3  0.1302     0.8215 0.044 0.000 0.956 0.000
#> GSM486814     2  0.0336     0.8217 0.008 0.992 0.000 0.000
#> GSM486816     3  0.2593     0.7948 0.104 0.000 0.892 0.004
#> GSM486818     1  0.8583     0.5454 0.488 0.096 0.296 0.120
#> GSM486821     4  0.5112     0.6132 0.188 0.016 0.036 0.760
#> GSM486823     2  0.4999     0.6172 0.012 0.660 0.000 0.328
#> GSM486826     3  0.0592     0.8195 0.016 0.000 0.984 0.000
#> GSM486830     4  0.6966     0.1692 0.396 0.100 0.004 0.500
#> GSM486832     3  0.0469     0.8180 0.012 0.000 0.988 0.000
#> GSM486834     1  0.6775     0.4038 0.612 0.012 0.100 0.276
#> GSM486836     3  0.0469     0.8150 0.012 0.000 0.988 0.000
#> GSM486838     2  0.5248     0.5943 0.248 0.716 0.024 0.012
#> GSM486840     3  0.0000     0.8182 0.000 0.000 1.000 0.000
#> GSM486842     3  0.0921     0.8170 0.028 0.000 0.972 0.000
#> GSM486844     3  0.0921     0.8083 0.028 0.000 0.972 0.000
#> GSM486846     2  0.4153     0.7503 0.132 0.820 0.000 0.048
#> GSM486848     3  0.0188     0.8180 0.004 0.000 0.996 0.000
#> GSM486850     2  0.0592     0.8208 0.016 0.984 0.000 0.000
#> GSM486852     4  0.5820     0.5339 0.232 0.000 0.084 0.684
#> GSM486854     2  0.0469     0.8216 0.012 0.988 0.000 0.000
#> GSM486856     2  0.0779     0.8196 0.016 0.980 0.000 0.004
#> GSM486858     2  0.2179     0.7987 0.064 0.924 0.000 0.012

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM486735     5  0.1893    0.49857 0.000 0.028 0.024 0.012 0.936
#> GSM486737     2  0.2722    0.76349 0.000 0.872 0.000 0.020 0.108
#> GSM486739     5  0.3745    0.46652 0.000 0.008 0.096 0.068 0.828
#> GSM486741     2  0.3098    0.73967 0.000 0.836 0.000 0.016 0.148
#> GSM486743     2  0.5663    0.62870 0.000 0.664 0.020 0.100 0.216
#> GSM486745     5  0.4742    0.46603 0.000 0.032 0.084 0.112 0.772
#> GSM486747     1  0.6133   -0.00647 0.496 0.000 0.136 0.368 0.000
#> GSM486749     2  0.5280    0.37078 0.000 0.560 0.008 0.036 0.396
#> GSM486751     4  0.6889    0.37646 0.248 0.004 0.160 0.552 0.036
#> GSM486753     5  0.5873    0.00341 0.000 0.412 0.012 0.068 0.508
#> GSM486755     2  0.5030    0.50211 0.000 0.624 0.008 0.032 0.336
#> GSM486757     4  0.7653    0.29393 0.248 0.004 0.208 0.472 0.068
#> GSM486759     1  0.1774    0.66564 0.932 0.000 0.052 0.016 0.000
#> GSM486761     1  0.4593    0.56667 0.748 0.000 0.124 0.128 0.000
#> GSM486763     5  0.6602    0.09759 0.008 0.000 0.380 0.164 0.448
#> GSM486765     1  0.3578    0.69048 0.820 0.000 0.132 0.048 0.000
#> GSM486767     5  0.6698    0.38334 0.000 0.104 0.088 0.204 0.604
#> GSM486769     5  0.2407    0.49204 0.000 0.088 0.004 0.012 0.896
#> GSM486771     2  0.3844    0.74607 0.000 0.808 0.008 0.040 0.144
#> GSM486773     5  0.6447    0.08076 0.000 0.092 0.028 0.396 0.484
#> GSM486775     1  0.2574    0.69958 0.876 0.000 0.112 0.012 0.000
#> GSM486777     1  0.4000    0.59019 0.788 0.000 0.164 0.044 0.004
#> GSM486779     2  0.2592    0.76484 0.000 0.892 0.052 0.056 0.000
#> GSM486781     5  0.7464    0.12370 0.000 0.284 0.032 0.332 0.352
#> GSM486783     2  0.0798    0.78449 0.000 0.976 0.000 0.016 0.008
#> GSM486785     1  0.2754    0.65750 0.880 0.000 0.080 0.040 0.000
#> GSM486787     1  0.1740    0.68665 0.932 0.000 0.056 0.012 0.000
#> GSM486789     5  0.5572    0.28251 0.000 0.296 0.016 0.064 0.624
#> GSM486791     3  0.7973    0.06063 0.128 0.000 0.428 0.172 0.272
#> GSM486793     1  0.5574    0.42443 0.652 0.000 0.212 0.132 0.004
#> GSM486795     1  0.7960    0.02195 0.540 0.148 0.128 0.148 0.036
#> GSM486797     4  0.7356    0.42833 0.204 0.048 0.132 0.576 0.040
#> GSM486799     1  0.1893    0.68335 0.928 0.000 0.048 0.024 0.000
#> GSM486801     1  0.1914    0.67917 0.924 0.000 0.060 0.016 0.000
#> GSM486803     1  0.3291    0.61717 0.848 0.000 0.088 0.064 0.000
#> GSM486805     4  0.6265    0.49602 0.100 0.028 0.060 0.692 0.120
#> GSM486807     1  0.3535    0.64404 0.832 0.000 0.080 0.088 0.000
#> GSM486809     5  0.3053    0.48045 0.000 0.008 0.076 0.044 0.872
#> GSM486811     1  0.3134    0.64346 0.848 0.000 0.120 0.032 0.000
#> GSM486813     2  0.1483    0.78384 0.000 0.952 0.008 0.028 0.012
#> GSM486815     1  0.4540    0.58233 0.748 0.000 0.180 0.068 0.004
#> GSM486817     4  0.8720    0.40188 0.200 0.092 0.136 0.468 0.104
#> GSM486819     5  0.7237    0.05093 0.016 0.004 0.368 0.236 0.376
#> GSM486822     5  0.4900    0.06055 0.000 0.412 0.004 0.020 0.564
#> GSM486824     1  0.2006    0.68113 0.916 0.000 0.072 0.012 0.000
#> GSM486828     4  0.6941    0.06101 0.000 0.068 0.092 0.496 0.344
#> GSM486831     1  0.3365    0.61555 0.836 0.000 0.120 0.044 0.000
#> GSM486833     4  0.6860    0.44412 0.112 0.000 0.140 0.604 0.144
#> GSM486835     1  0.2685    0.67818 0.880 0.000 0.092 0.028 0.000
#> GSM486837     2  0.5550    0.50327 0.012 0.628 0.072 0.288 0.000
#> GSM486839     1  0.0992    0.68041 0.968 0.000 0.024 0.008 0.000
#> GSM486841     1  0.2694    0.65483 0.884 0.000 0.076 0.040 0.000
#> GSM486843     1  0.2859    0.63235 0.876 0.000 0.056 0.068 0.000
#> GSM486845     2  0.6432    0.53274 0.000 0.608 0.048 0.228 0.116
#> GSM486847     1  0.1082    0.68233 0.964 0.000 0.028 0.008 0.000
#> GSM486849     2  0.2444    0.78387 0.000 0.912 0.024 0.028 0.036
#> GSM486851     5  0.7337   -0.00485 0.052 0.000 0.388 0.160 0.400
#> GSM486853     2  0.1403    0.78162 0.000 0.952 0.024 0.024 0.000
#> GSM486855     2  0.2632    0.76730 0.000 0.888 0.040 0.072 0.000
#> GSM486857     2  0.4365    0.71874 0.000 0.776 0.036 0.164 0.024
#> GSM486736     5  0.1989    0.49821 0.000 0.032 0.020 0.016 0.932
#> GSM486738     2  0.2972    0.76060 0.000 0.864 0.004 0.024 0.108
#> GSM486740     5  0.3515    0.47103 0.000 0.008 0.084 0.064 0.844
#> GSM486742     2  0.3099    0.75337 0.000 0.848 0.000 0.028 0.124
#> GSM486744     2  0.4499    0.71047 0.000 0.764 0.020 0.044 0.172
#> GSM486746     5  0.5258    0.45683 0.000 0.040 0.088 0.140 0.732
#> GSM486748     3  0.7112    0.03423 0.240 0.020 0.436 0.304 0.000
#> GSM486750     2  0.5229    0.42008 0.000 0.584 0.004 0.044 0.368
#> GSM486752     4  0.6450    0.10479 0.076 0.004 0.436 0.456 0.028
#> GSM486754     2  0.5976    0.21072 0.000 0.492 0.016 0.068 0.424
#> GSM486756     2  0.5216    0.55420 0.000 0.648 0.012 0.048 0.292
#> GSM486758     3  0.6739   -0.24472 0.100 0.000 0.440 0.420 0.040
#> GSM486760     1  0.3969    0.65733 0.692 0.000 0.304 0.004 0.000
#> GSM486762     1  0.5188    0.62940 0.612 0.000 0.328 0.060 0.000
#> GSM486764     5  0.6447    0.10350 0.004 0.000 0.384 0.156 0.456
#> GSM486766     1  0.4339    0.65287 0.652 0.000 0.336 0.012 0.000
#> GSM486768     5  0.7446    0.36479 0.000 0.220 0.104 0.156 0.520
#> GSM486770     5  0.3056    0.48621 0.000 0.112 0.008 0.020 0.860
#> GSM486772     2  0.3214    0.76849 0.000 0.856 0.008 0.032 0.104
#> GSM486774     5  0.7384    0.03566 0.000 0.116 0.084 0.368 0.432
#> GSM486776     1  0.3861    0.66014 0.712 0.000 0.284 0.004 0.000
#> GSM486778     1  0.5095    0.61548 0.592 0.000 0.368 0.036 0.004
#> GSM486780     2  0.2645    0.76454 0.000 0.888 0.068 0.044 0.000
#> GSM486782     5  0.7859    0.10006 0.000 0.312 0.064 0.292 0.332
#> GSM486784     2  0.0671    0.78285 0.000 0.980 0.000 0.016 0.004
#> GSM486786     1  0.4249    0.67165 0.688 0.000 0.296 0.016 0.000
#> GSM486788     1  0.4066    0.63842 0.672 0.000 0.324 0.004 0.000
#> GSM486790     5  0.5930    0.25873 0.000 0.296 0.028 0.072 0.604
#> GSM486792     3  0.7498    0.09919 0.076 0.000 0.480 0.176 0.268
#> GSM486794     1  0.5905    0.52000 0.516 0.000 0.388 0.092 0.004
#> GSM486796     3  0.8088   -0.08732 0.348 0.108 0.420 0.092 0.032
#> GSM486798     4  0.7915    0.27469 0.060 0.080 0.348 0.448 0.064
#> GSM486800     1  0.3949    0.65396 0.696 0.000 0.300 0.004 0.000
#> GSM486802     1  0.3999    0.63447 0.656 0.000 0.344 0.000 0.000
#> GSM486804     1  0.4722    0.58721 0.608 0.000 0.368 0.024 0.000
#> GSM486806     4  0.6846    0.44550 0.004 0.056 0.164 0.592 0.184
#> GSM486808     1  0.5429    0.57704 0.564 0.000 0.368 0.068 0.000
#> GSM486810     5  0.2741    0.48581 0.000 0.012 0.064 0.032 0.892
#> GSM486812     1  0.4456    0.65616 0.660 0.000 0.320 0.020 0.000
#> GSM486814     2  0.1179    0.78234 0.000 0.964 0.016 0.016 0.004
#> GSM486816     1  0.5256    0.61188 0.592 0.000 0.356 0.048 0.004
#> GSM486818     4  0.8126    0.23157 0.084 0.072 0.384 0.396 0.064
#> GSM486821     5  0.7040    0.06970 0.008 0.004 0.372 0.228 0.388
#> GSM486823     5  0.4958   -0.05624 0.000 0.452 0.004 0.020 0.524
#> GSM486826     1  0.4130    0.66081 0.696 0.000 0.292 0.012 0.000
#> GSM486830     4  0.7648    0.05439 0.000 0.096 0.140 0.424 0.340
#> GSM486832     1  0.3983    0.64040 0.660 0.000 0.340 0.000 0.000
#> GSM486834     4  0.6709    0.43978 0.016 0.016 0.200 0.584 0.184
#> GSM486836     1  0.4371    0.62236 0.644 0.000 0.344 0.012 0.000
#> GSM486838     2  0.5706    0.53326 0.004 0.632 0.132 0.232 0.000
#> GSM486840     1  0.3684    0.66165 0.720 0.000 0.280 0.000 0.000
#> GSM486842     1  0.4384    0.65404 0.660 0.000 0.324 0.016 0.000
#> GSM486844     1  0.4886    0.57907 0.596 0.000 0.372 0.032 0.000
#> GSM486846     2  0.6120    0.59536 0.000 0.656 0.080 0.192 0.072
#> GSM486848     1  0.3715    0.67199 0.736 0.000 0.260 0.004 0.000
#> GSM486850     2  0.2765    0.78545 0.000 0.896 0.036 0.044 0.024
#> GSM486852     5  0.7036    0.01022 0.028 0.000 0.396 0.168 0.408
#> GSM486854     2  0.1310    0.78370 0.000 0.956 0.024 0.020 0.000
#> GSM486856     2  0.2304    0.77569 0.000 0.908 0.044 0.048 0.000
#> GSM486858     2  0.4160    0.73609 0.000 0.804 0.068 0.112 0.016

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM486735     6   0.360     0.5295 0.000 0.020 0.004 0.000 0.220 0.756
#> GSM486737     2   0.386     0.6782 0.000 0.768 0.004 0.028 0.012 0.188
#> GSM486739     6   0.478     0.3489 0.000 0.000 0.028 0.020 0.360 0.592
#> GSM486741     2   0.394     0.6158 0.000 0.724 0.008 0.024 0.000 0.244
#> GSM486743     2   0.579     0.5010 0.000 0.588 0.032 0.072 0.016 0.292
#> GSM486745     6   0.562     0.4660 0.000 0.012 0.048 0.072 0.224 0.644
#> GSM486747     1   0.653    -0.2503 0.404 0.004 0.164 0.400 0.016 0.012
#> GSM486749     6   0.551     0.0738 0.000 0.412 0.016 0.048 0.016 0.508
#> GSM486751     4   0.648     0.4994 0.164 0.008 0.120 0.620 0.044 0.044
#> GSM486753     6   0.476     0.4223 0.000 0.256 0.020 0.032 0.012 0.680
#> GSM486755     6   0.512    -0.1853 0.000 0.472 0.016 0.036 0.004 0.472
#> GSM486757     4   0.750     0.3402 0.216 0.000 0.188 0.436 0.148 0.012
#> GSM486759     1   0.248     0.5627 0.892 0.000 0.064 0.016 0.028 0.000
#> GSM486761     1   0.479     0.4342 0.708 0.000 0.168 0.104 0.020 0.000
#> GSM486763     5   0.159     0.8790 0.008 0.000 0.000 0.008 0.936 0.048
#> GSM486765     1   0.298     0.5613 0.828 0.000 0.152 0.012 0.008 0.000
#> GSM486767     6   0.717     0.3726 0.000 0.064 0.064 0.152 0.184 0.536
#> GSM486769     6   0.343     0.5713 0.000 0.044 0.004 0.004 0.132 0.816
#> GSM486771     2   0.481     0.6658 0.000 0.724 0.028 0.052 0.016 0.180
#> GSM486773     6   0.642     0.1337 0.004 0.036 0.036 0.356 0.064 0.504
#> GSM486775     1   0.191     0.5766 0.900 0.000 0.096 0.004 0.000 0.000
#> GSM486777     1   0.500     0.3971 0.688 0.000 0.188 0.028 0.096 0.000
#> GSM486779     2   0.328     0.7169 0.000 0.852 0.052 0.064 0.004 0.028
#> GSM486781     6   0.759     0.1966 0.000 0.192 0.064 0.260 0.052 0.432
#> GSM486783     2   0.231     0.7405 0.000 0.900 0.008 0.036 0.000 0.056
#> GSM486785     1   0.279     0.5424 0.856 0.000 0.116 0.020 0.008 0.000
#> GSM486787     1   0.232     0.5626 0.884 0.000 0.100 0.008 0.008 0.000
#> GSM486789     6   0.347     0.5698 0.000 0.120 0.016 0.016 0.020 0.828
#> GSM486791     5   0.338     0.7734 0.084 0.000 0.060 0.020 0.836 0.000
#> GSM486793     1   0.640     0.2143 0.552 0.000 0.232 0.100 0.116 0.000
#> GSM486795     1   0.880    -0.2128 0.368 0.128 0.224 0.176 0.064 0.040
#> GSM486797     4   0.675     0.5418 0.112 0.032 0.124 0.628 0.036 0.068
#> GSM486799     1   0.196     0.5772 0.908 0.000 0.080 0.004 0.008 0.000
#> GSM486801     1   0.243     0.5594 0.884 0.000 0.092 0.012 0.012 0.000
#> GSM486803     1   0.441     0.4823 0.768 0.000 0.104 0.060 0.068 0.000
#> GSM486805     4   0.564     0.5555 0.060 0.040 0.040 0.724 0.036 0.100
#> GSM486807     1   0.413     0.4936 0.760 0.000 0.144 0.088 0.008 0.000
#> GSM486809     6   0.462     0.2158 0.000 0.008 0.008 0.012 0.444 0.528
#> GSM486811     1   0.289     0.5358 0.836 0.000 0.144 0.016 0.004 0.000
#> GSM486813     2   0.216     0.7402 0.000 0.908 0.008 0.028 0.000 0.056
#> GSM486815     1   0.443     0.4483 0.736 0.000 0.184 0.036 0.044 0.000
#> GSM486817     4   0.895     0.4031 0.092 0.108 0.200 0.388 0.060 0.152
#> GSM486819     5   0.317     0.8342 0.020 0.000 0.032 0.048 0.868 0.032
#> GSM486822     6   0.463     0.4508 0.000 0.284 0.008 0.004 0.044 0.660
#> GSM486824     1   0.284     0.5532 0.852 0.000 0.116 0.028 0.004 0.000
#> GSM486828     4   0.790     0.1474 0.004 0.072 0.088 0.416 0.132 0.288
#> GSM486831     1   0.358     0.5286 0.820 0.000 0.064 0.020 0.096 0.000
#> GSM486833     4   0.746     0.5498 0.064 0.016 0.124 0.556 0.124 0.116
#> GSM486835     1   0.371     0.5358 0.796 0.000 0.148 0.024 0.032 0.000
#> GSM486837     2   0.677     0.3018 0.020 0.516 0.080 0.308 0.012 0.064
#> GSM486839     1   0.156     0.5689 0.932 0.000 0.056 0.012 0.000 0.000
#> GSM486841     1   0.247     0.5474 0.884 0.000 0.088 0.016 0.012 0.000
#> GSM486843     1   0.361     0.5157 0.812 0.000 0.116 0.056 0.016 0.000
#> GSM486845     2   0.766     0.2111 0.004 0.416 0.076 0.304 0.044 0.156
#> GSM486847     1   0.135     0.5735 0.940 0.000 0.056 0.004 0.000 0.000
#> GSM486849     2   0.366     0.7291 0.000 0.824 0.016 0.080 0.008 0.072
#> GSM486851     5   0.149     0.8852 0.024 0.000 0.004 0.000 0.944 0.028
#> GSM486853     2   0.251     0.7402 0.000 0.892 0.016 0.036 0.000 0.056
#> GSM486855     2   0.359     0.7076 0.000 0.836 0.040 0.072 0.008 0.044
#> GSM486857     2   0.549     0.5801 0.000 0.640 0.048 0.244 0.008 0.060
#> GSM486736     6   0.373     0.5268 0.000 0.020 0.008 0.000 0.224 0.748
#> GSM486738     2   0.365     0.6393 0.000 0.752 0.008 0.016 0.000 0.224
#> GSM486740     6   0.471     0.3514 0.000 0.000 0.024 0.020 0.360 0.596
#> GSM486742     2   0.368     0.6361 0.000 0.748 0.008 0.016 0.000 0.228
#> GSM486744     2   0.468     0.6053 0.000 0.680 0.028 0.040 0.000 0.252
#> GSM486746     6   0.625     0.4262 0.000 0.012 0.060 0.112 0.232 0.584
#> GSM486748     3   0.694     0.2518 0.168 0.012 0.492 0.276 0.016 0.036
#> GSM486750     6   0.525     0.0329 0.000 0.444 0.028 0.016 0.016 0.496
#> GSM486752     4   0.643     0.1601 0.040 0.012 0.408 0.464 0.032 0.044
#> GSM486754     6   0.448     0.2952 0.000 0.336 0.016 0.020 0.000 0.628
#> GSM486756     2   0.512     0.2220 0.000 0.508 0.028 0.032 0.000 0.432
#> GSM486758     3   0.712    -0.2781 0.068 0.000 0.388 0.380 0.144 0.020
#> GSM486760     1   0.446     0.3990 0.584 0.000 0.388 0.008 0.020 0.000
#> GSM486762     1   0.544     0.2873 0.488 0.000 0.424 0.068 0.020 0.000
#> GSM486764     5   0.134     0.8846 0.004 0.000 0.008 0.000 0.948 0.040
#> GSM486766     1   0.425     0.4037 0.576 0.000 0.408 0.008 0.008 0.000
#> GSM486768     6   0.751     0.3738 0.000 0.116 0.072 0.144 0.152 0.516
#> GSM486770     6   0.360     0.5727 0.000 0.052 0.004 0.004 0.136 0.804
#> GSM486772     2   0.389     0.7024 0.000 0.784 0.028 0.036 0.000 0.152
#> GSM486774     6   0.722     0.1033 0.000 0.056 0.120 0.300 0.056 0.468
#> GSM486776     1   0.373     0.4491 0.652 0.000 0.344 0.004 0.000 0.000
#> GSM486778     1   0.557     0.2572 0.452 0.000 0.440 0.012 0.096 0.000
#> GSM486780     2   0.264     0.7259 0.000 0.892 0.036 0.036 0.004 0.032
#> GSM486782     6   0.732     0.2838 0.000 0.232 0.092 0.180 0.024 0.472
#> GSM486784     2   0.190     0.7337 0.000 0.908 0.004 0.004 0.000 0.084
#> GSM486786     1   0.449     0.4170 0.576 0.000 0.396 0.016 0.012 0.000
#> GSM486788     1   0.405     0.3682 0.564 0.000 0.428 0.000 0.008 0.000
#> GSM486790     6   0.327     0.5657 0.000 0.136 0.016 0.012 0.008 0.828
#> GSM486792     5   0.290     0.8079 0.036 0.000 0.084 0.016 0.864 0.000
#> GSM486794     3   0.647    -0.1290 0.364 0.000 0.456 0.084 0.096 0.000
#> GSM486796     3   0.769     0.2618 0.208 0.116 0.508 0.096 0.052 0.020
#> GSM486798     3   0.763    -0.3031 0.036 0.060 0.408 0.368 0.044 0.084
#> GSM486800     1   0.413     0.4242 0.620 0.000 0.364 0.004 0.012 0.000
#> GSM486802     1   0.410     0.3574 0.548 0.000 0.444 0.004 0.004 0.000
#> GSM486804     1   0.492     0.2882 0.512 0.000 0.444 0.024 0.016 0.004
#> GSM486806     4   0.675     0.4435 0.004 0.048 0.192 0.560 0.028 0.168
#> GSM486808     3   0.503    -0.3046 0.452 0.000 0.488 0.052 0.008 0.000
#> GSM486810     6   0.454     0.3229 0.000 0.008 0.012 0.008 0.392 0.580
#> GSM486812     1   0.418     0.4080 0.560 0.000 0.428 0.008 0.004 0.000
#> GSM486814     2   0.204     0.7362 0.000 0.908 0.004 0.016 0.000 0.072
#> GSM486816     1   0.529     0.2821 0.472 0.000 0.452 0.016 0.060 0.000
#> GSM486818     3   0.869    -0.3118 0.052 0.092 0.360 0.300 0.104 0.092
#> GSM486821     5   0.342     0.8067 0.000 0.000 0.068 0.048 0.840 0.044
#> GSM486823     6   0.467     0.4259 0.000 0.300 0.012 0.004 0.036 0.648
#> GSM486826     1   0.389     0.4508 0.640 0.000 0.352 0.004 0.000 0.004
#> GSM486830     6   0.789    -0.0896 0.000 0.052 0.108 0.320 0.152 0.368
#> GSM486832     1   0.513     0.3269 0.524 0.000 0.404 0.008 0.064 0.000
#> GSM486834     4   0.719     0.4935 0.012 0.012 0.208 0.512 0.088 0.168
#> GSM486836     1   0.456     0.2956 0.516 0.000 0.456 0.008 0.020 0.000
#> GSM486838     2   0.680     0.2423 0.000 0.500 0.160 0.260 0.008 0.072
#> GSM486840     1   0.371     0.4582 0.656 0.000 0.340 0.004 0.000 0.000
#> GSM486842     1   0.412     0.4122 0.568 0.000 0.420 0.000 0.012 0.000
#> GSM486844     3   0.465    -0.3369 0.468 0.004 0.504 0.016 0.004 0.004
#> GSM486846     2   0.709     0.3634 0.000 0.508 0.092 0.232 0.024 0.144
#> GSM486848     1   0.371     0.4628 0.656 0.000 0.340 0.000 0.004 0.000
#> GSM486850     2   0.297     0.7393 0.000 0.868 0.020 0.036 0.004 0.072
#> GSM486852     5   0.148     0.8842 0.000 0.000 0.020 0.004 0.944 0.032
#> GSM486854     2   0.210     0.7371 0.000 0.912 0.012 0.020 0.000 0.056
#> GSM486856     2   0.305     0.7220 0.000 0.864 0.044 0.048 0.000 0.044
#> GSM486858     2   0.493     0.6552 0.000 0.724 0.072 0.124 0.000 0.080

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 agent(p) individual(p) k
#> SD:skmeans 116  1.00000      9.49e-06 2
#> SD:skmeans 112  0.93660      1.77e-09 3
#> SD:skmeans 102  1.00000      9.61e-13 4
#> SD:skmeans  69  1.00000      3.59e-04 5
#> SD:skmeans  54  0.00907      3.93e-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.


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 120 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.468           0.708       0.866         0.4503 0.532   0.532
#> 3 3 0.690           0.797       0.911         0.4581 0.714   0.506
#> 4 4 0.732           0.744       0.886         0.0803 0.951   0.858
#> 5 5 0.675           0.566       0.801         0.0816 0.908   0.708
#> 6 6 0.750           0.743       0.871         0.0628 0.904   0.629

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
#> GSM486735     2  0.0376     0.8188 0.004 0.996
#> GSM486737     2  0.0000     0.8178 0.000 1.000
#> GSM486739     2  0.1633     0.8200 0.024 0.976
#> GSM486741     2  0.0000     0.8178 0.000 1.000
#> GSM486743     2  0.0376     0.8167 0.004 0.996
#> GSM486745     2  0.1184     0.8200 0.016 0.984
#> GSM486747     2  0.9393     0.5863 0.356 0.644
#> GSM486749     2  0.4161     0.8094 0.084 0.916
#> GSM486751     2  0.9286     0.6054 0.344 0.656
#> GSM486753     2  0.0000     0.8178 0.000 1.000
#> GSM486755     2  0.0000     0.8178 0.000 1.000
#> GSM486757     2  0.9358     0.5934 0.352 0.648
#> GSM486759     1  0.0000     0.8331 1.000 0.000
#> GSM486761     1  0.0000     0.8331 1.000 0.000
#> GSM486763     1  0.0672     0.8290 0.992 0.008
#> GSM486765     1  0.0000     0.8331 1.000 0.000
#> GSM486767     1  0.7453     0.6413 0.788 0.212
#> GSM486769     2  0.0376     0.8187 0.004 0.996
#> GSM486771     2  0.0000     0.8178 0.000 1.000
#> GSM486773     2  0.9209     0.6155 0.336 0.664
#> GSM486775     1  0.0000     0.8331 1.000 0.000
#> GSM486777     1  0.0000     0.8331 1.000 0.000
#> GSM486779     2  0.1184     0.8097 0.016 0.984
#> GSM486781     2  0.6801     0.7560 0.180 0.820
#> GSM486783     2  0.0000     0.8178 0.000 1.000
#> GSM486785     1  0.0000     0.8331 1.000 0.000
#> GSM486787     1  0.0000     0.8331 1.000 0.000
#> GSM486789     2  0.0000     0.8178 0.000 1.000
#> GSM486791     1  0.0000     0.8331 1.000 0.000
#> GSM486793     1  0.0000     0.8331 1.000 0.000
#> GSM486795     2  0.9393     0.5874 0.356 0.644
#> GSM486797     2  0.9552     0.5480 0.376 0.624
#> GSM486799     1  0.0000     0.8331 1.000 0.000
#> GSM486801     1  0.0000     0.8331 1.000 0.000
#> GSM486803     1  0.0000     0.8331 1.000 0.000
#> GSM486805     2  0.9393     0.5867 0.356 0.644
#> GSM486807     1  0.5178     0.7523 0.884 0.116
#> GSM486809     2  0.7376     0.7242 0.208 0.792
#> GSM486811     1  0.2948     0.8069 0.948 0.052
#> GSM486813     2  0.3114     0.7821 0.056 0.944
#> GSM486815     1  0.9933    -0.0156 0.548 0.452
#> GSM486817     1  0.9393     0.4052 0.644 0.356
#> GSM486819     1  0.0376     0.8308 0.996 0.004
#> GSM486822     2  0.2043     0.8193 0.032 0.968
#> GSM486824     1  0.2948     0.8069 0.948 0.052
#> GSM486828     1  0.9427     0.3513 0.640 0.360
#> GSM486831     1  0.0000     0.8331 1.000 0.000
#> GSM486833     2  0.9286     0.6054 0.344 0.656
#> GSM486835     1  0.0000     0.8331 1.000 0.000
#> GSM486837     1  0.9732     0.2164 0.596 0.404
#> GSM486839     1  0.0000     0.8331 1.000 0.000
#> GSM486841     1  0.0000     0.8331 1.000 0.000
#> GSM486843     1  0.2948     0.8073 0.948 0.052
#> GSM486845     2  0.9896     0.3853 0.440 0.560
#> GSM486847     1  0.0000     0.8331 1.000 0.000
#> GSM486849     2  0.0376     0.8187 0.004 0.996
#> GSM486851     1  0.0000     0.8331 1.000 0.000
#> GSM486853     2  0.0000     0.8178 0.000 1.000
#> GSM486855     1  0.9286     0.4599 0.656 0.344
#> GSM486857     2  0.8207     0.6958 0.256 0.744
#> GSM486736     2  0.0376     0.8187 0.004 0.996
#> GSM486738     2  0.0000     0.8178 0.000 1.000
#> GSM486740     2  0.0000     0.8178 0.000 1.000
#> GSM486742     2  0.0000     0.8178 0.000 1.000
#> GSM486744     2  0.0000     0.8178 0.000 1.000
#> GSM486746     2  0.0376     0.8189 0.004 0.996
#> GSM486748     2  0.9286     0.6054 0.344 0.656
#> GSM486750     2  0.3733     0.8124 0.072 0.928
#> GSM486752     2  0.9209     0.6155 0.336 0.664
#> GSM486754     2  0.0000     0.8178 0.000 1.000
#> GSM486756     2  0.0000     0.8178 0.000 1.000
#> GSM486758     2  0.9209     0.6155 0.336 0.664
#> GSM486760     2  0.9933     0.3491 0.452 0.548
#> GSM486762     2  0.9286     0.6054 0.344 0.656
#> GSM486764     1  0.8713     0.5742 0.708 0.292
#> GSM486766     1  0.9922     0.0245 0.552 0.448
#> GSM486768     2  0.1843     0.8195 0.028 0.972
#> GSM486770     2  0.0672     0.8193 0.008 0.992
#> GSM486772     2  0.0000     0.8178 0.000 1.000
#> GSM486774     2  0.4161     0.8094 0.084 0.916
#> GSM486776     1  0.0000     0.8331 1.000 0.000
#> GSM486778     2  0.9286     0.6054 0.344 0.656
#> GSM486780     2  0.0000     0.8178 0.000 1.000
#> GSM486782     2  0.3879     0.8115 0.076 0.924
#> GSM486784     2  0.0000     0.8178 0.000 1.000
#> GSM486786     1  0.9815     0.1467 0.580 0.420
#> GSM486788     2  0.9427     0.5800 0.360 0.640
#> GSM486790     2  0.0000     0.8178 0.000 1.000
#> GSM486792     1  0.7139     0.6612 0.804 0.196
#> GSM486794     2  0.9427     0.5792 0.360 0.640
#> GSM486796     2  0.4022     0.8104 0.080 0.920
#> GSM486798     2  0.4161     0.8094 0.084 0.916
#> GSM486800     1  0.0000     0.8331 1.000 0.000
#> GSM486802     1  0.9977    -0.0941 0.528 0.472
#> GSM486804     2  0.9286     0.6054 0.344 0.656
#> GSM486806     2  0.8555     0.6738 0.280 0.720
#> GSM486808     2  0.9286     0.6054 0.344 0.656
#> GSM486810     2  0.1843     0.8195 0.028 0.972
#> GSM486812     2  0.9286     0.6054 0.344 0.656
#> GSM486814     2  0.0000     0.8178 0.000 1.000
#> GSM486816     2  0.9286     0.6054 0.344 0.656
#> GSM486818     2  0.4022     0.8104 0.080 0.920
#> GSM486821     1  0.7528     0.6413 0.784 0.216
#> GSM486823     2  0.1414     0.8199 0.020 0.980
#> GSM486826     2  0.9286     0.6054 0.344 0.656
#> GSM486830     2  0.4562     0.8047 0.096 0.904
#> GSM486832     1  0.0000     0.8331 1.000 0.000
#> GSM486834     2  0.7674     0.7219 0.224 0.776
#> GSM486836     1  0.9795     0.1641 0.584 0.416
#> GSM486838     2  0.5178     0.7950 0.116 0.884
#> GSM486840     1  0.1184     0.8266 0.984 0.016
#> GSM486842     1  0.9170     0.4167 0.668 0.332
#> GSM486844     2  0.9286     0.6054 0.344 0.656
#> GSM486846     2  0.4161     0.8094 0.084 0.916
#> GSM486848     1  0.9358     0.3680 0.648 0.352
#> GSM486850     2  0.0000     0.8178 0.000 1.000
#> GSM486852     1  0.0000     0.8331 1.000 0.000
#> GSM486854     2  0.0000     0.8178 0.000 1.000
#> GSM486856     2  0.0000     0.8178 0.000 1.000
#> GSM486858     2  0.4161     0.8094 0.084 0.916

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM486735     3  0.5760    0.47003 0.000 0.328 0.672
#> GSM486737     2  0.0237    0.90743 0.000 0.996 0.004
#> GSM486739     3  0.5882    0.42905 0.000 0.348 0.652
#> GSM486741     2  0.0000    0.90842 0.000 1.000 0.000
#> GSM486743     2  0.0000    0.90842 0.000 1.000 0.000
#> GSM486745     2  0.4172    0.79638 0.004 0.840 0.156
#> GSM486747     3  0.0747    0.87104 0.016 0.000 0.984
#> GSM486749     3  0.0892    0.86792 0.000 0.020 0.980
#> GSM486751     3  0.0000    0.87320 0.000 0.000 1.000
#> GSM486753     2  0.0000    0.90842 0.000 1.000 0.000
#> GSM486755     2  0.0000    0.90842 0.000 1.000 0.000
#> GSM486757     3  0.0424    0.87302 0.008 0.000 0.992
#> GSM486759     1  0.0237    0.92268 0.996 0.000 0.004
#> GSM486761     1  0.1860    0.89513 0.948 0.000 0.052
#> GSM486763     1  0.0424    0.92182 0.992 0.000 0.008
#> GSM486765     1  0.0000    0.92387 1.000 0.000 0.000
#> GSM486767     1  0.3995    0.80990 0.868 0.116 0.016
#> GSM486769     2  0.5291    0.63731 0.000 0.732 0.268
#> GSM486771     2  0.4452    0.76164 0.000 0.808 0.192
#> GSM486773     3  0.0237    0.87342 0.004 0.000 0.996
#> GSM486775     1  0.0000    0.92387 1.000 0.000 0.000
#> GSM486777     1  0.0237    0.92268 0.996 0.000 0.004
#> GSM486779     2  0.0424    0.90622 0.000 0.992 0.008
#> GSM486781     3  0.0000    0.87320 0.000 0.000 1.000
#> GSM486783     2  0.0000    0.90842 0.000 1.000 0.000
#> GSM486785     1  0.0237    0.92268 0.996 0.000 0.004
#> GSM486787     1  0.0000    0.92387 1.000 0.000 0.000
#> GSM486789     2  0.0237    0.90743 0.000 0.996 0.004
#> GSM486791     1  0.0000    0.92387 1.000 0.000 0.000
#> GSM486793     1  0.0592    0.92054 0.988 0.000 0.012
#> GSM486795     3  0.4062    0.77004 0.164 0.000 0.836
#> GSM486797     3  0.1529    0.86109 0.040 0.000 0.960
#> GSM486799     1  0.0000    0.92387 1.000 0.000 0.000
#> GSM486801     1  0.0000    0.92387 1.000 0.000 0.000
#> GSM486803     1  0.0000    0.92387 1.000 0.000 0.000
#> GSM486805     3  0.0592    0.87216 0.012 0.000 0.988
#> GSM486807     1  0.4178    0.76818 0.828 0.000 0.172
#> GSM486809     3  0.5598    0.74470 0.052 0.148 0.800
#> GSM486811     1  0.1964    0.89167 0.944 0.000 0.056
#> GSM486813     2  0.0000    0.90842 0.000 1.000 0.000
#> GSM486815     3  0.6252    0.23945 0.444 0.000 0.556
#> GSM486817     1  0.6897    0.16660 0.548 0.016 0.436
#> GSM486819     1  0.0000    0.92387 1.000 0.000 0.000
#> GSM486822     2  0.6008    0.48177 0.000 0.628 0.372
#> GSM486824     1  0.2356    0.87992 0.928 0.000 0.072
#> GSM486828     3  0.6045    0.37729 0.380 0.000 0.620
#> GSM486831     1  0.0000    0.92387 1.000 0.000 0.000
#> GSM486833     3  0.0000    0.87320 0.000 0.000 1.000
#> GSM486835     1  0.0000    0.92387 1.000 0.000 0.000
#> GSM486837     3  0.5785    0.49238 0.332 0.000 0.668
#> GSM486839     1  0.0000    0.92387 1.000 0.000 0.000
#> GSM486841     1  0.0237    0.92268 0.996 0.000 0.004
#> GSM486843     1  0.1964    0.89317 0.944 0.000 0.056
#> GSM486845     3  0.3686    0.78531 0.140 0.000 0.860
#> GSM486847     1  0.0000    0.92387 1.000 0.000 0.000
#> GSM486849     2  0.6180    0.35641 0.000 0.584 0.416
#> GSM486851     1  0.0000    0.92387 1.000 0.000 0.000
#> GSM486853     2  0.0000    0.90842 0.000 1.000 0.000
#> GSM486855     2  0.0424    0.90456 0.008 0.992 0.000
#> GSM486857     3  0.0000    0.87320 0.000 0.000 1.000
#> GSM486736     3  0.6280    0.06184 0.000 0.460 0.540
#> GSM486738     2  0.0000    0.90842 0.000 1.000 0.000
#> GSM486740     2  0.4291    0.77451 0.000 0.820 0.180
#> GSM486742     2  0.0000    0.90842 0.000 1.000 0.000
#> GSM486744     2  0.0000    0.90842 0.000 1.000 0.000
#> GSM486746     2  0.5948    0.49610 0.000 0.640 0.360
#> GSM486748     3  0.0000    0.87320 0.000 0.000 1.000
#> GSM486750     3  0.2261    0.84031 0.000 0.068 0.932
#> GSM486752     3  0.0000    0.87320 0.000 0.000 1.000
#> GSM486754     2  0.0424    0.90567 0.000 0.992 0.008
#> GSM486756     2  0.0592    0.90387 0.000 0.988 0.012
#> GSM486758     3  0.0000    0.87320 0.000 0.000 1.000
#> GSM486760     3  0.4796    0.71026 0.220 0.000 0.780
#> GSM486762     3  0.0237    0.87312 0.004 0.000 0.996
#> GSM486764     1  0.4346    0.75337 0.816 0.000 0.184
#> GSM486766     3  0.5254    0.63009 0.264 0.000 0.736
#> GSM486768     3  0.4750    0.67777 0.000 0.216 0.784
#> GSM486770     2  0.5216    0.67328 0.000 0.740 0.260
#> GSM486772     2  0.0237    0.90733 0.000 0.996 0.004
#> GSM486774     3  0.0000    0.87320 0.000 0.000 1.000
#> GSM486776     1  0.0000    0.92387 1.000 0.000 0.000
#> GSM486778     3  0.0237    0.87312 0.004 0.000 0.996
#> GSM486780     2  0.0000    0.90842 0.000 1.000 0.000
#> GSM486782     3  0.4002    0.75724 0.000 0.160 0.840
#> GSM486784     2  0.0000    0.90842 0.000 1.000 0.000
#> GSM486786     3  0.5650    0.54173 0.312 0.000 0.688
#> GSM486788     3  0.4452    0.74435 0.192 0.000 0.808
#> GSM486790     2  0.0000    0.90842 0.000 1.000 0.000
#> GSM486792     1  0.5138    0.64228 0.748 0.000 0.252
#> GSM486794     3  0.1289    0.86627 0.032 0.000 0.968
#> GSM486796     3  0.0475    0.87293 0.004 0.004 0.992
#> GSM486798     3  0.0000    0.87320 0.000 0.000 1.000
#> GSM486800     1  0.0000    0.92387 1.000 0.000 0.000
#> GSM486802     3  0.6126    0.37834 0.400 0.000 0.600
#> GSM486804     3  0.0747    0.87158 0.016 0.000 0.984
#> GSM486806     3  0.0000    0.87320 0.000 0.000 1.000
#> GSM486808     3  0.0237    0.87312 0.004 0.000 0.996
#> GSM486810     3  0.4702    0.68352 0.000 0.212 0.788
#> GSM486812     3  0.0237    0.87312 0.004 0.000 0.996
#> GSM486814     2  0.0000    0.90842 0.000 1.000 0.000
#> GSM486816     3  0.0237    0.87312 0.004 0.000 0.996
#> GSM486818     3  0.1129    0.86875 0.004 0.020 0.976
#> GSM486821     1  0.0475    0.92156 0.992 0.004 0.004
#> GSM486823     2  0.6095    0.39654 0.000 0.608 0.392
#> GSM486826     3  0.0424    0.87303 0.008 0.000 0.992
#> GSM486830     3  0.0892    0.86859 0.000 0.020 0.980
#> GSM486832     1  0.0000    0.92387 1.000 0.000 0.000
#> GSM486834     3  0.0000    0.87320 0.000 0.000 1.000
#> GSM486836     3  0.6244    0.25113 0.440 0.000 0.560
#> GSM486838     3  0.0000    0.87320 0.000 0.000 1.000
#> GSM486840     1  0.1163    0.91115 0.972 0.000 0.028
#> GSM486842     1  0.6180    0.24375 0.584 0.000 0.416
#> GSM486844     3  0.0237    0.87312 0.004 0.000 0.996
#> GSM486846     3  0.2261    0.84239 0.000 0.068 0.932
#> GSM486848     1  0.6305   -0.00264 0.516 0.000 0.484
#> GSM486850     2  0.1643    0.88563 0.000 0.956 0.044
#> GSM486852     1  0.0237    0.92281 0.996 0.000 0.004
#> GSM486854     2  0.0000    0.90842 0.000 1.000 0.000
#> GSM486856     2  0.0000    0.90842 0.000 1.000 0.000
#> GSM486858     3  0.1753    0.85268 0.000 0.048 0.952

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM486735     4  0.1584    0.77116 0.000 0.036 0.012 0.952
#> GSM486737     2  0.0707    0.85802 0.000 0.980 0.000 0.020
#> GSM486739     4  0.4686    0.73311 0.000 0.144 0.068 0.788
#> GSM486741     2  0.0000    0.86727 0.000 1.000 0.000 0.000
#> GSM486743     2  0.0000    0.86727 0.000 1.000 0.000 0.000
#> GSM486745     4  0.6665    0.25750 0.004 0.440 0.072 0.484
#> GSM486747     3  0.0707    0.85394 0.020 0.000 0.980 0.000
#> GSM486749     3  0.3933    0.72242 0.000 0.008 0.792 0.200
#> GSM486751     3  0.0336    0.85075 0.000 0.000 0.992 0.008
#> GSM486753     2  0.0188    0.86584 0.000 0.996 0.000 0.004
#> GSM486755     2  0.0000    0.86727 0.000 1.000 0.000 0.000
#> GSM486757     3  0.1059    0.85274 0.012 0.000 0.972 0.016
#> GSM486759     1  0.0000    0.89520 1.000 0.000 0.000 0.000
#> GSM486761     1  0.1743    0.87309 0.940 0.000 0.056 0.004
#> GSM486763     1  0.0336    0.89393 0.992 0.000 0.000 0.008
#> GSM486765     1  0.0524    0.89549 0.988 0.000 0.008 0.004
#> GSM486767     1  0.4914    0.72758 0.804 0.092 0.020 0.084
#> GSM486769     4  0.1557    0.77362 0.000 0.056 0.000 0.944
#> GSM486771     2  0.6315   -0.13527 0.000 0.508 0.060 0.432
#> GSM486773     3  0.1635    0.84497 0.008 0.000 0.948 0.044
#> GSM486775     1  0.0804    0.89362 0.980 0.000 0.008 0.012
#> GSM486777     1  0.0921    0.89051 0.972 0.000 0.000 0.028
#> GSM486779     2  0.0524    0.86363 0.000 0.988 0.004 0.008
#> GSM486781     3  0.1716    0.83715 0.000 0.000 0.936 0.064
#> GSM486783     2  0.0817    0.85527 0.000 0.976 0.000 0.024
#> GSM486785     1  0.1042    0.89307 0.972 0.000 0.008 0.020
#> GSM486787     1  0.0707    0.89312 0.980 0.000 0.000 0.020
#> GSM486789     2  0.4679    0.27433 0.000 0.648 0.000 0.352
#> GSM486791     1  0.0188    0.89461 0.996 0.000 0.000 0.004
#> GSM486793     1  0.0895    0.89273 0.976 0.000 0.020 0.004
#> GSM486795     3  0.3812    0.77101 0.140 0.000 0.832 0.028
#> GSM486797     3  0.2500    0.83742 0.044 0.000 0.916 0.040
#> GSM486799     1  0.0188    0.89507 0.996 0.000 0.000 0.004
#> GSM486801     1  0.0000    0.89520 1.000 0.000 0.000 0.000
#> GSM486803     1  0.0000    0.89520 1.000 0.000 0.000 0.000
#> GSM486805     3  0.1610    0.84856 0.016 0.000 0.952 0.032
#> GSM486807     1  0.3486    0.73698 0.812 0.000 0.188 0.000
#> GSM486809     4  0.2198    0.74977 0.000 0.008 0.072 0.920
#> GSM486811     1  0.2466    0.86097 0.916 0.000 0.056 0.028
#> GSM486813     2  0.0817    0.85527 0.000 0.976 0.000 0.024
#> GSM486815     3  0.5708    0.28524 0.416 0.000 0.556 0.028
#> GSM486817     1  0.5876    0.14554 0.540 0.016 0.432 0.012
#> GSM486819     1  0.0188    0.89478 0.996 0.000 0.000 0.004
#> GSM486822     4  0.7324    0.44067 0.000 0.228 0.240 0.532
#> GSM486824     1  0.2489    0.85306 0.912 0.000 0.068 0.020
#> GSM486828     3  0.7265    0.38438 0.288 0.000 0.528 0.184
#> GSM486831     1  0.0000    0.89520 1.000 0.000 0.000 0.000
#> GSM486833     3  0.0336    0.85075 0.000 0.000 0.992 0.008
#> GSM486835     1  0.0000    0.89520 1.000 0.000 0.000 0.000
#> GSM486837     3  0.5812    0.49055 0.328 0.000 0.624 0.048
#> GSM486839     1  0.0000    0.89520 1.000 0.000 0.000 0.000
#> GSM486841     1  0.0000    0.89520 1.000 0.000 0.000 0.000
#> GSM486843     1  0.1474    0.87315 0.948 0.000 0.052 0.000
#> GSM486845     3  0.4514    0.75283 0.136 0.000 0.800 0.064
#> GSM486847     1  0.0592    0.89487 0.984 0.000 0.000 0.016
#> GSM486849     2  0.6170    0.08857 0.000 0.528 0.420 0.052
#> GSM486851     1  0.0188    0.89461 0.996 0.000 0.000 0.004
#> GSM486853     2  0.0817    0.85527 0.000 0.976 0.000 0.024
#> GSM486855     2  0.1356    0.84293 0.008 0.960 0.000 0.032
#> GSM486857     3  0.1716    0.83715 0.000 0.000 0.936 0.064
#> GSM486736     4  0.2796    0.77365 0.000 0.092 0.016 0.892
#> GSM486738     2  0.0000    0.86727 0.000 1.000 0.000 0.000
#> GSM486740     4  0.5112    0.44230 0.000 0.384 0.008 0.608
#> GSM486742     2  0.0000    0.86727 0.000 1.000 0.000 0.000
#> GSM486744     2  0.0000    0.86727 0.000 1.000 0.000 0.000
#> GSM486746     2  0.7398   -0.23757 0.000 0.456 0.168 0.376
#> GSM486748     3  0.0000    0.85209 0.000 0.000 1.000 0.000
#> GSM486750     3  0.1792    0.82786 0.000 0.068 0.932 0.000
#> GSM486752     3  0.0000    0.85209 0.000 0.000 1.000 0.000
#> GSM486754     2  0.0188    0.86569 0.000 0.996 0.004 0.000
#> GSM486756     2  0.0188    0.86569 0.000 0.996 0.004 0.000
#> GSM486758     3  0.0000    0.85209 0.000 0.000 1.000 0.000
#> GSM486760     3  0.4842    0.70722 0.192 0.000 0.760 0.048
#> GSM486762     3  0.0657    0.85286 0.004 0.000 0.984 0.012
#> GSM486764     1  0.6364    0.54044 0.652 0.000 0.144 0.204
#> GSM486766     3  0.5444    0.61324 0.264 0.000 0.688 0.048
#> GSM486768     3  0.5429    0.58382 0.000 0.208 0.720 0.072
#> GSM486770     4  0.2861    0.77209 0.000 0.096 0.016 0.888
#> GSM486772     2  0.0188    0.86543 0.000 0.996 0.004 0.000
#> GSM486774     3  0.1022    0.84730 0.000 0.000 0.968 0.032
#> GSM486776     1  0.1635    0.88266 0.948 0.000 0.008 0.044
#> GSM486778     3  0.1302    0.84711 0.000 0.000 0.956 0.044
#> GSM486780     2  0.0000    0.86727 0.000 1.000 0.000 0.000
#> GSM486782     3  0.3539    0.71831 0.000 0.176 0.820 0.004
#> GSM486784     2  0.0000    0.86727 0.000 1.000 0.000 0.000
#> GSM486786     3  0.5657    0.52158 0.312 0.000 0.644 0.044
#> GSM486788     3  0.4244    0.74262 0.160 0.000 0.804 0.036
#> GSM486790     2  0.0469    0.86097 0.000 0.988 0.000 0.012
#> GSM486792     1  0.4072    0.64342 0.748 0.000 0.252 0.000
#> GSM486794     3  0.1109    0.85199 0.028 0.000 0.968 0.004
#> GSM486796     3  0.1059    0.85164 0.000 0.016 0.972 0.012
#> GSM486798     3  0.0000    0.85209 0.000 0.000 1.000 0.000
#> GSM486800     1  0.1722    0.88139 0.944 0.000 0.008 0.048
#> GSM486802     3  0.5543    0.44627 0.360 0.000 0.612 0.028
#> GSM486804     3  0.1677    0.84685 0.012 0.000 0.948 0.040
#> GSM486806     3  0.0000    0.85209 0.000 0.000 1.000 0.000
#> GSM486808     3  0.0657    0.85286 0.004 0.000 0.984 0.012
#> GSM486810     3  0.6851    0.20247 0.000 0.116 0.540 0.344
#> GSM486812     3  0.1389    0.84584 0.000 0.000 0.952 0.048
#> GSM486814     2  0.0000    0.86727 0.000 1.000 0.000 0.000
#> GSM486816     3  0.1302    0.84711 0.000 0.000 0.956 0.044
#> GSM486818     3  0.1284    0.85082 0.000 0.024 0.964 0.012
#> GSM486821     1  0.1822    0.86880 0.944 0.008 0.004 0.044
#> GSM486823     2  0.7802   -0.19921 0.000 0.420 0.276 0.304
#> GSM486826     3  0.1489    0.84679 0.004 0.000 0.952 0.044
#> GSM486830     3  0.4121    0.71443 0.000 0.020 0.796 0.184
#> GSM486832     1  0.0188    0.89526 0.996 0.000 0.004 0.000
#> GSM486834     3  0.0000    0.85209 0.000 0.000 1.000 0.000
#> GSM486836     3  0.5517    0.31066 0.412 0.000 0.568 0.020
#> GSM486838     3  0.0524    0.85190 0.000 0.008 0.988 0.004
#> GSM486840     1  0.2494    0.86828 0.916 0.000 0.036 0.048
#> GSM486842     1  0.6061    0.22445 0.552 0.000 0.400 0.048
#> GSM486844     3  0.0707    0.85141 0.000 0.000 0.980 0.020
#> GSM486846     3  0.2722    0.81760 0.000 0.064 0.904 0.032
#> GSM486848     1  0.6145   -0.00933 0.492 0.000 0.460 0.048
#> GSM486850     2  0.1302    0.82045 0.000 0.956 0.044 0.000
#> GSM486852     1  0.0524    0.89521 0.988 0.000 0.008 0.004
#> GSM486854     2  0.0000    0.86727 0.000 1.000 0.000 0.000
#> GSM486856     2  0.0000    0.86727 0.000 1.000 0.000 0.000
#> GSM486858     3  0.1557    0.83431 0.000 0.056 0.944 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
#> GSM486735     5  0.0000    0.79249 0.000 0.000 0.000 0.000 1.000
#> GSM486737     2  0.3949    0.45527 0.000 0.668 0.000 0.332 0.000
#> GSM486739     5  0.4191    0.72516 0.000 0.112 0.036 0.044 0.808
#> GSM486741     2  0.0000    0.86047 0.000 1.000 0.000 0.000 0.000
#> GSM486743     2  0.0000    0.86047 0.000 1.000 0.000 0.000 0.000
#> GSM486745     5  0.6112    0.22711 0.004 0.416 0.068 0.016 0.496
#> GSM486747     3  0.0510    0.73769 0.016 0.000 0.984 0.000 0.000
#> GSM486749     3  0.5956   -0.15209 0.000 0.004 0.472 0.432 0.092
#> GSM486751     3  0.0000    0.73890 0.000 0.000 1.000 0.000 0.000
#> GSM486753     2  0.0162    0.85734 0.000 0.996 0.000 0.000 0.004
#> GSM486755     2  0.0000    0.86047 0.000 1.000 0.000 0.000 0.000
#> GSM486757     3  0.0981    0.73625 0.012 0.000 0.972 0.008 0.008
#> GSM486759     1  0.0162    0.85458 0.996 0.000 0.000 0.004 0.000
#> GSM486761     1  0.1502    0.83246 0.940 0.000 0.056 0.004 0.000
#> GSM486763     1  0.0451    0.85262 0.988 0.000 0.000 0.008 0.004
#> GSM486765     1  0.0609    0.85201 0.980 0.000 0.000 0.020 0.000
#> GSM486767     1  0.7222    0.07873 0.472 0.084 0.020 0.372 0.052
#> GSM486769     5  0.0162    0.79189 0.000 0.000 0.000 0.004 0.996
#> GSM486771     4  0.6067   -0.03778 0.000 0.388 0.004 0.500 0.108
#> GSM486773     3  0.3008    0.66476 0.004 0.000 0.868 0.092 0.036
#> GSM486775     1  0.1341    0.84112 0.944 0.000 0.000 0.056 0.000
#> GSM486777     1  0.3109    0.74177 0.800 0.000 0.000 0.200 0.000
#> GSM486779     2  0.1571    0.81148 0.000 0.936 0.004 0.060 0.000
#> GSM486781     4  0.5157    0.17130 0.000 0.000 0.440 0.520 0.040
#> GSM486783     2  0.4452    0.09108 0.000 0.500 0.000 0.496 0.004
#> GSM486785     1  0.2674    0.80337 0.868 0.000 0.012 0.120 0.000
#> GSM486787     1  0.2648    0.77424 0.848 0.000 0.000 0.152 0.000
#> GSM486789     2  0.3999    0.36345 0.000 0.656 0.000 0.000 0.344
#> GSM486791     1  0.0324    0.85330 0.992 0.000 0.000 0.004 0.004
#> GSM486793     1  0.0865    0.84855 0.972 0.000 0.024 0.004 0.000
#> GSM486795     3  0.3689    0.64260 0.140 0.000 0.820 0.016 0.024
#> GSM486797     3  0.2472    0.71049 0.044 0.000 0.908 0.012 0.036
#> GSM486799     1  0.0162    0.85402 0.996 0.000 0.000 0.004 0.000
#> GSM486801     1  0.0290    0.85404 0.992 0.000 0.000 0.008 0.000
#> GSM486803     1  0.0000    0.85366 1.000 0.000 0.000 0.000 0.000
#> GSM486805     3  0.1891    0.72364 0.016 0.000 0.936 0.016 0.032
#> GSM486807     1  0.3086    0.70052 0.816 0.000 0.180 0.004 0.000
#> GSM486809     5  0.1106    0.78386 0.000 0.000 0.012 0.024 0.964
#> GSM486811     1  0.5019    0.57404 0.632 0.000 0.052 0.316 0.000
#> GSM486813     4  0.4450   -0.15869 0.000 0.488 0.000 0.508 0.004
#> GSM486815     3  0.6665    0.16561 0.260 0.000 0.440 0.300 0.000
#> GSM486817     3  0.7283   -0.09998 0.348 0.016 0.376 0.256 0.004
#> GSM486819     1  0.0162    0.85346 0.996 0.000 0.000 0.004 0.000
#> GSM486822     4  0.6179   -0.15705 0.000 0.060 0.032 0.480 0.428
#> GSM486824     1  0.4017    0.73289 0.788 0.000 0.064 0.148 0.000
#> GSM486828     4  0.6209    0.21178 0.036 0.000 0.396 0.508 0.060
#> GSM486831     1  0.0000    0.85366 1.000 0.000 0.000 0.000 0.000
#> GSM486833     3  0.0000    0.73890 0.000 0.000 1.000 0.000 0.000
#> GSM486835     1  0.0000    0.85366 1.000 0.000 0.000 0.000 0.000
#> GSM486837     4  0.5751    0.19718 0.036 0.000 0.420 0.516 0.028
#> GSM486839     1  0.0000    0.85366 1.000 0.000 0.000 0.000 0.000
#> GSM486841     1  0.0290    0.85387 0.992 0.000 0.000 0.008 0.000
#> GSM486843     1  0.1597    0.83297 0.940 0.000 0.048 0.012 0.000
#> GSM486845     4  0.5499    0.18506 0.012 0.000 0.428 0.520 0.040
#> GSM486847     1  0.1965    0.82781 0.904 0.000 0.000 0.096 0.000
#> GSM486849     4  0.6336   -0.00235 0.000 0.412 0.080 0.480 0.028
#> GSM486851     1  0.0451    0.85262 0.988 0.000 0.000 0.008 0.004
#> GSM486853     4  0.4451   -0.16687 0.000 0.492 0.000 0.504 0.004
#> GSM486855     4  0.4656   -0.14469 0.000 0.480 0.000 0.508 0.012
#> GSM486857     3  0.5178   -0.15260 0.000 0.000 0.484 0.476 0.040
#> GSM486736     5  0.1043    0.79748 0.000 0.040 0.000 0.000 0.960
#> GSM486738     2  0.0000    0.86047 0.000 1.000 0.000 0.000 0.000
#> GSM486740     5  0.4633    0.44734 0.000 0.348 0.004 0.016 0.632
#> GSM486742     2  0.0000    0.86047 0.000 1.000 0.000 0.000 0.000
#> GSM486744     2  0.0000    0.86047 0.000 1.000 0.000 0.000 0.000
#> GSM486746     2  0.6100   -0.19128 0.000 0.448 0.124 0.000 0.428
#> GSM486748     3  0.0000    0.73890 0.000 0.000 1.000 0.000 0.000
#> GSM486750     3  0.1478    0.71525 0.000 0.064 0.936 0.000 0.000
#> GSM486752     3  0.0000    0.73890 0.000 0.000 1.000 0.000 0.000
#> GSM486754     2  0.0000    0.86047 0.000 1.000 0.000 0.000 0.000
#> GSM486756     2  0.0000    0.86047 0.000 1.000 0.000 0.000 0.000
#> GSM486758     3  0.0000    0.73890 0.000 0.000 1.000 0.000 0.000
#> GSM486760     4  0.5998   -0.23276 0.112 0.000 0.424 0.464 0.000
#> GSM486762     3  0.0771    0.73923 0.004 0.000 0.976 0.020 0.000
#> GSM486764     1  0.5756    0.47911 0.628 0.000 0.116 0.008 0.248
#> GSM486766     4  0.6602   -0.02538 0.240 0.000 0.304 0.456 0.000
#> GSM486768     3  0.5897    0.41538 0.000 0.208 0.660 0.040 0.092
#> GSM486770     5  0.1285    0.79712 0.000 0.036 0.004 0.004 0.956
#> GSM486772     2  0.0162    0.85707 0.000 0.996 0.004 0.000 0.000
#> GSM486774     3  0.0794    0.73282 0.000 0.000 0.972 0.000 0.028
#> GSM486776     1  0.4278    0.48051 0.548 0.000 0.000 0.452 0.000
#> GSM486778     3  0.4045    0.47148 0.000 0.000 0.644 0.356 0.000
#> GSM486780     2  0.0000    0.86047 0.000 1.000 0.000 0.000 0.000
#> GSM486782     3  0.2891    0.60778 0.000 0.176 0.824 0.000 0.000
#> GSM486784     2  0.0000    0.86047 0.000 1.000 0.000 0.000 0.000
#> GSM486786     4  0.6752   -0.01125 0.280 0.000 0.316 0.404 0.000
#> GSM486788     3  0.4836    0.46533 0.032 0.000 0.612 0.356 0.000
#> GSM486790     2  0.0609    0.84677 0.000 0.980 0.000 0.000 0.020
#> GSM486792     1  0.3807    0.60363 0.748 0.000 0.240 0.012 0.000
#> GSM486794     3  0.1582    0.72979 0.028 0.000 0.944 0.028 0.000
#> GSM486796     3  0.1168    0.73665 0.000 0.008 0.960 0.032 0.000
#> GSM486798     3  0.0000    0.73890 0.000 0.000 1.000 0.000 0.000
#> GSM486800     1  0.4291    0.46578 0.536 0.000 0.000 0.464 0.000
#> GSM486802     3  0.6326    0.30810 0.208 0.000 0.524 0.268 0.000
#> GSM486804     3  0.4003    0.56179 0.008 0.000 0.704 0.288 0.000
#> GSM486806     3  0.0000    0.73890 0.000 0.000 1.000 0.000 0.000
#> GSM486808     3  0.0566    0.73937 0.004 0.000 0.984 0.012 0.000
#> GSM486810     3  0.6085    0.23180 0.000 0.100 0.512 0.008 0.380
#> GSM486812     3  0.4273    0.36804 0.000 0.000 0.552 0.448 0.000
#> GSM486814     2  0.0000    0.86047 0.000 1.000 0.000 0.000 0.000
#> GSM486816     3  0.3999    0.48304 0.000 0.000 0.656 0.344 0.000
#> GSM486818     3  0.1493    0.73497 0.000 0.024 0.948 0.028 0.000
#> GSM486821     1  0.2338    0.82006 0.916 0.008 0.004 0.024 0.048
#> GSM486823     2  0.6916   -0.16961 0.000 0.376 0.280 0.004 0.340
#> GSM486826     3  0.4196    0.48755 0.004 0.000 0.640 0.356 0.000
#> GSM486830     3  0.5067    0.48765 0.000 0.024 0.700 0.044 0.232
#> GSM486832     1  0.0162    0.85383 0.996 0.000 0.004 0.000 0.000
#> GSM486834     3  0.0000    0.73890 0.000 0.000 1.000 0.000 0.000
#> GSM486836     3  0.6318    0.18095 0.344 0.000 0.488 0.168 0.000
#> GSM486838     3  0.0451    0.73840 0.000 0.008 0.988 0.004 0.000
#> GSM486840     1  0.4740    0.43848 0.516 0.000 0.016 0.468 0.000
#> GSM486842     4  0.6392   -0.15581 0.356 0.000 0.176 0.468 0.000
#> GSM486844     3  0.2732    0.66855 0.000 0.000 0.840 0.160 0.000
#> GSM486846     4  0.4802    0.13288 0.000 0.012 0.480 0.504 0.004
#> GSM486848     4  0.6469   -0.11073 0.336 0.000 0.196 0.468 0.000
#> GSM486850     2  0.1197    0.81244 0.000 0.952 0.048 0.000 0.000
#> GSM486852     1  0.0566    0.85315 0.984 0.000 0.004 0.012 0.000
#> GSM486854     2  0.0000    0.86047 0.000 1.000 0.000 0.000 0.000
#> GSM486856     2  0.0000    0.86047 0.000 1.000 0.000 0.000 0.000
#> GSM486858     3  0.1270    0.72287 0.000 0.052 0.948 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
#> GSM486735     6  0.0000     0.8032 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM486737     2  0.3747     0.2318 0.000 0.604 0.000 0.396 0.000 0.000
#> GSM486739     6  0.4320     0.6625 0.012 0.032 0.004 0.244 0.000 0.708
#> GSM486741     2  0.0000     0.8838 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486743     2  0.0000     0.8838 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486745     6  0.6627     0.4091 0.012 0.336 0.040 0.148 0.000 0.464
#> GSM486747     3  0.0547     0.8479 0.000 0.000 0.980 0.000 0.020 0.000
#> GSM486749     4  0.4150     0.6519 0.000 0.004 0.204 0.732 0.000 0.060
#> GSM486751     3  0.0000     0.8517 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM486753     2  0.0000     0.8838 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486755     2  0.0000     0.8838 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486757     3  0.1500     0.8374 0.000 0.000 0.936 0.052 0.012 0.000
#> GSM486759     5  0.0146     0.8995 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM486761     5  0.1398     0.8786 0.008 0.000 0.052 0.000 0.940 0.000
#> GSM486763     5  0.0458     0.8981 0.000 0.000 0.000 0.016 0.984 0.000
#> GSM486765     5  0.0937     0.8894 0.040 0.000 0.000 0.000 0.960 0.000
#> GSM486767     4  0.3341     0.5763 0.000 0.012 0.004 0.776 0.208 0.000
#> GSM486769     6  0.0935     0.7988 0.004 0.000 0.000 0.032 0.000 0.964
#> GSM486771     4  0.3139     0.7139 0.000 0.152 0.000 0.816 0.000 0.032
#> GSM486773     3  0.3175     0.6755 0.000 0.000 0.744 0.256 0.000 0.000
#> GSM486775     5  0.1444     0.8762 0.072 0.000 0.000 0.000 0.928 0.000
#> GSM486777     5  0.3221     0.6401 0.264 0.000 0.000 0.000 0.736 0.000
#> GSM486779     2  0.1908     0.7960 0.000 0.900 0.004 0.096 0.000 0.000
#> GSM486781     4  0.1141     0.7507 0.000 0.000 0.052 0.948 0.000 0.000
#> GSM486783     4  0.3515     0.5535 0.000 0.324 0.000 0.676 0.000 0.000
#> GSM486785     5  0.2912     0.7213 0.216 0.000 0.000 0.000 0.784 0.000
#> GSM486787     5  0.2454     0.7879 0.160 0.000 0.000 0.000 0.840 0.000
#> GSM486789     2  0.3804     0.4027 0.008 0.656 0.000 0.000 0.000 0.336
#> GSM486791     5  0.0363     0.8986 0.000 0.000 0.000 0.012 0.988 0.000
#> GSM486793     5  0.0405     0.8990 0.004 0.000 0.008 0.000 0.988 0.000
#> GSM486795     3  0.3316     0.7162 0.028 0.000 0.804 0.004 0.164 0.000
#> GSM486797     3  0.2775     0.7973 0.000 0.000 0.856 0.104 0.040 0.000
#> GSM486799     5  0.0260     0.8989 0.008 0.000 0.000 0.000 0.992 0.000
#> GSM486801     5  0.1863     0.8503 0.104 0.000 0.000 0.000 0.896 0.000
#> GSM486803     5  0.0000     0.8988 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486805     3  0.2623     0.7899 0.000 0.000 0.852 0.132 0.016 0.000
#> GSM486807     5  0.2848     0.7513 0.008 0.000 0.176 0.000 0.816 0.000
#> GSM486809     6  0.1957     0.7729 0.000 0.000 0.000 0.112 0.000 0.888
#> GSM486811     1  0.3190     0.6686 0.772 0.000 0.008 0.000 0.220 0.000
#> GSM486813     4  0.2597     0.7151 0.000 0.176 0.000 0.824 0.000 0.000
#> GSM486815     1  0.4583     0.6714 0.696 0.000 0.128 0.000 0.176 0.000
#> GSM486817     4  0.6276     0.2053 0.000 0.008 0.292 0.404 0.296 0.000
#> GSM486819     5  0.0260     0.8986 0.000 0.000 0.000 0.008 0.992 0.000
#> GSM486822     4  0.3081     0.6200 0.004 0.000 0.000 0.776 0.000 0.220
#> GSM486824     5  0.3835     0.7088 0.188 0.000 0.056 0.000 0.756 0.000
#> GSM486828     4  0.1563     0.7501 0.000 0.000 0.056 0.932 0.012 0.000
#> GSM486831     5  0.0000     0.8988 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486833     3  0.0000     0.8517 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM486835     5  0.0000     0.8988 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486837     4  0.1753     0.7530 0.000 0.000 0.084 0.912 0.004 0.000
#> GSM486839     5  0.0000     0.8988 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486841     5  0.0458     0.8971 0.016 0.000 0.000 0.000 0.984 0.000
#> GSM486843     5  0.2488     0.8485 0.076 0.000 0.044 0.000 0.880 0.000
#> GSM486845     4  0.1082     0.7494 0.000 0.000 0.040 0.956 0.004 0.000
#> GSM486847     5  0.2260     0.8313 0.140 0.000 0.000 0.000 0.860 0.000
#> GSM486849     4  0.3088     0.7032 0.000 0.172 0.020 0.808 0.000 0.000
#> GSM486851     5  0.0363     0.8986 0.000 0.000 0.000 0.012 0.988 0.000
#> GSM486853     4  0.2730     0.7016 0.000 0.192 0.000 0.808 0.000 0.000
#> GSM486855     4  0.1957     0.7450 0.000 0.112 0.000 0.888 0.000 0.000
#> GSM486857     4  0.1910     0.7309 0.000 0.000 0.108 0.892 0.000 0.000
#> GSM486736     6  0.0260     0.8026 0.000 0.000 0.000 0.008 0.000 0.992
#> GSM486738     2  0.0000     0.8838 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486740     6  0.5557     0.6212 0.012 0.232 0.004 0.144 0.000 0.608
#> GSM486742     2  0.0000     0.8838 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486744     2  0.0000     0.8838 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486746     2  0.5700    -0.1800 0.012 0.444 0.112 0.000 0.000 0.432
#> GSM486748     3  0.0000     0.8517 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM486750     3  0.1204     0.8335 0.000 0.056 0.944 0.000 0.000 0.000
#> GSM486752     3  0.0000     0.8517 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM486754     2  0.0000     0.8838 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486756     2  0.0000     0.8838 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486758     3  0.0000     0.8517 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM486760     1  0.0806     0.8109 0.972 0.000 0.020 0.000 0.008 0.000
#> GSM486762     3  0.1007     0.8378 0.044 0.000 0.956 0.000 0.000 0.000
#> GSM486764     5  0.5522     0.4591 0.004 0.000 0.116 0.016 0.608 0.256
#> GSM486766     1  0.2512     0.7942 0.880 0.000 0.060 0.000 0.060 0.000
#> GSM486768     3  0.5606     0.5520 0.012 0.204 0.652 0.040 0.000 0.092
#> GSM486770     6  0.1168     0.8003 0.016 0.000 0.000 0.028 0.000 0.956
#> GSM486772     2  0.0146     0.8803 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM486774     3  0.0146     0.8515 0.000 0.000 0.996 0.004 0.000 0.000
#> GSM486776     1  0.2378     0.7269 0.848 0.000 0.000 0.000 0.152 0.000
#> GSM486778     1  0.2340     0.7719 0.852 0.000 0.148 0.000 0.000 0.000
#> GSM486780     2  0.0000     0.8838 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486782     3  0.2491     0.7425 0.000 0.164 0.836 0.000 0.000 0.000
#> GSM486784     2  0.0000     0.8838 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486786     1  0.1908     0.8004 0.900 0.000 0.096 0.000 0.004 0.000
#> GSM486788     1  0.2821     0.7455 0.832 0.000 0.152 0.000 0.016 0.000
#> GSM486790     2  0.0603     0.8699 0.004 0.980 0.000 0.000 0.000 0.016
#> GSM486792     5  0.3488     0.6505 0.004 0.000 0.244 0.008 0.744 0.000
#> GSM486794     3  0.3168     0.6750 0.192 0.000 0.792 0.000 0.016 0.000
#> GSM486796     3  0.0891     0.8469 0.024 0.008 0.968 0.000 0.000 0.000
#> GSM486798     3  0.0000     0.8517 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM486800     1  0.0790     0.8060 0.968 0.000 0.000 0.000 0.032 0.000
#> GSM486802     1  0.4682     0.5104 0.640 0.000 0.284 0.000 0.076 0.000
#> GSM486804     3  0.4047     0.3682 0.384 0.000 0.604 0.000 0.012 0.000
#> GSM486806     3  0.0000     0.8517 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM486808     3  0.0291     0.8506 0.004 0.000 0.992 0.000 0.004 0.000
#> GSM486810     3  0.5967     0.1953 0.000 0.088 0.488 0.044 0.000 0.380
#> GSM486812     1  0.0865     0.8119 0.964 0.000 0.036 0.000 0.000 0.000
#> GSM486814     2  0.0000     0.8838 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486816     1  0.3240     0.6910 0.752 0.000 0.244 0.000 0.004 0.000
#> GSM486818     3  0.1418     0.8413 0.032 0.024 0.944 0.000 0.000 0.000
#> GSM486821     5  0.3032     0.8373 0.096 0.004 0.004 0.016 0.860 0.020
#> GSM486823     2  0.6756    -0.1412 0.004 0.368 0.276 0.028 0.000 0.324
#> GSM486826     1  0.3881     0.3669 0.600 0.000 0.396 0.000 0.004 0.000
#> GSM486830     3  0.5994     0.4113 0.012 0.012 0.568 0.184 0.000 0.224
#> GSM486832     5  0.0146     0.8987 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM486834     3  0.0000     0.8517 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM486836     3  0.5948     0.0844 0.328 0.000 0.440 0.000 0.232 0.000
#> GSM486838     3  0.0000     0.8517 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM486840     1  0.0777     0.8084 0.972 0.000 0.004 0.000 0.024 0.000
#> GSM486842     1  0.0508     0.8079 0.984 0.000 0.004 0.000 0.012 0.000
#> GSM486844     3  0.3265     0.6517 0.248 0.000 0.748 0.000 0.004 0.000
#> GSM486846     4  0.2996     0.6682 0.000 0.000 0.228 0.772 0.000 0.000
#> GSM486848     1  0.0458     0.8064 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM486850     2  0.1075     0.8385 0.000 0.952 0.048 0.000 0.000 0.000
#> GSM486852     5  0.0508     0.8985 0.004 0.000 0.000 0.012 0.984 0.000
#> GSM486854     2  0.0000     0.8838 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486856     2  0.0000     0.8838 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486858     3  0.1930     0.8250 0.000 0.048 0.916 0.036 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 agent(p) individual(p) k
#> SD:pam 107 1.02e-03      1.94e-02 2
#> SD:pam 105 4.30e-04      2.81e-04 3
#> SD:pam 103 7.57e-04      1.30e-06 4
#> SD:pam  78 5.91e-05      1.05e-03 5
#> SD:pam 108 1.39e-07      4.44e-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.


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 120 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.495           0.902       0.901         0.4955 0.496   0.496
#> 3 3 0.395           0.673       0.788         0.1945 0.951   0.901
#> 4 4 0.609           0.794       0.803         0.2514 0.751   0.472
#> 5 5 0.729           0.826       0.857         0.0641 0.866   0.541
#> 6 6 0.732           0.684       0.771         0.0322 0.931   0.702

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
#> GSM486735     1  0.6973      0.903 0.812 0.188
#> GSM486737     1  0.6801      0.909 0.820 0.180
#> GSM486739     1  0.7299      0.901 0.796 0.204
#> GSM486741     1  0.6531      0.909 0.832 0.168
#> GSM486743     1  0.6801      0.909 0.820 0.180
#> GSM486745     1  0.7219      0.902 0.800 0.200
#> GSM486747     1  0.4022      0.912 0.920 0.080
#> GSM486749     1  0.6343      0.912 0.840 0.160
#> GSM486751     1  0.4939      0.916 0.892 0.108
#> GSM486753     1  0.7056      0.903 0.808 0.192
#> GSM486755     1  0.6887      0.908 0.816 0.184
#> GSM486757     1  0.4939      0.916 0.892 0.108
#> GSM486759     1  0.0938      0.886 0.988 0.012
#> GSM486761     1  0.0000      0.886 1.000 0.000
#> GSM486763     1  0.7219      0.902 0.800 0.200
#> GSM486765     1  0.0000      0.886 1.000 0.000
#> GSM486767     1  0.7219      0.902 0.800 0.200
#> GSM486769     1  0.6973      0.903 0.812 0.188
#> GSM486771     1  0.6801      0.909 0.820 0.180
#> GSM486773     1  0.5178      0.916 0.884 0.116
#> GSM486775     1  0.0938      0.886 0.988 0.012
#> GSM486777     1  0.0000      0.886 1.000 0.000
#> GSM486779     1  0.6712      0.911 0.824 0.176
#> GSM486781     1  0.5178      0.916 0.884 0.116
#> GSM486783     1  0.6801      0.909 0.820 0.180
#> GSM486785     1  0.0000      0.886 1.000 0.000
#> GSM486787     1  0.0938      0.886 0.988 0.012
#> GSM486789     1  0.7056      0.902 0.808 0.192
#> GSM486791     1  0.7219      0.902 0.800 0.200
#> GSM486793     1  0.0000      0.886 1.000 0.000
#> GSM486795     1  0.5408      0.916 0.876 0.124
#> GSM486797     1  0.4939      0.916 0.892 0.108
#> GSM486799     1  0.0938      0.886 0.988 0.012
#> GSM486801     1  0.0938      0.886 0.988 0.012
#> GSM486803     1  0.0938      0.886 0.988 0.012
#> GSM486805     1  0.4939      0.916 0.892 0.108
#> GSM486807     1  0.0000      0.886 1.000 0.000
#> GSM486809     1  0.6973      0.903 0.812 0.188
#> GSM486811     1  0.0000      0.886 1.000 0.000
#> GSM486813     1  0.6801      0.909 0.820 0.180
#> GSM486815     1  0.0000      0.886 1.000 0.000
#> GSM486817     1  0.5519      0.916 0.872 0.128
#> GSM486819     1  0.7219      0.902 0.800 0.200
#> GSM486822     1  0.6973      0.903 0.812 0.188
#> GSM486824     1  0.0938      0.886 0.988 0.012
#> GSM486828     1  0.5178      0.916 0.884 0.116
#> GSM486831     1  0.0938      0.886 0.988 0.012
#> GSM486833     1  0.4939      0.916 0.892 0.108
#> GSM486835     1  0.0938      0.886 0.988 0.012
#> GSM486837     1  0.5178      0.916 0.884 0.116
#> GSM486839     1  0.0938      0.886 0.988 0.012
#> GSM486841     1  0.0000      0.886 1.000 0.000
#> GSM486843     1  0.0938      0.886 0.988 0.012
#> GSM486845     1  0.5178      0.916 0.884 0.116
#> GSM486847     1  0.0938      0.886 0.988 0.012
#> GSM486849     1  0.5737      0.915 0.864 0.136
#> GSM486851     1  0.7219      0.902 0.800 0.200
#> GSM486853     1  0.6343      0.911 0.840 0.160
#> GSM486855     1  0.6801      0.909 0.820 0.180
#> GSM486857     1  0.5178      0.916 0.884 0.116
#> GSM486736     2  0.0938      0.904 0.012 0.988
#> GSM486738     2  0.1633      0.911 0.024 0.976
#> GSM486740     2  0.0000      0.904 0.000 1.000
#> GSM486742     2  0.2043      0.911 0.032 0.968
#> GSM486744     2  0.1414      0.912 0.020 0.980
#> GSM486746     2  0.0000      0.904 0.000 1.000
#> GSM486748     2  0.4431      0.916 0.092 0.908
#> GSM486750     2  0.1843      0.911 0.028 0.972
#> GSM486752     2  0.4431      0.916 0.092 0.908
#> GSM486754     2  0.1184      0.911 0.016 0.984
#> GSM486756     2  0.1414      0.912 0.020 0.980
#> GSM486758     2  0.4431      0.916 0.092 0.908
#> GSM486760     2  0.6973      0.884 0.188 0.812
#> GSM486762     2  0.7219      0.884 0.200 0.800
#> GSM486764     2  0.0000      0.904 0.000 1.000
#> GSM486766     2  0.7219      0.884 0.200 0.800
#> GSM486768     2  0.0672      0.908 0.008 0.992
#> GSM486770     2  0.0938      0.904 0.012 0.988
#> GSM486772     2  0.1414      0.912 0.020 0.980
#> GSM486774     2  0.4161      0.917 0.084 0.916
#> GSM486776     2  0.6973      0.884 0.188 0.812
#> GSM486778     2  0.7219      0.884 0.200 0.800
#> GSM486780     2  0.1633      0.913 0.024 0.976
#> GSM486782     2  0.4161      0.917 0.084 0.916
#> GSM486784     2  0.1414      0.912 0.020 0.980
#> GSM486786     2  0.7219      0.884 0.200 0.800
#> GSM486788     2  0.6973      0.884 0.188 0.812
#> GSM486790     2  0.0938      0.904 0.012 0.988
#> GSM486792     2  0.0000      0.904 0.000 1.000
#> GSM486794     2  0.7219      0.884 0.200 0.800
#> GSM486796     2  0.3733      0.917 0.072 0.928
#> GSM486798     2  0.4161      0.917 0.084 0.916
#> GSM486800     2  0.6973      0.884 0.188 0.812
#> GSM486802     2  0.6973      0.884 0.188 0.812
#> GSM486804     2  0.6973      0.884 0.188 0.812
#> GSM486806     2  0.4161      0.917 0.084 0.916
#> GSM486808     2  0.7219      0.884 0.200 0.800
#> GSM486810     2  0.0938      0.904 0.012 0.988
#> GSM486812     2  0.7219      0.884 0.200 0.800
#> GSM486814     2  0.1414      0.912 0.020 0.980
#> GSM486816     2  0.7219      0.884 0.200 0.800
#> GSM486818     2  0.3733      0.917 0.072 0.928
#> GSM486821     2  0.0000      0.904 0.000 1.000
#> GSM486823     2  0.0938      0.904 0.012 0.988
#> GSM486826     2  0.6801      0.888 0.180 0.820
#> GSM486830     2  0.4022      0.917 0.080 0.920
#> GSM486832     2  0.6973      0.884 0.188 0.812
#> GSM486834     2  0.4161      0.917 0.084 0.916
#> GSM486836     2  0.6973      0.884 0.188 0.812
#> GSM486838     2  0.4161      0.917 0.084 0.916
#> GSM486840     2  0.6973      0.884 0.188 0.812
#> GSM486842     2  0.7219      0.884 0.200 0.800
#> GSM486844     2  0.6712      0.890 0.176 0.824
#> GSM486846     2  0.4161      0.917 0.084 0.916
#> GSM486848     2  0.6973      0.884 0.188 0.812
#> GSM486850     2  0.2603      0.914 0.044 0.956
#> GSM486852     2  0.0000      0.904 0.000 1.000
#> GSM486854     2  0.2043      0.911 0.032 0.968
#> GSM486856     2  0.1414      0.912 0.020 0.980
#> GSM486858     2  0.4161      0.917 0.084 0.916

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM486735     2  0.6625     0.3274 0.176 0.744 0.080
#> GSM486737     1  0.8620     0.6487 0.536 0.352 0.112
#> GSM486739     1  0.8280     0.6170 0.516 0.404 0.080
#> GSM486741     1  0.8610     0.6630 0.548 0.336 0.116
#> GSM486743     1  0.8553     0.6640 0.552 0.336 0.112
#> GSM486745     1  0.8512     0.6626 0.552 0.340 0.108
#> GSM486747     1  0.6892     0.7086 0.736 0.152 0.112
#> GSM486749     1  0.8907     0.6846 0.560 0.272 0.168
#> GSM486751     1  0.8171     0.7128 0.644 0.184 0.172
#> GSM486753     1  0.9014     0.5880 0.484 0.380 0.136
#> GSM486755     1  0.8663     0.6397 0.524 0.364 0.112
#> GSM486757     1  0.8171     0.7128 0.644 0.184 0.172
#> GSM486759     1  0.0000     0.6380 1.000 0.000 0.000
#> GSM486761     1  0.3272     0.6554 0.904 0.016 0.080
#> GSM486763     1  0.7920     0.6516 0.572 0.360 0.068
#> GSM486765     1  0.3370     0.6541 0.904 0.024 0.072
#> GSM486767     1  0.8712     0.6659 0.556 0.312 0.132
#> GSM486769     2  0.4035     0.5727 0.040 0.880 0.080
#> GSM486771     1  0.8535     0.6669 0.556 0.332 0.112
#> GSM486773     1  0.8841     0.7032 0.580 0.216 0.204
#> GSM486775     1  0.0424     0.6396 0.992 0.008 0.000
#> GSM486777     1  0.3045     0.6513 0.916 0.020 0.064
#> GSM486779     1  0.8496     0.6711 0.564 0.324 0.112
#> GSM486781     1  0.8913     0.6998 0.572 0.220 0.208
#> GSM486783     1  0.8588     0.6579 0.544 0.344 0.112
#> GSM486785     1  0.2845     0.6519 0.920 0.012 0.068
#> GSM486787     1  0.0000     0.6380 1.000 0.000 0.000
#> GSM486789     2  0.5588     0.5426 0.068 0.808 0.124
#> GSM486791     1  0.7824     0.6568 0.580 0.356 0.064
#> GSM486793     1  0.3530     0.6596 0.900 0.032 0.068
#> GSM486795     1  0.7317     0.7163 0.696 0.208 0.096
#> GSM486797     1  0.8216     0.7126 0.640 0.188 0.172
#> GSM486799     1  0.0000     0.6380 1.000 0.000 0.000
#> GSM486801     1  0.1163     0.6557 0.972 0.028 0.000
#> GSM486803     1  0.1411     0.6588 0.964 0.036 0.000
#> GSM486805     1  0.8433     0.7109 0.620 0.204 0.176
#> GSM486807     1  0.3502     0.6545 0.896 0.020 0.084
#> GSM486809     1  0.8250     0.6295 0.528 0.392 0.080
#> GSM486811     1  0.2749     0.6516 0.924 0.012 0.064
#> GSM486813     1  0.8496     0.6711 0.564 0.324 0.112
#> GSM486815     1  0.3045     0.6513 0.916 0.020 0.064
#> GSM486817     1  0.7458     0.7166 0.692 0.196 0.112
#> GSM486819     1  0.8137     0.6857 0.592 0.316 0.092
#> GSM486822     1  0.8850     0.6375 0.516 0.356 0.128
#> GSM486824     1  0.1411     0.6598 0.964 0.036 0.000
#> GSM486828     1  0.8876     0.7016 0.576 0.220 0.204
#> GSM486831     1  0.0892     0.6372 0.980 0.020 0.000
#> GSM486833     1  0.8216     0.7126 0.640 0.188 0.172
#> GSM486835     1  0.0424     0.6396 0.992 0.008 0.000
#> GSM486837     1  0.8668     0.7079 0.596 0.224 0.180
#> GSM486839     1  0.0000     0.6380 1.000 0.000 0.000
#> GSM486841     1  0.2845     0.6519 0.920 0.012 0.068
#> GSM486843     1  0.1529     0.6615 0.960 0.040 0.000
#> GSM486845     1  0.8838     0.7024 0.580 0.220 0.200
#> GSM486847     1  0.0000     0.6380 1.000 0.000 0.000
#> GSM486849     1  0.8726     0.6857 0.564 0.296 0.140
#> GSM486851     1  0.7920     0.6508 0.572 0.360 0.068
#> GSM486853     1  0.9093     0.5651 0.460 0.400 0.140
#> GSM486855     1  0.8496     0.6711 0.564 0.324 0.112
#> GSM486857     1  0.8624     0.7100 0.596 0.240 0.164
#> GSM486736     2  0.5706     0.5692 0.000 0.680 0.320
#> GSM486738     2  0.6305     0.2685 0.000 0.516 0.484
#> GSM486740     3  0.4346     0.6882 0.000 0.184 0.816
#> GSM486742     3  0.6180    -0.0107 0.000 0.416 0.584
#> GSM486744     3  0.2796     0.7299 0.000 0.092 0.908
#> GSM486746     3  0.3116     0.7303 0.000 0.108 0.892
#> GSM486748     3  0.2550     0.7648 0.040 0.024 0.936
#> GSM486750     3  0.2356     0.7392 0.000 0.072 0.928
#> GSM486752     3  0.2116     0.7638 0.040 0.012 0.948
#> GSM486754     3  0.3038     0.7223 0.000 0.104 0.896
#> GSM486756     3  0.4062     0.6817 0.000 0.164 0.836
#> GSM486758     3  0.2414     0.7641 0.040 0.020 0.940
#> GSM486760     3  0.6839     0.7050 0.272 0.044 0.684
#> GSM486762     3  0.6001     0.7255 0.176 0.052 0.772
#> GSM486764     3  0.4629     0.6958 0.004 0.188 0.808
#> GSM486766     3  0.6138     0.7214 0.172 0.060 0.768
#> GSM486768     3  0.2796     0.7271 0.000 0.092 0.908
#> GSM486770     2  0.5926     0.5259 0.000 0.644 0.356
#> GSM486772     3  0.3267     0.7258 0.000 0.116 0.884
#> GSM486774     3  0.1015     0.7595 0.012 0.008 0.980
#> GSM486776     3  0.6839     0.7050 0.272 0.044 0.684
#> GSM486778     3  0.6488     0.7179 0.192 0.064 0.744
#> GSM486780     3  0.3267     0.7258 0.000 0.116 0.884
#> GSM486782     3  0.0829     0.7585 0.012 0.004 0.984
#> GSM486784     3  0.3482     0.7181 0.000 0.128 0.872
#> GSM486786     3  0.6304     0.7185 0.192 0.056 0.752
#> GSM486788     3  0.6839     0.7050 0.272 0.044 0.684
#> GSM486790     3  0.3412     0.7108 0.000 0.124 0.876
#> GSM486792     3  0.5072     0.7079 0.012 0.196 0.792
#> GSM486794     3  0.6203     0.7200 0.184 0.056 0.760
#> GSM486796     3  0.4232     0.7670 0.084 0.044 0.872
#> GSM486798     3  0.1950     0.7634 0.040 0.008 0.952
#> GSM486800     3  0.6839     0.7050 0.272 0.044 0.684
#> GSM486802     3  0.6735     0.7128 0.260 0.044 0.696
#> GSM486804     3  0.6380     0.7298 0.224 0.044 0.732
#> GSM486806     3  0.1711     0.7629 0.032 0.008 0.960
#> GSM486808     3  0.6098     0.7212 0.176 0.056 0.768
#> GSM486810     3  0.4291     0.6904 0.000 0.180 0.820
#> GSM486812     3  0.6258     0.7188 0.196 0.052 0.752
#> GSM486814     3  0.3340     0.7231 0.000 0.120 0.880
#> GSM486816     3  0.6398     0.7181 0.192 0.060 0.748
#> GSM486818     3  0.3459     0.7668 0.096 0.012 0.892
#> GSM486821     3  0.3715     0.7318 0.004 0.128 0.868
#> GSM486823     3  0.6079     0.0490 0.000 0.388 0.612
#> GSM486826     3  0.6490     0.7200 0.256 0.036 0.708
#> GSM486830     3  0.0829     0.7597 0.012 0.004 0.984
#> GSM486832     3  0.7076     0.7043 0.256 0.060 0.684
#> GSM486834     3  0.2152     0.7630 0.036 0.016 0.948
#> GSM486836     3  0.6839     0.7050 0.272 0.044 0.684
#> GSM486838     3  0.1525     0.7644 0.032 0.004 0.964
#> GSM486840     3  0.6839     0.7050 0.272 0.044 0.684
#> GSM486842     3  0.6258     0.7188 0.196 0.052 0.752
#> GSM486844     3  0.6247     0.7349 0.212 0.044 0.744
#> GSM486846     3  0.1182     0.7575 0.012 0.012 0.976
#> GSM486848     3  0.6839     0.7050 0.272 0.044 0.684
#> GSM486850     3  0.2959     0.7355 0.000 0.100 0.900
#> GSM486852     3  0.4784     0.7016 0.004 0.200 0.796
#> GSM486854     3  0.3686     0.7067 0.000 0.140 0.860
#> GSM486856     3  0.3267     0.7258 0.000 0.116 0.884
#> GSM486858     3  0.1482     0.7608 0.020 0.012 0.968

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM486735     4  0.5732     0.6855 0.264 0.064 0.000 0.672
#> GSM486737     4  0.3569     0.8617 0.000 0.196 0.000 0.804
#> GSM486739     4  0.5759     0.6833 0.268 0.064 0.000 0.668
#> GSM486741     4  0.3444     0.8651 0.000 0.184 0.000 0.816
#> GSM486743     4  0.3486     0.8644 0.000 0.188 0.000 0.812
#> GSM486745     4  0.2825     0.8359 0.056 0.012 0.024 0.908
#> GSM486747     1  0.5574     0.7472 0.668 0.000 0.048 0.284
#> GSM486749     4  0.2909     0.8666 0.020 0.092 0.000 0.888
#> GSM486751     1  0.4800     0.6933 0.656 0.000 0.004 0.340
#> GSM486753     4  0.3862     0.8654 0.024 0.152 0.000 0.824
#> GSM486755     4  0.3444     0.8649 0.000 0.184 0.000 0.816
#> GSM486757     1  0.4781     0.6974 0.660 0.000 0.004 0.336
#> GSM486759     1  0.5256     0.8350 0.700 0.000 0.260 0.040
#> GSM486761     1  0.5515     0.8401 0.732 0.000 0.152 0.116
#> GSM486763     1  0.2892     0.6255 0.896 0.068 0.000 0.036
#> GSM486765     1  0.5395     0.8408 0.732 0.000 0.184 0.084
#> GSM486767     4  0.2807     0.8412 0.044 0.020 0.024 0.912
#> GSM486769     4  0.5732     0.6855 0.264 0.064 0.000 0.672
#> GSM486771     4  0.3528     0.8633 0.000 0.192 0.000 0.808
#> GSM486773     4  0.0817     0.8191 0.024 0.000 0.000 0.976
#> GSM486775     1  0.5256     0.8350 0.700 0.000 0.260 0.040
#> GSM486777     1  0.5371     0.8408 0.732 0.000 0.188 0.080
#> GSM486779     4  0.3528     0.8633 0.000 0.192 0.000 0.808
#> GSM486781     4  0.1520     0.8338 0.020 0.024 0.000 0.956
#> GSM486783     4  0.3569     0.8617 0.000 0.196 0.000 0.804
#> GSM486785     1  0.5395     0.8408 0.732 0.000 0.184 0.084
#> GSM486787     1  0.5256     0.8350 0.700 0.000 0.260 0.040
#> GSM486789     4  0.3999     0.8572 0.036 0.140 0.000 0.824
#> GSM486791     1  0.2892     0.6255 0.896 0.068 0.000 0.036
#> GSM486793     1  0.5395     0.8408 0.732 0.000 0.184 0.084
#> GSM486795     1  0.6194     0.6988 0.632 0.008 0.060 0.300
#> GSM486797     1  0.4936     0.6526 0.624 0.000 0.004 0.372
#> GSM486799     1  0.5256     0.8350 0.700 0.000 0.260 0.040
#> GSM486801     1  0.5763     0.8377 0.700 0.000 0.204 0.096
#> GSM486803     1  0.5710     0.8405 0.708 0.000 0.192 0.100
#> GSM486805     4  0.1867     0.7791 0.072 0.000 0.000 0.928
#> GSM486807     1  0.5417     0.8399 0.732 0.000 0.180 0.088
#> GSM486809     4  0.5732     0.6855 0.264 0.064 0.000 0.672
#> GSM486811     1  0.5371     0.8408 0.732 0.000 0.188 0.080
#> GSM486813     4  0.3528     0.8633 0.000 0.192 0.000 0.808
#> GSM486815     1  0.5371     0.8408 0.732 0.000 0.188 0.080
#> GSM486817     4  0.2744     0.8158 0.024 0.012 0.052 0.912
#> GSM486819     1  0.5314     0.6534 0.676 0.004 0.024 0.296
#> GSM486822     4  0.3907     0.8599 0.044 0.120 0.000 0.836
#> GSM486824     1  0.5803     0.8374 0.700 0.000 0.196 0.104
#> GSM486828     4  0.0817     0.8191 0.024 0.000 0.000 0.976
#> GSM486831     1  0.5137     0.8382 0.716 0.000 0.244 0.040
#> GSM486833     1  0.4661     0.6846 0.652 0.000 0.000 0.348
#> GSM486835     1  0.5256     0.8350 0.700 0.000 0.260 0.040
#> GSM486837     4  0.1697     0.8336 0.016 0.028 0.004 0.952
#> GSM486839     1  0.5256     0.8350 0.700 0.000 0.260 0.040
#> GSM486841     1  0.5371     0.8408 0.732 0.000 0.188 0.080
#> GSM486843     1  0.5803     0.8374 0.700 0.000 0.196 0.104
#> GSM486845     4  0.1114     0.8251 0.016 0.008 0.004 0.972
#> GSM486847     1  0.5256     0.8350 0.700 0.000 0.260 0.040
#> GSM486849     4  0.3123     0.8673 0.000 0.156 0.000 0.844
#> GSM486851     1  0.2892     0.6255 0.896 0.068 0.000 0.036
#> GSM486853     4  0.3172     0.8685 0.000 0.160 0.000 0.840
#> GSM486855     4  0.3528     0.8633 0.000 0.192 0.000 0.808
#> GSM486857     4  0.1985     0.8391 0.016 0.040 0.004 0.940
#> GSM486736     2  0.5337     0.6675 0.260 0.696 0.000 0.044
#> GSM486738     2  0.2124     0.8543 0.000 0.924 0.068 0.008
#> GSM486740     2  0.5227     0.6727 0.256 0.704 0.000 0.040
#> GSM486742     2  0.2635     0.8616 0.000 0.904 0.076 0.020
#> GSM486744     2  0.2546     0.8626 0.000 0.900 0.092 0.008
#> GSM486746     2  0.6333     0.8233 0.052 0.724 0.112 0.112
#> GSM486748     3  0.6416     0.6715 0.024 0.120 0.696 0.160
#> GSM486750     2  0.4882     0.8601 0.032 0.812 0.084 0.072
#> GSM486752     3  0.5952     0.7051 0.024 0.084 0.728 0.164
#> GSM486754     2  0.2821     0.8635 0.004 0.900 0.076 0.020
#> GSM486756     2  0.2412     0.8619 0.000 0.908 0.084 0.008
#> GSM486758     3  0.6014     0.7017 0.024 0.088 0.724 0.164
#> GSM486760     3  0.0188     0.8311 0.004 0.000 0.996 0.000
#> GSM486762     3  0.3047     0.8326 0.040 0.012 0.900 0.048
#> GSM486764     3  0.6873     0.6044 0.264 0.072 0.628 0.036
#> GSM486766     3  0.2313     0.8342 0.032 0.000 0.924 0.044
#> GSM486768     2  0.5825     0.8354 0.028 0.748 0.116 0.108
#> GSM486770     2  0.5337     0.6675 0.260 0.696 0.000 0.044
#> GSM486772     2  0.2334     0.8610 0.000 0.908 0.088 0.004
#> GSM486774     2  0.6116     0.8109 0.024 0.716 0.092 0.168
#> GSM486776     3  0.0188     0.8311 0.004 0.000 0.996 0.000
#> GSM486778     3  0.2411     0.8329 0.040 0.000 0.920 0.040
#> GSM486780     2  0.2334     0.8610 0.000 0.908 0.088 0.004
#> GSM486782     2  0.5795     0.8248 0.020 0.740 0.092 0.148
#> GSM486784     2  0.2266     0.8604 0.000 0.912 0.084 0.004
#> GSM486786     3  0.2500     0.8322 0.040 0.000 0.916 0.044
#> GSM486788     3  0.0000     0.8323 0.000 0.000 1.000 0.000
#> GSM486790     2  0.4314     0.8569 0.036 0.844 0.072 0.048
#> GSM486792     3  0.6873     0.6044 0.264 0.072 0.628 0.036
#> GSM486794     3  0.2411     0.8329 0.040 0.000 0.920 0.040
#> GSM486796     3  0.6493     0.5018 0.004 0.240 0.640 0.116
#> GSM486798     2  0.6448     0.7911 0.024 0.692 0.116 0.168
#> GSM486800     3  0.0188     0.8311 0.004 0.000 0.996 0.000
#> GSM486802     3  0.1004     0.8344 0.004 0.024 0.972 0.000
#> GSM486804     3  0.1637     0.8249 0.000 0.060 0.940 0.000
#> GSM486806     2  0.6116     0.8109 0.024 0.716 0.092 0.168
#> GSM486808     3  0.2399     0.8333 0.032 0.000 0.920 0.048
#> GSM486810     2  0.6147     0.7152 0.232 0.688 0.032 0.048
#> GSM486812     3  0.2411     0.8329 0.040 0.000 0.920 0.040
#> GSM486814     2  0.2266     0.8604 0.000 0.912 0.084 0.004
#> GSM486816     3  0.2411     0.8329 0.040 0.000 0.920 0.040
#> GSM486818     3  0.7267     0.0603 0.008 0.372 0.500 0.120
#> GSM486821     3  0.6388     0.6797 0.064 0.108 0.724 0.104
#> GSM486823     2  0.4480     0.8544 0.036 0.836 0.068 0.060
#> GSM486826     3  0.1492     0.8340 0.004 0.036 0.956 0.004
#> GSM486830     2  0.6057     0.8139 0.020 0.716 0.092 0.172
#> GSM486832     3  0.0469     0.8346 0.012 0.000 0.988 0.000
#> GSM486834     3  0.6777     0.6352 0.024 0.140 0.664 0.172
#> GSM486836     3  0.0000     0.8323 0.000 0.000 1.000 0.000
#> GSM486838     2  0.5779     0.8229 0.016 0.736 0.092 0.156
#> GSM486840     3  0.0188     0.8311 0.004 0.000 0.996 0.000
#> GSM486842     3  0.2319     0.8338 0.036 0.000 0.924 0.040
#> GSM486844     3  0.2053     0.8183 0.000 0.072 0.924 0.004
#> GSM486846     2  0.5837     0.8195 0.012 0.724 0.092 0.172
#> GSM486848     3  0.0188     0.8311 0.004 0.000 0.996 0.000
#> GSM486850     2  0.3243     0.8636 0.000 0.876 0.088 0.036
#> GSM486852     3  0.6873     0.6044 0.264 0.072 0.628 0.036
#> GSM486854     2  0.3082     0.8652 0.000 0.884 0.084 0.032
#> GSM486856     2  0.2334     0.8610 0.000 0.908 0.088 0.004
#> GSM486858     2  0.5337     0.8379 0.016 0.772 0.092 0.120

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM486735     5  0.0963      0.863 0.000 0.000 0.000 0.036 0.964
#> GSM486737     4  0.3123      0.820 0.000 0.184 0.004 0.812 0.000
#> GSM486739     5  0.1043      0.858 0.000 0.000 0.000 0.040 0.960
#> GSM486741     4  0.2921      0.829 0.000 0.148 0.004 0.844 0.004
#> GSM486743     4  0.3048      0.824 0.000 0.176 0.000 0.820 0.004
#> GSM486745     4  0.4123      0.753 0.008 0.004 0.020 0.768 0.200
#> GSM486747     1  0.3950      0.791 0.812 0.008 0.068 0.112 0.000
#> GSM486749     4  0.2464      0.833 0.000 0.048 0.004 0.904 0.044
#> GSM486751     1  0.5797      0.116 0.492 0.008 0.068 0.432 0.000
#> GSM486753     4  0.3859      0.814 0.000 0.072 0.008 0.820 0.100
#> GSM486755     4  0.3764      0.825 0.000 0.156 0.000 0.800 0.044
#> GSM486757     1  0.4305      0.741 0.768 0.008 0.048 0.176 0.000
#> GSM486759     1  0.0162      0.909 0.996 0.000 0.004 0.000 0.000
#> GSM486761     1  0.2208      0.897 0.908 0.000 0.072 0.020 0.000
#> GSM486763     5  0.3058      0.839 0.096 0.000 0.044 0.000 0.860
#> GSM486765     1  0.1908      0.898 0.908 0.000 0.092 0.000 0.000
#> GSM486767     4  0.3299      0.804 0.008 0.016 0.016 0.860 0.100
#> GSM486769     5  0.1043      0.863 0.000 0.000 0.000 0.040 0.960
#> GSM486771     4  0.3123      0.822 0.000 0.184 0.000 0.812 0.004
#> GSM486773     4  0.0740      0.815 0.000 0.004 0.008 0.980 0.008
#> GSM486775     1  0.0162      0.909 0.996 0.000 0.004 0.000 0.000
#> GSM486777     1  0.1965      0.897 0.904 0.000 0.096 0.000 0.000
#> GSM486779     4  0.2929      0.823 0.000 0.180 0.000 0.820 0.000
#> GSM486781     4  0.1087      0.817 0.000 0.008 0.016 0.968 0.008
#> GSM486783     4  0.3123      0.820 0.000 0.184 0.004 0.812 0.000
#> GSM486785     1  0.1732      0.901 0.920 0.000 0.080 0.000 0.000
#> GSM486787     1  0.0162      0.909 0.996 0.000 0.004 0.000 0.000
#> GSM486789     4  0.4113      0.785 0.000 0.048 0.008 0.788 0.156
#> GSM486791     5  0.3758      0.819 0.096 0.000 0.088 0.000 0.816
#> GSM486793     1  0.2077      0.899 0.908 0.000 0.084 0.008 0.000
#> GSM486795     4  0.5683      0.132 0.464 0.008 0.040 0.480 0.008
#> GSM486797     4  0.5379      0.363 0.340 0.008 0.052 0.600 0.000
#> GSM486799     1  0.0162      0.909 0.996 0.000 0.004 0.000 0.000
#> GSM486801     1  0.0324      0.909 0.992 0.000 0.004 0.004 0.000
#> GSM486803     1  0.0324      0.909 0.992 0.000 0.004 0.004 0.000
#> GSM486805     4  0.2875      0.783 0.052 0.008 0.056 0.884 0.000
#> GSM486807     1  0.2189      0.897 0.904 0.000 0.084 0.012 0.000
#> GSM486809     5  0.1410      0.850 0.000 0.000 0.000 0.060 0.940
#> GSM486811     1  0.1965      0.897 0.904 0.000 0.096 0.000 0.000
#> GSM486813     4  0.2929      0.823 0.000 0.180 0.000 0.820 0.000
#> GSM486815     1  0.1965      0.897 0.904 0.000 0.096 0.000 0.000
#> GSM486817     4  0.3336      0.800 0.076 0.008 0.044 0.864 0.008
#> GSM486819     4  0.6089      0.647 0.184 0.004 0.060 0.668 0.084
#> GSM486822     4  0.3518      0.810 0.000 0.048 0.008 0.840 0.104
#> GSM486824     1  0.0162      0.909 0.996 0.000 0.004 0.000 0.000
#> GSM486828     4  0.1186      0.813 0.000 0.008 0.008 0.964 0.020
#> GSM486831     1  0.0963      0.907 0.964 0.000 0.036 0.000 0.000
#> GSM486833     4  0.5370      0.153 0.408 0.008 0.040 0.544 0.000
#> GSM486835     1  0.0162      0.909 0.996 0.000 0.004 0.000 0.000
#> GSM486837     4  0.1408      0.824 0.000 0.044 0.008 0.948 0.000
#> GSM486839     1  0.0162      0.909 0.996 0.000 0.004 0.000 0.000
#> GSM486841     1  0.1851      0.899 0.912 0.000 0.088 0.000 0.000
#> GSM486843     1  0.0324      0.909 0.992 0.000 0.004 0.004 0.000
#> GSM486845     4  0.1124      0.811 0.000 0.004 0.036 0.960 0.000
#> GSM486847     1  0.0162      0.909 0.996 0.000 0.004 0.000 0.000
#> GSM486849     4  0.2411      0.835 0.000 0.108 0.000 0.884 0.008
#> GSM486851     5  0.3201      0.836 0.096 0.000 0.052 0.000 0.852
#> GSM486853     4  0.2570      0.834 0.000 0.108 0.004 0.880 0.008
#> GSM486855     4  0.2929      0.823 0.000 0.180 0.000 0.820 0.000
#> GSM486857     4  0.1124      0.827 0.000 0.036 0.004 0.960 0.000
#> GSM486736     5  0.2331      0.856 0.000 0.080 0.000 0.020 0.900
#> GSM486738     2  0.0671      0.839 0.000 0.980 0.004 0.016 0.000
#> GSM486740     5  0.2358      0.842 0.000 0.104 0.000 0.008 0.888
#> GSM486742     2  0.1205      0.846 0.000 0.956 0.004 0.040 0.000
#> GSM486744     2  0.0566      0.846 0.000 0.984 0.004 0.012 0.000
#> GSM486746     2  0.4148      0.823 0.008 0.816 0.016 0.056 0.104
#> GSM486748     2  0.5946      0.481 0.000 0.508 0.380 0.112 0.000
#> GSM486750     2  0.3536      0.848 0.000 0.840 0.008 0.100 0.052
#> GSM486752     2  0.5039      0.764 0.000 0.700 0.184 0.116 0.000
#> GSM486754     2  0.1673      0.852 0.000 0.944 0.008 0.032 0.016
#> GSM486756     2  0.0771      0.843 0.000 0.976 0.004 0.020 0.000
#> GSM486758     2  0.6032      0.454 0.000 0.492 0.388 0.120 0.000
#> GSM486760     3  0.3074      0.946 0.196 0.000 0.804 0.000 0.000
#> GSM486762     3  0.2470      0.930 0.104 0.000 0.884 0.012 0.000
#> GSM486764     5  0.2516      0.838 0.000 0.000 0.140 0.000 0.860
#> GSM486766     3  0.2074      0.933 0.104 0.000 0.896 0.000 0.000
#> GSM486768     2  0.3627      0.850 0.008 0.856 0.024 0.060 0.052
#> GSM486770     5  0.2423      0.855 0.000 0.080 0.000 0.024 0.896
#> GSM486772     2  0.0404      0.842 0.000 0.988 0.000 0.012 0.000
#> GSM486774     2  0.3421      0.845 0.000 0.816 0.016 0.164 0.004
#> GSM486776     3  0.3074      0.946 0.196 0.000 0.804 0.000 0.000
#> GSM486778     3  0.2074      0.925 0.104 0.000 0.896 0.000 0.000
#> GSM486780     2  0.0566      0.843 0.000 0.984 0.004 0.012 0.000
#> GSM486782     2  0.3283      0.849 0.000 0.832 0.028 0.140 0.000
#> GSM486784     2  0.0404      0.842 0.000 0.988 0.000 0.012 0.000
#> GSM486786     3  0.2280      0.933 0.120 0.000 0.880 0.000 0.000
#> GSM486788     3  0.3039      0.945 0.192 0.000 0.808 0.000 0.000
#> GSM486790     2  0.3333      0.837 0.000 0.856 0.008 0.060 0.076
#> GSM486792     5  0.2966      0.818 0.000 0.000 0.184 0.000 0.816
#> GSM486794     3  0.2462      0.930 0.112 0.000 0.880 0.008 0.000
#> GSM486796     2  0.6079      0.725 0.076 0.684 0.172 0.052 0.016
#> GSM486798     2  0.3531      0.842 0.000 0.816 0.036 0.148 0.000
#> GSM486800     3  0.3074      0.946 0.196 0.000 0.804 0.000 0.000
#> GSM486802     3  0.3074      0.946 0.196 0.000 0.804 0.000 0.000
#> GSM486804     3  0.3053      0.927 0.164 0.008 0.828 0.000 0.000
#> GSM486806     2  0.3595      0.841 0.000 0.816 0.044 0.140 0.000
#> GSM486808     3  0.2464      0.925 0.096 0.000 0.888 0.016 0.000
#> GSM486810     5  0.4835      0.283 0.000 0.384 0.004 0.020 0.592
#> GSM486812     3  0.2127      0.932 0.108 0.000 0.892 0.000 0.000
#> GSM486814     2  0.0566      0.840 0.000 0.984 0.004 0.012 0.000
#> GSM486816     3  0.2074      0.925 0.104 0.000 0.896 0.000 0.000
#> GSM486818     2  0.5353      0.795 0.064 0.748 0.108 0.072 0.008
#> GSM486821     2  0.5684      0.758 0.008 0.716 0.140 0.052 0.084
#> GSM486823     2  0.3523      0.834 0.000 0.844 0.008 0.072 0.076
#> GSM486826     3  0.3074      0.946 0.196 0.000 0.804 0.000 0.000
#> GSM486830     2  0.3421      0.845 0.000 0.816 0.016 0.164 0.004
#> GSM486832     3  0.2773      0.943 0.164 0.000 0.836 0.000 0.000
#> GSM486834     2  0.4764      0.799 0.000 0.732 0.128 0.140 0.000
#> GSM486836     3  0.3039      0.945 0.192 0.000 0.808 0.000 0.000
#> GSM486838     2  0.3400      0.848 0.000 0.828 0.036 0.136 0.000
#> GSM486840     3  0.3074      0.946 0.196 0.000 0.804 0.000 0.000
#> GSM486842     3  0.2127      0.932 0.108 0.000 0.892 0.000 0.000
#> GSM486844     3  0.3171      0.936 0.176 0.008 0.816 0.000 0.000
#> GSM486846     2  0.3595      0.844 0.000 0.816 0.044 0.140 0.000
#> GSM486848     3  0.3109      0.944 0.200 0.000 0.800 0.000 0.000
#> GSM486850     2  0.1764      0.854 0.000 0.928 0.000 0.064 0.008
#> GSM486852     5  0.2605      0.836 0.000 0.000 0.148 0.000 0.852
#> GSM486854     2  0.1956      0.855 0.000 0.916 0.000 0.076 0.008
#> GSM486856     2  0.0404      0.842 0.000 0.988 0.000 0.012 0.000
#> GSM486858     2  0.2753      0.854 0.000 0.856 0.008 0.136 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
#> GSM486735     3  0.4264    0.59361 0.000 0.000 0.496 0.016 0.000 0.488
#> GSM486737     4  0.2762    0.80772 0.000 0.196 0.000 0.804 0.000 0.000
#> GSM486739     3  0.4256    0.59473 0.000 0.000 0.520 0.016 0.000 0.464
#> GSM486741     4  0.2631    0.81390 0.000 0.152 0.000 0.840 0.000 0.008
#> GSM486743     4  0.3319    0.81078 0.000 0.176 0.016 0.800 0.004 0.004
#> GSM486745     4  0.5735    0.46188 0.000 0.012 0.284 0.572 0.008 0.124
#> GSM486747     5  0.2981    0.78496 0.020 0.000 0.016 0.116 0.848 0.000
#> GSM486749     4  0.3404    0.80204 0.000 0.064 0.012 0.840 0.008 0.076
#> GSM486751     5  0.4378    0.25842 0.000 0.000 0.016 0.452 0.528 0.004
#> GSM486753     4  0.4304    0.78076 0.000 0.068 0.040 0.784 0.008 0.100
#> GSM486755     4  0.3675    0.81032 0.000 0.164 0.028 0.792 0.008 0.008
#> GSM486757     5  0.3669    0.69508 0.000 0.000 0.028 0.208 0.760 0.004
#> GSM486759     5  0.2178    0.85254 0.132 0.000 0.000 0.000 0.868 0.000
#> GSM486761     5  0.0865    0.84028 0.036 0.000 0.000 0.000 0.964 0.000
#> GSM486763     3  0.3714    0.56166 0.000 0.000 0.656 0.000 0.004 0.340
#> GSM486765     5  0.1267    0.82796 0.060 0.000 0.000 0.000 0.940 0.000
#> GSM486767     4  0.2326    0.78694 0.000 0.020 0.040 0.908 0.004 0.028
#> GSM486769     3  0.4264    0.59361 0.000 0.000 0.496 0.016 0.000 0.488
#> GSM486771     4  0.3043    0.80817 0.000 0.196 0.004 0.796 0.004 0.000
#> GSM486773     4  0.1078    0.77887 0.000 0.000 0.012 0.964 0.016 0.008
#> GSM486775     5  0.2178    0.85128 0.132 0.000 0.000 0.000 0.868 0.000
#> GSM486777     5  0.0790    0.84093 0.032 0.000 0.000 0.000 0.968 0.000
#> GSM486779     4  0.2762    0.80772 0.000 0.196 0.000 0.804 0.000 0.000
#> GSM486781     4  0.1036    0.78718 0.000 0.008 0.024 0.964 0.004 0.000
#> GSM486783     4  0.2902    0.80674 0.000 0.196 0.004 0.800 0.000 0.000
#> GSM486785     5  0.0858    0.84551 0.028 0.000 0.000 0.004 0.968 0.000
#> GSM486787     5  0.2135    0.85185 0.128 0.000 0.000 0.000 0.872 0.000
#> GSM486789     4  0.5778    0.59244 0.000 0.028 0.176 0.624 0.008 0.164
#> GSM486791     3  0.3714    0.56166 0.000 0.000 0.656 0.000 0.004 0.340
#> GSM486793     5  0.1075    0.83257 0.048 0.000 0.000 0.000 0.952 0.000
#> GSM486795     5  0.5101    0.23422 0.040 0.000 0.008 0.452 0.492 0.008
#> GSM486797     4  0.4374   -0.06413 0.000 0.000 0.016 0.532 0.448 0.004
#> GSM486799     5  0.2178    0.85254 0.132 0.000 0.000 0.000 0.868 0.000
#> GSM486801     5  0.2092    0.85078 0.124 0.000 0.000 0.000 0.876 0.000
#> GSM486803     5  0.2178    0.85365 0.132 0.000 0.000 0.000 0.868 0.000
#> GSM486805     4  0.2592    0.70934 0.000 0.000 0.016 0.864 0.116 0.004
#> GSM486807     5  0.1444    0.82253 0.072 0.000 0.000 0.000 0.928 0.000
#> GSM486809     3  0.4264    0.59601 0.000 0.000 0.500 0.016 0.000 0.484
#> GSM486811     5  0.0790    0.84093 0.032 0.000 0.000 0.000 0.968 0.000
#> GSM486813     4  0.2762    0.80772 0.000 0.196 0.000 0.804 0.000 0.000
#> GSM486815     5  0.0790    0.83777 0.032 0.000 0.000 0.000 0.968 0.000
#> GSM486817     4  0.2514    0.75604 0.032 0.000 0.016 0.896 0.052 0.004
#> GSM486819     5  0.6426   -0.00650 0.000 0.000 0.192 0.384 0.396 0.028
#> GSM486822     4  0.4070    0.72466 0.000 0.004 0.064 0.768 0.008 0.156
#> GSM486824     5  0.2446    0.84842 0.124 0.000 0.000 0.012 0.864 0.000
#> GSM486828     4  0.1116    0.78042 0.000 0.000 0.028 0.960 0.004 0.008
#> GSM486831     5  0.2003    0.85478 0.116 0.000 0.000 0.000 0.884 0.000
#> GSM486833     4  0.4598   -0.12141 0.000 0.000 0.028 0.504 0.464 0.004
#> GSM486835     5  0.2260    0.85129 0.140 0.000 0.000 0.000 0.860 0.000
#> GSM486837     4  0.1367    0.80522 0.000 0.044 0.000 0.944 0.012 0.000
#> GSM486839     5  0.2234    0.85007 0.124 0.000 0.000 0.004 0.872 0.000
#> GSM486841     5  0.0713    0.83952 0.028 0.000 0.000 0.000 0.972 0.000
#> GSM486843     5  0.2431    0.85188 0.132 0.000 0.000 0.008 0.860 0.000
#> GSM486845     4  0.0458    0.79301 0.000 0.016 0.000 0.984 0.000 0.000
#> GSM486847     5  0.2234    0.85007 0.124 0.000 0.000 0.004 0.872 0.000
#> GSM486849     4  0.2553    0.81484 0.000 0.144 0.000 0.848 0.000 0.008
#> GSM486851     3  0.3714    0.56166 0.000 0.000 0.656 0.000 0.004 0.340
#> GSM486853     4  0.2695    0.81463 0.000 0.144 0.004 0.844 0.000 0.008
#> GSM486855     4  0.2762    0.80772 0.000 0.196 0.000 0.804 0.000 0.000
#> GSM486857     4  0.1219    0.80610 0.000 0.048 0.000 0.948 0.004 0.000
#> GSM486736     6  0.0964    0.61965 0.000 0.004 0.012 0.016 0.000 0.968
#> GSM486738     2  0.2278    0.72160 0.000 0.868 0.128 0.004 0.000 0.000
#> GSM486740     6  0.1773    0.63578 0.000 0.016 0.036 0.016 0.000 0.932
#> GSM486742     2  0.3079    0.73067 0.000 0.836 0.128 0.028 0.000 0.008
#> GSM486744     2  0.1647    0.78231 0.008 0.940 0.032 0.016 0.000 0.004
#> GSM486746     6  0.6869    0.16484 0.004 0.264 0.172 0.080 0.000 0.480
#> GSM486748     1  0.7424    0.42846 0.500 0.156 0.172 0.136 0.036 0.000
#> GSM486750     2  0.3993    0.75017 0.008 0.812 0.040 0.044 0.004 0.092
#> GSM486752     1  0.7544    0.36891 0.468 0.184 0.176 0.144 0.028 0.000
#> GSM486754     2  0.2414    0.77553 0.008 0.904 0.056 0.016 0.004 0.012
#> GSM486756     2  0.2350    0.76750 0.008 0.896 0.076 0.016 0.000 0.004
#> GSM486758     1  0.7282    0.43979 0.512 0.152 0.164 0.144 0.028 0.000
#> GSM486760     1  0.0458    0.78639 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM486762     1  0.2092    0.77414 0.876 0.000 0.000 0.000 0.124 0.000
#> GSM486764     6  0.2527    0.58212 0.000 0.000 0.168 0.000 0.000 0.832
#> GSM486766     1  0.1863    0.77881 0.896 0.000 0.000 0.000 0.104 0.000
#> GSM486768     2  0.4924    0.71525 0.008 0.712 0.160 0.100 0.000 0.020
#> GSM486770     6  0.0964    0.61974 0.000 0.004 0.012 0.016 0.000 0.968
#> GSM486772     2  0.0692    0.77990 0.004 0.976 0.020 0.000 0.000 0.000
#> GSM486774     2  0.5267    0.68368 0.008 0.648 0.160 0.180 0.000 0.004
#> GSM486776     1  0.0458    0.78589 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM486778     1  0.2300    0.77435 0.856 0.000 0.000 0.000 0.144 0.000
#> GSM486780     2  0.0837    0.77581 0.004 0.972 0.020 0.004 0.000 0.000
#> GSM486782     2  0.4780    0.71541 0.008 0.692 0.120 0.180 0.000 0.000
#> GSM486784     2  0.1285    0.76850 0.000 0.944 0.052 0.004 0.000 0.000
#> GSM486786     1  0.2300    0.77335 0.856 0.000 0.000 0.000 0.144 0.000
#> GSM486788     1  0.0363    0.78682 0.988 0.000 0.000 0.000 0.012 0.000
#> GSM486790     2  0.5340    0.60942 0.004 0.664 0.128 0.016 0.004 0.184
#> GSM486792     6  0.2703    0.58283 0.004 0.000 0.172 0.000 0.000 0.824
#> GSM486794     1  0.2135    0.77232 0.872 0.000 0.000 0.000 0.128 0.000
#> GSM486796     1  0.7138    0.23007 0.452 0.264 0.164 0.116 0.004 0.000
#> GSM486798     2  0.6169    0.62224 0.068 0.584 0.168 0.180 0.000 0.000
#> GSM486800     1  0.0363    0.78682 0.988 0.000 0.000 0.000 0.012 0.000
#> GSM486802     1  0.0547    0.78571 0.980 0.000 0.000 0.000 0.020 0.000
#> GSM486804     1  0.1059    0.78634 0.964 0.004 0.016 0.000 0.016 0.000
#> GSM486806     2  0.5694    0.66249 0.020 0.632 0.176 0.160 0.012 0.000
#> GSM486808     1  0.1957    0.77522 0.888 0.000 0.000 0.000 0.112 0.000
#> GSM486810     6  0.2836    0.58130 0.000 0.052 0.060 0.016 0.000 0.872
#> GSM486812     1  0.2003    0.77670 0.884 0.000 0.000 0.000 0.116 0.000
#> GSM486814     2  0.1219    0.76955 0.000 0.948 0.048 0.004 0.000 0.000
#> GSM486816     1  0.2340    0.76895 0.852 0.000 0.000 0.000 0.148 0.000
#> GSM486818     1  0.7413   -0.09415 0.348 0.344 0.164 0.140 0.000 0.004
#> GSM486821     3  0.8507   -0.17550 0.252 0.228 0.264 0.060 0.000 0.196
#> GSM486823     2  0.5673    0.59876 0.004 0.644 0.132 0.032 0.004 0.184
#> GSM486826     1  0.1349    0.77364 0.940 0.004 0.000 0.000 0.056 0.000
#> GSM486830     2  0.5292    0.68362 0.008 0.644 0.156 0.188 0.000 0.004
#> GSM486832     1  0.0632    0.78990 0.976 0.000 0.000 0.000 0.024 0.000
#> GSM486834     1  0.8297    0.00243 0.328 0.300 0.176 0.152 0.020 0.024
#> GSM486836     1  0.0260    0.78955 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM486838     2  0.5505    0.69322 0.024 0.644 0.148 0.180 0.004 0.000
#> GSM486840     1  0.1204    0.77510 0.944 0.000 0.000 0.000 0.056 0.000
#> GSM486842     1  0.2003    0.77537 0.884 0.000 0.000 0.000 0.116 0.000
#> GSM486844     1  0.2619    0.74291 0.884 0.056 0.048 0.000 0.012 0.000
#> GSM486846     2  0.5151    0.68847 0.008 0.648 0.152 0.192 0.000 0.000
#> GSM486848     1  0.1387    0.76978 0.932 0.000 0.000 0.000 0.068 0.000
#> GSM486850     2  0.1957    0.78326 0.000 0.920 0.024 0.048 0.000 0.008
#> GSM486852     6  0.3043    0.59020 0.004 0.004 0.196 0.000 0.000 0.796
#> GSM486854     2  0.3065    0.75761 0.000 0.848 0.096 0.048 0.000 0.008
#> GSM486856     2  0.0858    0.77884 0.000 0.968 0.028 0.004 0.000 0.000
#> GSM486858     2  0.3994    0.74705 0.000 0.768 0.092 0.136 0.004 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 agent(p) individual(p) k
#> SD:mclust 120 4.67e-27         1.000 2
#> SD:mclust 116 4.78e-25         0.807 3
#> SD:mclust 119 1.27e-25         1.000 4
#> SD:mclust 113 9.48e-21         0.443 5
#> SD:mclust 106 2.87e-21         0.987 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 120 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 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-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.897           0.928       0.970         0.5004 0.499   0.499
#> 3 3 0.576           0.720       0.855         0.2900 0.801   0.620
#> 4 4 0.561           0.625       0.789         0.1318 0.882   0.683
#> 5 5 0.523           0.517       0.719         0.0504 0.855   0.556
#> 6 6 0.531           0.410       0.628         0.0428 0.926   0.710

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
#> GSM486735     2  0.0000      0.962 0.000 1.000
#> GSM486737     2  0.0000      0.962 0.000 1.000
#> GSM486739     2  0.0000      0.962 0.000 1.000
#> GSM486741     2  0.0000      0.962 0.000 1.000
#> GSM486743     2  0.0000      0.962 0.000 1.000
#> GSM486745     2  0.0000      0.962 0.000 1.000
#> GSM486747     1  0.0000      0.976 1.000 0.000
#> GSM486749     2  0.0000      0.962 0.000 1.000
#> GSM486751     1  0.9661      0.332 0.608 0.392
#> GSM486753     2  0.0000      0.962 0.000 1.000
#> GSM486755     2  0.0000      0.962 0.000 1.000
#> GSM486757     1  0.6438      0.793 0.836 0.164
#> GSM486759     1  0.0000      0.976 1.000 0.000
#> GSM486761     1  0.0000      0.976 1.000 0.000
#> GSM486763     2  0.1633      0.944 0.024 0.976
#> GSM486765     1  0.0000      0.976 1.000 0.000
#> GSM486767     2  0.0000      0.962 0.000 1.000
#> GSM486769     2  0.0000      0.962 0.000 1.000
#> GSM486771     2  0.0000      0.962 0.000 1.000
#> GSM486773     2  0.0000      0.962 0.000 1.000
#> GSM486775     1  0.0000      0.976 1.000 0.000
#> GSM486777     1  0.0000      0.976 1.000 0.000
#> GSM486779     2  0.0000      0.962 0.000 1.000
#> GSM486781     2  0.0000      0.962 0.000 1.000
#> GSM486783     2  0.0000      0.962 0.000 1.000
#> GSM486785     1  0.0000      0.976 1.000 0.000
#> GSM486787     1  0.0000      0.976 1.000 0.000
#> GSM486789     2  0.0000      0.962 0.000 1.000
#> GSM486791     1  0.0000      0.976 1.000 0.000
#> GSM486793     1  0.0000      0.976 1.000 0.000
#> GSM486795     1  0.2603      0.937 0.956 0.044
#> GSM486797     2  0.9580      0.413 0.380 0.620
#> GSM486799     1  0.0000      0.976 1.000 0.000
#> GSM486801     1  0.0000      0.976 1.000 0.000
#> GSM486803     1  0.0000      0.976 1.000 0.000
#> GSM486805     2  0.1414      0.947 0.020 0.980
#> GSM486807     1  0.0000      0.976 1.000 0.000
#> GSM486809     2  0.0000      0.962 0.000 1.000
#> GSM486811     1  0.0000      0.976 1.000 0.000
#> GSM486813     2  0.0000      0.962 0.000 1.000
#> GSM486815     1  0.0000      0.976 1.000 0.000
#> GSM486817     2  0.9286      0.498 0.344 0.656
#> GSM486819     2  0.9909      0.229 0.444 0.556
#> GSM486822     2  0.0000      0.962 0.000 1.000
#> GSM486824     1  0.0000      0.976 1.000 0.000
#> GSM486828     2  0.0000      0.962 0.000 1.000
#> GSM486831     1  0.0000      0.976 1.000 0.000
#> GSM486833     2  0.6048      0.821 0.148 0.852
#> GSM486835     1  0.0000      0.976 1.000 0.000
#> GSM486837     2  0.1184      0.951 0.016 0.984
#> GSM486839     1  0.0000      0.976 1.000 0.000
#> GSM486841     1  0.0000      0.976 1.000 0.000
#> GSM486843     1  0.0000      0.976 1.000 0.000
#> GSM486845     2  0.0000      0.962 0.000 1.000
#> GSM486847     1  0.0000      0.976 1.000 0.000
#> GSM486849     2  0.0000      0.962 0.000 1.000
#> GSM486851     1  0.0376      0.973 0.996 0.004
#> GSM486853     2  0.0000      0.962 0.000 1.000
#> GSM486855     2  0.0000      0.962 0.000 1.000
#> GSM486857     2  0.0000      0.962 0.000 1.000
#> GSM486736     2  0.0000      0.962 0.000 1.000
#> GSM486738     2  0.0000      0.962 0.000 1.000
#> GSM486740     2  0.0000      0.962 0.000 1.000
#> GSM486742     2  0.0000      0.962 0.000 1.000
#> GSM486744     2  0.0000      0.962 0.000 1.000
#> GSM486746     2  0.0000      0.962 0.000 1.000
#> GSM486748     1  0.0000      0.976 1.000 0.000
#> GSM486750     2  0.0000      0.962 0.000 1.000
#> GSM486752     1  0.5629      0.837 0.868 0.132
#> GSM486754     2  0.0000      0.962 0.000 1.000
#> GSM486756     2  0.0000      0.962 0.000 1.000
#> GSM486758     1  0.3114      0.925 0.944 0.056
#> GSM486760     1  0.0000      0.976 1.000 0.000
#> GSM486762     1  0.0000      0.976 1.000 0.000
#> GSM486764     2  0.6438      0.802 0.164 0.836
#> GSM486766     1  0.0000      0.976 1.000 0.000
#> GSM486768     2  0.0000      0.962 0.000 1.000
#> GSM486770     2  0.0000      0.962 0.000 1.000
#> GSM486772     2  0.0000      0.962 0.000 1.000
#> GSM486774     2  0.0000      0.962 0.000 1.000
#> GSM486776     1  0.0000      0.976 1.000 0.000
#> GSM486778     1  0.0000      0.976 1.000 0.000
#> GSM486780     2  0.0000      0.962 0.000 1.000
#> GSM486782     2  0.0000      0.962 0.000 1.000
#> GSM486784     2  0.0000      0.962 0.000 1.000
#> GSM486786     1  0.0000      0.976 1.000 0.000
#> GSM486788     1  0.0000      0.976 1.000 0.000
#> GSM486790     2  0.0000      0.962 0.000 1.000
#> GSM486792     1  0.0000      0.976 1.000 0.000
#> GSM486794     1  0.0000      0.976 1.000 0.000
#> GSM486796     1  0.0938      0.966 0.988 0.012
#> GSM486798     2  0.9460      0.452 0.364 0.636
#> GSM486800     1  0.0000      0.976 1.000 0.000
#> GSM486802     1  0.0000      0.976 1.000 0.000
#> GSM486804     1  0.0000      0.976 1.000 0.000
#> GSM486806     2  0.0000      0.962 0.000 1.000
#> GSM486808     1  0.0000      0.976 1.000 0.000
#> GSM486810     2  0.0000      0.962 0.000 1.000
#> GSM486812     1  0.0000      0.976 1.000 0.000
#> GSM486814     2  0.0000      0.962 0.000 1.000
#> GSM486816     1  0.0000      0.976 1.000 0.000
#> GSM486818     1  0.9795      0.259 0.584 0.416
#> GSM486821     2  0.7674      0.719 0.224 0.776
#> GSM486823     2  0.0000      0.962 0.000 1.000
#> GSM486826     1  0.0000      0.976 1.000 0.000
#> GSM486830     2  0.0000      0.962 0.000 1.000
#> GSM486832     1  0.0000      0.976 1.000 0.000
#> GSM486834     2  0.2423      0.930 0.040 0.960
#> GSM486836     1  0.0000      0.976 1.000 0.000
#> GSM486838     2  0.6343      0.806 0.160 0.840
#> GSM486840     1  0.0000      0.976 1.000 0.000
#> GSM486842     1  0.0000      0.976 1.000 0.000
#> GSM486844     1  0.0000      0.976 1.000 0.000
#> GSM486846     2  0.0000      0.962 0.000 1.000
#> GSM486848     1  0.0000      0.976 1.000 0.000
#> GSM486850     2  0.0000      0.962 0.000 1.000
#> GSM486852     1  0.1184      0.963 0.984 0.016
#> GSM486854     2  0.0000      0.962 0.000 1.000
#> GSM486856     2  0.0000      0.962 0.000 1.000
#> GSM486858     2  0.0000      0.962 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
#> GSM486735     1  0.3038     0.7049 0.896 0.104 0.000
#> GSM486737     2  0.3038     0.8158 0.104 0.896 0.000
#> GSM486739     1  0.2625     0.7047 0.916 0.084 0.000
#> GSM486741     2  0.4702     0.7446 0.212 0.788 0.000
#> GSM486743     2  0.2959     0.8119 0.100 0.900 0.000
#> GSM486745     1  0.4702     0.6672 0.788 0.212 0.000
#> GSM486747     3  0.3694     0.8669 0.052 0.052 0.896
#> GSM486749     1  0.5363     0.5560 0.724 0.276 0.000
#> GSM486751     3  0.7901     0.4681 0.312 0.080 0.608
#> GSM486753     2  0.5363     0.5983 0.276 0.724 0.000
#> GSM486755     2  0.5431     0.5675 0.284 0.716 0.000
#> GSM486757     1  0.6627     0.3570 0.644 0.020 0.336
#> GSM486759     3  0.1267     0.8984 0.024 0.004 0.972
#> GSM486761     3  0.2301     0.8851 0.060 0.004 0.936
#> GSM486763     1  0.1620     0.6923 0.964 0.024 0.012
#> GSM486765     3  0.0237     0.8998 0.004 0.000 0.996
#> GSM486767     1  0.6244     0.2562 0.560 0.440 0.000
#> GSM486769     1  0.3752     0.6973 0.856 0.144 0.000
#> GSM486771     2  0.3816     0.7731 0.148 0.852 0.000
#> GSM486773     1  0.5431     0.5335 0.716 0.284 0.000
#> GSM486775     3  0.0000     0.8997 0.000 0.000 1.000
#> GSM486777     3  0.3412     0.8481 0.124 0.000 0.876
#> GSM486779     2  0.2301     0.8022 0.060 0.936 0.004
#> GSM486781     2  0.4555     0.7426 0.200 0.800 0.000
#> GSM486783     2  0.1643     0.8200 0.044 0.956 0.000
#> GSM486785     3  0.3031     0.8745 0.076 0.012 0.912
#> GSM486787     3  0.0747     0.8995 0.016 0.000 0.984
#> GSM486789     2  0.6305     0.0186 0.484 0.516 0.000
#> GSM486791     1  0.6476     0.0558 0.548 0.004 0.448
#> GSM486793     3  0.2796     0.8676 0.092 0.000 0.908
#> GSM486795     3  0.6865     0.7299 0.160 0.104 0.736
#> GSM486797     3  0.9074     0.2254 0.352 0.148 0.500
#> GSM486799     3  0.0747     0.8995 0.016 0.000 0.984
#> GSM486801     3  0.2860     0.8789 0.084 0.004 0.912
#> GSM486803     3  0.3722     0.8677 0.088 0.024 0.888
#> GSM486805     2  0.7956     0.2128 0.424 0.516 0.060
#> GSM486807     3  0.0424     0.9000 0.008 0.000 0.992
#> GSM486809     1  0.1753     0.7007 0.952 0.048 0.000
#> GSM486811     3  0.1529     0.8934 0.040 0.000 0.960
#> GSM486813     2  0.2796     0.8137 0.092 0.908 0.000
#> GSM486815     3  0.2066     0.8851 0.060 0.000 0.940
#> GSM486817     2  0.7011     0.5397 0.092 0.720 0.188
#> GSM486819     1  0.4862     0.6334 0.820 0.020 0.160
#> GSM486822     1  0.4702     0.6561 0.788 0.212 0.000
#> GSM486824     3  0.3148     0.8807 0.048 0.036 0.916
#> GSM486828     1  0.6286     0.1530 0.536 0.464 0.000
#> GSM486831     3  0.1647     0.8954 0.036 0.004 0.960
#> GSM486833     1  0.3889     0.6781 0.884 0.032 0.084
#> GSM486835     3  0.0475     0.9001 0.004 0.004 0.992
#> GSM486837     2  0.3091     0.8011 0.072 0.912 0.016
#> GSM486839     3  0.1989     0.8916 0.048 0.004 0.948
#> GSM486841     3  0.2165     0.8862 0.064 0.000 0.936
#> GSM486843     3  0.3692     0.8675 0.056 0.048 0.896
#> GSM486845     2  0.5397     0.6713 0.280 0.720 0.000
#> GSM486847     3  0.2066     0.8897 0.060 0.000 0.940
#> GSM486849     2  0.3192     0.8216 0.112 0.888 0.000
#> GSM486851     1  0.4465     0.6299 0.820 0.004 0.176
#> GSM486853     2  0.2711     0.8249 0.088 0.912 0.000
#> GSM486855     2  0.1860     0.8131 0.052 0.948 0.000
#> GSM486857     2  0.2711     0.8163 0.088 0.912 0.000
#> GSM486736     1  0.3752     0.6968 0.856 0.144 0.000
#> GSM486738     2  0.1031     0.8295 0.024 0.976 0.000
#> GSM486740     1  0.4178     0.6856 0.828 0.172 0.000
#> GSM486742     2  0.2878     0.8182 0.096 0.904 0.000
#> GSM486744     2  0.0892     0.8286 0.020 0.980 0.000
#> GSM486746     1  0.6307     0.0666 0.512 0.488 0.000
#> GSM486748     3  0.6513     0.1274 0.004 0.476 0.520
#> GSM486750     2  0.6111     0.3545 0.396 0.604 0.000
#> GSM486752     3  0.6758     0.4289 0.020 0.360 0.620
#> GSM486754     2  0.2356     0.8260 0.072 0.928 0.000
#> GSM486756     2  0.2796     0.8164 0.092 0.908 0.000
#> GSM486758     3  0.2681     0.8720 0.040 0.028 0.932
#> GSM486760     3  0.0661     0.9000 0.004 0.008 0.988
#> GSM486762     3  0.1031     0.8952 0.000 0.024 0.976
#> GSM486764     1  0.3356     0.6993 0.908 0.056 0.036
#> GSM486766     3  0.0237     0.8996 0.000 0.004 0.996
#> GSM486768     2  0.3551     0.7986 0.132 0.868 0.000
#> GSM486770     1  0.4750     0.6518 0.784 0.216 0.000
#> GSM486772     2  0.1289     0.8299 0.032 0.968 0.000
#> GSM486774     2  0.4110     0.7755 0.152 0.844 0.004
#> GSM486776     3  0.0424     0.8994 0.000 0.008 0.992
#> GSM486778     3  0.0424     0.8994 0.008 0.000 0.992
#> GSM486780     2  0.1015     0.8220 0.012 0.980 0.008
#> GSM486782     2  0.2537     0.8225 0.080 0.920 0.000
#> GSM486784     2  0.0592     0.8264 0.012 0.988 0.000
#> GSM486786     3  0.0237     0.8996 0.000 0.004 0.996
#> GSM486788     3  0.0592     0.8987 0.000 0.012 0.988
#> GSM486790     2  0.5810     0.5066 0.336 0.664 0.000
#> GSM486792     3  0.6126     0.4563 0.352 0.004 0.644
#> GSM486794     3  0.0424     0.8994 0.008 0.000 0.992
#> GSM486796     3  0.6973     0.3387 0.020 0.416 0.564
#> GSM486798     2  0.7037     0.3743 0.036 0.636 0.328
#> GSM486800     3  0.0237     0.8996 0.000 0.004 0.996
#> GSM486802     3  0.0747     0.8976 0.000 0.016 0.984
#> GSM486804     3  0.3349     0.8413 0.004 0.108 0.888
#> GSM486806     2  0.3310     0.8205 0.064 0.908 0.028
#> GSM486808     3  0.0424     0.8994 0.000 0.008 0.992
#> GSM486810     1  0.3038     0.7046 0.896 0.104 0.000
#> GSM486812     3  0.0237     0.8998 0.004 0.000 0.996
#> GSM486814     2  0.1647     0.8220 0.036 0.960 0.004
#> GSM486816     3  0.0424     0.8994 0.008 0.000 0.992
#> GSM486818     2  0.4514     0.6667 0.012 0.832 0.156
#> GSM486821     1  0.8844     0.1752 0.444 0.116 0.440
#> GSM486823     1  0.6192     0.2790 0.580 0.420 0.000
#> GSM486826     3  0.2860     0.8601 0.004 0.084 0.912
#> GSM486830     2  0.4605     0.7307 0.204 0.796 0.000
#> GSM486832     3  0.0661     0.8997 0.008 0.004 0.988
#> GSM486834     1  0.9556     0.2977 0.460 0.332 0.208
#> GSM486836     3  0.1525     0.8931 0.004 0.032 0.964
#> GSM486838     2  0.2939     0.7852 0.012 0.916 0.072
#> GSM486840     3  0.0747     0.8976 0.000 0.016 0.984
#> GSM486842     3  0.0237     0.8998 0.004 0.000 0.996
#> GSM486844     3  0.4887     0.7020 0.000 0.228 0.772
#> GSM486846     2  0.2584     0.8259 0.064 0.928 0.008
#> GSM486848     3  0.0661     0.8998 0.004 0.008 0.988
#> GSM486850     2  0.1643     0.8298 0.044 0.956 0.000
#> GSM486852     1  0.5480     0.5455 0.732 0.004 0.264
#> GSM486854     2  0.1031     0.8293 0.024 0.976 0.000
#> GSM486856     2  0.1015     0.8241 0.012 0.980 0.008
#> GSM486858     2  0.1950     0.8288 0.040 0.952 0.008

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM486735     4  0.1576    0.79417 0.048 0.004 0.000 0.948
#> GSM486737     2  0.4697    0.43560 0.356 0.644 0.000 0.000
#> GSM486739     4  0.0524    0.79590 0.008 0.004 0.000 0.988
#> GSM486741     2  0.5881    0.39882 0.420 0.544 0.000 0.036
#> GSM486743     2  0.3032    0.68612 0.124 0.868 0.000 0.008
#> GSM486745     4  0.5260    0.69639 0.092 0.144 0.004 0.760
#> GSM486747     1  0.5508    0.24268 0.572 0.020 0.408 0.000
#> GSM486749     1  0.4093    0.61684 0.832 0.096 0.000 0.072
#> GSM486751     1  0.2546    0.68557 0.900 0.008 0.092 0.000
#> GSM486753     2  0.5122    0.66517 0.080 0.756 0.000 0.164
#> GSM486755     2  0.5628    0.61677 0.080 0.704 0.000 0.216
#> GSM486757     1  0.2741    0.68020 0.892 0.000 0.096 0.012
#> GSM486759     3  0.3829    0.77440 0.152 0.004 0.828 0.016
#> GSM486761     1  0.4972    0.09754 0.544 0.000 0.456 0.000
#> GSM486763     4  0.2654    0.75979 0.108 0.000 0.004 0.888
#> GSM486765     3  0.1022    0.83078 0.032 0.000 0.968 0.000
#> GSM486767     1  0.7728   -0.00752 0.412 0.392 0.004 0.192
#> GSM486769     4  0.1938    0.79198 0.052 0.012 0.000 0.936
#> GSM486771     2  0.4284    0.61734 0.200 0.780 0.000 0.020
#> GSM486773     1  0.3764    0.63484 0.852 0.072 0.000 0.076
#> GSM486775     3  0.1211    0.82919 0.040 0.000 0.960 0.000
#> GSM486777     3  0.5168    0.08654 0.496 0.000 0.500 0.004
#> GSM486779     2  0.5317    0.06623 0.460 0.532 0.004 0.004
#> GSM486781     2  0.6130    0.34023 0.440 0.512 0.000 0.048
#> GSM486783     2  0.1398    0.72032 0.040 0.956 0.000 0.004
#> GSM486785     1  0.4072    0.54849 0.748 0.000 0.252 0.000
#> GSM486787     3  0.2281    0.81357 0.096 0.000 0.904 0.000
#> GSM486789     2  0.6926    0.22390 0.108 0.460 0.000 0.432
#> GSM486791     4  0.6100    0.49294 0.084 0.000 0.272 0.644
#> GSM486793     3  0.3583    0.74126 0.180 0.000 0.816 0.004
#> GSM486795     1  0.4137    0.62758 0.848 0.088 0.036 0.028
#> GSM486797     1  0.2546    0.68548 0.900 0.008 0.092 0.000
#> GSM486799     3  0.2401    0.81268 0.092 0.000 0.904 0.004
#> GSM486801     3  0.6118    0.37914 0.404 0.024 0.556 0.016
#> GSM486803     3  0.6435    0.22232 0.448 0.036 0.500 0.016
#> GSM486805     1  0.3338    0.67349 0.884 0.052 0.056 0.008
#> GSM486807     3  0.1792    0.82010 0.068 0.000 0.932 0.000
#> GSM486809     4  0.1474    0.79437 0.052 0.000 0.000 0.948
#> GSM486811     3  0.3569    0.72902 0.196 0.000 0.804 0.000
#> GSM486813     2  0.5773    0.22820 0.408 0.564 0.004 0.024
#> GSM486815     3  0.2868    0.77907 0.136 0.000 0.864 0.000
#> GSM486817     1  0.5513    0.40657 0.628 0.348 0.016 0.008
#> GSM486819     1  0.6313    0.32975 0.632 0.020 0.048 0.300
#> GSM486822     4  0.5522    0.60553 0.204 0.080 0.000 0.716
#> GSM486824     3  0.5383    0.58634 0.292 0.036 0.672 0.000
#> GSM486828     1  0.6773    0.23975 0.584 0.284 0.000 0.132
#> GSM486831     3  0.3606    0.78516 0.132 0.000 0.844 0.024
#> GSM486833     1  0.3505    0.65360 0.864 0.000 0.048 0.088
#> GSM486835     3  0.2412    0.81512 0.084 0.000 0.908 0.008
#> GSM486837     2  0.5257    0.32192 0.444 0.548 0.008 0.000
#> GSM486839     3  0.4699    0.57273 0.320 0.000 0.676 0.004
#> GSM486841     3  0.4522    0.55373 0.320 0.000 0.680 0.000
#> GSM486843     1  0.6016    0.12491 0.544 0.044 0.412 0.000
#> GSM486845     1  0.4342    0.54522 0.784 0.196 0.012 0.008
#> GSM486847     3  0.4889    0.50126 0.360 0.000 0.636 0.004
#> GSM486849     2  0.5039    0.44375 0.404 0.592 0.000 0.004
#> GSM486851     4  0.4955    0.67924 0.144 0.000 0.084 0.772
#> GSM486853     2  0.4543    0.56539 0.324 0.676 0.000 0.000
#> GSM486855     2  0.3538    0.65490 0.160 0.832 0.004 0.004
#> GSM486857     1  0.4304    0.40207 0.716 0.284 0.000 0.000
#> GSM486736     4  0.1545    0.79490 0.040 0.008 0.000 0.952
#> GSM486738     2  0.1059    0.73040 0.016 0.972 0.000 0.012
#> GSM486740     4  0.0937    0.79645 0.012 0.012 0.000 0.976
#> GSM486742     2  0.3143    0.72424 0.100 0.876 0.000 0.024
#> GSM486744     2  0.0967    0.72939 0.004 0.976 0.004 0.016
#> GSM486746     4  0.4849    0.67501 0.036 0.200 0.004 0.760
#> GSM486748     2  0.6504    0.11834 0.072 0.476 0.452 0.000
#> GSM486750     2  0.6898    0.39260 0.116 0.524 0.000 0.360
#> GSM486752     3  0.6986    0.31470 0.092 0.296 0.592 0.020
#> GSM486754     2  0.2300    0.73330 0.028 0.924 0.000 0.048
#> GSM486756     2  0.2773    0.72985 0.028 0.900 0.000 0.072
#> GSM486758     3  0.4260    0.71689 0.080 0.016 0.840 0.064
#> GSM486760     3  0.1229    0.82903 0.020 0.004 0.968 0.008
#> GSM486762     3  0.0779    0.83070 0.016 0.004 0.980 0.000
#> GSM486764     4  0.1305    0.78926 0.036 0.000 0.004 0.960
#> GSM486766     3  0.0336    0.83205 0.008 0.000 0.992 0.000
#> GSM486768     2  0.4821    0.67355 0.036 0.804 0.032 0.128
#> GSM486770     4  0.2214    0.78582 0.044 0.028 0.000 0.928
#> GSM486772     2  0.0895    0.72913 0.000 0.976 0.004 0.020
#> GSM486774     2  0.6223    0.67672 0.112 0.732 0.052 0.104
#> GSM486776     3  0.0336    0.83298 0.008 0.000 0.992 0.000
#> GSM486778     3  0.0336    0.83240 0.008 0.000 0.992 0.000
#> GSM486780     2  0.0804    0.72192 0.012 0.980 0.008 0.000
#> GSM486782     2  0.3702    0.72270 0.100 0.860 0.012 0.028
#> GSM486784     2  0.0188    0.72467 0.004 0.996 0.000 0.000
#> GSM486786     3  0.0336    0.83205 0.008 0.000 0.992 0.000
#> GSM486788     3  0.0779    0.83206 0.016 0.004 0.980 0.000
#> GSM486790     2  0.6383    0.54689 0.096 0.612 0.000 0.292
#> GSM486792     4  0.5277    0.52574 0.028 0.000 0.304 0.668
#> GSM486794     3  0.0336    0.83205 0.008 0.000 0.992 0.000
#> GSM486796     3  0.6974    0.18321 0.048 0.420 0.500 0.032
#> GSM486798     2  0.7133    0.27481 0.072 0.512 0.392 0.024
#> GSM486800     3  0.1042    0.82986 0.020 0.000 0.972 0.008
#> GSM486802     3  0.1486    0.82948 0.024 0.008 0.960 0.008
#> GSM486804     3  0.4691    0.70912 0.044 0.136 0.804 0.016
#> GSM486806     2  0.6166    0.63082 0.104 0.720 0.148 0.028
#> GSM486808     3  0.0336    0.83205 0.008 0.000 0.992 0.000
#> GSM486810     4  0.1118    0.79550 0.036 0.000 0.000 0.964
#> GSM486812     3  0.0469    0.83247 0.012 0.000 0.988 0.000
#> GSM486814     2  0.1486    0.71737 0.024 0.960 0.008 0.008
#> GSM486816     3  0.0188    0.83259 0.004 0.000 0.996 0.000
#> GSM486818     2  0.4831    0.56786 0.016 0.772 0.188 0.024
#> GSM486821     4  0.6768    0.55458 0.056 0.044 0.264 0.636
#> GSM486823     4  0.6033    0.51480 0.116 0.204 0.000 0.680
#> GSM486826     3  0.2402    0.79790 0.012 0.076 0.912 0.000
#> GSM486830     2  0.6999    0.63059 0.116 0.664 0.048 0.172
#> GSM486832     3  0.1575    0.82502 0.028 0.004 0.956 0.012
#> GSM486834     4  0.7983    0.45180 0.116 0.064 0.268 0.552
#> GSM486836     3  0.1721    0.82422 0.028 0.012 0.952 0.008
#> GSM486838     2  0.3810    0.70902 0.092 0.848 0.060 0.000
#> GSM486840     3  0.0672    0.83403 0.008 0.008 0.984 0.000
#> GSM486842     3  0.0336    0.83205 0.008 0.000 0.992 0.000
#> GSM486844     3  0.4482    0.56533 0.008 0.264 0.728 0.000
#> GSM486846     2  0.3974    0.71843 0.092 0.852 0.040 0.016
#> GSM486848     3  0.0657    0.83357 0.012 0.004 0.984 0.000
#> GSM486850     2  0.2861    0.72684 0.092 0.892 0.004 0.012
#> GSM486852     4  0.2926    0.76967 0.048 0.000 0.056 0.896
#> GSM486854     2  0.2149    0.72611 0.088 0.912 0.000 0.000
#> GSM486856     2  0.0804    0.72192 0.012 0.980 0.008 0.000
#> GSM486858     2  0.3126    0.72547 0.092 0.884 0.016 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
#> GSM486735     5  0.3906    0.65627 0.000 0.000 0.292 0.004 0.704
#> GSM486737     3  0.6794    0.00414 0.000 0.320 0.380 0.300 0.000
#> GSM486739     5  0.2719    0.71637 0.000 0.004 0.144 0.000 0.852
#> GSM486741     3  0.5817    0.45969 0.000 0.204 0.612 0.184 0.000
#> GSM486743     2  0.5685    0.49652 0.000 0.620 0.284 0.084 0.012
#> GSM486745     5  0.5117    0.64518 0.004 0.204 0.096 0.000 0.696
#> GSM486747     1  0.4941    0.57446 0.708 0.000 0.208 0.080 0.004
#> GSM486749     4  0.5289    0.17016 0.000 0.012 0.424 0.536 0.028
#> GSM486751     4  0.6742    0.39635 0.296 0.000 0.292 0.412 0.000
#> GSM486753     3  0.5704    0.45206 0.000 0.252 0.648 0.028 0.072
#> GSM486755     3  0.5136    0.45365 0.000 0.252 0.676 0.008 0.064
#> GSM486757     4  0.5372    0.57610 0.180 0.000 0.152 0.668 0.000
#> GSM486759     1  0.4826    0.70557 0.772 0.048 0.000 0.104 0.076
#> GSM486761     1  0.3904    0.69848 0.792 0.000 0.052 0.156 0.000
#> GSM486763     5  0.2682    0.71035 0.032 0.020 0.016 0.024 0.908
#> GSM486765     1  0.1648    0.77778 0.940 0.000 0.040 0.020 0.000
#> GSM486767     2  0.8007    0.14745 0.004 0.424 0.092 0.260 0.220
#> GSM486769     5  0.4201    0.49130 0.000 0.000 0.408 0.000 0.592
#> GSM486771     2  0.4103    0.65382 0.000 0.800 0.132 0.056 0.012
#> GSM486773     3  0.5167    0.06220 0.000 0.004 0.564 0.396 0.036
#> GSM486775     1  0.1200    0.78556 0.964 0.008 0.012 0.016 0.000
#> GSM486777     1  0.4669    0.44627 0.628 0.000 0.008 0.352 0.012
#> GSM486779     2  0.4536    0.55275 0.000 0.712 0.048 0.240 0.000
#> GSM486781     3  0.4820    0.53874 0.000 0.100 0.748 0.140 0.012
#> GSM486783     2  0.4161    0.61637 0.000 0.752 0.208 0.040 0.000
#> GSM486785     4  0.3944    0.49314 0.272 0.004 0.004 0.720 0.000
#> GSM486787     1  0.3394    0.75767 0.864 0.040 0.000 0.044 0.052
#> GSM486789     3  0.4288    0.51432 0.000 0.052 0.764 0.004 0.180
#> GSM486791     5  0.3088    0.68507 0.068 0.044 0.004 0.008 0.876
#> GSM486793     1  0.2349    0.76977 0.900 0.000 0.012 0.084 0.004
#> GSM486795     4  0.4037    0.42447 0.020 0.184 0.000 0.780 0.016
#> GSM486797     4  0.4959    0.56661 0.128 0.004 0.144 0.724 0.000
#> GSM486799     1  0.3081    0.76823 0.880 0.028 0.000 0.044 0.048
#> GSM486801     4  0.7173    0.33052 0.300 0.088 0.000 0.508 0.104
#> GSM486803     4  0.7522    0.38493 0.276 0.144 0.000 0.484 0.096
#> GSM486805     3  0.6149   -0.11730 0.120 0.004 0.504 0.372 0.000
#> GSM486807     1  0.2381    0.77368 0.908 0.004 0.052 0.036 0.000
#> GSM486809     5  0.3607    0.68932 0.000 0.000 0.244 0.004 0.752
#> GSM486811     1  0.3014    0.75739 0.868 0.004 0.008 0.104 0.016
#> GSM486813     2  0.4796    0.59565 0.000 0.744 0.052 0.180 0.024
#> GSM486815     1  0.2241    0.77187 0.908 0.000 0.008 0.076 0.008
#> GSM486817     2  0.6383    0.13206 0.016 0.456 0.072 0.444 0.012
#> GSM486819     5  0.6586    0.42773 0.044 0.232 0.000 0.136 0.588
#> GSM486822     3  0.4928    0.31285 0.000 0.012 0.684 0.040 0.264
#> GSM486824     1  0.6908    0.02647 0.456 0.200 0.000 0.328 0.016
#> GSM486828     3  0.6921    0.38440 0.000 0.164 0.576 0.192 0.068
#> GSM486831     1  0.5864    0.57249 0.672 0.076 0.000 0.056 0.196
#> GSM486833     4  0.6925    0.27507 0.092 0.000 0.400 0.448 0.060
#> GSM486835     1  0.5045    0.68559 0.756 0.088 0.004 0.032 0.120
#> GSM486837     3  0.7218    0.08045 0.012 0.300 0.396 0.288 0.004
#> GSM486839     1  0.5542    0.41268 0.592 0.052 0.004 0.344 0.008
#> GSM486841     1  0.3550    0.65440 0.760 0.000 0.004 0.236 0.000
#> GSM486843     4  0.5640    0.45871 0.276 0.116 0.000 0.608 0.000
#> GSM486845     4  0.5369    0.28147 0.004 0.072 0.296 0.628 0.000
#> GSM486847     1  0.5212    0.25530 0.540 0.036 0.000 0.420 0.004
#> GSM486849     2  0.6273    0.23438 0.000 0.500 0.336 0.164 0.000
#> GSM486851     5  0.3946    0.66459 0.064 0.100 0.000 0.016 0.820
#> GSM486853     3  0.5802    0.17449 0.000 0.388 0.516 0.096 0.000
#> GSM486855     2  0.3339    0.64686 0.000 0.852 0.072 0.072 0.004
#> GSM486857     4  0.5580    0.13704 0.000 0.088 0.336 0.576 0.000
#> GSM486736     5  0.3707    0.66364 0.000 0.000 0.284 0.000 0.716
#> GSM486738     2  0.4306    0.07405 0.000 0.508 0.492 0.000 0.000
#> GSM486740     5  0.2920    0.72188 0.000 0.016 0.132 0.000 0.852
#> GSM486742     3  0.3796    0.43233 0.000 0.300 0.700 0.000 0.000
#> GSM486744     2  0.3932    0.47821 0.000 0.672 0.328 0.000 0.000
#> GSM486746     5  0.4785    0.68538 0.004 0.140 0.116 0.000 0.740
#> GSM486748     1  0.4825    0.46386 0.652 0.024 0.316 0.004 0.004
#> GSM486750     3  0.3657    0.53715 0.000 0.064 0.820 0.000 0.116
#> GSM486752     1  0.4268    0.22645 0.556 0.000 0.444 0.000 0.000
#> GSM486754     3  0.4367    0.31650 0.000 0.372 0.620 0.000 0.008
#> GSM486756     3  0.4101    0.37216 0.000 0.332 0.664 0.000 0.004
#> GSM486758     1  0.5191    0.33154 0.588 0.008 0.376 0.008 0.020
#> GSM486760     1  0.2593    0.77443 0.904 0.048 0.004 0.008 0.036
#> GSM486762     1  0.2729    0.74872 0.876 0.004 0.108 0.008 0.004
#> GSM486764     5  0.2963    0.70838 0.044 0.048 0.016 0.004 0.888
#> GSM486766     1  0.1662    0.77214 0.936 0.000 0.056 0.004 0.004
#> GSM486768     2  0.5986    0.40890 0.012 0.596 0.296 0.004 0.092
#> GSM486770     5  0.4264    0.54440 0.000 0.004 0.376 0.000 0.620
#> GSM486772     2  0.3163    0.64484 0.000 0.824 0.164 0.000 0.012
#> GSM486774     3  0.2227    0.55130 0.032 0.048 0.916 0.000 0.004
#> GSM486776     1  0.1469    0.78306 0.948 0.016 0.036 0.000 0.000
#> GSM486778     1  0.2386    0.78325 0.916 0.016 0.008 0.012 0.048
#> GSM486780     2  0.2629    0.65168 0.000 0.860 0.136 0.000 0.004
#> GSM486782     3  0.3462    0.51510 0.000 0.196 0.792 0.000 0.012
#> GSM486784     2  0.3305    0.61049 0.000 0.776 0.224 0.000 0.000
#> GSM486786     1  0.1243    0.78251 0.960 0.000 0.028 0.008 0.004
#> GSM486788     1  0.2814    0.77200 0.892 0.056 0.004 0.008 0.040
#> GSM486790     3  0.4406    0.53833 0.000 0.108 0.764 0.000 0.128
#> GSM486792     5  0.2915    0.68240 0.092 0.024 0.004 0.004 0.876
#> GSM486794     1  0.1605    0.77973 0.944 0.000 0.040 0.012 0.004
#> GSM486796     2  0.4574    0.43426 0.140 0.776 0.016 0.004 0.064
#> GSM486798     3  0.5836    0.04078 0.428 0.060 0.500 0.008 0.004
#> GSM486800     1  0.1978    0.78018 0.932 0.032 0.000 0.012 0.024
#> GSM486802     1  0.4735    0.69076 0.756 0.132 0.000 0.012 0.100
#> GSM486804     1  0.6252    0.25169 0.492 0.404 0.008 0.008 0.088
#> GSM486806     3  0.4537    0.44191 0.176 0.060 0.756 0.004 0.004
#> GSM486808     1  0.2084    0.77088 0.920 0.004 0.064 0.008 0.004
#> GSM486810     5  0.3752    0.66297 0.000 0.000 0.292 0.000 0.708
#> GSM486812     1  0.1095    0.78355 0.968 0.000 0.012 0.012 0.008
#> GSM486814     2  0.2293    0.64137 0.000 0.900 0.084 0.000 0.016
#> GSM486816     1  0.1173    0.78241 0.964 0.000 0.020 0.012 0.004
#> GSM486818     2  0.5725    0.52821 0.088 0.672 0.212 0.004 0.024
#> GSM486821     5  0.5869    0.44130 0.068 0.344 0.012 0.004 0.572
#> GSM486823     3  0.3805    0.47843 0.000 0.032 0.784 0.000 0.184
#> GSM486826     1  0.3566    0.72984 0.812 0.160 0.024 0.000 0.004
#> GSM486830     3  0.4499    0.53656 0.024 0.120 0.784 0.000 0.072
#> GSM486832     1  0.3654    0.75028 0.844 0.052 0.008 0.008 0.088
#> GSM486834     3  0.4277    0.35355 0.156 0.000 0.768 0.000 0.076
#> GSM486836     1  0.4852    0.70887 0.768 0.132 0.024 0.008 0.068
#> GSM486838     3  0.5327   -0.01099 0.032 0.452 0.508 0.004 0.004
#> GSM486840     1  0.2555    0.78071 0.900 0.072 0.016 0.004 0.008
#> GSM486842     1  0.0865    0.78248 0.972 0.000 0.024 0.004 0.000
#> GSM486844     1  0.5045    0.56748 0.672 0.276 0.040 0.008 0.004
#> GSM486846     3  0.4745    0.14154 0.012 0.424 0.560 0.000 0.004
#> GSM486848     1  0.2061    0.78442 0.924 0.056 0.004 0.004 0.012
#> GSM486850     2  0.4321    0.26587 0.000 0.600 0.396 0.000 0.004
#> GSM486852     5  0.3888    0.65812 0.072 0.112 0.000 0.004 0.812
#> GSM486854     3  0.4283    0.12947 0.000 0.456 0.544 0.000 0.000
#> GSM486856     2  0.2280    0.65363 0.000 0.880 0.120 0.000 0.000
#> GSM486858     3  0.4135    0.35696 0.000 0.340 0.656 0.000 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
#> GSM486735     5   0.475    0.36691 0.000 0.000 0.048 0.000 0.496 0.456
#> GSM486737     2   0.745   -0.02267 0.000 0.372 0.140 0.124 0.016 0.348
#> GSM486739     5   0.527    0.49961 0.000 0.012 0.084 0.000 0.576 0.328
#> GSM486741     6   0.669    0.17867 0.000 0.192 0.180 0.104 0.000 0.524
#> GSM486743     2   0.643    0.32880 0.000 0.504 0.320 0.076 0.004 0.096
#> GSM486745     5   0.779    0.32072 0.000 0.128 0.184 0.032 0.408 0.248
#> GSM486747     1   0.450    0.59926 0.720 0.000 0.200 0.020 0.000 0.060
#> GSM486749     6   0.577    0.20703 0.000 0.024 0.080 0.356 0.008 0.532
#> GSM486751     4   0.736    0.31203 0.292 0.000 0.120 0.360 0.000 0.228
#> GSM486753     6   0.671    0.11212 0.000 0.192 0.280 0.016 0.032 0.480
#> GSM486755     6   0.509    0.28038 0.000 0.280 0.064 0.012 0.008 0.636
#> GSM486757     4   0.620    0.35370 0.196 0.000 0.028 0.516 0.000 0.260
#> GSM486759     1   0.479    0.69400 0.764 0.024 0.036 0.088 0.084 0.004
#> GSM486761     1   0.383    0.69033 0.800 0.000 0.072 0.108 0.000 0.020
#> GSM486763     5   0.283    0.61348 0.020 0.016 0.004 0.004 0.876 0.080
#> GSM486765     1   0.170    0.74327 0.936 0.000 0.040 0.008 0.004 0.012
#> GSM486767     5   0.812    0.03883 0.000 0.212 0.188 0.224 0.344 0.032
#> GSM486769     6   0.470   -0.13697 0.000 0.000 0.052 0.000 0.380 0.568
#> GSM486771     2   0.520    0.53578 0.000 0.712 0.144 0.084 0.016 0.044
#> GSM486773     4   0.635   -0.10407 0.000 0.000 0.284 0.404 0.012 0.300
#> GSM486775     1   0.127    0.75088 0.960 0.004 0.012 0.008 0.012 0.004
#> GSM486777     1   0.479    0.50242 0.652 0.000 0.012 0.288 0.040 0.008
#> GSM486779     2   0.495    0.43465 0.000 0.640 0.052 0.288 0.016 0.004
#> GSM486781     3   0.544    0.31427 0.000 0.012 0.620 0.128 0.004 0.236
#> GSM486783     2   0.486    0.49498 0.000 0.696 0.200 0.028 0.000 0.076
#> GSM486785     4   0.416    0.27441 0.376 0.000 0.004 0.608 0.000 0.012
#> GSM486787     1   0.451    0.71113 0.784 0.020 0.040 0.060 0.092 0.004
#> GSM486789     6   0.644    0.15713 0.000 0.068 0.316 0.008 0.096 0.512
#> GSM486791     5   0.299    0.60622 0.076 0.000 0.012 0.012 0.868 0.032
#> GSM486793     1   0.213    0.74731 0.920 0.000 0.012 0.036 0.012 0.020
#> GSM486795     4   0.477    0.31193 0.036 0.220 0.012 0.708 0.008 0.016
#> GSM486797     4   0.399    0.43568 0.088 0.000 0.048 0.800 0.000 0.064
#> GSM486799     1   0.325    0.74512 0.852 0.004 0.020 0.032 0.088 0.004
#> GSM486801     4   0.685    0.14216 0.360 0.036 0.036 0.456 0.108 0.004
#> GSM486803     4   0.706    0.36375 0.264 0.064 0.064 0.516 0.092 0.000
#> GSM486805     3   0.704    0.04073 0.084 0.000 0.424 0.316 0.004 0.172
#> GSM486807     1   0.310    0.71134 0.832 0.000 0.136 0.012 0.000 0.020
#> GSM486809     5   0.456    0.45223 0.000 0.000 0.040 0.000 0.568 0.392
#> GSM486811     1   0.326    0.73982 0.860 0.004 0.028 0.068 0.032 0.008
#> GSM486813     2   0.429    0.52672 0.000 0.784 0.032 0.124 0.024 0.036
#> GSM486815     1   0.216    0.74848 0.920 0.000 0.016 0.020 0.028 0.016
#> GSM486817     4   0.711   -0.15361 0.004 0.316 0.244 0.388 0.016 0.032
#> GSM486819     5   0.545    0.49293 0.028 0.108 0.056 0.100 0.708 0.000
#> GSM486822     6   0.516    0.32596 0.000 0.024 0.220 0.008 0.076 0.672
#> GSM486824     1   0.751    0.07968 0.436 0.228 0.040 0.240 0.052 0.004
#> GSM486828     3   0.607    0.31261 0.004 0.096 0.620 0.032 0.028 0.220
#> GSM486831     1   0.634    0.39358 0.536 0.012 0.060 0.064 0.320 0.008
#> GSM486833     6   0.655   -0.05530 0.104 0.000 0.064 0.360 0.008 0.464
#> GSM486835     1   0.622    0.62950 0.660 0.048 0.116 0.056 0.112 0.008
#> GSM486837     3   0.550    0.32708 0.008 0.092 0.616 0.268 0.004 0.012
#> GSM486839     1   0.581    0.40343 0.564 0.020 0.036 0.328 0.052 0.000
#> GSM486841     1   0.329    0.67538 0.784 0.000 0.008 0.200 0.008 0.000
#> GSM486843     4   0.638    0.33547 0.304 0.064 0.068 0.540 0.024 0.000
#> GSM486845     4   0.549   -0.03835 0.000 0.020 0.368 0.540 0.004 0.068
#> GSM486847     1   0.554    0.43415 0.616 0.024 0.020 0.292 0.040 0.008
#> GSM486849     2   0.713    0.15249 0.000 0.380 0.336 0.104 0.000 0.180
#> GSM486851     5   0.211    0.61541 0.032 0.028 0.008 0.012 0.920 0.000
#> GSM486853     3   0.717    0.18650 0.000 0.280 0.412 0.108 0.000 0.200
#> GSM486855     2   0.598    0.38078 0.000 0.556 0.300 0.108 0.020 0.016
#> GSM486857     4   0.506    0.18612 0.000 0.024 0.220 0.668 0.000 0.088
#> GSM486736     5   0.474    0.39434 0.000 0.000 0.048 0.000 0.516 0.436
#> GSM486738     2   0.588    0.18826 0.000 0.512 0.160 0.000 0.012 0.316
#> GSM486740     5   0.514    0.52156 0.000 0.012 0.084 0.000 0.612 0.292
#> GSM486742     6   0.583    0.10827 0.000 0.304 0.216 0.000 0.000 0.480
#> GSM486744     2   0.501    0.41037 0.000 0.600 0.300 0.000 0.000 0.100
#> GSM486746     5   0.728    0.36681 0.000 0.092 0.192 0.016 0.456 0.244
#> GSM486748     1   0.552    0.45006 0.612 0.024 0.244 0.000 0.000 0.120
#> GSM486750     6   0.463    0.27470 0.000 0.072 0.256 0.000 0.004 0.668
#> GSM486752     1   0.512    0.49378 0.652 0.008 0.148 0.000 0.000 0.192
#> GSM486754     6   0.616   -0.06575 0.000 0.360 0.248 0.000 0.004 0.388
#> GSM486756     6   0.509    0.11283 0.000 0.364 0.076 0.000 0.004 0.556
#> GSM486758     1   0.554    0.27374 0.536 0.008 0.084 0.004 0.004 0.364
#> GSM486760     1   0.302    0.74448 0.872 0.008 0.036 0.016 0.064 0.004
#> GSM486762     1   0.337    0.70690 0.820 0.004 0.132 0.000 0.004 0.040
#> GSM486764     5   0.317    0.61455 0.024 0.032 0.016 0.000 0.864 0.064
#> GSM486766     1   0.204    0.73466 0.908 0.000 0.072 0.000 0.004 0.016
#> GSM486768     3   0.764    0.00538 0.000 0.264 0.360 0.020 0.264 0.092
#> GSM486770     6   0.503   -0.12281 0.000 0.004 0.068 0.000 0.376 0.552
#> GSM486772     2   0.381    0.55950 0.004 0.784 0.132 0.000 0.000 0.080
#> GSM486774     3   0.500    0.20410 0.044 0.020 0.588 0.000 0.000 0.348
#> GSM486776     1   0.155    0.75133 0.944 0.004 0.032 0.000 0.012 0.008
#> GSM486778     1   0.304    0.74413 0.864 0.008 0.032 0.004 0.084 0.008
#> GSM486780     2   0.356    0.53646 0.000 0.836 0.092 0.020 0.024 0.028
#> GSM486782     3   0.496    0.23778 0.004 0.072 0.592 0.000 0.000 0.332
#> GSM486784     2   0.437    0.47754 0.000 0.720 0.164 0.000 0.000 0.116
#> GSM486786     1   0.211    0.75169 0.920 0.012 0.032 0.000 0.008 0.028
#> GSM486788     1   0.400    0.72674 0.816 0.024 0.052 0.020 0.084 0.004
#> GSM486790     6   0.633    0.10576 0.000 0.088 0.348 0.000 0.080 0.484
#> GSM486792     5   0.318    0.60623 0.084 0.000 0.008 0.004 0.848 0.056
#> GSM486794     1   0.158    0.74891 0.944 0.000 0.020 0.004 0.008 0.024
#> GSM486796     2   0.539    0.43666 0.100 0.728 0.084 0.008 0.036 0.044
#> GSM486798     1   0.605    0.28154 0.532 0.028 0.284 0.000 0.000 0.156
#> GSM486800     1   0.291    0.74195 0.872 0.004 0.020 0.020 0.080 0.004
#> GSM486802     1   0.512    0.68334 0.736 0.080 0.040 0.024 0.116 0.004
#> GSM486804     1   0.675    0.34908 0.512 0.304 0.084 0.020 0.076 0.004
#> GSM486806     3   0.515    0.29370 0.172 0.004 0.640 0.000 0.000 0.184
#> GSM486808     1   0.286    0.70155 0.828 0.000 0.156 0.000 0.000 0.016
#> GSM486810     5   0.474    0.38146 0.000 0.008 0.032 0.000 0.524 0.436
#> GSM486812     1   0.204    0.75195 0.924 0.004 0.036 0.004 0.024 0.008
#> GSM486814     2   0.360    0.53407 0.000 0.828 0.084 0.004 0.024 0.060
#> GSM486816     1   0.207    0.74928 0.920 0.000 0.024 0.004 0.012 0.040
#> GSM486818     3   0.659   -0.09348 0.052 0.344 0.512 0.020 0.032 0.040
#> GSM486821     5   0.518    0.51386 0.028 0.152 0.080 0.020 0.716 0.004
#> GSM486823     6   0.528    0.31057 0.000 0.052 0.240 0.000 0.060 0.648
#> GSM486826     1   0.563    0.52850 0.640 0.256 0.024 0.020 0.020 0.040
#> GSM486830     3   0.512    0.31535 0.004 0.068 0.656 0.000 0.024 0.248
#> GSM486832     1   0.455    0.69651 0.756 0.008 0.056 0.020 0.152 0.008
#> GSM486834     6   0.597    0.07485 0.312 0.000 0.164 0.000 0.016 0.508
#> GSM486836     1   0.536    0.67971 0.720 0.052 0.128 0.020 0.072 0.008
#> GSM486838     3   0.453    0.27576 0.012 0.272 0.672 0.000 0.000 0.044
#> GSM486840     1   0.416    0.73360 0.808 0.080 0.052 0.016 0.040 0.004
#> GSM486842     1   0.160    0.74939 0.940 0.000 0.040 0.004 0.008 0.008
#> GSM486844     1   0.576    0.56653 0.640 0.208 0.108 0.020 0.020 0.004
#> GSM486846     3   0.495    0.35630 0.012 0.220 0.676 0.000 0.004 0.088
#> GSM486848     1   0.366    0.73697 0.832 0.084 0.020 0.000 0.044 0.020
#> GSM486850     2   0.570    0.28466 0.004 0.500 0.344 0.000 0.000 0.152
#> GSM486852     5   0.241    0.61500 0.032 0.036 0.012 0.004 0.908 0.008
#> GSM486854     3   0.589    0.06425 0.000 0.368 0.428 0.000 0.000 0.204
#> GSM486856     2   0.410    0.42749 0.000 0.664 0.316 0.008 0.008 0.004
#> GSM486858     3   0.584    0.26746 0.000 0.232 0.488 0.000 0.000 0.280

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 agent(p) individual(p) k
#> SD:NMF 114 1.000000      1.11e-05 2
#> SD:NMF 102 0.269141      6.56e-07 3
#> SD:NMF  94 0.000529      1.17e-04 4
#> SD:NMF  69 0.495453      1.02e-07 5
#> SD:NMF  47 0.981784      1.11e-03 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 120 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 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-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.1827           0.831       0.813         0.2033 0.967   0.967
#> 3 3 0.0478           0.470       0.700         0.7711 0.906   0.903
#> 4 4 0.0792           0.576       0.676         0.3378 0.568   0.518
#> 5 5 0.0998           0.544       0.698         0.1902 0.953   0.905
#> 6 6 0.1424           0.461       0.670         0.0993 0.940   0.874

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
#> GSM486735     2   0.482      0.831 0.104 0.896
#> GSM486737     2   0.506      0.856 0.112 0.888
#> GSM486739     2   0.494      0.866 0.108 0.892
#> GSM486741     2   0.469      0.864 0.100 0.900
#> GSM486743     2   0.541      0.859 0.124 0.876
#> GSM486745     2   0.584      0.857 0.140 0.860
#> GSM486747     2   0.552      0.851 0.128 0.872
#> GSM486749     2   0.343      0.846 0.064 0.936
#> GSM486751     2   0.469      0.864 0.100 0.900
#> GSM486753     2   0.595      0.856 0.144 0.856
#> GSM486755     2   0.529      0.860 0.120 0.880
#> GSM486757     2   0.753      0.779 0.216 0.784
#> GSM486759     2   0.662      0.850 0.172 0.828
#> GSM486761     2   0.443      0.860 0.092 0.908
#> GSM486763     1   0.697      1.000 0.812 0.188
#> GSM486765     2   0.689      0.819 0.184 0.816
#> GSM486767     2   0.671      0.855 0.176 0.824
#> GSM486769     2   0.494      0.832 0.108 0.892
#> GSM486771     2   0.541      0.856 0.124 0.876
#> GSM486773     2   0.416      0.860 0.084 0.916
#> GSM486775     2   0.714      0.837 0.196 0.804
#> GSM486777     2   0.625      0.838 0.156 0.844
#> GSM486779     2   0.584      0.865 0.140 0.860
#> GSM486781     2   0.295      0.858 0.052 0.948
#> GSM486783     2   0.563      0.853 0.132 0.868
#> GSM486785     2   0.595      0.846 0.144 0.856
#> GSM486787     2   0.738      0.832 0.208 0.792
#> GSM486789     2   0.416      0.854 0.084 0.916
#> GSM486791     2   0.969      0.452 0.396 0.604
#> GSM486793     2   0.662      0.823 0.172 0.828
#> GSM486795     2   0.595      0.863 0.144 0.856
#> GSM486797     2   0.260      0.864 0.044 0.956
#> GSM486799     2   0.738      0.831 0.208 0.792
#> GSM486801     2   0.662      0.848 0.172 0.828
#> GSM486803     2   0.814      0.809 0.252 0.748
#> GSM486805     2   0.343      0.861 0.064 0.936
#> GSM486807     2   0.402      0.866 0.080 0.920
#> GSM486809     2   0.518      0.835 0.116 0.884
#> GSM486811     2   0.563      0.854 0.132 0.868
#> GSM486813     2   0.529      0.862 0.120 0.880
#> GSM486815     2   0.760      0.791 0.220 0.780
#> GSM486817     2   0.714      0.839 0.196 0.804
#> GSM486819     2   0.605      0.863 0.148 0.852
#> GSM486822     2   0.494      0.832 0.108 0.892
#> GSM486824     2   0.730      0.836 0.204 0.796
#> GSM486828     2   0.343      0.848 0.064 0.936
#> GSM486831     2   0.753      0.839 0.216 0.784
#> GSM486833     2   0.443      0.859 0.092 0.908
#> GSM486835     2   0.697      0.843 0.188 0.812
#> GSM486837     2   0.416      0.852 0.084 0.916
#> GSM486839     2   0.730      0.833 0.204 0.796
#> GSM486841     2   0.653      0.830 0.168 0.832
#> GSM486843     2   0.689      0.845 0.184 0.816
#> GSM486845     2   0.260      0.852 0.044 0.956
#> GSM486847     2   0.730      0.834 0.204 0.796
#> GSM486849     2   0.327      0.854 0.060 0.940
#> GSM486851     2   1.000      0.186 0.488 0.512
#> GSM486853     2   0.343      0.848 0.064 0.936
#> GSM486855     2   0.552      0.860 0.128 0.872
#> GSM486857     2   0.388      0.846 0.076 0.924
#> GSM486736     2   0.482      0.831 0.104 0.896
#> GSM486738     2   0.506      0.856 0.112 0.888
#> GSM486740     2   0.494      0.866 0.108 0.892
#> GSM486742     2   0.469      0.864 0.100 0.900
#> GSM486744     2   0.574      0.860 0.136 0.864
#> GSM486746     2   0.605      0.858 0.148 0.852
#> GSM486748     2   0.518      0.861 0.116 0.884
#> GSM486750     2   0.388      0.846 0.076 0.924
#> GSM486752     2   0.443      0.863 0.092 0.908
#> GSM486754     2   0.595      0.856 0.144 0.856
#> GSM486756     2   0.529      0.860 0.120 0.880
#> GSM486758     2   0.753      0.779 0.216 0.784
#> GSM486760     2   0.697      0.847 0.188 0.812
#> GSM486762     2   0.443      0.860 0.092 0.908
#> GSM486764     1   0.697      1.000 0.812 0.188
#> GSM486766     2   0.671      0.827 0.176 0.824
#> GSM486768     2   0.563      0.866 0.132 0.868
#> GSM486770     2   0.469      0.834 0.100 0.900
#> GSM486772     2   0.541      0.859 0.124 0.876
#> GSM486774     2   0.358      0.857 0.068 0.932
#> GSM486776     2   0.722      0.841 0.200 0.800
#> GSM486778     2   0.615      0.839 0.152 0.848
#> GSM486780     2   0.680      0.850 0.180 0.820
#> GSM486782     2   0.311      0.857 0.056 0.944
#> GSM486784     2   0.563      0.853 0.132 0.868
#> GSM486786     2   0.653      0.833 0.168 0.832
#> GSM486788     2   0.753      0.828 0.216 0.784
#> GSM486790     2   0.416      0.857 0.084 0.916
#> GSM486792     2   0.969      0.452 0.396 0.604
#> GSM486794     2   0.671      0.821 0.176 0.824
#> GSM486796     2   0.595      0.863 0.144 0.856
#> GSM486798     2   0.388      0.866 0.076 0.924
#> GSM486800     2   0.671      0.848 0.176 0.824
#> GSM486802     2   0.662      0.848 0.172 0.828
#> GSM486804     2   0.753      0.830 0.216 0.784
#> GSM486806     2   0.327      0.863 0.060 0.940
#> GSM486808     2   0.529      0.856 0.120 0.880
#> GSM486810     2   0.506      0.832 0.112 0.888
#> GSM486812     2   0.574      0.852 0.136 0.864
#> GSM486814     2   0.529      0.863 0.120 0.880
#> GSM486816     2   0.753      0.795 0.216 0.784
#> GSM486818     2   0.722      0.839 0.200 0.800
#> GSM486821     2   0.584      0.862 0.140 0.860
#> GSM486823     2   0.494      0.832 0.108 0.892
#> GSM486826     2   0.745      0.831 0.212 0.788
#> GSM486830     2   0.327      0.849 0.060 0.940
#> GSM486832     2   0.753      0.835 0.216 0.784
#> GSM486834     2   0.443      0.859 0.092 0.908
#> GSM486836     2   0.753      0.827 0.216 0.784
#> GSM486838     2   0.388      0.865 0.076 0.924
#> GSM486840     2   0.730      0.833 0.204 0.796
#> GSM486842     2   0.662      0.822 0.172 0.828
#> GSM486844     2   0.653      0.852 0.168 0.832
#> GSM486846     2   0.260      0.852 0.044 0.956
#> GSM486848     2   0.745      0.832 0.212 0.788
#> GSM486850     2   0.327      0.854 0.060 0.940
#> GSM486852     2   1.000      0.186 0.488 0.512
#> GSM486854     2   0.358      0.846 0.068 0.932
#> GSM486856     2   0.541      0.859 0.124 0.876
#> GSM486858     2   0.416      0.854 0.084 0.916

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM486735     3   0.357     0.5747 0.060 0.040 0.900
#> GSM486737     3   0.512     0.5885 0.188 0.016 0.796
#> GSM486739     3   0.416     0.6223 0.144 0.008 0.848
#> GSM486741     3   0.397     0.6172 0.132 0.008 0.860
#> GSM486743     3   0.441     0.6070 0.172 0.004 0.824
#> GSM486745     3   0.481     0.6076 0.176 0.012 0.812
#> GSM486747     3   0.670     0.4836 0.280 0.036 0.684
#> GSM486749     3   0.230     0.6126 0.036 0.020 0.944
#> GSM486751     3   0.554     0.5920 0.200 0.024 0.776
#> GSM486753     3   0.392     0.6110 0.120 0.012 0.868
#> GSM486755     3   0.451     0.6112 0.156 0.012 0.832
#> GSM486757     1   0.875     0.0858 0.580 0.164 0.256
#> GSM486759     3   0.613     0.4463 0.400 0.000 0.600
#> GSM486761     3   0.568     0.5596 0.212 0.024 0.764
#> GSM486763     2   0.608     1.0000 0.128 0.784 0.088
#> GSM486765     3   0.741     0.2874 0.384 0.040 0.576
#> GSM486767     3   0.674     0.5280 0.300 0.032 0.668
#> GSM486769     3   0.379     0.5714 0.060 0.048 0.892
#> GSM486771     3   0.447     0.6096 0.176 0.004 0.820
#> GSM486773     3   0.374     0.6174 0.072 0.036 0.892
#> GSM486775     3   0.647     0.3651 0.444 0.004 0.552
#> GSM486777     3   0.716     0.3963 0.316 0.044 0.640
#> GSM486779     3   0.651     0.4676 0.300 0.024 0.676
#> GSM486781     3   0.249     0.6239 0.048 0.016 0.936
#> GSM486783     3   0.459     0.5956 0.172 0.008 0.820
#> GSM486785     3   0.784     0.1432 0.408 0.056 0.536
#> GSM486787     3   0.693     0.3385 0.452 0.016 0.532
#> GSM486789     3   0.311     0.6103 0.056 0.028 0.916
#> GSM486791     3   0.986    -0.4245 0.372 0.252 0.376
#> GSM486793     3   0.733     0.2901 0.388 0.036 0.576
#> GSM486795     3   0.514     0.5942 0.252 0.000 0.748
#> GSM486797     3   0.321     0.6363 0.084 0.012 0.904
#> GSM486799     3   0.758     0.1751 0.468 0.040 0.492
#> GSM486801     3   0.658     0.3959 0.420 0.008 0.572
#> GSM486803     1   0.832     0.0648 0.496 0.080 0.424
#> GSM486805     3   0.427     0.6289 0.116 0.024 0.860
#> GSM486807     3   0.527     0.5880 0.212 0.012 0.776
#> GSM486809     3   0.408     0.5745 0.072 0.048 0.880
#> GSM486811     3   0.684     0.4147 0.332 0.028 0.640
#> GSM486813     3   0.582     0.5741 0.236 0.020 0.744
#> GSM486815     3   0.816     0.0530 0.412 0.072 0.516
#> GSM486817     3   0.688     0.3521 0.428 0.016 0.556
#> GSM486819     3   0.562     0.5937 0.244 0.012 0.744
#> GSM486822     3   0.389     0.5702 0.064 0.048 0.888
#> GSM486824     3   0.717     0.2339 0.456 0.024 0.520
#> GSM486828     3   0.253     0.6140 0.044 0.020 0.936
#> GSM486831     3   0.730     0.3598 0.412 0.032 0.556
#> GSM486833     3   0.522     0.5952 0.176 0.024 0.800
#> GSM486835     3   0.715     0.2957 0.440 0.024 0.536
#> GSM486837     3   0.318     0.6238 0.076 0.016 0.908
#> GSM486839     3   0.648     0.3660 0.452 0.004 0.544
#> GSM486841     3   0.702     0.3237 0.392 0.024 0.584
#> GSM486843     3   0.654     0.4125 0.408 0.008 0.584
#> GSM486845     3   0.223     0.6191 0.044 0.012 0.944
#> GSM486847     3   0.680     0.3192 0.456 0.012 0.532
#> GSM486849     3   0.231     0.6202 0.032 0.024 0.944
#> GSM486851     1   0.999     0.4553 0.356 0.332 0.312
#> GSM486853     3   0.337     0.5992 0.052 0.040 0.908
#> GSM486855     3   0.486     0.6106 0.180 0.012 0.808
#> GSM486857     3   0.397     0.5978 0.072 0.044 0.884
#> GSM486736     3   0.368     0.5726 0.060 0.044 0.896
#> GSM486738     3   0.484     0.5941 0.168 0.016 0.816
#> GSM486740     3   0.416     0.6223 0.144 0.008 0.848
#> GSM486742     3   0.350     0.6173 0.116 0.004 0.880
#> GSM486744     3   0.517     0.6162 0.192 0.016 0.792
#> GSM486746     3   0.497     0.6084 0.188 0.012 0.800
#> GSM486748     3   0.607     0.5715 0.236 0.028 0.736
#> GSM486750     3   0.253     0.6096 0.044 0.020 0.936
#> GSM486752     3   0.544     0.5912 0.192 0.024 0.784
#> GSM486754     3   0.392     0.6110 0.120 0.012 0.868
#> GSM486756     3   0.451     0.6112 0.156 0.012 0.832
#> GSM486758     1   0.875     0.0858 0.580 0.164 0.256
#> GSM486760     3   0.642     0.4093 0.424 0.004 0.572
#> GSM486762     3   0.568     0.5596 0.212 0.024 0.764
#> GSM486764     2   0.608     1.0000 0.128 0.784 0.088
#> GSM486766     3   0.725     0.3299 0.368 0.036 0.596
#> GSM486768     3   0.527     0.6171 0.212 0.012 0.776
#> GSM486770     3   0.359     0.5749 0.052 0.048 0.900
#> GSM486772     3   0.441     0.6135 0.160 0.008 0.832
#> GSM486774     3   0.383     0.6194 0.076 0.036 0.888
#> GSM486776     3   0.679     0.3147 0.448 0.012 0.540
#> GSM486778     3   0.714     0.4010 0.312 0.044 0.644
#> GSM486780     3   0.725     0.3618 0.368 0.036 0.596
#> GSM486782     3   0.238     0.6241 0.044 0.016 0.940
#> GSM486784     3   0.459     0.5956 0.172 0.008 0.820
#> GSM486786     3   0.806     0.0294 0.440 0.064 0.496
#> GSM486788     3   0.690     0.3701 0.440 0.016 0.544
#> GSM486790     3   0.355     0.6105 0.064 0.036 0.900
#> GSM486792     3   0.986    -0.4245 0.372 0.252 0.376
#> GSM486794     3   0.741     0.2910 0.384 0.040 0.576
#> GSM486796     3   0.518     0.5927 0.256 0.000 0.744
#> GSM486798     3   0.517     0.6043 0.192 0.016 0.792
#> GSM486800     3   0.694     0.3866 0.404 0.020 0.576
#> GSM486802     3   0.656     0.4009 0.416 0.008 0.576
#> GSM486804     3   0.784     0.1012 0.456 0.052 0.492
#> GSM486806     3   0.391     0.6259 0.104 0.020 0.876
#> GSM486808     3   0.633     0.4882 0.292 0.020 0.688
#> GSM486810     3   0.398     0.5699 0.068 0.048 0.884
#> GSM486812     3   0.687     0.4090 0.336 0.028 0.636
#> GSM486814     3   0.555     0.5854 0.212 0.020 0.768
#> GSM486816     3   0.809     0.0513 0.416 0.068 0.516
#> GSM486818     3   0.749     0.3244 0.408 0.040 0.552
#> GSM486821     3   0.580     0.5898 0.248 0.016 0.736
#> GSM486823     3   0.389     0.5702 0.064 0.048 0.888
#> GSM486826     1   0.719    -0.2439 0.500 0.024 0.476
#> GSM486830     3   0.241     0.6157 0.040 0.020 0.940
#> GSM486832     3   0.733     0.3424 0.424 0.032 0.544
#> GSM486834     3   0.517     0.5952 0.172 0.024 0.804
#> GSM486836     3   0.707     0.2465 0.468 0.020 0.512
#> GSM486838     3   0.461     0.6208 0.128 0.028 0.844
#> GSM486840     3   0.648     0.3660 0.452 0.004 0.544
#> GSM486842     3   0.722     0.3166 0.388 0.032 0.580
#> GSM486844     3   0.636     0.4194 0.404 0.004 0.592
#> GSM486846     3   0.223     0.6191 0.044 0.012 0.944
#> GSM486848     3   0.747     0.2521 0.448 0.036 0.516
#> GSM486850     3   0.231     0.6202 0.032 0.024 0.944
#> GSM486852     1   0.999     0.4553 0.356 0.332 0.312
#> GSM486854     3   0.313     0.5974 0.052 0.032 0.916
#> GSM486856     3   0.502     0.6060 0.192 0.012 0.796
#> GSM486858     3   0.448     0.5950 0.096 0.044 0.860

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM486735     2   0.313     0.6777 0.036 0.900 0.036 0.028
#> GSM486737     2   0.594     0.5967 0.032 0.696 0.236 0.036
#> GSM486739     2   0.415     0.6738 0.016 0.800 0.180 0.004
#> GSM486741     2   0.460     0.6899 0.012 0.796 0.160 0.032
#> GSM486743     2   0.455     0.6780 0.008 0.784 0.184 0.024
#> GSM486745     2   0.455     0.6494 0.012 0.772 0.204 0.012
#> GSM486747     2   0.694    -0.2891 0.080 0.520 0.388 0.012
#> GSM486749     2   0.197     0.7119 0.008 0.932 0.060 0.000
#> GSM486751     2   0.564     0.4158 0.032 0.692 0.260 0.016
#> GSM486753     2   0.449     0.6887 0.020 0.812 0.140 0.028
#> GSM486755     2   0.472     0.6831 0.016 0.788 0.168 0.028
#> GSM486757     1   0.354     1.0000 0.864 0.060 0.076 0.000
#> GSM486759     3   0.506     0.5290 0.004 0.412 0.584 0.000
#> GSM486761     2   0.605     0.0362 0.044 0.620 0.328 0.008
#> GSM486763     4   0.241     1.0000 0.004 0.016 0.060 0.920
#> GSM486765     3   0.728     0.5896 0.092 0.380 0.508 0.020
#> GSM486767     2   0.731     0.2097 0.068 0.512 0.384 0.036
#> GSM486769     2   0.332     0.6750 0.040 0.892 0.036 0.032
#> GSM486771     2   0.457     0.6538 0.008 0.768 0.208 0.016
#> GSM486773     2   0.384     0.7084 0.032 0.860 0.088 0.020
#> GSM486775     3   0.532     0.6253 0.004 0.360 0.624 0.012
#> GSM486777     3   0.716     0.5351 0.064 0.444 0.464 0.028
#> GSM486779     2   0.713     0.2306 0.068 0.480 0.428 0.024
#> GSM486781     2   0.328     0.7017 0.024 0.880 0.088 0.008
#> GSM486783     2   0.474     0.6505 0.004 0.760 0.208 0.028
#> GSM486785     3   0.777     0.5399 0.160 0.340 0.484 0.016
#> GSM486787     3   0.565     0.6473 0.012 0.328 0.640 0.020
#> GSM486789     2   0.298     0.7136 0.024 0.900 0.064 0.012
#> GSM486791     3   0.846     0.4311 0.056 0.196 0.500 0.248
#> GSM486793     3   0.752     0.5922 0.092 0.372 0.504 0.032
#> GSM486795     2   0.545     0.3407 0.008 0.620 0.360 0.012
#> GSM486797     2   0.390     0.6928 0.016 0.836 0.136 0.012
#> GSM486799     3   0.681     0.6624 0.060 0.260 0.636 0.044
#> GSM486801     3   0.530     0.5914 0.004 0.388 0.600 0.008
#> GSM486803     3   0.777     0.4915 0.140 0.156 0.616 0.088
#> GSM486805     2   0.448     0.6672 0.020 0.804 0.156 0.020
#> GSM486807     2   0.527     0.2130 0.016 0.676 0.300 0.008
#> GSM486809     2   0.374     0.6717 0.048 0.872 0.052 0.028
#> GSM486811     3   0.660     0.5654 0.040 0.444 0.496 0.020
#> GSM486813     2   0.627     0.5059 0.032 0.624 0.316 0.028
#> GSM486815     3   0.810     0.5335 0.116 0.308 0.516 0.060
#> GSM486817     3   0.663     0.4975 0.044 0.372 0.560 0.024
#> GSM486819     2   0.561     0.4312 0.016 0.648 0.320 0.016
#> GSM486822     2   0.341     0.6740 0.040 0.888 0.040 0.032
#> GSM486824     3   0.670     0.5724 0.060 0.316 0.600 0.024
#> GSM486828     2   0.249     0.7087 0.016 0.916 0.064 0.004
#> GSM486831     3   0.613     0.6402 0.020 0.372 0.584 0.024
#> GSM486833     2   0.560     0.4233 0.040 0.712 0.232 0.016
#> GSM486835     3   0.601     0.6543 0.032 0.324 0.628 0.016
#> GSM486837     2   0.298     0.6879 0.008 0.880 0.108 0.004
#> GSM486839     3   0.542     0.6179 0.008 0.352 0.628 0.012
#> GSM486841     3   0.693     0.5979 0.064 0.396 0.520 0.020
#> GSM486843     3   0.536     0.6001 0.008 0.368 0.616 0.008
#> GSM486845     2   0.205     0.7028 0.008 0.928 0.064 0.000
#> GSM486847     3   0.589     0.6552 0.016 0.336 0.624 0.024
#> GSM486849     2   0.252     0.7143 0.020 0.916 0.060 0.004
#> GSM486851     3   0.797     0.1341 0.028 0.144 0.460 0.368
#> GSM486853     2   0.331     0.7047 0.028 0.880 0.084 0.008
#> GSM486855     2   0.496     0.6507 0.008 0.732 0.240 0.020
#> GSM486857     2   0.401     0.7004 0.036 0.848 0.100 0.016
#> GSM486736     2   0.322     0.6762 0.040 0.896 0.036 0.028
#> GSM486738     2   0.564     0.6245 0.028 0.724 0.212 0.036
#> GSM486740     2   0.415     0.6738 0.016 0.800 0.180 0.004
#> GSM486742     2   0.426     0.6939 0.012 0.820 0.140 0.028
#> GSM486744     2   0.486     0.6578 0.008 0.744 0.228 0.020
#> GSM486746     2   0.466     0.6436 0.012 0.760 0.216 0.012
#> GSM486748     2   0.552     0.3036 0.032 0.664 0.300 0.004
#> GSM486750     2   0.212     0.7089 0.012 0.932 0.052 0.004
#> GSM486752     2   0.540     0.4056 0.032 0.700 0.260 0.008
#> GSM486754     2   0.449     0.6887 0.020 0.812 0.140 0.028
#> GSM486756     2   0.472     0.6831 0.016 0.788 0.168 0.028
#> GSM486758     1   0.354     1.0000 0.864 0.060 0.076 0.000
#> GSM486760     3   0.529     0.5932 0.004 0.384 0.604 0.008
#> GSM486762     2   0.605     0.0362 0.044 0.620 0.328 0.008
#> GSM486764     4   0.241     1.0000 0.004 0.016 0.060 0.920
#> GSM486766     3   0.732     0.5845 0.084 0.408 0.484 0.024
#> GSM486768     2   0.503     0.5701 0.004 0.696 0.284 0.016
#> GSM486770     2   0.313     0.6765 0.040 0.900 0.032 0.028
#> GSM486772     2   0.439     0.6664 0.004 0.784 0.192 0.020
#> GSM486774     2   0.381     0.6923 0.044 0.856 0.092 0.008
#> GSM486776     3   0.572     0.6590 0.020 0.344 0.624 0.012
#> GSM486778     3   0.716     0.5289 0.064 0.448 0.460 0.028
#> GSM486780     3   0.782     0.0229 0.096 0.352 0.504 0.048
#> GSM486782     2   0.307     0.7000 0.024 0.892 0.076 0.008
#> GSM486784     2   0.474     0.6505 0.004 0.760 0.208 0.028
#> GSM486786     3   0.801     0.5415 0.216 0.268 0.496 0.020
#> GSM486788     3   0.558     0.6342 0.008 0.340 0.632 0.020
#> GSM486790     2   0.318     0.7130 0.024 0.892 0.068 0.016
#> GSM486792     3   0.846     0.4311 0.056 0.196 0.500 0.248
#> GSM486794     3   0.749     0.5909 0.096 0.372 0.504 0.028
#> GSM486796     2   0.547     0.3315 0.008 0.616 0.364 0.012
#> GSM486798     2   0.526     0.4176 0.020 0.716 0.248 0.016
#> GSM486800     3   0.634     0.6519 0.016 0.364 0.580 0.040
#> GSM486802     3   0.544     0.5838 0.008 0.392 0.592 0.008
#> GSM486804     3   0.745     0.5340 0.108 0.264 0.588 0.040
#> GSM486806     2   0.426     0.6614 0.040 0.824 0.128 0.008
#> GSM486808     2   0.658    -0.3103 0.044 0.548 0.388 0.020
#> GSM486810     2   0.349     0.6720 0.044 0.884 0.044 0.028
#> GSM486812     3   0.659     0.5721 0.040 0.436 0.504 0.020
#> GSM486814     2   0.591     0.5716 0.024 0.664 0.284 0.028
#> GSM486816     3   0.812     0.5337 0.112 0.308 0.516 0.064
#> GSM486818     3   0.722     0.5364 0.052 0.340 0.556 0.052
#> GSM486821     2   0.578     0.4276 0.012 0.644 0.316 0.028
#> GSM486823     2   0.341     0.6740 0.040 0.888 0.040 0.032
#> GSM486826     3   0.684     0.5959 0.096 0.260 0.624 0.020
#> GSM486830     2   0.236     0.7067 0.012 0.920 0.064 0.004
#> GSM486832     3   0.615     0.6535 0.020 0.352 0.600 0.028
#> GSM486834     2   0.556     0.4280 0.040 0.716 0.228 0.016
#> GSM486836     3   0.563     0.6657 0.020 0.304 0.660 0.016
#> GSM486838     2   0.478     0.6302 0.028 0.756 0.212 0.004
#> GSM486840     3   0.542     0.6179 0.008 0.352 0.628 0.012
#> GSM486842     3   0.715     0.5994 0.068 0.388 0.516 0.028
#> GSM486844     3   0.588     0.5200 0.016 0.388 0.580 0.016
#> GSM486846     2   0.205     0.7028 0.008 0.928 0.064 0.000
#> GSM486848     3   0.636     0.6697 0.032 0.300 0.632 0.036
#> GSM486850     2   0.252     0.7143 0.020 0.916 0.060 0.004
#> GSM486852     3   0.797     0.1341 0.028 0.144 0.460 0.368
#> GSM486854     2   0.307     0.7032 0.024 0.888 0.084 0.004
#> GSM486856     2   0.515     0.6447 0.012 0.720 0.248 0.020
#> GSM486858     2   0.470     0.6844 0.052 0.808 0.124 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
#> GSM486735     4  0.3361    0.65278 0.040 0.056 0.012 0.872 0.020
#> GSM486737     4  0.5761    0.45882 0.184 0.176 0.000 0.636 0.004
#> GSM486739     4  0.4298    0.66887 0.168 0.052 0.000 0.772 0.008
#> GSM486741     4  0.4634    0.64933 0.144 0.100 0.000 0.752 0.004
#> GSM486743     4  0.4812    0.65470 0.172 0.076 0.000 0.740 0.012
#> GSM486745     4  0.4612    0.64157 0.196 0.056 0.000 0.740 0.008
#> GSM486747     1  0.6537    0.38012 0.496 0.056 0.052 0.392 0.004
#> GSM486749     4  0.2619    0.69725 0.072 0.024 0.004 0.896 0.004
#> GSM486751     4  0.5693    0.43140 0.320 0.044 0.024 0.608 0.004
#> GSM486753     4  0.4728    0.65775 0.128 0.088 0.000 0.764 0.020
#> GSM486755     4  0.4826    0.65570 0.156 0.088 0.000 0.744 0.012
#> GSM486757     3  0.0968    0.98089 0.012 0.004 0.972 0.012 0.000
#> GSM486759     1  0.4636    0.48119 0.664 0.024 0.000 0.308 0.004
#> GSM486761     4  0.5889   -0.15793 0.444 0.060 0.016 0.480 0.000
#> GSM486763     5  0.0955    1.00000 0.028 0.000 0.000 0.004 0.968
#> GSM486765     1  0.6585    0.57802 0.620 0.096 0.060 0.216 0.008
#> GSM486767     4  0.7962   -0.12702 0.332 0.196 0.036 0.404 0.032
#> GSM486769     4  0.3464    0.64802 0.032 0.060 0.016 0.868 0.024
#> GSM486771     4  0.4444    0.64813 0.184 0.052 0.000 0.756 0.008
#> GSM486773     4  0.3982    0.69423 0.088 0.084 0.000 0.816 0.012
#> GSM486775     1  0.3954    0.62402 0.772 0.036 0.000 0.192 0.000
#> GSM486777     1  0.6283    0.57484 0.596 0.064 0.040 0.292 0.008
#> GSM486779     2  0.7268    0.61754 0.196 0.456 0.008 0.316 0.024
#> GSM486781     4  0.3885    0.69933 0.120 0.036 0.012 0.824 0.008
#> GSM486783     4  0.4951    0.60780 0.172 0.104 0.000 0.720 0.004
#> GSM486785     1  0.7697    0.29535 0.508 0.216 0.124 0.148 0.004
#> GSM486787     1  0.4551    0.62306 0.768 0.032 0.008 0.172 0.020
#> GSM486789     4  0.3522    0.68843 0.068 0.044 0.008 0.860 0.020
#> GSM486791     1  0.7600    0.25151 0.544 0.152 0.024 0.072 0.208
#> GSM486793     1  0.6611    0.57089 0.628 0.104 0.056 0.200 0.012
#> GSM486795     4  0.5146    0.39354 0.400 0.028 0.000 0.564 0.008
#> GSM486797     4  0.4260    0.69166 0.164 0.052 0.008 0.776 0.000
#> GSM486799     1  0.5326    0.57121 0.736 0.124 0.016 0.108 0.016
#> GSM486801     1  0.4377    0.58862 0.720 0.028 0.000 0.248 0.004
#> GSM486803     1  0.7411    0.16361 0.560 0.248 0.068 0.044 0.080
#> GSM486805     4  0.5028    0.65682 0.180 0.060 0.012 0.736 0.012
#> GSM486807     4  0.5138    0.09975 0.396 0.028 0.008 0.568 0.000
#> GSM486809     4  0.4108    0.63553 0.068 0.060 0.020 0.832 0.020
#> GSM486811     1  0.5605    0.59140 0.620 0.044 0.016 0.312 0.008
#> GSM486813     4  0.6595    0.25432 0.280 0.196 0.004 0.516 0.004
#> GSM486815     1  0.7186    0.37293 0.572 0.208 0.048 0.152 0.020
#> GSM486817     1  0.6479    0.30606 0.572 0.128 0.016 0.276 0.008
#> GSM486819     4  0.5595    0.49638 0.348 0.048 0.004 0.588 0.012
#> GSM486822     4  0.3544    0.64574 0.036 0.060 0.016 0.864 0.024
#> GSM486824     1  0.6856    0.33216 0.612 0.172 0.032 0.156 0.028
#> GSM486828     4  0.3221    0.70193 0.084 0.032 0.008 0.868 0.008
#> GSM486831     1  0.5184    0.62271 0.704 0.052 0.004 0.220 0.020
#> GSM486833     4  0.5448    0.39315 0.308 0.052 0.016 0.624 0.000
#> GSM486835     1  0.5223    0.59126 0.736 0.072 0.016 0.160 0.016
#> GSM486837     4  0.3372    0.69378 0.120 0.036 0.004 0.840 0.000
#> GSM486839     1  0.3953    0.61285 0.780 0.024 0.008 0.188 0.000
#> GSM486841     1  0.6431    0.59595 0.616 0.084 0.048 0.244 0.008
#> GSM486843     1  0.5442    0.56838 0.692 0.060 0.012 0.220 0.016
#> GSM486845     4  0.2767    0.69604 0.088 0.020 0.004 0.884 0.004
#> GSM486847     1  0.4083    0.63013 0.788 0.040 0.004 0.164 0.004
#> GSM486849     4  0.2569    0.69347 0.068 0.032 0.004 0.896 0.000
#> GSM486851     1  0.7098   -0.00538 0.476 0.128 0.008 0.036 0.352
#> GSM486853     4  0.3492    0.66322 0.064 0.080 0.004 0.848 0.004
#> GSM486855     4  0.4998    0.62585 0.200 0.080 0.000 0.712 0.008
#> GSM486857     4  0.4303    0.64764 0.088 0.096 0.012 0.800 0.004
#> GSM486736     4  0.3464    0.65068 0.040 0.056 0.016 0.868 0.020
#> GSM486738     4  0.5496    0.51787 0.168 0.160 0.000 0.668 0.004
#> GSM486740     4  0.4298    0.66887 0.168 0.052 0.000 0.772 0.008
#> GSM486742     4  0.4359    0.65940 0.128 0.092 0.000 0.776 0.004
#> GSM486744     4  0.5155    0.64632 0.216 0.068 0.000 0.700 0.016
#> GSM486746     4  0.4771    0.63202 0.208 0.060 0.000 0.724 0.008
#> GSM486748     4  0.5759    0.29345 0.364 0.044 0.020 0.568 0.004
#> GSM486750     4  0.2325    0.69271 0.068 0.028 0.000 0.904 0.000
#> GSM486752     4  0.5501    0.43228 0.324 0.032 0.024 0.616 0.004
#> GSM486754     4  0.4728    0.65775 0.128 0.088 0.000 0.764 0.020
#> GSM486756     4  0.4826    0.65570 0.156 0.088 0.000 0.744 0.012
#> GSM486758     3  0.0693    0.98087 0.012 0.000 0.980 0.008 0.000
#> GSM486760     1  0.4624    0.58641 0.716 0.028 0.004 0.244 0.008
#> GSM486762     4  0.5887   -0.15310 0.440 0.060 0.016 0.484 0.000
#> GSM486764     5  0.0955    1.00000 0.028 0.000 0.000 0.004 0.968
#> GSM486766     1  0.6420    0.59681 0.620 0.080 0.052 0.240 0.008
#> GSM486768     4  0.5253    0.58812 0.304 0.036 0.000 0.640 0.020
#> GSM486770     4  0.3305    0.65114 0.032 0.056 0.016 0.876 0.020
#> GSM486772     4  0.4339    0.65818 0.168 0.048 0.000 0.772 0.012
#> GSM486774     4  0.4022    0.68425 0.100 0.092 0.004 0.804 0.000
#> GSM486776     1  0.4307    0.63264 0.768 0.040 0.012 0.180 0.000
#> GSM486778     1  0.6300    0.57249 0.592 0.064 0.040 0.296 0.008
#> GSM486780     2  0.6427    0.55555 0.236 0.596 0.012 0.144 0.012
#> GSM486782     4  0.3708    0.69957 0.112 0.032 0.012 0.836 0.008
#> GSM486784     4  0.4951    0.60780 0.172 0.104 0.000 0.720 0.004
#> GSM486786     1  0.7650    0.22572 0.508 0.256 0.136 0.088 0.012
#> GSM486788     1  0.4565    0.61838 0.756 0.024 0.008 0.192 0.020
#> GSM486790     4  0.3584    0.69025 0.072 0.044 0.008 0.856 0.020
#> GSM486792     1  0.7600    0.25151 0.544 0.152 0.024 0.072 0.208
#> GSM486794     1  0.6580    0.57198 0.624 0.108 0.056 0.204 0.008
#> GSM486796     4  0.5155    0.38600 0.404 0.028 0.000 0.560 0.008
#> GSM486798     4  0.5202    0.38707 0.316 0.032 0.012 0.636 0.004
#> GSM486800     1  0.5129    0.63487 0.712 0.060 0.004 0.208 0.016
#> GSM486802     1  0.4482    0.58294 0.712 0.032 0.000 0.252 0.004
#> GSM486804     1  0.7243    0.06081 0.524 0.308 0.036 0.096 0.036
#> GSM486806     4  0.4634    0.66973 0.152 0.044 0.028 0.772 0.004
#> GSM486808     1  0.6084    0.33305 0.484 0.048 0.036 0.432 0.000
#> GSM486810     4  0.3884    0.63762 0.060 0.060 0.020 0.844 0.016
#> GSM486812     1  0.5658    0.59407 0.624 0.044 0.020 0.304 0.008
#> GSM486814     4  0.6211    0.38000 0.256 0.176 0.000 0.564 0.004
#> GSM486816     1  0.7241    0.37153 0.572 0.204 0.048 0.152 0.024
#> GSM486818     1  0.7070    0.30194 0.556 0.140 0.012 0.248 0.044
#> GSM486821     4  0.5830    0.49460 0.340 0.048 0.004 0.584 0.024
#> GSM486823     4  0.3544    0.64574 0.036 0.060 0.016 0.864 0.024
#> GSM486826     1  0.6740    0.31491 0.612 0.220 0.044 0.104 0.020
#> GSM486830     4  0.3137    0.70181 0.084 0.028 0.008 0.872 0.008
#> GSM486832     1  0.5031    0.63204 0.728 0.056 0.004 0.192 0.020
#> GSM486834     4  0.5431    0.39733 0.304 0.052 0.016 0.628 0.000
#> GSM486836     1  0.4595    0.61220 0.772 0.060 0.016 0.148 0.004
#> GSM486838     4  0.5248    0.59670 0.192 0.084 0.012 0.708 0.004
#> GSM486840     1  0.3953    0.61285 0.780 0.024 0.008 0.188 0.000
#> GSM486842     1  0.6535    0.58947 0.620 0.092 0.048 0.228 0.012
#> GSM486844     1  0.5629    0.50253 0.660 0.076 0.012 0.244 0.008
#> GSM486846     4  0.2767    0.69604 0.088 0.020 0.004 0.884 0.004
#> GSM486848     1  0.4651    0.61649 0.768 0.072 0.008 0.144 0.008
#> GSM486850     4  0.2569    0.69347 0.068 0.032 0.004 0.896 0.000
#> GSM486852     1  0.7098   -0.00538 0.476 0.128 0.008 0.036 0.352
#> GSM486854     4  0.3306    0.66165 0.060 0.072 0.004 0.860 0.004
#> GSM486856     4  0.5165    0.61093 0.208 0.088 0.000 0.696 0.008
#> GSM486858     4  0.4820    0.62012 0.088 0.120 0.016 0.768 0.008

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM486735     4  0.3484     0.6507 0.020 0.036 0.004 0.844 0.012 0.084
#> GSM486737     4  0.5708     0.4636 0.148 0.256 0.000 0.580 0.004 0.012
#> GSM486739     4  0.4136     0.6794 0.180 0.048 0.000 0.756 0.004 0.012
#> GSM486741     4  0.4531     0.6478 0.112 0.172 0.000 0.712 0.004 0.000
#> GSM486743     4  0.4775     0.6598 0.144 0.136 0.000 0.708 0.004 0.008
#> GSM486745     4  0.4468     0.6579 0.200 0.064 0.000 0.720 0.000 0.016
#> GSM486747     1  0.6572     0.2730 0.472 0.024 0.020 0.328 0.000 0.156
#> GSM486749     4  0.3212     0.6996 0.056 0.072 0.004 0.852 0.000 0.016
#> GSM486751     4  0.5805     0.3499 0.324 0.040 0.008 0.560 0.000 0.068
#> GSM486753     4  0.4688     0.6665 0.100 0.116 0.000 0.748 0.012 0.024
#> GSM486755     4  0.4774     0.6613 0.136 0.116 0.000 0.724 0.004 0.020
#> GSM486757     3  0.0692     0.9837 0.000 0.000 0.976 0.004 0.000 0.020
#> GSM486759     1  0.4850     0.4372 0.672 0.028 0.008 0.264 0.004 0.024
#> GSM486761     1  0.6285     0.2737 0.440 0.032 0.008 0.404 0.000 0.116
#> GSM486763     5  0.0291     0.2562 0.004 0.000 0.000 0.004 0.992 0.000
#> GSM486765     1  0.5739     0.1782 0.592 0.000 0.028 0.140 0.000 0.240
#> GSM486767     4  0.8189    -0.1640 0.252 0.248 0.032 0.352 0.016 0.100
#> GSM486769     4  0.3509     0.6479 0.012 0.036 0.008 0.844 0.016 0.084
#> GSM486771     4  0.4469     0.6629 0.192 0.072 0.000 0.724 0.004 0.008
#> GSM486773     4  0.4386     0.6972 0.076 0.076 0.004 0.788 0.008 0.048
#> GSM486775     1  0.3573     0.5067 0.816 0.028 0.000 0.120 0.000 0.036
#> GSM486777     1  0.5996     0.2973 0.576 0.020 0.008 0.216 0.000 0.180
#> GSM486779     2  0.6132     0.5601 0.112 0.588 0.000 0.240 0.012 0.048
#> GSM486781     4  0.4155     0.7000 0.100 0.076 0.004 0.792 0.004 0.024
#> GSM486783     4  0.5132     0.6220 0.148 0.152 0.000 0.680 0.004 0.016
#> GSM486785     1  0.7949    -0.3828 0.392 0.108 0.092 0.104 0.000 0.304
#> GSM486787     1  0.3690     0.4987 0.820 0.028 0.000 0.112 0.012 0.028
#> GSM486789     4  0.3395     0.6925 0.048 0.064 0.004 0.852 0.008 0.024
#> GSM486791     1  0.7579    -0.4146 0.412 0.064 0.000 0.048 0.184 0.292
#> GSM486793     1  0.5987     0.1366 0.568 0.012 0.020 0.132 0.000 0.268
#> GSM486795     4  0.5002     0.3181 0.436 0.032 0.004 0.516 0.004 0.008
#> GSM486797     4  0.4551     0.6976 0.136 0.072 0.000 0.748 0.000 0.044
#> GSM486799     1  0.4935     0.2128 0.728 0.060 0.004 0.052 0.004 0.152
#> GSM486801     1  0.3813     0.5004 0.768 0.028 0.000 0.188 0.000 0.016
#> GSM486803     1  0.7163    -0.2888 0.424 0.136 0.016 0.012 0.056 0.356
#> GSM486805     4  0.5123     0.6441 0.192 0.080 0.004 0.688 0.000 0.036
#> GSM486807     4  0.5414    -0.0604 0.424 0.028 0.004 0.500 0.000 0.044
#> GSM486809     4  0.4207     0.6370 0.040 0.036 0.012 0.808 0.016 0.088
#> GSM486811     1  0.5241     0.4099 0.644 0.016 0.004 0.240 0.000 0.096
#> GSM486813     4  0.6819     0.1945 0.236 0.280 0.000 0.428 0.000 0.056
#> GSM486815     6  0.5920     0.6350 0.392 0.024 0.012 0.080 0.000 0.492
#> GSM486817     1  0.6975     0.2160 0.496 0.112 0.000 0.212 0.004 0.176
#> GSM486819     4  0.5442     0.4592 0.364 0.044 0.000 0.552 0.004 0.036
#> GSM486822     4  0.3601     0.6457 0.016 0.036 0.008 0.840 0.016 0.084
#> GSM486824     1  0.6895     0.0905 0.564 0.132 0.012 0.100 0.012 0.180
#> GSM486828     4  0.3626     0.7057 0.088 0.064 0.004 0.824 0.000 0.020
#> GSM486831     1  0.4877     0.4940 0.732 0.040 0.004 0.168 0.016 0.040
#> GSM486833     4  0.6182     0.3196 0.272 0.036 0.008 0.552 0.000 0.132
#> GSM486835     1  0.4984     0.4361 0.744 0.052 0.004 0.100 0.012 0.088
#> GSM486837     4  0.4005     0.6934 0.124 0.068 0.004 0.788 0.000 0.016
#> GSM486839     1  0.3301     0.5088 0.828 0.032 0.000 0.124 0.000 0.016
#> GSM486841     1  0.6024     0.2735 0.592 0.020 0.016 0.172 0.000 0.200
#> GSM486843     1  0.5044     0.4784 0.724 0.048 0.008 0.160 0.008 0.052
#> GSM486845     4  0.3280     0.6986 0.084 0.056 0.004 0.844 0.000 0.012
#> GSM486847     1  0.3993     0.4918 0.800 0.040 0.004 0.108 0.000 0.048
#> GSM486849     4  0.3216     0.6975 0.060 0.068 0.004 0.852 0.000 0.016
#> GSM486851     5  0.7363     0.2218 0.316 0.044 0.000 0.028 0.352 0.260
#> GSM486853     4  0.3709     0.6648 0.036 0.124 0.008 0.812 0.000 0.020
#> GSM486855     4  0.4992     0.6387 0.200 0.124 0.000 0.668 0.004 0.004
#> GSM486857     4  0.4656     0.6275 0.060 0.176 0.012 0.732 0.000 0.020
#> GSM486736     4  0.3595     0.6495 0.020 0.036 0.008 0.840 0.012 0.084
#> GSM486738     4  0.5534     0.5120 0.136 0.240 0.000 0.608 0.004 0.012
#> GSM486740     4  0.4136     0.6794 0.180 0.048 0.000 0.756 0.004 0.012
#> GSM486742     4  0.4259     0.6586 0.096 0.160 0.000 0.740 0.004 0.000
#> GSM486744     4  0.5031     0.6682 0.188 0.116 0.000 0.680 0.012 0.004
#> GSM486746     4  0.4628     0.6486 0.216 0.064 0.000 0.704 0.004 0.012
#> GSM486748     4  0.5998     0.2470 0.344 0.056 0.016 0.536 0.000 0.048
#> GSM486750     4  0.2952     0.6960 0.052 0.068 0.000 0.864 0.000 0.016
#> GSM486752     4  0.5695     0.3526 0.320 0.040 0.008 0.572 0.000 0.060
#> GSM486754     4  0.4732     0.6672 0.104 0.116 0.000 0.744 0.012 0.024
#> GSM486756     4  0.4774     0.6613 0.136 0.116 0.000 0.724 0.004 0.020
#> GSM486758     3  0.0458     0.9838 0.000 0.000 0.984 0.000 0.000 0.016
#> GSM486760     1  0.4471     0.4997 0.744 0.024 0.008 0.188 0.008 0.028
#> GSM486762     1  0.6286     0.2726 0.436 0.032 0.008 0.408 0.000 0.116
#> GSM486764     5  0.0291     0.2562 0.004 0.000 0.000 0.004 0.992 0.000
#> GSM486766     1  0.5703     0.2911 0.616 0.004 0.024 0.156 0.000 0.200
#> GSM486768     4  0.5200     0.6104 0.296 0.048 0.000 0.624 0.012 0.020
#> GSM486770     4  0.3346     0.6509 0.012 0.032 0.008 0.852 0.012 0.084
#> GSM486772     4  0.4401     0.6709 0.176 0.068 0.000 0.740 0.008 0.008
#> GSM486774     4  0.4351     0.6877 0.092 0.068 0.004 0.780 0.000 0.056
#> GSM486776     1  0.4072     0.4929 0.796 0.028 0.008 0.108 0.000 0.060
#> GSM486778     1  0.6017     0.2979 0.572 0.020 0.008 0.220 0.000 0.180
#> GSM486780     2  0.4838     0.4286 0.144 0.732 0.000 0.056 0.004 0.064
#> GSM486782     4  0.3864     0.7027 0.096 0.064 0.004 0.812 0.004 0.020
#> GSM486784     4  0.5099     0.6211 0.148 0.148 0.000 0.684 0.004 0.016
#> GSM486786     6  0.7157     0.2852 0.380 0.100 0.084 0.032 0.000 0.404
#> GSM486788     1  0.3968     0.5125 0.792 0.036 0.000 0.140 0.012 0.020
#> GSM486790     4  0.3263     0.6930 0.040 0.064 0.004 0.860 0.008 0.024
#> GSM486792     1  0.7579    -0.4146 0.412 0.064 0.000 0.048 0.184 0.292
#> GSM486794     1  0.5897     0.1373 0.572 0.008 0.020 0.132 0.000 0.268
#> GSM486796     4  0.5002     0.3197 0.436 0.032 0.004 0.516 0.004 0.008
#> GSM486798     4  0.5523     0.3279 0.324 0.040 0.004 0.584 0.004 0.044
#> GSM486800     1  0.4520     0.4942 0.760 0.028 0.004 0.144 0.008 0.056
#> GSM486802     1  0.4000     0.4996 0.756 0.032 0.000 0.192 0.000 0.020
#> GSM486804     1  0.7050    -0.2279 0.420 0.288 0.000 0.032 0.024 0.236
#> GSM486806     4  0.4959     0.6632 0.152 0.064 0.008 0.724 0.000 0.052
#> GSM486808     1  0.5887     0.3305 0.504 0.012 0.012 0.368 0.000 0.104
#> GSM486810     4  0.3998     0.6396 0.036 0.036 0.012 0.820 0.012 0.084
#> GSM486812     1  0.5238     0.4110 0.648 0.016 0.004 0.232 0.000 0.100
#> GSM486814     4  0.6525     0.3352 0.220 0.252 0.000 0.484 0.000 0.044
#> GSM486816     6  0.5986     0.6356 0.392 0.028 0.012 0.080 0.000 0.488
#> GSM486818     1  0.7613     0.1685 0.468 0.108 0.004 0.188 0.032 0.200
#> GSM486821     4  0.5815     0.4540 0.352 0.060 0.000 0.540 0.012 0.036
#> GSM486823     4  0.3670     0.6466 0.016 0.040 0.008 0.836 0.016 0.084
#> GSM486826     1  0.6595    -0.0161 0.572 0.120 0.020 0.052 0.008 0.228
#> GSM486830     4  0.3617     0.7062 0.092 0.060 0.004 0.824 0.000 0.020
#> GSM486832     1  0.4555     0.4904 0.760 0.044 0.000 0.140 0.016 0.040
#> GSM486834     4  0.6166     0.3236 0.268 0.036 0.008 0.556 0.000 0.132
#> GSM486836     1  0.3818     0.4561 0.812 0.024 0.000 0.088 0.004 0.072
#> GSM486838     4  0.5642     0.5783 0.200 0.116 0.016 0.644 0.000 0.024
#> GSM486840     1  0.3301     0.5088 0.828 0.032 0.000 0.124 0.000 0.016
#> GSM486842     1  0.5841     0.2370 0.600 0.012 0.016 0.156 0.000 0.216
#> GSM486844     1  0.5669     0.4208 0.668 0.088 0.008 0.172 0.004 0.060
#> GSM486846     4  0.3280     0.6986 0.084 0.056 0.004 0.844 0.000 0.012
#> GSM486848     1  0.4025     0.4312 0.812 0.036 0.008 0.076 0.004 0.064
#> GSM486850     4  0.3216     0.6975 0.060 0.068 0.004 0.852 0.000 0.016
#> GSM486852     5  0.7363     0.2218 0.316 0.044 0.000 0.028 0.352 0.260
#> GSM486854     4  0.3785     0.6601 0.036 0.140 0.008 0.800 0.000 0.016
#> GSM486856     4  0.5178     0.6218 0.212 0.136 0.000 0.644 0.004 0.004
#> GSM486858     4  0.5089     0.5963 0.056 0.200 0.016 0.696 0.000 0.032

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 agent(p) individual(p) k
#> CV:hclust 116    1.000      6.52e-06 2
#> CV:hclust  70    1.000      4.01e-04 3
#> CV:hclust  96    0.996      3.34e-11 4
#> CV:hclust  86    1.000      5.88e-13 5
#> CV:hclust  61    0.878      1.09e-08 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 120 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 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-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.505           0.858       0.910         0.4961 0.498   0.498
#> 3 3 0.473           0.574       0.768         0.2492 0.961   0.923
#> 4 4 0.489           0.361       0.671         0.1346 0.830   0.637
#> 5 5 0.513           0.504       0.694         0.0764 0.878   0.634
#> 6 6 0.558           0.508       0.677         0.0464 0.913   0.663

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
#> GSM486735     2  0.0000      0.897 0.000 1.000
#> GSM486737     2  0.6712      0.847 0.176 0.824
#> GSM486739     2  0.6801      0.845 0.180 0.820
#> GSM486741     2  0.0376      0.896 0.004 0.996
#> GSM486743     2  0.6801      0.845 0.180 0.820
#> GSM486745     2  0.6973      0.839 0.188 0.812
#> GSM486747     1  0.7453      0.829 0.788 0.212
#> GSM486749     2  0.0000      0.897 0.000 1.000
#> GSM486751     2  0.2778      0.864 0.048 0.952
#> GSM486753     2  0.6712      0.847 0.176 0.824
#> GSM486755     2  0.6712      0.847 0.176 0.824
#> GSM486757     2  0.9686      0.135 0.396 0.604
#> GSM486759     1  0.1184      0.896 0.984 0.016
#> GSM486761     1  0.7139      0.841 0.804 0.196
#> GSM486763     1  0.1633      0.884 0.976 0.024
#> GSM486765     1  0.7056      0.844 0.808 0.192
#> GSM486767     2  0.7376      0.822 0.208 0.792
#> GSM486769     2  0.0000      0.897 0.000 1.000
#> GSM486771     2  0.6712      0.847 0.176 0.824
#> GSM486773     2  0.0000      0.897 0.000 1.000
#> GSM486775     1  0.1184      0.896 0.984 0.016
#> GSM486777     1  0.7056      0.844 0.808 0.192
#> GSM486779     2  0.6887      0.842 0.184 0.816
#> GSM486781     2  0.0000      0.897 0.000 1.000
#> GSM486783     2  0.6712      0.847 0.176 0.824
#> GSM486785     1  0.7056      0.844 0.808 0.192
#> GSM486787     1  0.1184      0.896 0.984 0.016
#> GSM486789     2  0.0000      0.897 0.000 1.000
#> GSM486791     1  0.0376      0.890 0.996 0.004
#> GSM486793     1  0.7056      0.844 0.808 0.192
#> GSM486795     1  0.6438      0.754 0.836 0.164
#> GSM486797     2  0.0000      0.897 0.000 1.000
#> GSM486799     1  0.1184      0.896 0.984 0.016
#> GSM486801     1  0.1184      0.896 0.984 0.016
#> GSM486803     1  0.1184      0.896 0.984 0.016
#> GSM486805     2  0.0000      0.897 0.000 1.000
#> GSM486807     1  0.7056      0.844 0.808 0.192
#> GSM486809     2  0.0376      0.895 0.004 0.996
#> GSM486811     1  0.7056      0.844 0.808 0.192
#> GSM486813     2  0.7453      0.818 0.212 0.788
#> GSM486815     1  0.6973      0.843 0.812 0.188
#> GSM486817     2  0.8661      0.727 0.288 0.712
#> GSM486819     1  0.8386      0.559 0.732 0.268
#> GSM486822     2  0.0000      0.897 0.000 1.000
#> GSM486824     1  0.1184      0.896 0.984 0.016
#> GSM486828     2  0.0000      0.897 0.000 1.000
#> GSM486831     1  0.1184      0.896 0.984 0.016
#> GSM486833     2  0.3733      0.843 0.072 0.928
#> GSM486835     1  0.1184      0.896 0.984 0.016
#> GSM486837     2  0.0000      0.897 0.000 1.000
#> GSM486839     1  0.1184      0.896 0.984 0.016
#> GSM486841     1  0.7056      0.844 0.808 0.192
#> GSM486843     1  0.1184      0.896 0.984 0.016
#> GSM486845     2  0.0000      0.897 0.000 1.000
#> GSM486847     1  0.1184      0.896 0.984 0.016
#> GSM486849     2  0.0000      0.897 0.000 1.000
#> GSM486851     1  0.0376      0.890 0.996 0.004
#> GSM486853     2  0.0000      0.897 0.000 1.000
#> GSM486855     2  0.6712      0.847 0.176 0.824
#> GSM486857     2  0.0000      0.897 0.000 1.000
#> GSM486736     2  0.0000      0.897 0.000 1.000
#> GSM486738     2  0.6712      0.847 0.176 0.824
#> GSM486740     2  0.6801      0.845 0.180 0.820
#> GSM486742     2  0.0376      0.896 0.004 0.996
#> GSM486744     2  0.6712      0.847 0.176 0.824
#> GSM486746     2  0.6887      0.842 0.184 0.816
#> GSM486748     1  0.8499      0.762 0.724 0.276
#> GSM486750     2  0.0000      0.897 0.000 1.000
#> GSM486752     2  0.6343      0.731 0.160 0.840
#> GSM486754     2  0.6712      0.847 0.176 0.824
#> GSM486756     2  0.6712      0.847 0.176 0.824
#> GSM486758     1  0.7299      0.833 0.796 0.204
#> GSM486760     1  0.1184      0.896 0.984 0.016
#> GSM486762     1  0.7219      0.839 0.800 0.200
#> GSM486764     1  0.1184      0.888 0.984 0.016
#> GSM486766     1  0.7056      0.844 0.808 0.192
#> GSM486768     2  0.6887      0.842 0.184 0.816
#> GSM486770     2  0.0000      0.897 0.000 1.000
#> GSM486772     2  0.6712      0.847 0.176 0.824
#> GSM486774     2  0.0000      0.897 0.000 1.000
#> GSM486776     1  0.1184      0.896 0.984 0.016
#> GSM486778     1  0.7056      0.844 0.808 0.192
#> GSM486780     2  0.7139      0.833 0.196 0.804
#> GSM486782     2  0.0000      0.897 0.000 1.000
#> GSM486784     2  0.6712      0.847 0.176 0.824
#> GSM486786     1  0.7056      0.844 0.808 0.192
#> GSM486788     1  0.1184      0.896 0.984 0.016
#> GSM486790     2  0.0000      0.897 0.000 1.000
#> GSM486792     1  0.0376      0.890 0.996 0.004
#> GSM486794     1  0.7056      0.844 0.808 0.192
#> GSM486796     1  0.1843      0.890 0.972 0.028
#> GSM486798     2  0.0672      0.893 0.008 0.992
#> GSM486800     1  0.1184      0.896 0.984 0.016
#> GSM486802     1  0.1184      0.896 0.984 0.016
#> GSM486804     1  0.1184      0.896 0.984 0.016
#> GSM486806     2  0.0000      0.897 0.000 1.000
#> GSM486808     1  0.7056      0.844 0.808 0.192
#> GSM486810     2  0.0000      0.897 0.000 1.000
#> GSM486812     1  0.7056      0.844 0.808 0.192
#> GSM486814     2  0.6801      0.845 0.180 0.820
#> GSM486816     1  0.6973      0.843 0.812 0.188
#> GSM486818     1  0.6801      0.731 0.820 0.180
#> GSM486821     1  0.7602      0.665 0.780 0.220
#> GSM486823     2  0.0000      0.897 0.000 1.000
#> GSM486826     1  0.1184      0.896 0.984 0.016
#> GSM486830     2  0.0000      0.897 0.000 1.000
#> GSM486832     1  0.1184      0.896 0.984 0.016
#> GSM486834     2  0.2603      0.867 0.044 0.956
#> GSM486836     1  0.1184      0.896 0.984 0.016
#> GSM486838     2  0.0000      0.897 0.000 1.000
#> GSM486840     1  0.1184      0.896 0.984 0.016
#> GSM486842     1  0.7056      0.844 0.808 0.192
#> GSM486844     1  0.1184      0.896 0.984 0.016
#> GSM486846     2  0.0000      0.897 0.000 1.000
#> GSM486848     1  0.1184      0.896 0.984 0.016
#> GSM486850     2  0.0000      0.897 0.000 1.000
#> GSM486852     1  0.0376      0.890 0.996 0.004
#> GSM486854     2  0.0000      0.897 0.000 1.000
#> GSM486856     2  0.6712      0.847 0.176 0.824
#> GSM486858     2  0.0000      0.897 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
#> GSM486735     2  0.5591     0.7305 0.304 0.696 0.000
#> GSM486737     2  0.3921     0.7021 0.036 0.884 0.080
#> GSM486739     2  0.6266     0.6615 0.156 0.768 0.076
#> GSM486741     2  0.3038     0.7593 0.104 0.896 0.000
#> GSM486743     2  0.4217     0.6906 0.032 0.868 0.100
#> GSM486745     2  0.6910     0.6166 0.144 0.736 0.120
#> GSM486747     3  0.7292     0.0798 0.472 0.028 0.500
#> GSM486749     2  0.5098     0.7622 0.248 0.752 0.000
#> GSM486751     2  0.8330     0.5371 0.356 0.552 0.092
#> GSM486753     2  0.3889     0.7062 0.032 0.884 0.084
#> GSM486755     2  0.4544     0.6973 0.056 0.860 0.084
#> GSM486757     1  0.5810     0.4364 0.796 0.072 0.132
#> GSM486759     3  0.0237     0.6635 0.000 0.004 0.996
#> GSM486761     3  0.6600     0.3092 0.384 0.012 0.604
#> GSM486763     1  0.8949     0.3691 0.532 0.148 0.320
#> GSM486765     3  0.5988     0.4681 0.304 0.008 0.688
#> GSM486767     2  0.8163     0.3918 0.248 0.628 0.124
#> GSM486769     2  0.5591     0.7305 0.304 0.696 0.000
#> GSM486771     2  0.4007     0.6989 0.036 0.880 0.084
#> GSM486773     2  0.5058     0.7637 0.244 0.756 0.000
#> GSM486775     3  0.0747     0.6639 0.016 0.000 0.984
#> GSM486777     3  0.5461     0.5331 0.244 0.008 0.748
#> GSM486779     2  0.7510     0.4966 0.184 0.692 0.124
#> GSM486781     2  0.5016     0.7606 0.240 0.760 0.000
#> GSM486783     2  0.3637     0.7042 0.024 0.892 0.084
#> GSM486785     3  0.6625     0.2062 0.440 0.008 0.552
#> GSM486787     3  0.0000     0.6645 0.000 0.000 1.000
#> GSM486789     2  0.4750     0.7685 0.216 0.784 0.000
#> GSM486791     3  0.4834     0.4719 0.204 0.004 0.792
#> GSM486793     3  0.6047     0.4635 0.312 0.008 0.680
#> GSM486795     3  0.5219     0.4065 0.016 0.196 0.788
#> GSM486797     2  0.5497     0.7286 0.292 0.708 0.000
#> GSM486799     3  0.0237     0.6650 0.004 0.000 0.996
#> GSM486801     3  0.0237     0.6639 0.004 0.000 0.996
#> GSM486803     3  0.5254     0.3378 0.264 0.000 0.736
#> GSM486805     2  0.5623     0.7426 0.280 0.716 0.004
#> GSM486807     3  0.5797     0.4923 0.280 0.008 0.712
#> GSM486809     2  0.5706     0.7252 0.320 0.680 0.000
#> GSM486811     3  0.5292     0.5450 0.228 0.008 0.764
#> GSM486813     2  0.6975     0.5416 0.144 0.732 0.124
#> GSM486815     1  0.6672    -0.1707 0.520 0.008 0.472
#> GSM486817     2  0.9387     0.0760 0.272 0.508 0.220
#> GSM486819     3  0.7835     0.1294 0.112 0.232 0.656
#> GSM486822     2  0.5138     0.7562 0.252 0.748 0.000
#> GSM486824     3  0.4784     0.4464 0.200 0.004 0.796
#> GSM486828     2  0.4931     0.7637 0.232 0.768 0.000
#> GSM486831     3  0.0424     0.6624 0.008 0.000 0.992
#> GSM486833     2  0.7672     0.4689 0.468 0.488 0.044
#> GSM486835     3  0.0592     0.6607 0.012 0.000 0.988
#> GSM486837     2  0.5363     0.7411 0.276 0.724 0.000
#> GSM486839     3  0.0237     0.6650 0.004 0.000 0.996
#> GSM486841     3  0.5461     0.5280 0.244 0.008 0.748
#> GSM486843     3  0.1031     0.6539 0.024 0.000 0.976
#> GSM486845     2  0.4654     0.7658 0.208 0.792 0.000
#> GSM486847     3  0.0424     0.6650 0.008 0.000 0.992
#> GSM486849     2  0.4452     0.7688 0.192 0.808 0.000
#> GSM486851     3  0.6834     0.2866 0.260 0.048 0.692
#> GSM486853     2  0.4555     0.7668 0.200 0.800 0.000
#> GSM486855     2  0.3043     0.7085 0.008 0.908 0.084
#> GSM486857     2  0.5529     0.7366 0.296 0.704 0.000
#> GSM486736     2  0.5591     0.7305 0.304 0.696 0.000
#> GSM486738     2  0.3889     0.6990 0.032 0.884 0.084
#> GSM486740     2  0.6266     0.6615 0.156 0.768 0.076
#> GSM486742     2  0.2625     0.7581 0.084 0.916 0.000
#> GSM486744     2  0.3637     0.7059 0.024 0.892 0.084
#> GSM486746     2  0.7256     0.6285 0.164 0.712 0.124
#> GSM486748     3  0.8173     0.0649 0.420 0.072 0.508
#> GSM486750     2  0.5016     0.7625 0.240 0.760 0.000
#> GSM486752     2  0.9574     0.2046 0.392 0.412 0.196
#> GSM486754     2  0.3889     0.7062 0.032 0.884 0.084
#> GSM486756     2  0.4339     0.7006 0.048 0.868 0.084
#> GSM486758     1  0.5384     0.4239 0.788 0.024 0.188
#> GSM486760     3  0.0237     0.6639 0.004 0.000 0.996
#> GSM486762     3  0.6962     0.2273 0.412 0.020 0.568
#> GSM486764     1  0.8841     0.3581 0.528 0.132 0.340
#> GSM486766     3  0.5692     0.5050 0.268 0.008 0.724
#> GSM486768     2  0.4662     0.6801 0.032 0.844 0.124
#> GSM486770     2  0.5591     0.7305 0.304 0.696 0.000
#> GSM486772     2  0.3889     0.7041 0.032 0.884 0.084
#> GSM486774     2  0.5138     0.7587 0.252 0.748 0.000
#> GSM486776     3  0.0747     0.6639 0.016 0.000 0.984
#> GSM486778     3  0.5420     0.5354 0.240 0.008 0.752
#> GSM486780     2  0.8129     0.3642 0.244 0.632 0.124
#> GSM486782     2  0.5016     0.7606 0.240 0.760 0.000
#> GSM486784     2  0.3502     0.7054 0.020 0.896 0.084
#> GSM486786     3  0.6683     0.0402 0.496 0.008 0.496
#> GSM486788     3  0.0237     0.6639 0.004 0.000 0.996
#> GSM486790     2  0.4062     0.7698 0.164 0.836 0.000
#> GSM486792     3  0.4605     0.4768 0.204 0.000 0.796
#> GSM486794     3  0.5896     0.4863 0.292 0.008 0.700
#> GSM486796     3  0.3129     0.5837 0.008 0.088 0.904
#> GSM486798     2  0.5397     0.7415 0.280 0.720 0.000
#> GSM486800     3  0.0000     0.6645 0.000 0.000 1.000
#> GSM486802     3  0.0237     0.6639 0.004 0.000 0.996
#> GSM486804     3  0.5070     0.4059 0.224 0.004 0.772
#> GSM486806     2  0.5397     0.7419 0.280 0.720 0.000
#> GSM486808     3  0.5692     0.5047 0.268 0.008 0.724
#> GSM486810     2  0.5650     0.7262 0.312 0.688 0.000
#> GSM486812     3  0.5292     0.5450 0.228 0.008 0.764
#> GSM486814     2  0.4708     0.6684 0.036 0.844 0.120
#> GSM486816     3  0.6664     0.1433 0.464 0.008 0.528
#> GSM486818     3  0.9783    -0.3259 0.300 0.264 0.436
#> GSM486821     3  0.8033     0.1052 0.120 0.240 0.640
#> GSM486823     2  0.5098     0.7568 0.248 0.752 0.000
#> GSM486826     3  0.5024     0.4201 0.220 0.004 0.776
#> GSM486830     2  0.4796     0.7646 0.220 0.780 0.000
#> GSM486832     3  0.0237     0.6635 0.004 0.000 0.996
#> GSM486834     2  0.6777     0.6421 0.364 0.616 0.020
#> GSM486836     3  0.0000     0.6645 0.000 0.000 1.000
#> GSM486838     2  0.5775     0.7394 0.260 0.728 0.012
#> GSM486840     3  0.0237     0.6650 0.004 0.000 0.996
#> GSM486842     3  0.5335     0.5386 0.232 0.008 0.760
#> GSM486844     3  0.2918     0.6224 0.044 0.032 0.924
#> GSM486846     2  0.4605     0.7662 0.204 0.796 0.000
#> GSM486848     3  0.0237     0.6650 0.004 0.000 0.996
#> GSM486850     2  0.4452     0.7680 0.192 0.808 0.000
#> GSM486852     3  0.7283     0.2520 0.260 0.068 0.672
#> GSM486854     2  0.4842     0.7616 0.224 0.776 0.000
#> GSM486856     2  0.3769     0.6943 0.016 0.880 0.104
#> GSM486858     2  0.5178     0.7552 0.256 0.744 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM486735     2  0.5511   0.404433 0.032 0.636 0.000 0.332
#> GSM486737     4  0.6225   0.449641 0.008 0.456 0.036 0.500
#> GSM486739     4  0.6538   0.184856 0.052 0.396 0.012 0.540
#> GSM486741     2  0.4897   0.105672 0.000 0.660 0.008 0.332
#> GSM486743     4  0.6242   0.456110 0.004 0.456 0.044 0.496
#> GSM486745     4  0.7290   0.289313 0.040 0.332 0.072 0.556
#> GSM486747     1  0.7529   0.614978 0.508 0.164 0.320 0.008
#> GSM486749     2  0.3743   0.561004 0.016 0.824 0.000 0.160
#> GSM486751     2  0.6385   0.382425 0.224 0.676 0.076 0.024
#> GSM486753     4  0.6268   0.395723 0.012 0.476 0.032 0.480
#> GSM486755     4  0.6426   0.470639 0.020 0.424 0.032 0.524
#> GSM486757     1  0.5499   0.524358 0.756 0.156 0.020 0.068
#> GSM486759     3  0.0469   0.622261 0.012 0.000 0.988 0.000
#> GSM486761     1  0.7497   0.553562 0.444 0.156 0.396 0.004
#> GSM486763     4  0.7369  -0.094427 0.408 0.000 0.160 0.432
#> GSM486765     3  0.5897  -0.335914 0.468 0.020 0.504 0.008
#> GSM486767     4  0.8417   0.430415 0.156 0.332 0.052 0.460
#> GSM486769     2  0.5492   0.406414 0.032 0.640 0.000 0.328
#> GSM486771     4  0.6090   0.460980 0.004 0.448 0.036 0.512
#> GSM486773     2  0.2500   0.594894 0.040 0.916 0.000 0.044
#> GSM486775     3  0.1356   0.614698 0.032 0.000 0.960 0.008
#> GSM486777     3  0.5349   0.031655 0.336 0.024 0.640 0.000
#> GSM486779     4  0.8480   0.435859 0.160 0.300 0.060 0.480
#> GSM486781     2  0.1624   0.601326 0.028 0.952 0.000 0.020
#> GSM486783     4  0.5938   0.424309 0.000 0.480 0.036 0.484
#> GSM486785     1  0.6212   0.561405 0.620 0.024 0.324 0.032
#> GSM486787     3  0.1488   0.616847 0.032 0.000 0.956 0.012
#> GSM486789     2  0.4212   0.501731 0.012 0.772 0.000 0.216
#> GSM486791     3  0.7110   0.282067 0.236 0.000 0.564 0.200
#> GSM486793     3  0.6014  -0.371361 0.484 0.020 0.484 0.012
#> GSM486795     3  0.4327   0.485115 0.016 0.020 0.812 0.152
#> GSM486797     2  0.4057   0.547065 0.120 0.836 0.008 0.036
#> GSM486799     3  0.1284   0.619095 0.024 0.000 0.964 0.012
#> GSM486801     3  0.0336   0.621950 0.000 0.000 0.992 0.008
#> GSM486803     3  0.6516   0.249654 0.308 0.000 0.592 0.100
#> GSM486805     2  0.3575   0.572751 0.092 0.868 0.012 0.028
#> GSM486807     3  0.5735  -0.162511 0.392 0.032 0.576 0.000
#> GSM486809     2  0.5717   0.405913 0.044 0.632 0.000 0.324
#> GSM486811     3  0.5184   0.120724 0.304 0.024 0.672 0.000
#> GSM486813     4  0.7775   0.477532 0.076 0.360 0.060 0.504
#> GSM486815     1  0.5664   0.581499 0.688 0.016 0.264 0.032
#> GSM486817     4  0.9669   0.315761 0.276 0.176 0.184 0.364
#> GSM486819     3  0.7643   0.292726 0.064 0.120 0.608 0.208
#> GSM486822     2  0.4434   0.508182 0.016 0.756 0.000 0.228
#> GSM486824     3  0.5787   0.354775 0.244 0.000 0.680 0.076
#> GSM486828     2  0.2385   0.599815 0.028 0.920 0.000 0.052
#> GSM486831     3  0.0804   0.619019 0.008 0.000 0.980 0.012
#> GSM486833     2  0.6389   0.146118 0.400 0.548 0.028 0.024
#> GSM486835     3  0.0779   0.621677 0.016 0.000 0.980 0.004
#> GSM486837     2  0.3370   0.574748 0.080 0.872 0.000 0.048
#> GSM486839     3  0.0927   0.621123 0.016 0.000 0.976 0.008
#> GSM486841     3  0.5349   0.031026 0.336 0.024 0.640 0.000
#> GSM486843     3  0.2385   0.594461 0.052 0.000 0.920 0.028
#> GSM486845     2  0.2266   0.574421 0.004 0.912 0.000 0.084
#> GSM486847     3  0.0895   0.620301 0.020 0.000 0.976 0.004
#> GSM486849     2  0.2944   0.553308 0.004 0.868 0.000 0.128
#> GSM486851     3  0.7557   0.212720 0.260 0.000 0.488 0.252
#> GSM486853     2  0.2773   0.543874 0.004 0.880 0.000 0.116
#> GSM486855     2  0.5928  -0.424279 0.000 0.508 0.036 0.456
#> GSM486857     2  0.4525   0.527270 0.080 0.804 0.000 0.116
#> GSM486736     2  0.5530   0.399320 0.032 0.632 0.000 0.336
#> GSM486738     4  0.6229   0.450348 0.008 0.464 0.036 0.492
#> GSM486740     4  0.6310   0.160474 0.052 0.404 0.004 0.540
#> GSM486742     2  0.4917   0.061608 0.000 0.656 0.008 0.336
#> GSM486744     2  0.5858  -0.439650 0.000 0.500 0.032 0.468
#> GSM486746     4  0.7744   0.191382 0.052 0.380 0.080 0.488
#> GSM486748     1  0.7826   0.538447 0.400 0.212 0.384 0.004
#> GSM486750     2  0.3764   0.554683 0.012 0.816 0.000 0.172
#> GSM486752     2  0.7230   0.000224 0.272 0.556 0.168 0.004
#> GSM486754     2  0.6156  -0.426567 0.008 0.484 0.032 0.476
#> GSM486756     4  0.6442   0.460259 0.020 0.436 0.032 0.512
#> GSM486758     1  0.5603   0.551090 0.772 0.108 0.052 0.068
#> GSM486760     3  0.0000   0.621388 0.000 0.000 1.000 0.000
#> GSM486762     1  0.7557   0.551590 0.432 0.164 0.400 0.004
#> GSM486764     4  0.7371  -0.102596 0.416 0.000 0.160 0.424
#> GSM486766     3  0.5508  -0.165431 0.408 0.020 0.572 0.000
#> GSM486768     2  0.6306  -0.398136 0.000 0.544 0.064 0.392
#> GSM486770     2  0.5511   0.401839 0.032 0.636 0.000 0.332
#> GSM486772     4  0.5931   0.416182 0.000 0.460 0.036 0.504
#> GSM486774     2  0.2021   0.599606 0.040 0.936 0.000 0.024
#> GSM486776     3  0.1256   0.616868 0.028 0.000 0.964 0.008
#> GSM486778     3  0.5228   0.093547 0.312 0.024 0.664 0.000
#> GSM486780     4  0.8373   0.428235 0.212 0.236 0.048 0.504
#> GSM486782     2  0.1284   0.601507 0.024 0.964 0.000 0.012
#> GSM486784     2  0.5933  -0.435608 0.000 0.500 0.036 0.464
#> GSM486786     1  0.6066   0.571686 0.652 0.016 0.288 0.044
#> GSM486788     3  0.0804   0.622448 0.008 0.000 0.980 0.012
#> GSM486790     2  0.4663   0.406197 0.012 0.716 0.000 0.272
#> GSM486792     3  0.7110   0.282067 0.236 0.000 0.564 0.200
#> GSM486794     3  0.5895  -0.317846 0.464 0.020 0.508 0.008
#> GSM486796     3  0.2101   0.593751 0.012 0.000 0.928 0.060
#> GSM486798     2  0.2915   0.580437 0.088 0.892 0.004 0.016
#> GSM486800     3  0.0000   0.621388 0.000 0.000 1.000 0.000
#> GSM486802     3  0.0188   0.621455 0.000 0.000 0.996 0.004
#> GSM486804     3  0.6194   0.274651 0.288 0.000 0.628 0.084
#> GSM486806     2  0.2596   0.592272 0.068 0.908 0.000 0.024
#> GSM486808     3  0.5835  -0.133042 0.372 0.040 0.588 0.000
#> GSM486810     2  0.5636   0.419821 0.044 0.648 0.000 0.308
#> GSM486812     3  0.5161   0.129910 0.300 0.024 0.676 0.000
#> GSM486814     4  0.6311   0.455188 0.004 0.456 0.048 0.492
#> GSM486816     1  0.5833   0.558693 0.636 0.016 0.324 0.024
#> GSM486818     3  0.9466  -0.051964 0.312 0.120 0.360 0.208
#> GSM486821     3  0.7749   0.280201 0.064 0.124 0.596 0.216
#> GSM486823     2  0.4364   0.514960 0.016 0.764 0.000 0.220
#> GSM486826     3  0.5907   0.333308 0.252 0.000 0.668 0.080
#> GSM486830     2  0.1767   0.599690 0.012 0.944 0.000 0.044
#> GSM486832     3  0.1059   0.618035 0.012 0.000 0.972 0.016
#> GSM486834     2  0.4709   0.479625 0.200 0.768 0.008 0.024
#> GSM486836     3  0.0672   0.622241 0.008 0.000 0.984 0.008
#> GSM486838     2  0.3658   0.565100 0.064 0.864 0.004 0.068
#> GSM486840     3  0.0927   0.621123 0.016 0.000 0.976 0.008
#> GSM486842     3  0.5386   0.008611 0.344 0.024 0.632 0.000
#> GSM486844     3  0.3587   0.566353 0.056 0.016 0.876 0.052
#> GSM486846     2  0.2593   0.562079 0.004 0.892 0.000 0.104
#> GSM486848     3  0.0779   0.620929 0.016 0.000 0.980 0.004
#> GSM486850     2  0.2589   0.557416 0.000 0.884 0.000 0.116
#> GSM486852     3  0.7644   0.192424 0.260 0.000 0.468 0.272
#> GSM486854     2  0.2805   0.547234 0.012 0.888 0.000 0.100
#> GSM486856     2  0.6204  -0.442712 0.000 0.500 0.052 0.448
#> GSM486858     2  0.3821   0.533254 0.040 0.840 0.000 0.120

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM486735     4  0.6048     0.2573 0.000 0.116 0.004 0.536 0.344
#> GSM486737     2  0.3639     0.7932 0.008 0.808 0.000 0.164 0.020
#> GSM486739     5  0.7021     0.1517 0.008 0.296 0.000 0.312 0.384
#> GSM486741     2  0.4218     0.5790 0.000 0.660 0.000 0.332 0.008
#> GSM486743     2  0.4118     0.7983 0.012 0.780 0.000 0.176 0.032
#> GSM486745     2  0.7459    -0.1018 0.036 0.388 0.000 0.256 0.320
#> GSM486747     3  0.6309     0.6450 0.144 0.000 0.588 0.248 0.020
#> GSM486749     4  0.4985     0.5806 0.000 0.124 0.016 0.740 0.120
#> GSM486751     4  0.5624     0.4476 0.052 0.024 0.212 0.692 0.020
#> GSM486753     2  0.4822     0.7317 0.008 0.720 0.004 0.220 0.048
#> GSM486755     2  0.3768     0.7909 0.008 0.812 0.000 0.144 0.036
#> GSM486757     3  0.5041     0.4712 0.000 0.032 0.744 0.080 0.144
#> GSM486759     1  0.0960     0.7113 0.972 0.008 0.004 0.000 0.016
#> GSM486761     3  0.6480     0.6449 0.196 0.000 0.552 0.240 0.012
#> GSM486763     5  0.6941     0.3674 0.068 0.144 0.168 0.012 0.608
#> GSM486765     3  0.4726     0.6570 0.280 0.000 0.684 0.016 0.020
#> GSM486767     2  0.6617     0.5606 0.016 0.636 0.072 0.196 0.080
#> GSM486769     4  0.6020     0.2595 0.000 0.112 0.004 0.536 0.348
#> GSM486771     2  0.3863     0.7915 0.012 0.792 0.000 0.176 0.020
#> GSM486773     4  0.4038     0.6310 0.000 0.132 0.032 0.808 0.028
#> GSM486775     1  0.2011     0.6789 0.908 0.004 0.088 0.000 0.000
#> GSM486777     1  0.5569    -0.2538 0.496 0.000 0.452 0.028 0.024
#> GSM486779     2  0.5219     0.5757 0.024 0.768 0.056 0.056 0.096
#> GSM486781     4  0.3007     0.6373 0.000 0.104 0.028 0.864 0.004
#> GSM486783     2  0.3597     0.7902 0.012 0.800 0.000 0.180 0.008
#> GSM486785     3  0.6493     0.6220 0.212 0.060 0.644 0.032 0.052
#> GSM486787     1  0.1202     0.7066 0.960 0.004 0.032 0.000 0.004
#> GSM486789     4  0.6080     0.4366 0.000 0.204 0.004 0.592 0.200
#> GSM486791     1  0.5797     0.0729 0.512 0.000 0.080 0.004 0.404
#> GSM486793     3  0.4613     0.6568 0.276 0.000 0.692 0.016 0.016
#> GSM486795     1  0.4653     0.5659 0.764 0.168 0.012 0.012 0.044
#> GSM486797     4  0.4342     0.6097 0.000 0.092 0.116 0.784 0.008
#> GSM486799     1  0.1106     0.7070 0.964 0.000 0.024 0.000 0.012
#> GSM486801     1  0.1356     0.7087 0.956 0.004 0.012 0.000 0.028
#> GSM486803     1  0.7046     0.3746 0.572 0.088 0.188 0.000 0.152
#> GSM486805     4  0.3586     0.6297 0.004 0.052 0.092 0.844 0.008
#> GSM486807     3  0.5718     0.4781 0.420 0.000 0.496 0.084 0.000
#> GSM486809     4  0.6103     0.2521 0.000 0.108 0.008 0.532 0.352
#> GSM486811     1  0.5363    -0.1144 0.548 0.000 0.408 0.020 0.024
#> GSM486813     2  0.3861     0.7436 0.012 0.836 0.020 0.100 0.032
#> GSM486815     3  0.4572     0.6428 0.132 0.004 0.772 0.008 0.084
#> GSM486817     2  0.8567     0.0925 0.176 0.488 0.144 0.072 0.120
#> GSM486819     1  0.7128     0.1828 0.568 0.076 0.008 0.120 0.228
#> GSM486822     4  0.5663     0.4148 0.000 0.116 0.004 0.628 0.252
#> GSM486824     1  0.6277     0.4826 0.660 0.092 0.136 0.000 0.112
#> GSM486828     4  0.3584     0.6293 0.000 0.148 0.012 0.820 0.020
#> GSM486831     1  0.0968     0.7081 0.972 0.000 0.012 0.004 0.012
#> GSM486833     4  0.5877     0.0705 0.012 0.044 0.400 0.532 0.012
#> GSM486835     1  0.0566     0.7108 0.984 0.004 0.000 0.000 0.012
#> GSM486837     4  0.4169     0.6236 0.000 0.116 0.072 0.800 0.012
#> GSM486839     1  0.1243     0.7074 0.960 0.004 0.028 0.000 0.008
#> GSM486841     1  0.5076    -0.1932 0.528 0.000 0.444 0.016 0.012
#> GSM486843     1  0.2180     0.6883 0.924 0.032 0.024 0.000 0.020
#> GSM486845     4  0.4260     0.5737 0.000 0.236 0.012 0.736 0.016
#> GSM486847     1  0.1365     0.7032 0.952 0.004 0.040 0.000 0.004
#> GSM486849     4  0.4996     0.4933 0.000 0.304 0.012 0.652 0.032
#> GSM486851     5  0.5883     0.0435 0.420 0.012 0.068 0.000 0.500
#> GSM486853     4  0.4588     0.4880 0.000 0.308 0.012 0.668 0.012
#> GSM486855     2  0.3981     0.7772 0.012 0.764 0.000 0.212 0.012
#> GSM486857     4  0.5033     0.5536 0.000 0.236 0.064 0.692 0.008
#> GSM486736     4  0.6058     0.2523 0.000 0.116 0.004 0.532 0.348
#> GSM486738     2  0.3167     0.7961 0.008 0.836 0.000 0.148 0.008
#> GSM486740     5  0.7014     0.1320 0.008 0.284 0.000 0.324 0.384
#> GSM486742     2  0.4084     0.5776 0.000 0.668 0.000 0.328 0.004
#> GSM486744     2  0.4145     0.7901 0.012 0.772 0.000 0.188 0.028
#> GSM486746     5  0.8051     0.1744 0.088 0.264 0.000 0.320 0.328
#> GSM486748     3  0.6867     0.5627 0.184 0.004 0.476 0.324 0.012
#> GSM486750     4  0.4702     0.5840 0.000 0.116 0.012 0.760 0.112
#> GSM486752     4  0.6185     0.2065 0.080 0.012 0.284 0.604 0.020
#> GSM486754     2  0.4754     0.7254 0.008 0.712 0.000 0.232 0.048
#> GSM486756     2  0.3853     0.7909 0.008 0.804 0.000 0.152 0.036
#> GSM486758     3  0.5081     0.4622 0.000 0.032 0.740 0.080 0.148
#> GSM486760     1  0.0727     0.7103 0.980 0.004 0.004 0.000 0.012
#> GSM486762     3  0.6586     0.6280 0.192 0.000 0.528 0.268 0.012
#> GSM486764     5  0.6874     0.3650 0.068 0.148 0.168 0.008 0.608
#> GSM486766     3  0.4734     0.5938 0.344 0.000 0.632 0.016 0.008
#> GSM486768     2  0.5031     0.7386 0.024 0.692 0.000 0.248 0.036
#> GSM486770     4  0.6020     0.2595 0.000 0.112 0.004 0.536 0.348
#> GSM486772     2  0.4173     0.7719 0.008 0.760 0.000 0.204 0.028
#> GSM486774     4  0.3507     0.6371 0.000 0.104 0.036 0.844 0.016
#> GSM486776     1  0.1928     0.6863 0.920 0.004 0.072 0.000 0.004
#> GSM486778     1  0.5537    -0.1480 0.528 0.000 0.420 0.028 0.024
#> GSM486780     2  0.4717     0.5886 0.012 0.796 0.068 0.048 0.076
#> GSM486782     4  0.2856     0.6394 0.000 0.104 0.016 0.872 0.008
#> GSM486784     2  0.3670     0.7874 0.012 0.792 0.000 0.188 0.008
#> GSM486786     3  0.5683     0.6287 0.128 0.060 0.724 0.012 0.076
#> GSM486788     1  0.0889     0.7096 0.976 0.004 0.004 0.004 0.012
#> GSM486790     4  0.6479     0.2832 0.000 0.288 0.004 0.512 0.196
#> GSM486792     1  0.5797     0.0729 0.512 0.000 0.080 0.004 0.404
#> GSM486794     3  0.4658     0.6518 0.284 0.000 0.684 0.016 0.016
#> GSM486796     1  0.3072     0.6713 0.880 0.064 0.008 0.008 0.040
#> GSM486798     4  0.4130     0.6206 0.000 0.076 0.108 0.804 0.012
#> GSM486800     1  0.0727     0.7092 0.980 0.004 0.012 0.000 0.004
#> GSM486802     1  0.1428     0.7071 0.956 0.004 0.012 0.004 0.024
#> GSM486804     1  0.6931     0.3989 0.592 0.100 0.168 0.000 0.140
#> GSM486806     4  0.3116     0.6373 0.000 0.064 0.076 0.860 0.000
#> GSM486808     3  0.5594     0.4527 0.436 0.000 0.492 0.072 0.000
#> GSM486810     4  0.6020     0.2914 0.000 0.108 0.008 0.560 0.324
#> GSM486812     1  0.5267    -0.0874 0.560 0.000 0.400 0.020 0.020
#> GSM486814     2  0.3234     0.7892 0.012 0.836 0.000 0.144 0.008
#> GSM486816     3  0.4354     0.6689 0.172 0.004 0.772 0.008 0.044
#> GSM486818     1  0.9241    -0.1185 0.320 0.300 0.168 0.068 0.144
#> GSM486821     1  0.7255     0.1628 0.556 0.088 0.008 0.116 0.232
#> GSM486823     4  0.5568     0.4356 0.000 0.116 0.004 0.644 0.236
#> GSM486826     1  0.6529     0.4578 0.636 0.100 0.148 0.000 0.116
#> GSM486830     4  0.3284     0.6270 0.000 0.148 0.000 0.828 0.024
#> GSM486832     1  0.1560     0.7053 0.948 0.000 0.020 0.004 0.028
#> GSM486834     4  0.4860     0.5532 0.012 0.040 0.188 0.744 0.016
#> GSM486836     1  0.0648     0.7095 0.984 0.004 0.004 0.004 0.004
#> GSM486838     4  0.4528     0.5974 0.000 0.172 0.064 0.756 0.008
#> GSM486840     1  0.0932     0.7074 0.972 0.004 0.020 0.000 0.004
#> GSM486842     1  0.4798    -0.2540 0.512 0.000 0.472 0.012 0.004
#> GSM486844     1  0.2538     0.6872 0.904 0.064 0.016 0.004 0.012
#> GSM486846     4  0.4444     0.5483 0.000 0.264 0.012 0.708 0.016
#> GSM486848     1  0.1202     0.7051 0.960 0.004 0.032 0.000 0.004
#> GSM486850     4  0.4630     0.4997 0.000 0.300 0.008 0.672 0.020
#> GSM486852     5  0.6198     0.0908 0.396 0.024 0.076 0.000 0.504
#> GSM486854     4  0.4291     0.5119 0.000 0.276 0.016 0.704 0.004
#> GSM486856     2  0.3740     0.7835 0.012 0.784 0.000 0.196 0.008
#> GSM486858     4  0.4948     0.5204 0.000 0.280 0.036 0.672 0.012

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM486735     6  0.6259     0.6186 0.000 0.124 0.000 0.340 0.048 0.488
#> GSM486737     2  0.2394     0.7822 0.004 0.900 0.000 0.052 0.036 0.008
#> GSM486739     6  0.7497     0.4518 0.004 0.304 0.000 0.180 0.148 0.364
#> GSM486741     2  0.3236     0.6392 0.000 0.796 0.000 0.180 0.024 0.000
#> GSM486743     2  0.2118     0.7872 0.008 0.920 0.000 0.036 0.016 0.020
#> GSM486745     2  0.7674    -0.3293 0.044 0.392 0.000 0.152 0.092 0.320
#> GSM486747     3  0.5637     0.3871 0.072 0.000 0.516 0.384 0.004 0.024
#> GSM486749     4  0.5712     0.1122 0.000 0.196 0.000 0.560 0.008 0.236
#> GSM486751     4  0.4224     0.5513 0.048 0.032 0.144 0.772 0.000 0.004
#> GSM486753     2  0.3617     0.7015 0.000 0.816 0.000 0.080 0.016 0.088
#> GSM486755     2  0.3092     0.7583 0.000 0.860 0.000 0.036 0.040 0.064
#> GSM486757     3  0.6467     0.2618 0.000 0.004 0.572 0.096 0.176 0.152
#> GSM486759     1  0.0436     0.7130 0.988 0.004 0.000 0.000 0.004 0.004
#> GSM486761     3  0.5823     0.4738 0.132 0.004 0.512 0.344 0.004 0.004
#> GSM486763     5  0.3945     0.5528 0.016 0.060 0.032 0.000 0.816 0.076
#> GSM486765     3  0.4117     0.6216 0.228 0.000 0.732 0.016 0.012 0.012
#> GSM486767     2  0.7280     0.4625 0.016 0.560 0.064 0.124 0.064 0.172
#> GSM486769     6  0.6267     0.6173 0.000 0.124 0.000 0.344 0.048 0.484
#> GSM486771     2  0.2322     0.7822 0.008 0.912 0.004 0.024 0.012 0.040
#> GSM486773     4  0.4017     0.6344 0.000 0.120 0.008 0.792 0.016 0.064
#> GSM486775     1  0.2113     0.6718 0.896 0.000 0.092 0.000 0.004 0.008
#> GSM486777     3  0.4958     0.4040 0.424 0.000 0.524 0.036 0.016 0.000
#> GSM486779     2  0.7173     0.3060 0.032 0.492 0.080 0.016 0.076 0.304
#> GSM486781     4  0.3351     0.6779 0.000 0.160 0.000 0.800 0.000 0.040
#> GSM486783     2  0.1894     0.7882 0.004 0.928 0.000 0.040 0.012 0.016
#> GSM486785     3  0.6579     0.4840 0.116 0.004 0.608 0.064 0.040 0.168
#> GSM486787     1  0.1511     0.7084 0.944 0.000 0.012 0.000 0.012 0.032
#> GSM486789     6  0.6292     0.4550 0.000 0.232 0.000 0.372 0.012 0.384
#> GSM486791     5  0.5534     0.5329 0.412 0.000 0.080 0.004 0.492 0.012
#> GSM486793     3  0.3787     0.6143 0.208 0.000 0.760 0.008 0.016 0.008
#> GSM486795     1  0.3999     0.5495 0.800 0.132 0.008 0.024 0.024 0.012
#> GSM486797     4  0.3787     0.6714 0.008 0.124 0.056 0.804 0.004 0.004
#> GSM486799     1  0.1053     0.7120 0.964 0.000 0.012 0.000 0.004 0.020
#> GSM486801     1  0.0841     0.7110 0.976 0.004 0.004 0.004 0.008 0.004
#> GSM486803     1  0.7381    -0.0288 0.380 0.004 0.156 0.004 0.120 0.336
#> GSM486805     4  0.3692     0.6369 0.020 0.064 0.040 0.836 0.000 0.040
#> GSM486807     3  0.5801     0.5089 0.364 0.004 0.496 0.128 0.008 0.000
#> GSM486809     6  0.6488     0.6087 0.000 0.116 0.004 0.348 0.060 0.472
#> GSM486811     1  0.4829    -0.2812 0.520 0.000 0.436 0.032 0.012 0.000
#> GSM486813     2  0.3285     0.7599 0.012 0.864 0.008 0.024 0.036 0.056
#> GSM486815     3  0.4085     0.5434 0.096 0.000 0.804 0.016 0.036 0.048
#> GSM486817     6  0.9025    -0.1960 0.136 0.264 0.140 0.040 0.096 0.324
#> GSM486819     1  0.7346    -0.0307 0.540 0.068 0.012 0.116 0.200 0.064
#> GSM486822     6  0.5984     0.5313 0.000 0.124 0.004 0.404 0.016 0.452
#> GSM486824     1  0.7101     0.0773 0.440 0.020 0.136 0.000 0.076 0.328
#> GSM486828     4  0.4708     0.6400 0.000 0.192 0.008 0.716 0.016 0.068
#> GSM486831     1  0.1296     0.7040 0.952 0.000 0.004 0.012 0.032 0.000
#> GSM486833     4  0.5090     0.2295 0.008 0.044 0.340 0.596 0.008 0.004
#> GSM486835     1  0.1015     0.7102 0.968 0.000 0.004 0.004 0.012 0.012
#> GSM486837     4  0.3275     0.6881 0.000 0.148 0.012 0.820 0.004 0.016
#> GSM486839     1  0.0912     0.7143 0.972 0.004 0.004 0.000 0.008 0.012
#> GSM486841     3  0.4978     0.3365 0.468 0.000 0.484 0.032 0.012 0.004
#> GSM486843     1  0.3107     0.6360 0.860 0.004 0.036 0.008 0.008 0.084
#> GSM486845     4  0.5041     0.5898 0.000 0.316 0.004 0.608 0.008 0.064
#> GSM486847     1  0.1692     0.6990 0.932 0.000 0.048 0.000 0.012 0.008
#> GSM486849     4  0.5893     0.4669 0.000 0.368 0.012 0.512 0.020 0.088
#> GSM486851     5  0.5196     0.6952 0.260 0.020 0.024 0.008 0.660 0.028
#> GSM486853     4  0.5062     0.5515 0.000 0.376 0.004 0.560 0.008 0.052
#> GSM486855     2  0.3022     0.7742 0.016 0.872 0.004 0.072 0.016 0.020
#> GSM486857     4  0.4866     0.6502 0.000 0.200 0.036 0.712 0.020 0.032
#> GSM486736     6  0.6259     0.6186 0.000 0.124 0.000 0.340 0.048 0.488
#> GSM486738     2  0.1899     0.7857 0.004 0.928 0.000 0.028 0.032 0.008
#> GSM486740     6  0.7509     0.4595 0.004 0.300 0.000 0.184 0.148 0.364
#> GSM486742     2  0.3109     0.6500 0.000 0.812 0.000 0.168 0.016 0.004
#> GSM486744     2  0.2521     0.7817 0.008 0.896 0.000 0.056 0.012 0.028
#> GSM486746     6  0.8410     0.4198 0.100 0.284 0.000 0.188 0.108 0.320
#> GSM486748     4  0.6079    -0.2394 0.120 0.004 0.380 0.476 0.008 0.012
#> GSM486750     4  0.5743     0.1154 0.000 0.180 0.000 0.564 0.012 0.244
#> GSM486752     4  0.5048     0.4063 0.076 0.028 0.208 0.684 0.000 0.004
#> GSM486754     2  0.3717     0.6962 0.000 0.808 0.000 0.084 0.016 0.092
#> GSM486756     2  0.3229     0.7528 0.000 0.852 0.000 0.044 0.040 0.064
#> GSM486758     3  0.6380     0.2548 0.000 0.004 0.576 0.080 0.184 0.156
#> GSM486760     1  0.0291     0.7132 0.992 0.000 0.000 0.000 0.004 0.004
#> GSM486762     3  0.5914     0.4132 0.136 0.004 0.472 0.380 0.004 0.004
#> GSM486764     5  0.4016     0.5516 0.016 0.060 0.036 0.000 0.812 0.076
#> GSM486766     3  0.4660     0.5898 0.304 0.000 0.648 0.028 0.008 0.012
#> GSM486768     2  0.4393     0.7170 0.024 0.780 0.000 0.116 0.028 0.052
#> GSM486770     6  0.6267     0.6173 0.000 0.124 0.000 0.344 0.048 0.484
#> GSM486772     2  0.2758     0.7698 0.012 0.888 0.004 0.044 0.008 0.044
#> GSM486774     4  0.3262     0.6835 0.000 0.148 0.004 0.820 0.008 0.020
#> GSM486776     1  0.2062     0.6733 0.900 0.000 0.088 0.000 0.008 0.004
#> GSM486778     1  0.5057    -0.3555 0.476 0.000 0.472 0.032 0.016 0.004
#> GSM486780     2  0.6551     0.3682 0.012 0.532 0.096 0.012 0.048 0.300
#> GSM486782     4  0.3455     0.6675 0.000 0.144 0.000 0.800 0.000 0.056
#> GSM486784     2  0.1557     0.7885 0.008 0.944 0.004 0.036 0.004 0.004
#> GSM486786     3  0.5794     0.3866 0.052 0.004 0.640 0.020 0.056 0.228
#> GSM486788     1  0.1368     0.7087 0.956 0.004 0.004 0.008 0.012 0.016
#> GSM486790     6  0.6458     0.4654 0.000 0.320 0.000 0.288 0.016 0.376
#> GSM486792     5  0.5450     0.5317 0.416 0.000 0.080 0.004 0.492 0.008
#> GSM486794     3  0.3844     0.6130 0.216 0.000 0.752 0.008 0.016 0.008
#> GSM486796     1  0.2877     0.6588 0.888 0.040 0.008 0.024 0.028 0.012
#> GSM486798     4  0.3766     0.6821 0.008 0.136 0.040 0.804 0.004 0.008
#> GSM486800     1  0.0260     0.7147 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM486802     1  0.1057     0.7095 0.968 0.004 0.004 0.008 0.012 0.004
#> GSM486804     1  0.7262    -0.0116 0.376 0.004 0.164 0.004 0.096 0.356
#> GSM486806     4  0.3292     0.6706 0.004 0.112 0.012 0.836 0.000 0.036
#> GSM486808     3  0.5831     0.4867 0.384 0.000 0.476 0.128 0.008 0.004
#> GSM486810     6  0.6434     0.6122 0.000 0.116 0.004 0.344 0.056 0.480
#> GSM486812     1  0.4951    -0.2691 0.524 0.000 0.428 0.032 0.012 0.004
#> GSM486814     2  0.2713     0.7833 0.008 0.896 0.008 0.032 0.028 0.028
#> GSM486816     3  0.4404     0.5648 0.132 0.000 0.772 0.016 0.032 0.048
#> GSM486818     6  0.9160    -0.2923 0.252 0.124 0.156 0.048 0.104 0.316
#> GSM486821     1  0.7320    -0.0330 0.536 0.072 0.012 0.120 0.208 0.052
#> GSM486823     4  0.5871    -0.4846 0.000 0.108 0.004 0.452 0.016 0.420
#> GSM486826     1  0.7364     0.0388 0.412 0.028 0.152 0.000 0.080 0.328
#> GSM486830     4  0.4742     0.6353 0.000 0.196 0.004 0.704 0.012 0.084
#> GSM486832     1  0.1750     0.6950 0.928 0.000 0.008 0.004 0.056 0.004
#> GSM486834     4  0.3520     0.6221 0.008 0.056 0.100 0.828 0.004 0.004
#> GSM486836     1  0.0924     0.7103 0.972 0.000 0.004 0.008 0.008 0.008
#> GSM486838     4  0.4078     0.6843 0.004 0.196 0.016 0.756 0.004 0.024
#> GSM486840     1  0.0798     0.7144 0.976 0.004 0.004 0.000 0.004 0.012
#> GSM486842     3  0.4706     0.3451 0.468 0.000 0.500 0.016 0.012 0.004
#> GSM486844     1  0.5002     0.5470 0.760 0.056 0.036 0.016 0.032 0.100
#> GSM486846     4  0.5083     0.5821 0.000 0.328 0.004 0.596 0.008 0.064
#> GSM486848     1  0.1078     0.7115 0.964 0.000 0.016 0.000 0.012 0.008
#> GSM486850     4  0.5744     0.4874 0.000 0.372 0.012 0.520 0.016 0.080
#> GSM486852     5  0.5280     0.6989 0.248 0.028 0.024 0.008 0.664 0.028
#> GSM486854     4  0.4579     0.6249 0.000 0.316 0.004 0.640 0.008 0.032
#> GSM486856     2  0.3010     0.7747 0.016 0.872 0.008 0.076 0.016 0.012
#> GSM486858     4  0.4834     0.6414 0.000 0.284 0.024 0.656 0.012 0.024

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)

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

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

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 agent(p) individual(p) k
#> CV:kmeans 119    0.923      1.05e-05 2
#> CV:kmeans  86    0.882      2.25e-04 3
#> CV:kmeans  56    0.957      1.31e-05 4
#> CV:kmeans  76    0.986      1.29e-09 5
#> CV:kmeans  81    0.997      1.66e-14 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 120 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 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-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.369           0.719       0.861         0.5039 0.496   0.496
#> 3 3 0.194           0.446       0.647         0.3187 0.812   0.647
#> 4 4 0.198           0.242       0.456         0.1272 0.867   0.676
#> 5 5 0.262           0.207       0.457         0.0659 0.770   0.405
#> 6 6 0.340           0.221       0.437         0.0426 0.904   0.622

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
#> GSM486735     2  0.6887   8.25e-01 0.184 0.816
#> GSM486737     2  0.0000   7.88e-01 0.000 1.000
#> GSM486739     2  0.0000   7.88e-01 0.000 1.000
#> GSM486741     2  0.6712   8.26e-01 0.176 0.824
#> GSM486743     2  0.2236   7.69e-01 0.036 0.964
#> GSM486745     2  0.2236   7.69e-01 0.036 0.964
#> GSM486747     1  0.4298   7.12e-01 0.912 0.088
#> GSM486749     2  0.7299   8.20e-01 0.204 0.796
#> GSM486751     2  0.9993   4.31e-01 0.484 0.516
#> GSM486753     2  0.0000   7.88e-01 0.000 1.000
#> GSM486755     2  0.0000   7.88e-01 0.000 1.000
#> GSM486757     1  0.9129   2.12e-01 0.672 0.328
#> GSM486759     1  0.6887   8.29e-01 0.816 0.184
#> GSM486761     1  0.1184   7.75e-01 0.984 0.016
#> GSM486763     1  0.9795   5.73e-01 0.584 0.416
#> GSM486765     1  0.0000   7.84e-01 1.000 0.000
#> GSM486767     2  0.5946   6.58e-01 0.144 0.856
#> GSM486769     2  0.6887   8.25e-01 0.184 0.816
#> GSM486771     2  0.0000   7.88e-01 0.000 1.000
#> GSM486773     2  0.7376   8.18e-01 0.208 0.792
#> GSM486775     1  0.6887   8.29e-01 0.816 0.184
#> GSM486777     1  0.0000   7.84e-01 1.000 0.000
#> GSM486779     2  0.6531   6.20e-01 0.168 0.832
#> GSM486781     2  0.6973   8.24e-01 0.188 0.812
#> GSM486783     2  0.0000   7.88e-01 0.000 1.000
#> GSM486785     1  0.0376   7.82e-01 0.996 0.004
#> GSM486787     1  0.6887   8.29e-01 0.816 0.184
#> GSM486789     2  0.6887   8.25e-01 0.184 0.816
#> GSM486791     1  0.6887   8.29e-01 0.816 0.184
#> GSM486793     1  0.0000   7.84e-01 1.000 0.000
#> GSM486795     1  0.9954   4.78e-01 0.540 0.460
#> GSM486797     2  0.9896   5.37e-01 0.440 0.560
#> GSM486799     1  0.6887   8.29e-01 0.816 0.184
#> GSM486801     1  0.6887   8.29e-01 0.816 0.184
#> GSM486803     1  0.6887   8.29e-01 0.816 0.184
#> GSM486805     2  0.9358   6.88e-01 0.352 0.648
#> GSM486807     1  0.0000   7.84e-01 1.000 0.000
#> GSM486809     2  0.6973   8.25e-01 0.188 0.812
#> GSM486811     1  0.0000   7.84e-01 1.000 0.000
#> GSM486813     2  0.6048   6.51e-01 0.148 0.852
#> GSM486815     1  0.0000   7.84e-01 1.000 0.000
#> GSM486817     2  0.9775  -9.54e-02 0.412 0.588
#> GSM486819     2  0.9954  -2.75e-01 0.460 0.540
#> GSM486822     2  0.6887   8.25e-01 0.184 0.816
#> GSM486824     1  0.6887   8.29e-01 0.816 0.184
#> GSM486828     2  0.6887   8.25e-01 0.184 0.816
#> GSM486831     1  0.6887   8.29e-01 0.816 0.184
#> GSM486833     1  0.9944  -2.77e-01 0.544 0.456
#> GSM486835     1  0.6887   8.29e-01 0.816 0.184
#> GSM486837     2  0.8713   7.58e-01 0.292 0.708
#> GSM486839     1  0.6887   8.29e-01 0.816 0.184
#> GSM486841     1  0.0000   7.84e-01 1.000 0.000
#> GSM486843     1  0.6887   8.29e-01 0.816 0.184
#> GSM486845     2  0.6887   8.25e-01 0.184 0.816
#> GSM486847     1  0.6887   8.29e-01 0.816 0.184
#> GSM486849     2  0.6887   8.25e-01 0.184 0.816
#> GSM486851     1  0.7299   8.20e-01 0.796 0.204
#> GSM486853     2  0.6887   8.25e-01 0.184 0.816
#> GSM486855     2  0.0000   7.88e-01 0.000 1.000
#> GSM486857     2  0.8443   7.75e-01 0.272 0.728
#> GSM486736     2  0.6887   8.25e-01 0.184 0.816
#> GSM486738     2  0.0000   7.88e-01 0.000 1.000
#> GSM486740     2  0.0000   7.88e-01 0.000 1.000
#> GSM486742     2  0.6712   8.26e-01 0.176 0.824
#> GSM486744     2  0.0000   7.88e-01 0.000 1.000
#> GSM486746     2  0.2423   7.67e-01 0.040 0.960
#> GSM486748     1  0.7299   5.35e-01 0.796 0.204
#> GSM486750     2  0.6887   8.25e-01 0.184 0.816
#> GSM486752     1  0.9608  -3.28e-05 0.616 0.384
#> GSM486754     2  0.0000   7.88e-01 0.000 1.000
#> GSM486756     2  0.0000   7.88e-01 0.000 1.000
#> GSM486758     1  0.5408   6.69e-01 0.876 0.124
#> GSM486760     1  0.6887   8.29e-01 0.816 0.184
#> GSM486762     1  0.2236   7.62e-01 0.964 0.036
#> GSM486764     1  0.8327   7.76e-01 0.736 0.264
#> GSM486766     1  0.0000   7.84e-01 1.000 0.000
#> GSM486768     2  0.0672   7.84e-01 0.008 0.992
#> GSM486770     2  0.6887   8.25e-01 0.184 0.816
#> GSM486772     2  0.0000   7.88e-01 0.000 1.000
#> GSM486774     2  0.7376   8.18e-01 0.208 0.792
#> GSM486776     1  0.6887   8.29e-01 0.816 0.184
#> GSM486778     1  0.0000   7.84e-01 1.000 0.000
#> GSM486780     2  0.7376   5.48e-01 0.208 0.792
#> GSM486782     2  0.6887   8.25e-01 0.184 0.816
#> GSM486784     2  0.0000   7.88e-01 0.000 1.000
#> GSM486786     1  0.0000   7.84e-01 1.000 0.000
#> GSM486788     1  0.6887   8.29e-01 0.816 0.184
#> GSM486790     2  0.6887   8.25e-01 0.184 0.816
#> GSM486792     1  0.6887   8.29e-01 0.816 0.184
#> GSM486794     1  0.0000   7.84e-01 1.000 0.000
#> GSM486796     1  0.9661   6.15e-01 0.608 0.392
#> GSM486798     1  1.0000  -3.95e-01 0.504 0.496
#> GSM486800     1  0.6887   8.29e-01 0.816 0.184
#> GSM486802     1  0.6887   8.29e-01 0.816 0.184
#> GSM486804     1  0.6887   8.29e-01 0.816 0.184
#> GSM486806     2  0.7528   8.13e-01 0.216 0.784
#> GSM486808     1  0.0000   7.84e-01 1.000 0.000
#> GSM486810     2  0.6887   8.25e-01 0.184 0.816
#> GSM486812     1  0.0000   7.84e-01 1.000 0.000
#> GSM486814     2  0.2236   7.69e-01 0.036 0.964
#> GSM486816     1  0.0000   7.84e-01 1.000 0.000
#> GSM486818     1  1.0000   3.72e-01 0.500 0.500
#> GSM486821     2  0.9988  -3.34e-01 0.480 0.520
#> GSM486823     2  0.6887   8.25e-01 0.184 0.816
#> GSM486826     1  0.6973   8.28e-01 0.812 0.188
#> GSM486830     2  0.6887   8.25e-01 0.184 0.816
#> GSM486832     1  0.6887   8.29e-01 0.816 0.184
#> GSM486834     2  0.9996   4.21e-01 0.488 0.512
#> GSM486836     1  0.6887   8.29e-01 0.816 0.184
#> GSM486838     2  0.9661   6.30e-01 0.392 0.608
#> GSM486840     1  0.6887   8.29e-01 0.816 0.184
#> GSM486842     1  0.0000   7.84e-01 1.000 0.000
#> GSM486844     1  0.7056   8.26e-01 0.808 0.192
#> GSM486846     2  0.6887   8.25e-01 0.184 0.816
#> GSM486848     1  0.6887   8.29e-01 0.816 0.184
#> GSM486850     2  0.6887   8.25e-01 0.184 0.816
#> GSM486852     1  0.7674   8.07e-01 0.776 0.224
#> GSM486854     2  0.6887   8.25e-01 0.184 0.816
#> GSM486856     2  0.1633   7.76e-01 0.024 0.976
#> GSM486858     2  0.7299   8.19e-01 0.204 0.796

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM486735     2   0.488     0.5890 0.208 0.788 0.004
#> GSM486737     2   0.760     0.5784 0.236 0.668 0.096
#> GSM486739     2   0.696     0.5665 0.184 0.724 0.092
#> GSM486741     2   0.590     0.5770 0.244 0.736 0.020
#> GSM486743     2   0.817     0.4849 0.180 0.644 0.176
#> GSM486745     2   0.930     0.3472 0.244 0.524 0.232
#> GSM486747     1   0.802     0.3697 0.632 0.108 0.260
#> GSM486749     2   0.760     0.3697 0.328 0.612 0.060
#> GSM486751     1   0.899     0.5365 0.560 0.248 0.192
#> GSM486753     2   0.670     0.6000 0.188 0.736 0.076
#> GSM486755     2   0.676     0.5883 0.200 0.728 0.072
#> GSM486757     1   0.876     0.5303 0.584 0.240 0.176
#> GSM486759     3   0.524     0.6312 0.160 0.032 0.808
#> GSM486761     1   0.761     0.1675 0.584 0.052 0.364
#> GSM486763     3   0.989    -0.0512 0.312 0.284 0.404
#> GSM486765     3   0.620     0.4253 0.424 0.000 0.576
#> GSM486767     2   0.993     0.1025 0.312 0.392 0.296
#> GSM486769     2   0.480     0.5863 0.220 0.780 0.000
#> GSM486771     2   0.788     0.5453 0.244 0.648 0.108
#> GSM486773     2   0.750     0.2920 0.412 0.548 0.040
#> GSM486775     3   0.362     0.6470 0.136 0.000 0.864
#> GSM486777     3   0.606     0.4530 0.384 0.000 0.616
#> GSM486779     2   0.976     0.1200 0.360 0.408 0.232
#> GSM486781     2   0.772     0.1540 0.432 0.520 0.048
#> GSM486783     2   0.770     0.5521 0.200 0.676 0.124
#> GSM486785     3   0.767     0.3088 0.456 0.044 0.500
#> GSM486787     3   0.303     0.6505 0.092 0.004 0.904
#> GSM486789     2   0.506     0.5899 0.244 0.756 0.000
#> GSM486791     3   0.531     0.6378 0.192 0.020 0.788
#> GSM486793     3   0.630     0.3803 0.472 0.000 0.528
#> GSM486795     3   0.910     0.2004 0.192 0.264 0.544
#> GSM486797     1   0.939     0.3219 0.440 0.388 0.172
#> GSM486799     3   0.355     0.6419 0.132 0.000 0.868
#> GSM486801     3   0.670     0.5693 0.144 0.108 0.748
#> GSM486803     3   0.642     0.5925 0.228 0.044 0.728
#> GSM486805     1   0.894     0.2900 0.512 0.352 0.136
#> GSM486807     3   0.704     0.3323 0.444 0.020 0.536
#> GSM486809     2   0.694     0.4397 0.372 0.604 0.024
#> GSM486811     3   0.588     0.4942 0.348 0.000 0.652
#> GSM486813     2   0.960     0.1994 0.252 0.476 0.272
#> GSM486815     3   0.694     0.3873 0.468 0.016 0.516
#> GSM486817     3   0.981    -0.0185 0.288 0.280 0.432
#> GSM486819     3   0.950     0.0343 0.224 0.288 0.488
#> GSM486822     2   0.497     0.5741 0.236 0.764 0.000
#> GSM486824     3   0.662     0.5659 0.228 0.052 0.720
#> GSM486828     2   0.769     0.4164 0.344 0.596 0.060
#> GSM486831     3   0.341     0.6526 0.124 0.000 0.876
#> GSM486833     1   0.901     0.5214 0.556 0.256 0.188
#> GSM486835     3   0.504     0.6377 0.172 0.020 0.808
#> GSM486837     1   0.879     0.1481 0.448 0.440 0.112
#> GSM486839     3   0.329     0.6475 0.096 0.008 0.896
#> GSM486841     3   0.597     0.4780 0.364 0.000 0.636
#> GSM486843     3   0.610     0.5856 0.208 0.040 0.752
#> GSM486845     2   0.683     0.4530 0.312 0.656 0.032
#> GSM486847     3   0.423     0.6530 0.160 0.004 0.836
#> GSM486849     2   0.552     0.5645 0.268 0.728 0.004
#> GSM486851     3   0.792     0.4804 0.228 0.120 0.652
#> GSM486853     2   0.529     0.5366 0.268 0.732 0.000
#> GSM486855     2   0.731     0.5598 0.168 0.708 0.124
#> GSM486857     1   0.825     0.2186 0.528 0.392 0.080
#> GSM486736     2   0.511     0.5751 0.228 0.768 0.004
#> GSM486738     2   0.658     0.5823 0.136 0.756 0.108
#> GSM486740     2   0.591     0.5900 0.156 0.784 0.060
#> GSM486742     2   0.506     0.5906 0.208 0.784 0.008
#> GSM486744     2   0.701     0.5843 0.176 0.724 0.100
#> GSM486746     2   0.934     0.2600 0.208 0.512 0.280
#> GSM486748     1   0.882     0.4387 0.564 0.156 0.280
#> GSM486750     2   0.529     0.5313 0.268 0.732 0.000
#> GSM486752     1   0.924     0.5609 0.532 0.244 0.224
#> GSM486754     2   0.573     0.6094 0.164 0.788 0.048
#> GSM486756     2   0.667     0.5862 0.200 0.732 0.068
#> GSM486758     1   0.764     0.3611 0.656 0.088 0.256
#> GSM486760     3   0.350     0.6506 0.116 0.004 0.880
#> GSM486762     1   0.817     0.2600 0.576 0.088 0.336
#> GSM486764     3   0.953     0.1538 0.272 0.240 0.488
#> GSM486766     3   0.614     0.4474 0.404 0.000 0.596
#> GSM486768     2   0.914     0.3591 0.212 0.544 0.244
#> GSM486770     2   0.470     0.5819 0.212 0.788 0.000
#> GSM486772     2   0.509     0.6093 0.112 0.832 0.056
#> GSM486774     2   0.784     0.0398 0.456 0.492 0.052
#> GSM486776     3   0.327     0.6518 0.116 0.000 0.884
#> GSM486778     3   0.728     0.3859 0.404 0.032 0.564
#> GSM486780     2   0.987     0.1291 0.324 0.408 0.268
#> GSM486782     2   0.610     0.4613 0.320 0.672 0.008
#> GSM486784     2   0.697     0.5680 0.144 0.732 0.124
#> GSM486786     3   0.668     0.3418 0.480 0.008 0.512
#> GSM486788     3   0.350     0.6472 0.116 0.004 0.880
#> GSM486790     2   0.406     0.5995 0.164 0.836 0.000
#> GSM486792     3   0.462     0.6459 0.144 0.020 0.836
#> GSM486794     3   0.617     0.4448 0.412 0.000 0.588
#> GSM486796     3   0.905     0.2943 0.224 0.220 0.556
#> GSM486798     2   0.922    -0.3171 0.404 0.444 0.152
#> GSM486800     3   0.254     0.6468 0.080 0.000 0.920
#> GSM486802     3   0.484     0.6222 0.104 0.052 0.844
#> GSM486804     3   0.671     0.5737 0.196 0.072 0.732
#> GSM486806     1   0.813     0.0950 0.488 0.444 0.068
#> GSM486808     3   0.659     0.3918 0.424 0.008 0.568
#> GSM486810     2   0.572     0.5630 0.292 0.704 0.004
#> GSM486812     3   0.568     0.5127 0.316 0.000 0.684
#> GSM486814     2   0.913     0.3729 0.268 0.540 0.192
#> GSM486816     3   0.626     0.4160 0.448 0.000 0.552
#> GSM486818     3   0.964     0.0522 0.280 0.252 0.468
#> GSM486821     3   0.946     0.1513 0.256 0.244 0.500
#> GSM486823     2   0.510     0.5477 0.248 0.752 0.000
#> GSM486826     3   0.733     0.5409 0.276 0.064 0.660
#> GSM486830     2   0.710     0.3886 0.384 0.588 0.028
#> GSM486832     3   0.271     0.6503 0.088 0.000 0.912
#> GSM486834     1   0.854     0.4910 0.580 0.292 0.128
#> GSM486836     3   0.417     0.6488 0.156 0.004 0.840
#> GSM486838     1   0.951     0.4500 0.464 0.336 0.200
#> GSM486840     3   0.303     0.6471 0.076 0.012 0.912
#> GSM486842     3   0.546     0.5363 0.288 0.000 0.712
#> GSM486844     3   0.747     0.4907 0.216 0.100 0.684
#> GSM486846     2   0.691     0.4846 0.324 0.644 0.032
#> GSM486848     3   0.345     0.6513 0.104 0.008 0.888
#> GSM486850     2   0.522     0.5662 0.260 0.740 0.000
#> GSM486852     3   0.839     0.4062 0.200 0.176 0.624
#> GSM486854     2   0.620     0.4625 0.312 0.676 0.012
#> GSM486856     2   0.851     0.4388 0.212 0.612 0.176
#> GSM486858     1   0.729    -0.0428 0.500 0.472 0.028

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM486735     2   0.549    0.38410 0.128 0.752 0.008 0.112
#> GSM486737     1   0.842   -0.26610 0.380 0.316 0.020 0.284
#> GSM486739     2   0.775    0.32086 0.132 0.568 0.044 0.256
#> GSM486741     1   0.783   -0.26220 0.420 0.408 0.016 0.156
#> GSM486743     2   0.933    0.02698 0.240 0.348 0.092 0.320
#> GSM486745     2   0.886    0.12069 0.148 0.440 0.092 0.320
#> GSM486747     1   0.911   -0.00153 0.400 0.076 0.244 0.280
#> GSM486749     2   0.827    0.10343 0.304 0.508 0.076 0.112
#> GSM486751     1   0.980    0.20167 0.312 0.300 0.176 0.212
#> GSM486753     2   0.862    0.25757 0.256 0.444 0.044 0.256
#> GSM486755     2   0.851    0.22342 0.268 0.404 0.028 0.300
#> GSM486757     1   0.949    0.11333 0.372 0.224 0.120 0.284
#> GSM486759     3   0.694    0.42545 0.048 0.048 0.596 0.308
#> GSM486761     1   0.914   -0.10836 0.376 0.072 0.284 0.268
#> GSM486763     4   0.952    0.28983 0.124 0.220 0.296 0.360
#> GSM486765     3   0.753    0.44703 0.216 0.004 0.520 0.260
#> GSM486767     4   0.980    0.20446 0.288 0.256 0.156 0.300
#> GSM486769     2   0.526    0.39444 0.148 0.764 0.008 0.080
#> GSM486771     2   0.886    0.15975 0.252 0.356 0.048 0.344
#> GSM486773     2   0.843    0.01052 0.356 0.424 0.040 0.180
#> GSM486775     3   0.575    0.52950 0.088 0.000 0.696 0.216
#> GSM486777     3   0.856    0.40702 0.212 0.056 0.484 0.248
#> GSM486779     1   0.966   -0.19763 0.328 0.240 0.136 0.296
#> GSM486781     1   0.810   -0.08173 0.428 0.412 0.052 0.108
#> GSM486783     1   0.898   -0.23580 0.372 0.280 0.056 0.292
#> GSM486785     3   0.888    0.28821 0.328 0.056 0.388 0.228
#> GSM486787     3   0.521    0.53048 0.048 0.004 0.736 0.212
#> GSM486789     2   0.591    0.40286 0.236 0.676 0.000 0.088
#> GSM486791     3   0.735    0.33971 0.036 0.084 0.556 0.324
#> GSM486793     3   0.805    0.40709 0.256 0.012 0.456 0.276
#> GSM486795     3   0.942   -0.18612 0.240 0.136 0.416 0.208
#> GSM486797     1   0.930    0.22228 0.448 0.212 0.188 0.152
#> GSM486799     3   0.443    0.53580 0.032 0.004 0.796 0.168
#> GSM486801     3   0.811    0.34592 0.104 0.112 0.576 0.208
#> GSM486803     3   0.715    0.37568 0.052 0.044 0.540 0.364
#> GSM486805     1   0.945    0.16266 0.344 0.324 0.112 0.220
#> GSM486807     3   0.877    0.35804 0.268 0.056 0.440 0.236
#> GSM486809     2   0.718    0.28617 0.252 0.608 0.028 0.112
#> GSM486811     3   0.771    0.47676 0.176 0.032 0.572 0.220
#> GSM486813     4   0.959    0.21184 0.308 0.204 0.140 0.348
#> GSM486815     3   0.836    0.37502 0.228 0.024 0.408 0.340
#> GSM486817     4   0.964    0.30800 0.280 0.128 0.264 0.328
#> GSM486819     3   0.977   -0.24183 0.156 0.240 0.316 0.288
#> GSM486822     2   0.525    0.38090 0.196 0.736 0.000 0.068
#> GSM486824     3   0.771    0.32890 0.124 0.032 0.532 0.312
#> GSM486828     2   0.865    0.12026 0.348 0.424 0.060 0.168
#> GSM486831     3   0.529    0.49637 0.032 0.004 0.700 0.264
#> GSM486833     1   0.955    0.14994 0.400 0.224 0.156 0.220
#> GSM486835     3   0.707    0.44870 0.068 0.048 0.616 0.268
#> GSM486837     1   0.839    0.12319 0.476 0.332 0.072 0.120
#> GSM486839     3   0.551    0.51560 0.064 0.004 0.720 0.212
#> GSM486841     3   0.766    0.48021 0.216 0.020 0.556 0.208
#> GSM486843     3   0.773    0.37313 0.144 0.044 0.580 0.232
#> GSM486845     2   0.769    0.20176 0.408 0.468 0.060 0.064
#> GSM486847     3   0.527    0.52391 0.036 0.008 0.724 0.232
#> GSM486849     2   0.767    0.30017 0.352 0.488 0.016 0.144
#> GSM486851     3   0.847    0.15931 0.068 0.140 0.480 0.312
#> GSM486853     2   0.639    0.28014 0.404 0.528 0.000 0.068
#> GSM486855     2   0.906    0.19667 0.324 0.360 0.064 0.252
#> GSM486857     1   0.841    0.09480 0.460 0.288 0.036 0.216
#> GSM486736     2   0.439    0.39873 0.088 0.832 0.016 0.064
#> GSM486738     2   0.833    0.24487 0.328 0.380 0.016 0.276
#> GSM486740     2   0.749    0.31023 0.084 0.576 0.052 0.288
#> GSM486742     2   0.797    0.27899 0.400 0.408 0.016 0.176
#> GSM486744     2   0.889    0.25514 0.272 0.420 0.060 0.248
#> GSM486746     2   0.943   -0.03585 0.140 0.416 0.208 0.236
#> GSM486748     1   0.985    0.13572 0.328 0.192 0.264 0.216
#> GSM486750     2   0.602    0.37625 0.204 0.700 0.012 0.084
#> GSM486752     1   0.966    0.19261 0.372 0.264 0.172 0.192
#> GSM486754     2   0.739    0.36067 0.200 0.560 0.008 0.232
#> GSM486756     2   0.861    0.23887 0.300 0.412 0.036 0.252
#> GSM486758     4   0.960   -0.14531 0.328 0.160 0.176 0.336
#> GSM486760     3   0.482    0.52411 0.040 0.020 0.796 0.144
#> GSM486762     1   0.946   -0.09137 0.328 0.104 0.320 0.248
#> GSM486764     4   0.948    0.28634 0.136 0.192 0.288 0.384
#> GSM486766     3   0.782    0.44691 0.244 0.016 0.520 0.220
#> GSM486768     2   0.971   -0.05760 0.244 0.344 0.148 0.264
#> GSM486770     2   0.417    0.41274 0.092 0.828 0.000 0.080
#> GSM486772     2   0.815    0.32540 0.188 0.520 0.040 0.252
#> GSM486774     2   0.812    0.05736 0.368 0.456 0.040 0.136
#> GSM486776     3   0.504    0.53428 0.056 0.000 0.748 0.196
#> GSM486778     3   0.832    0.42966 0.192 0.076 0.548 0.184
#> GSM486780     4   0.965    0.22619 0.284 0.220 0.144 0.352
#> GSM486782     2   0.678    0.31051 0.272 0.624 0.024 0.080
#> GSM486784     1   0.916   -0.24220 0.348 0.328 0.072 0.252
#> GSM486786     3   0.812    0.37089 0.288 0.008 0.400 0.304
#> GSM486788     3   0.521    0.48869 0.048 0.004 0.736 0.212
#> GSM486790     2   0.577    0.43110 0.176 0.708 0.000 0.116
#> GSM486792     3   0.662    0.41609 0.016 0.072 0.612 0.300
#> GSM486794     3   0.773    0.44199 0.232 0.008 0.504 0.256
#> GSM486796     3   0.922    0.00482 0.152 0.136 0.428 0.284
#> GSM486798     1   0.936    0.19013 0.372 0.332 0.132 0.164
#> GSM486800     3   0.468    0.53192 0.048 0.000 0.776 0.176
#> GSM486802     3   0.755    0.39627 0.100 0.076 0.620 0.204
#> GSM486804     3   0.835    0.31894 0.132 0.076 0.520 0.272
#> GSM486806     2   0.815    0.06369 0.348 0.484 0.064 0.104
#> GSM486808     3   0.777    0.42856 0.272 0.024 0.536 0.168
#> GSM486810     2   0.641    0.35191 0.192 0.688 0.024 0.096
#> GSM486812     3   0.729    0.49122 0.200 0.020 0.604 0.176
#> GSM486814     4   0.950   -0.03646 0.284 0.292 0.104 0.320
#> GSM486816     3   0.868    0.40410 0.224 0.048 0.432 0.296
#> GSM486818     4   0.948    0.30940 0.212 0.128 0.276 0.384
#> GSM486821     3   0.980   -0.29460 0.196 0.236 0.352 0.216
#> GSM486823     2   0.549    0.36234 0.236 0.708 0.004 0.052
#> GSM486826     3   0.857    0.14854 0.148 0.064 0.436 0.352
#> GSM486830     2   0.804    0.24909 0.312 0.496 0.032 0.160
#> GSM486832     3   0.557    0.51590 0.040 0.020 0.724 0.216
#> GSM486834     1   0.932    0.22769 0.420 0.276 0.144 0.160
#> GSM486836     3   0.534    0.51277 0.044 0.008 0.728 0.220
#> GSM486838     1   0.889    0.13512 0.444 0.316 0.128 0.112
#> GSM486840     3   0.563    0.50439 0.076 0.012 0.736 0.176
#> GSM486842     3   0.642    0.50575 0.176 0.004 0.664 0.156
#> GSM486844     3   0.879    0.11919 0.160 0.080 0.448 0.312
#> GSM486846     2   0.674    0.31356 0.380 0.544 0.016 0.060
#> GSM486848     3   0.610    0.48990 0.064 0.008 0.656 0.272
#> GSM486850     2   0.763    0.30987 0.372 0.492 0.028 0.108
#> GSM486852     3   0.875    0.07141 0.076 0.196 0.480 0.248
#> GSM486854     1   0.717   -0.19939 0.464 0.424 0.008 0.104
#> GSM486856     1   0.943   -0.13620 0.348 0.260 0.100 0.292
#> GSM486858     1   0.848    0.01860 0.472 0.308 0.056 0.164

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM486735     4   0.571    0.28666 0.016 0.100 0.056 0.728 0.100
#> GSM486737     2   0.765    0.30487 0.052 0.520 0.028 0.236 0.164
#> GSM486739     4   0.802    0.03124 0.076 0.276 0.040 0.484 0.124
#> GSM486741     2   0.771    0.14537 0.012 0.448 0.048 0.288 0.204
#> GSM486743     2   0.856    0.28982 0.120 0.424 0.028 0.208 0.220
#> GSM486745     4   0.872   -0.12484 0.132 0.308 0.036 0.372 0.152
#> GSM486747     3   0.795    0.26206 0.080 0.080 0.544 0.092 0.204
#> GSM486749     4   0.853    0.21667 0.060 0.156 0.136 0.488 0.160
#> GSM486751     3   0.897   -0.16617 0.060 0.084 0.332 0.280 0.244
#> GSM486753     2   0.805    0.22126 0.044 0.440 0.052 0.320 0.144
#> GSM486755     2   0.799    0.29211 0.068 0.500 0.044 0.252 0.136
#> GSM486757     3   0.894   -0.03213 0.072 0.092 0.396 0.192 0.248
#> GSM486759     1   0.746    0.40801 0.580 0.076 0.168 0.032 0.144
#> GSM486761     3   0.805    0.35427 0.152 0.064 0.520 0.060 0.204
#> GSM486763     5   0.994   -0.07529 0.212 0.224 0.156 0.184 0.224
#> GSM486765     3   0.578    0.34875 0.252 0.024 0.652 0.008 0.064
#> GSM486767     2   0.901    0.19947 0.120 0.416 0.092 0.136 0.236
#> GSM486769     4   0.476    0.29935 0.004 0.108 0.036 0.780 0.072
#> GSM486771     2   0.755    0.29306 0.044 0.520 0.028 0.252 0.156
#> GSM486773     4   0.888    0.05323 0.032 0.232 0.128 0.352 0.256
#> GSM486775     1   0.643    0.24433 0.548 0.080 0.328 0.000 0.044
#> GSM486777     3   0.756    0.26404 0.276 0.036 0.528 0.084 0.076
#> GSM486779     2   0.934    0.13937 0.140 0.344 0.076 0.208 0.232
#> GSM486781     4   0.883    0.12818 0.048 0.152 0.124 0.372 0.304
#> GSM486783     2   0.672    0.35776 0.056 0.628 0.020 0.196 0.100
#> GSM486785     3   0.832    0.24552 0.288 0.060 0.432 0.048 0.172
#> GSM486787     1   0.622    0.37939 0.648 0.044 0.196 0.004 0.108
#> GSM486789     4   0.677    0.17924 0.016 0.240 0.024 0.580 0.140
#> GSM486791     1   0.881    0.30795 0.436 0.096 0.232 0.080 0.156
#> GSM486793     3   0.612    0.39100 0.188 0.032 0.664 0.012 0.104
#> GSM486795     1   0.920    0.28925 0.404 0.172 0.152 0.088 0.184
#> GSM486797     3   0.953   -0.22449 0.088 0.160 0.284 0.184 0.284
#> GSM486799     1   0.631    0.31883 0.608 0.044 0.248 0.000 0.100
#> GSM486801     1   0.839    0.34710 0.496 0.084 0.184 0.068 0.168
#> GSM486803     1   0.807    0.35044 0.484 0.120 0.164 0.016 0.216
#> GSM486805     4   0.933   -0.01370 0.060 0.148 0.228 0.304 0.260
#> GSM486807     3   0.795    0.34314 0.244 0.048 0.500 0.052 0.156
#> GSM486809     4   0.752    0.21689 0.016 0.100 0.168 0.560 0.156
#> GSM486811     3   0.701    0.19156 0.336 0.020 0.512 0.032 0.100
#> GSM486813     2   0.879    0.19989 0.144 0.468 0.084 0.148 0.156
#> GSM486815     3   0.764    0.30950 0.212 0.048 0.548 0.048 0.144
#> GSM486817     2   0.950    0.04021 0.184 0.348 0.120 0.128 0.220
#> GSM486819     1   0.977    0.01581 0.296 0.220 0.132 0.180 0.172
#> GSM486822     4   0.600    0.27599 0.008 0.184 0.028 0.668 0.112
#> GSM486824     1   0.826    0.36308 0.500 0.152 0.176 0.036 0.136
#> GSM486828     4   0.898    0.12864 0.044 0.232 0.144 0.380 0.200
#> GSM486831     1   0.644    0.41021 0.652 0.036 0.164 0.020 0.128
#> GSM486833     3   0.923   -0.05236 0.084 0.112 0.368 0.208 0.228
#> GSM486835     1   0.725    0.38142 0.576 0.088 0.212 0.016 0.108
#> GSM486837     4   0.941    0.05122 0.084 0.160 0.164 0.328 0.264
#> GSM486839     1   0.708    0.37306 0.592 0.072 0.204 0.016 0.116
#> GSM486841     3   0.710    0.28973 0.308 0.028 0.532 0.036 0.096
#> GSM486843     1   0.798    0.36252 0.516 0.120 0.148 0.024 0.192
#> GSM486845     4   0.893    0.12646 0.060 0.280 0.096 0.368 0.196
#> GSM486847     1   0.750    0.34462 0.532 0.084 0.260 0.020 0.104
#> GSM486849     4   0.799    0.08140 0.036 0.288 0.056 0.464 0.156
#> GSM486851     1   0.938    0.22748 0.388 0.120 0.172 0.148 0.172
#> GSM486853     4   0.752    0.16174 0.004 0.300 0.048 0.448 0.200
#> GSM486855     2   0.796    0.30922 0.088 0.496 0.028 0.252 0.136
#> GSM486857     2   0.919   -0.06012 0.040 0.292 0.172 0.216 0.280
#> GSM486736     4   0.560    0.27926 0.024 0.132 0.036 0.732 0.076
#> GSM486738     2   0.659    0.36199 0.028 0.636 0.040 0.204 0.092
#> GSM486740     4   0.753    0.05679 0.052 0.260 0.040 0.536 0.112
#> GSM486742     2   0.752    0.14651 0.020 0.476 0.036 0.304 0.164
#> GSM486744     2   0.786    0.28361 0.100 0.488 0.016 0.264 0.132
#> GSM486746     4   0.929   -0.08520 0.184 0.200 0.068 0.364 0.184
#> GSM486748     3   0.901    0.13903 0.152 0.064 0.412 0.164 0.208
#> GSM486750     4   0.697    0.28043 0.016 0.184 0.068 0.608 0.124
#> GSM486752     3   0.923   -0.06192 0.112 0.088 0.368 0.244 0.188
#> GSM486754     2   0.726    0.19881 0.032 0.472 0.016 0.344 0.136
#> GSM486756     2   0.780    0.26675 0.028 0.476 0.044 0.268 0.184
#> GSM486758     3   0.889    0.09992 0.120 0.072 0.420 0.144 0.244
#> GSM486760     1   0.637    0.37259 0.652 0.040 0.196 0.020 0.092
#> GSM486762     3   0.888    0.21682 0.208 0.060 0.412 0.108 0.212
#> GSM486764     1   0.986   -0.04434 0.252 0.204 0.200 0.128 0.216
#> GSM486766     3   0.647    0.35561 0.268 0.016 0.596 0.024 0.096
#> GSM486768     2   0.896    0.19189 0.136 0.360 0.044 0.280 0.180
#> GSM486770     4   0.433    0.29265 0.004 0.108 0.016 0.800 0.072
#> GSM486772     2   0.749    0.21591 0.060 0.460 0.040 0.372 0.068
#> GSM486774     4   0.905    0.08849 0.040 0.196 0.152 0.332 0.280
#> GSM486776     1   0.651    0.30179 0.596 0.076 0.252 0.000 0.076
#> GSM486778     3   0.800    0.19333 0.312 0.024 0.448 0.084 0.132
#> GSM486780     2   0.950    0.13974 0.168 0.364 0.124 0.152 0.192
#> GSM486782     4   0.794    0.26339 0.020 0.172 0.088 0.496 0.224
#> GSM486784     2   0.742    0.32670 0.084 0.556 0.024 0.236 0.100
#> GSM486786     3   0.727    0.33011 0.268 0.032 0.524 0.020 0.156
#> GSM486788     1   0.616    0.42953 0.704 0.064 0.116 0.032 0.084
#> GSM486790     4   0.615    0.11580 0.012 0.296 0.008 0.588 0.096
#> GSM486792     1   0.807    0.33139 0.500 0.048 0.240 0.072 0.140
#> GSM486794     3   0.623    0.33685 0.256 0.008 0.620 0.032 0.084
#> GSM486796     1   0.915    0.22372 0.424 0.152 0.104 0.160 0.160
#> GSM486798     4   0.938   -0.07704 0.076 0.124 0.276 0.288 0.236
#> GSM486800     1   0.596    0.36748 0.664 0.068 0.200 0.000 0.068
#> GSM486802     1   0.683    0.41347 0.636 0.076 0.120 0.020 0.148
#> GSM486804     1   0.884    0.26992 0.404 0.140 0.204 0.040 0.212
#> GSM486806     4   0.899    0.11831 0.052 0.156 0.144 0.368 0.280
#> GSM486808     3   0.760    0.29281 0.328 0.024 0.456 0.036 0.156
#> GSM486810     4   0.716    0.25010 0.016 0.168 0.096 0.600 0.120
#> GSM486812     3   0.650    0.13571 0.420 0.016 0.472 0.016 0.076
#> GSM486814     2   0.805    0.33768 0.108 0.524 0.044 0.204 0.120
#> GSM486816     3   0.727    0.32762 0.232 0.020 0.560 0.056 0.132
#> GSM486818     1   0.949    0.00756 0.312 0.236 0.120 0.100 0.232
#> GSM486821     1   0.968   -0.02467 0.316 0.188 0.116 0.208 0.172
#> GSM486823     4   0.585    0.31035 0.016 0.140 0.028 0.700 0.116
#> GSM486826     1   0.866    0.22793 0.372 0.152 0.208 0.016 0.252
#> GSM486830     4   0.846    0.19328 0.020 0.204 0.140 0.436 0.200
#> GSM486832     1   0.707    0.31116 0.588 0.056 0.236 0.032 0.088
#> GSM486834     5   0.914    0.00611 0.088 0.088 0.312 0.188 0.324
#> GSM486836     1   0.599    0.40221 0.684 0.048 0.168 0.008 0.092
#> GSM486838     4   0.967   -0.00488 0.116 0.196 0.148 0.300 0.240
#> GSM486840     1   0.602    0.40168 0.692 0.096 0.140 0.008 0.064
#> GSM486842     3   0.607    0.23167 0.376 0.012 0.536 0.008 0.068
#> GSM486844     1   0.871    0.28013 0.416 0.180 0.184 0.028 0.192
#> GSM486846     4   0.841    0.19528 0.036 0.272 0.080 0.424 0.188
#> GSM486848     1   0.726    0.33611 0.568 0.120 0.204 0.008 0.100
#> GSM486850     4   0.844    0.09144 0.024 0.284 0.096 0.400 0.196
#> GSM486852     1   0.953    0.15440 0.352 0.116 0.148 0.192 0.192
#> GSM486854     4   0.855    0.14486 0.028 0.252 0.088 0.380 0.252
#> GSM486856     2   0.852    0.26974 0.108 0.464 0.048 0.208 0.172
#> GSM486858     5   0.905   -0.15220 0.040 0.284 0.128 0.252 0.296

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM486735     6   0.608    0.39052 0.016 0.108 0.012 0.116 0.084 0.664
#> GSM486737     2   0.736    0.27342 0.032 0.536 0.016 0.188 0.108 0.120
#> GSM486739     6   0.678    0.22131 0.016 0.160 0.016 0.052 0.188 0.568
#> GSM486741     2   0.799    0.12425 0.028 0.412 0.028 0.228 0.072 0.232
#> GSM486743     2   0.859    0.25859 0.092 0.396 0.020 0.124 0.148 0.220
#> GSM486745     6   0.857    0.02628 0.076 0.200 0.032 0.088 0.208 0.396
#> GSM486747     3   0.793    0.32064 0.096 0.060 0.512 0.196 0.068 0.068
#> GSM486749     6   0.846    0.09252 0.036 0.128 0.096 0.208 0.092 0.440
#> GSM486751     4   0.918    0.21063 0.068 0.100 0.248 0.264 0.072 0.248
#> GSM486753     2   0.755    0.14875 0.020 0.428 0.028 0.100 0.088 0.336
#> GSM486755     2   0.818    0.21960 0.036 0.416 0.032 0.096 0.164 0.256
#> GSM486757     3   0.904    0.02493 0.040 0.104 0.364 0.184 0.144 0.164
#> GSM486759     1   0.824    0.16736 0.424 0.084 0.144 0.064 0.256 0.028
#> GSM486761     3   0.767    0.35478 0.148 0.044 0.496 0.220 0.068 0.024
#> GSM486763     5   0.832    0.38095 0.156 0.112 0.060 0.036 0.456 0.180
#> GSM486765     3   0.509    0.40027 0.156 0.016 0.724 0.048 0.052 0.004
#> GSM486767     2   0.939    0.13254 0.100 0.252 0.056 0.136 0.208 0.248
#> GSM486769     6   0.425    0.40402 0.000 0.068 0.016 0.104 0.024 0.788
#> GSM486771     2   0.760    0.26722 0.068 0.484 0.008 0.060 0.144 0.236
#> GSM486773     6   0.883   -0.03161 0.016 0.176 0.104 0.252 0.128 0.324
#> GSM486775     1   0.636    0.19976 0.516 0.028 0.324 0.016 0.112 0.004
#> GSM486777     3   0.792    0.32842 0.172 0.016 0.496 0.092 0.140 0.084
#> GSM486779     2   0.960    0.12078 0.164 0.268 0.068 0.160 0.208 0.132
#> GSM486781     4   0.826    0.10410 0.028 0.136 0.056 0.368 0.088 0.324
#> GSM486783     2   0.707    0.32692 0.068 0.580 0.008 0.132 0.068 0.144
#> GSM486785     3   0.805    0.19733 0.276 0.056 0.432 0.120 0.092 0.024
#> GSM486787     1   0.630    0.34895 0.624 0.028 0.188 0.048 0.104 0.008
#> GSM486789     6   0.673    0.30086 0.004 0.164 0.016 0.196 0.064 0.556
#> GSM486791     5   0.803    0.27574 0.232 0.036 0.168 0.020 0.436 0.108
#> GSM486793     3   0.712    0.40099 0.132 0.040 0.596 0.096 0.104 0.032
#> GSM486795     1   0.955   -0.03518 0.312 0.152 0.116 0.120 0.192 0.108
#> GSM486797     4   0.937    0.22814 0.072 0.180 0.184 0.328 0.108 0.128
#> GSM486799     1   0.673    0.31467 0.528 0.036 0.240 0.032 0.164 0.000
#> GSM486801     1   0.797    0.25023 0.500 0.076 0.108 0.044 0.204 0.068
#> GSM486803     1   0.805    0.18956 0.436 0.076 0.168 0.036 0.248 0.036
#> GSM486805     4   0.915    0.19140 0.044 0.108 0.176 0.308 0.112 0.252
#> GSM486807     3   0.752    0.35592 0.168 0.024 0.532 0.128 0.116 0.032
#> GSM486809     6   0.797    0.19909 0.024 0.108 0.096 0.120 0.140 0.512
#> GSM486811     3   0.763    0.12305 0.340 0.016 0.388 0.120 0.124 0.012
#> GSM486813     2   0.840    0.28191 0.072 0.476 0.060 0.112 0.120 0.160
#> GSM486815     3   0.734    0.36804 0.132 0.056 0.568 0.048 0.156 0.040
#> GSM486817     2   0.960   -0.01919 0.228 0.240 0.092 0.140 0.208 0.092
#> GSM486819     5   0.879    0.32430 0.188 0.112 0.060 0.080 0.416 0.144
#> GSM486822     6   0.612    0.29972 0.000 0.132 0.012 0.180 0.060 0.616
#> GSM486824     1   0.797    0.29145 0.468 0.088 0.112 0.060 0.244 0.028
#> GSM486828     6   0.903   -0.06988 0.048 0.188 0.080 0.272 0.108 0.304
#> GSM486831     1   0.734    0.21865 0.468 0.024 0.184 0.040 0.264 0.020
#> GSM486833     3   0.957   -0.03373 0.100 0.120 0.304 0.168 0.120 0.188
#> GSM486835     1   0.784    0.28417 0.488 0.052 0.172 0.060 0.196 0.032
#> GSM486837     4   0.818    0.27619 0.036 0.112 0.144 0.464 0.048 0.196
#> GSM486839     1   0.748    0.33836 0.520 0.064 0.200 0.044 0.152 0.020
#> GSM486841     3   0.732    0.31173 0.228 0.028 0.516 0.104 0.112 0.012
#> GSM486843     1   0.818    0.29847 0.484 0.128 0.116 0.084 0.160 0.028
#> GSM486845     4   0.854    0.12193 0.048 0.272 0.056 0.328 0.056 0.240
#> GSM486847     1   0.760    0.21950 0.436 0.084 0.300 0.048 0.128 0.004
#> GSM486849     6   0.819    0.10776 0.020 0.244 0.048 0.188 0.092 0.408
#> GSM486851     5   0.822    0.36890 0.184 0.056 0.112 0.036 0.468 0.144
#> GSM486853     4   0.769    0.04469 0.004 0.268 0.040 0.324 0.048 0.316
#> GSM486855     2   0.862    0.26675 0.072 0.416 0.040 0.172 0.112 0.188
#> GSM486857     4   0.904    0.07267 0.036 0.244 0.144 0.328 0.096 0.152
#> GSM486736     6   0.528    0.40023 0.008 0.052 0.024 0.108 0.076 0.732
#> GSM486738     2   0.748    0.32321 0.052 0.528 0.008 0.124 0.116 0.172
#> GSM486740     6   0.671    0.22976 0.020 0.164 0.008 0.056 0.180 0.572
#> GSM486742     2   0.789    0.17592 0.032 0.424 0.036 0.184 0.052 0.272
#> GSM486744     2   0.754    0.25684 0.068 0.484 0.012 0.064 0.104 0.268
#> GSM486746     6   0.892   -0.05306 0.132 0.124 0.040 0.096 0.264 0.344
#> GSM486748     4   0.867   -0.00646 0.148 0.056 0.304 0.340 0.048 0.104
#> GSM486750     6   0.761    0.17487 0.032 0.172 0.040 0.252 0.036 0.468
#> GSM486752     4   0.931    0.24287 0.108 0.076 0.224 0.312 0.092 0.188
#> GSM486754     2   0.770    0.10424 0.036 0.388 0.016 0.128 0.076 0.356
#> GSM486756     2   0.836    0.18261 0.036 0.372 0.040 0.116 0.136 0.300
#> GSM486758     3   0.870    0.21063 0.080 0.088 0.440 0.144 0.168 0.080
#> GSM486760     1   0.742    0.32684 0.484 0.044 0.232 0.032 0.188 0.020
#> GSM486762     3   0.872    0.13141 0.164 0.036 0.356 0.268 0.104 0.072
#> GSM486764     5   0.898    0.33772 0.120 0.112 0.112 0.068 0.400 0.188
#> GSM486766     3   0.552    0.35967 0.216 0.004 0.660 0.052 0.060 0.008
#> GSM486768     2   0.906    0.14481 0.128 0.328 0.032 0.136 0.136 0.240
#> GSM486770     6   0.393    0.40720 0.004 0.068 0.008 0.088 0.020 0.812
#> GSM486772     2   0.753    0.14181 0.092 0.404 0.008 0.076 0.056 0.364
#> GSM486774     4   0.905    0.19718 0.028 0.216 0.164 0.264 0.076 0.252
#> GSM486776     1   0.757    0.26003 0.460 0.052 0.256 0.044 0.176 0.012
#> GSM486778     3   0.879    0.16545 0.268 0.036 0.344 0.108 0.168 0.076
#> GSM486780     2   0.864    0.22153 0.132 0.456 0.116 0.124 0.112 0.060
#> GSM486782     6   0.755    0.03137 0.012 0.136 0.052 0.324 0.048 0.428
#> GSM486784     2   0.811    0.27439 0.092 0.508 0.044 0.132 0.088 0.136
#> GSM486786     3   0.759    0.28400 0.184 0.036 0.520 0.092 0.144 0.024
#> GSM486788     1   0.627    0.33904 0.632 0.044 0.068 0.044 0.200 0.012
#> GSM486790     6   0.655    0.23239 0.008 0.236 0.008 0.140 0.052 0.556
#> GSM486792     5   0.770    0.12781 0.292 0.028 0.176 0.024 0.424 0.056
#> GSM486794     3   0.663    0.40762 0.120 0.020 0.632 0.076 0.116 0.036
#> GSM486796     1   0.897   -0.00375 0.380 0.156 0.072 0.076 0.212 0.104
#> GSM486798     4   0.945    0.25628 0.080 0.100 0.228 0.280 0.112 0.200
#> GSM486800     1   0.611    0.39747 0.632 0.024 0.152 0.028 0.156 0.008
#> GSM486802     1   0.737    0.29234 0.580 0.084 0.068 0.072 0.152 0.044
#> GSM486804     1   0.894    0.19504 0.372 0.120 0.216 0.080 0.160 0.052
#> GSM486806     4   0.757    0.16343 0.016 0.076 0.108 0.476 0.048 0.276
#> GSM486808     3   0.704    0.31588 0.236 0.012 0.524 0.144 0.068 0.016
#> GSM486810     6   0.725    0.31672 0.012 0.144 0.040 0.164 0.088 0.552
#> GSM486812     3   0.734    0.09239 0.380 0.016 0.400 0.064 0.116 0.024
#> GSM486814     2   0.830    0.28421 0.100 0.492 0.048 0.136 0.108 0.116
#> GSM486816     3   0.763    0.33599 0.196 0.072 0.520 0.056 0.132 0.024
#> GSM486818     1   0.948   -0.02073 0.260 0.184 0.124 0.152 0.228 0.052
#> GSM486821     5   0.933    0.24393 0.156 0.136 0.068 0.132 0.348 0.160
#> GSM486823     6   0.598    0.24479 0.004 0.124 0.008 0.240 0.028 0.596
#> GSM486826     1   0.859    0.21735 0.376 0.112 0.196 0.076 0.220 0.020
#> GSM486830     6   0.840    0.01235 0.028 0.148 0.076 0.304 0.076 0.368
#> GSM486832     1   0.700    0.32468 0.552 0.040 0.156 0.036 0.200 0.016
#> GSM486834     4   0.914    0.26563 0.088 0.080 0.204 0.360 0.100 0.168
#> GSM486836     1   0.647    0.34912 0.608 0.040 0.084 0.032 0.216 0.020
#> GSM486838     4   0.884    0.24109 0.076 0.148 0.152 0.428 0.096 0.100
#> GSM486840     1   0.592    0.40781 0.672 0.052 0.144 0.036 0.092 0.004
#> GSM486842     3   0.651    0.14224 0.396 0.012 0.456 0.052 0.076 0.008
#> GSM486844     1   0.874    0.19026 0.392 0.168 0.160 0.112 0.148 0.020
#> GSM486846     4   0.816    0.10203 0.024 0.232 0.072 0.352 0.036 0.284
#> GSM486848     1   0.729    0.35711 0.528 0.092 0.176 0.040 0.160 0.004
#> GSM486850     2   0.777    0.00294 0.016 0.376 0.032 0.280 0.048 0.248
#> GSM486852     5   0.839    0.35356 0.232 0.076 0.060 0.036 0.408 0.188
#> GSM486854     4   0.790    0.16905 0.016 0.252 0.064 0.420 0.044 0.204
#> GSM486856     2   0.763    0.30398 0.084 0.544 0.032 0.164 0.064 0.112
#> GSM486858     4   0.892    0.09502 0.028 0.268 0.112 0.324 0.112 0.156

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 agent(p) individual(p) k
#> CV:skmeans 109    0.920      2.01e-05 2
#> CV:skmeans  60    0.585      1.03e-04 3
#> CV:skmeans  12       NA            NA 4
#> CV:skmeans   0       NA            NA 5
#> CV:skmeans   0       NA            NA 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 120 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 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-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.118           0.551       0.776         0.4736 0.532   0.532
#> 3 3 0.207           0.529       0.736         0.3665 0.713   0.508
#> 4 4 0.347           0.469       0.705         0.1378 0.798   0.498
#> 5 5 0.431           0.473       0.679         0.0669 0.919   0.698
#> 6 6 0.479           0.391       0.656         0.0287 0.980   0.906

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
#> GSM486735     2  0.3114     0.6749 0.056 0.944
#> GSM486737     1  0.7528     0.6543 0.784 0.216
#> GSM486739     2  0.6623     0.6807 0.172 0.828
#> GSM486741     2  0.9608     0.2890 0.384 0.616
#> GSM486743     1  0.9881    -0.2444 0.564 0.436
#> GSM486745     2  0.9896     0.4469 0.440 0.560
#> GSM486747     1  0.9922     0.3758 0.552 0.448
#> GSM486749     2  0.5178     0.6719 0.116 0.884
#> GSM486751     1  0.9580     0.4679 0.620 0.380
#> GSM486753     2  0.7602     0.6550 0.220 0.780
#> GSM486755     2  0.6247     0.6827 0.156 0.844
#> GSM486757     2  0.9970    -0.0380 0.468 0.532
#> GSM486759     1  0.2603     0.7245 0.956 0.044
#> GSM486761     1  0.9944     0.3688 0.544 0.456
#> GSM486763     2  0.9044     0.5677 0.320 0.680
#> GSM486765     1  0.9686     0.4421 0.604 0.396
#> GSM486767     2  0.7139     0.6676 0.196 0.804
#> GSM486769     2  0.3431     0.6795 0.064 0.936
#> GSM486771     2  0.9944     0.4408 0.456 0.544
#> GSM486773     1  0.9922     0.2719 0.552 0.448
#> GSM486775     1  0.1414     0.7162 0.980 0.020
#> GSM486777     1  0.8081     0.6382 0.752 0.248
#> GSM486779     2  0.9358     0.5638 0.352 0.648
#> GSM486781     1  0.9983     0.3398 0.524 0.476
#> GSM486783     1  0.8608     0.5999 0.716 0.284
#> GSM486785     1  0.7056     0.6659 0.808 0.192
#> GSM486787     1  0.1414     0.7207 0.980 0.020
#> GSM486789     2  0.1843     0.6689 0.028 0.972
#> GSM486791     1  0.7453     0.5832 0.788 0.212
#> GSM486793     1  0.9988     0.3071 0.520 0.480
#> GSM486795     1  0.1184     0.7203 0.984 0.016
#> GSM486797     1  0.8144     0.6344 0.748 0.252
#> GSM486799     1  0.4815     0.6828 0.896 0.104
#> GSM486801     1  0.0672     0.7200 0.992 0.008
#> GSM486803     1  0.0938     0.7209 0.988 0.012
#> GSM486805     2  0.9129     0.3542 0.328 0.672
#> GSM486807     1  0.6343     0.6964 0.840 0.160
#> GSM486809     2  0.9286     0.5427 0.344 0.656
#> GSM486811     1  0.2948     0.7238 0.948 0.052
#> GSM486813     1  0.2778     0.7075 0.952 0.048
#> GSM486815     2  0.5059     0.6847 0.112 0.888
#> GSM486817     1  0.9460     0.3964 0.636 0.364
#> GSM486819     1  0.4161     0.6894 0.916 0.084
#> GSM486822     2  0.9209     0.5099 0.336 0.664
#> GSM486824     1  0.3584     0.7258 0.932 0.068
#> GSM486828     2  0.9988     0.3473 0.480 0.520
#> GSM486831     1  0.1843     0.7164 0.972 0.028
#> GSM486833     2  0.9754     0.0558 0.408 0.592
#> GSM486835     1  0.0938     0.7194 0.988 0.012
#> GSM486837     1  0.9977     0.3301 0.528 0.472
#> GSM486839     1  0.0672     0.7185 0.992 0.008
#> GSM486841     1  0.9815     0.4152 0.580 0.420
#> GSM486843     1  0.3431     0.7263 0.936 0.064
#> GSM486845     1  0.7453     0.6596 0.788 0.212
#> GSM486847     1  0.0938     0.7189 0.988 0.012
#> GSM486849     2  0.5737     0.6792 0.136 0.864
#> GSM486851     2  0.9909     0.4529 0.444 0.556
#> GSM486853     2  0.9998    -0.2817 0.492 0.508
#> GSM486855     1  0.8386     0.5952 0.732 0.268
#> GSM486857     1  0.8713     0.6027 0.708 0.292
#> GSM486736     2  0.7376     0.6729 0.208 0.792
#> GSM486738     1  0.9977    -0.1392 0.528 0.472
#> GSM486740     2  0.9661     0.5085 0.392 0.608
#> GSM486742     1  0.7674     0.6522 0.776 0.224
#> GSM486744     2  0.9954     0.4156 0.460 0.540
#> GSM486746     1  0.9933    -0.2814 0.548 0.452
#> GSM486748     1  0.9909     0.3841 0.556 0.444
#> GSM486750     2  0.9552     0.3894 0.376 0.624
#> GSM486752     1  0.9922     0.3701 0.552 0.448
#> GSM486754     2  0.8267     0.6332 0.260 0.740
#> GSM486756     2  0.6623     0.6710 0.172 0.828
#> GSM486758     2  0.4022     0.6790 0.080 0.920
#> GSM486760     1  0.7139     0.6553 0.804 0.196
#> GSM486762     1  0.9954     0.3577 0.540 0.460
#> GSM486764     2  0.9686     0.5160 0.396 0.604
#> GSM486766     1  0.9209     0.5137 0.664 0.336
#> GSM486768     1  0.1843     0.7137 0.972 0.028
#> GSM486770     2  0.2043     0.6699 0.032 0.968
#> GSM486772     1  0.6048     0.6522 0.852 0.148
#> GSM486774     2  0.6973     0.6320 0.188 0.812
#> GSM486776     1  0.2948     0.7254 0.948 0.052
#> GSM486778     1  0.8081     0.6353 0.752 0.248
#> GSM486780     2  0.6712     0.6827 0.176 0.824
#> GSM486782     2  0.3879     0.6753 0.076 0.924
#> GSM486784     1  0.4815     0.6749 0.896 0.104
#> GSM486786     1  0.6531     0.6945 0.832 0.168
#> GSM486788     1  0.0938     0.7174 0.988 0.012
#> GSM486790     2  0.1843     0.6677 0.028 0.972
#> GSM486792     1  0.7219     0.5107 0.800 0.200
#> GSM486794     1  0.5178     0.7058 0.884 0.116
#> GSM486796     1  0.3114     0.7120 0.944 0.056
#> GSM486798     2  0.8016     0.5716 0.244 0.756
#> GSM486800     1  0.0672     0.7168 0.992 0.008
#> GSM486802     1  0.1184     0.7207 0.984 0.016
#> GSM486804     1  0.1414     0.7220 0.980 0.020
#> GSM486806     1  0.9775     0.4209 0.588 0.412
#> GSM486808     1  0.9460     0.4760 0.636 0.364
#> GSM486810     2  0.0938     0.6551 0.012 0.988
#> GSM486812     1  0.2043     0.7207 0.968 0.032
#> GSM486814     1  0.4161     0.7224 0.916 0.084
#> GSM486816     2  0.9635     0.2201 0.388 0.612
#> GSM486818     1  0.7376     0.6822 0.792 0.208
#> GSM486821     1  0.8909     0.3666 0.692 0.308
#> GSM486823     2  0.7950     0.5466 0.240 0.760
#> GSM486826     1  0.4431     0.7196 0.908 0.092
#> GSM486830     2  0.4022     0.6834 0.080 0.920
#> GSM486832     1  0.1843     0.7240 0.972 0.028
#> GSM486834     1  0.9909     0.3732 0.556 0.444
#> GSM486836     1  0.0672     0.7200 0.992 0.008
#> GSM486838     1  0.9795     0.4417 0.584 0.416
#> GSM486840     1  0.0672     0.7169 0.992 0.008
#> GSM486842     1  0.4161     0.7212 0.916 0.084
#> GSM486844     1  0.1184     0.7174 0.984 0.016
#> GSM486846     1  0.7674     0.6524 0.776 0.224
#> GSM486848     1  0.0000     0.7179 1.000 0.000
#> GSM486850     2  0.9866     0.0197 0.432 0.568
#> GSM486852     2  0.9850     0.4631 0.428 0.572
#> GSM486854     2  0.7376     0.5762 0.208 0.792
#> GSM486856     1  0.2948     0.7112 0.948 0.052
#> GSM486858     1  0.9970     0.3339 0.532 0.468

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM486735     2  0.4233   0.631791 0.004 0.836 0.160
#> GSM486737     1  0.7677   0.476582 0.676 0.120 0.204
#> GSM486739     2  0.1636   0.705746 0.020 0.964 0.016
#> GSM486741     3  0.8716   0.507671 0.240 0.172 0.588
#> GSM486743     2  0.7099   0.458867 0.384 0.588 0.028
#> GSM486745     2  0.4750   0.674765 0.216 0.784 0.000
#> GSM486747     3  0.3573   0.645986 0.120 0.004 0.876
#> GSM486749     3  0.7152  -0.000152 0.024 0.444 0.532
#> GSM486751     3  0.6632   0.463790 0.392 0.012 0.596
#> GSM486753     2  0.3155   0.705193 0.040 0.916 0.044
#> GSM486755     2  0.5377   0.712306 0.112 0.820 0.068
#> GSM486757     3  0.8455   0.576855 0.296 0.120 0.584
#> GSM486759     1  0.4137   0.716135 0.872 0.032 0.096
#> GSM486761     3  0.5331   0.657377 0.184 0.024 0.792
#> GSM486763     2  0.3713   0.708852 0.032 0.892 0.076
#> GSM486765     3  0.6673   0.594741 0.224 0.056 0.720
#> GSM486767     2  0.8779   0.487952 0.164 0.576 0.260
#> GSM486769     2  0.3370   0.702912 0.024 0.904 0.072
#> GSM486771     2  0.6361   0.658920 0.232 0.728 0.040
#> GSM486773     1  0.9550  -0.254490 0.436 0.196 0.368
#> GSM486775     1  0.0237   0.722925 0.996 0.004 0.000
#> GSM486777     1  0.8437   0.439908 0.596 0.128 0.276
#> GSM486779     2  0.7319   0.641742 0.128 0.708 0.164
#> GSM486781     3  0.7344   0.604212 0.232 0.084 0.684
#> GSM486783     1  0.8608  -0.065788 0.488 0.100 0.412
#> GSM486785     1  0.6713   0.286333 0.572 0.012 0.416
#> GSM486787     1  0.2772   0.720586 0.916 0.004 0.080
#> GSM486789     2  0.3272   0.700703 0.004 0.892 0.104
#> GSM486791     1  0.7512   0.461157 0.656 0.268 0.076
#> GSM486793     3  0.4007   0.636099 0.084 0.036 0.880
#> GSM486795     1  0.1964   0.725689 0.944 0.000 0.056
#> GSM486797     3  0.7466  -0.051006 0.444 0.036 0.520
#> GSM486799     1  0.7107   0.601935 0.712 0.092 0.196
#> GSM486801     1  0.0237   0.724052 0.996 0.000 0.004
#> GSM486803     1  0.5503   0.666063 0.772 0.020 0.208
#> GSM486805     3  0.6529   0.584550 0.092 0.152 0.756
#> GSM486807     1  0.5061   0.640010 0.784 0.008 0.208
#> GSM486809     2  0.6728   0.632844 0.128 0.748 0.124
#> GSM486811     1  0.5681   0.622622 0.748 0.016 0.236
#> GSM486813     1  0.2681   0.715853 0.932 0.028 0.040
#> GSM486815     2  0.7748   0.210350 0.048 0.500 0.452
#> GSM486817     3  0.9228   0.218791 0.416 0.152 0.432
#> GSM486819     1  0.5891   0.624694 0.780 0.168 0.052
#> GSM486822     2  0.9571   0.117420 0.224 0.472 0.304
#> GSM486824     1  0.5947   0.676245 0.776 0.052 0.172
#> GSM486828     2  0.9760   0.269290 0.280 0.444 0.276
#> GSM486831     1  0.1636   0.726010 0.964 0.016 0.020
#> GSM486833     3  0.2414   0.605274 0.020 0.040 0.940
#> GSM486835     1  0.0747   0.726945 0.984 0.000 0.016
#> GSM486837     3  0.6007   0.615839 0.184 0.048 0.768
#> GSM486839     1  0.0475   0.725329 0.992 0.004 0.004
#> GSM486841     3  0.3933   0.638498 0.092 0.028 0.880
#> GSM486843     1  0.3539   0.721515 0.888 0.012 0.100
#> GSM486845     1  0.7820   0.294384 0.604 0.072 0.324
#> GSM486847     1  0.4228   0.687200 0.844 0.008 0.148
#> GSM486849     3  0.7013  -0.043539 0.020 0.432 0.548
#> GSM486851     2  0.6229   0.651326 0.064 0.764 0.172
#> GSM486853     3  0.6728   0.613804 0.184 0.080 0.736
#> GSM486855     1  0.9847  -0.013402 0.416 0.316 0.268
#> GSM486857     3  0.8268   0.105150 0.440 0.076 0.484
#> GSM486736     2  0.3530   0.714716 0.068 0.900 0.032
#> GSM486738     1  0.9693  -0.183677 0.404 0.216 0.380
#> GSM486740     2  0.2356   0.707025 0.072 0.928 0.000
#> GSM486742     1  0.7841   0.368779 0.636 0.092 0.272
#> GSM486744     2  0.8222   0.473901 0.332 0.576 0.092
#> GSM486746     2  0.5785   0.573449 0.332 0.668 0.000
#> GSM486748     3  0.6962   0.573549 0.316 0.036 0.648
#> GSM486750     2  0.9604   0.034073 0.268 0.476 0.256
#> GSM486752     3  0.7032   0.495305 0.368 0.028 0.604
#> GSM486754     2  0.7085   0.636959 0.096 0.716 0.188
#> GSM486756     2  0.7401   0.399754 0.048 0.612 0.340
#> GSM486758     3  0.7228   0.260140 0.036 0.364 0.600
#> GSM486760     1  0.7533   0.326468 0.564 0.044 0.392
#> GSM486762     3  0.5514   0.651708 0.156 0.044 0.800
#> GSM486764     2  0.3550   0.712669 0.080 0.896 0.024
#> GSM486766     3  0.5656   0.491100 0.264 0.008 0.728
#> GSM486768     1  0.1015   0.723205 0.980 0.012 0.008
#> GSM486770     2  0.1765   0.698125 0.004 0.956 0.040
#> GSM486772     1  0.5173   0.653058 0.816 0.148 0.036
#> GSM486774     3  0.7884   0.493616 0.104 0.252 0.644
#> GSM486776     1  0.5239   0.688821 0.808 0.032 0.160
#> GSM486778     1  0.7112   0.452793 0.648 0.044 0.308
#> GSM486780     2  0.8739   0.204646 0.112 0.496 0.392
#> GSM486782     3  0.6713   0.108893 0.012 0.416 0.572
#> GSM486784     1  0.4836   0.687280 0.848 0.080 0.072
#> GSM486786     1  0.6737   0.408946 0.600 0.016 0.384
#> GSM486788     1  0.0237   0.723395 0.996 0.000 0.004
#> GSM486790     2  0.3349   0.699601 0.004 0.888 0.108
#> GSM486792     1  0.7935   0.501346 0.648 0.236 0.116
#> GSM486794     1  0.6018   0.528257 0.684 0.008 0.308
#> GSM486796     1  0.3129   0.709024 0.904 0.088 0.008
#> GSM486798     3  0.6726   0.572361 0.120 0.132 0.748
#> GSM486800     1  0.1163   0.726444 0.972 0.000 0.028
#> GSM486802     1  0.0424   0.724349 0.992 0.000 0.008
#> GSM486804     1  0.0592   0.726392 0.988 0.000 0.012
#> GSM486806     3  0.6688   0.464819 0.408 0.012 0.580
#> GSM486808     3  0.5578   0.531287 0.240 0.012 0.748
#> GSM486810     3  0.5948   0.302465 0.000 0.360 0.640
#> GSM486812     1  0.5406   0.630691 0.764 0.012 0.224
#> GSM486814     1  0.5961   0.687272 0.792 0.096 0.112
#> GSM486816     3  0.7007   0.594980 0.176 0.100 0.724
#> GSM486818     1  0.7944   0.472596 0.616 0.088 0.296
#> GSM486821     1  0.8297   0.278887 0.560 0.348 0.092
#> GSM486823     3  0.7531   0.503854 0.092 0.236 0.672
#> GSM486826     1  0.5506   0.636235 0.764 0.016 0.220
#> GSM486830     2  0.4002   0.639992 0.000 0.840 0.160
#> GSM486832     1  0.2527   0.727965 0.936 0.020 0.044
#> GSM486834     3  0.4979   0.663547 0.168 0.020 0.812
#> GSM486836     1  0.1170   0.726109 0.976 0.008 0.016
#> GSM486838     3  0.6625   0.501479 0.316 0.024 0.660
#> GSM486840     1  0.0000   0.723251 1.000 0.000 0.000
#> GSM486842     1  0.6113   0.564025 0.688 0.012 0.300
#> GSM486844     1  0.0237   0.722925 0.996 0.004 0.000
#> GSM486846     1  0.7997   0.174604 0.568 0.072 0.360
#> GSM486848     1  0.0592   0.726522 0.988 0.000 0.012
#> GSM486850     3  0.8877   0.576150 0.244 0.184 0.572
#> GSM486852     2  0.6843   0.652539 0.144 0.740 0.116
#> GSM486854     3  0.8223   0.452260 0.108 0.288 0.604
#> GSM486856     1  0.4731   0.647764 0.840 0.032 0.128
#> GSM486858     3  0.7749   0.579173 0.300 0.076 0.624

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM486735     4  0.3903    0.68901 0.080 0.076 0.000 0.844
#> GSM486737     3  0.6538    0.10637 0.012 0.396 0.540 0.052
#> GSM486739     4  0.0336    0.72378 0.000 0.008 0.000 0.992
#> GSM486741     2  0.4476    0.61107 0.080 0.832 0.064 0.024
#> GSM486743     4  0.7031    0.40810 0.032 0.060 0.356 0.552
#> GSM486745     4  0.3569    0.67913 0.000 0.000 0.196 0.804
#> GSM486747     1  0.4050    0.43290 0.820 0.144 0.036 0.000
#> GSM486749     2  0.7752    0.25742 0.348 0.460 0.008 0.184
#> GSM486751     1  0.7735    0.19088 0.468 0.184 0.340 0.008
#> GSM486753     4  0.3681    0.68188 0.000 0.176 0.008 0.816
#> GSM486755     4  0.5442    0.69221 0.016 0.128 0.092 0.764
#> GSM486757     1  0.8370    0.17596 0.484 0.284 0.188 0.044
#> GSM486759     3  0.4720    0.62696 0.212 0.008 0.760 0.020
#> GSM486761     2  0.7430    0.16279 0.392 0.456 0.148 0.004
#> GSM486763     4  0.3263    0.71640 0.100 0.012 0.012 0.876
#> GSM486765     1  0.4614    0.46196 0.792 0.144 0.064 0.000
#> GSM486767     4  0.8422    0.51477 0.184 0.120 0.140 0.556
#> GSM486769     4  0.1929    0.72619 0.036 0.024 0.000 0.940
#> GSM486771     4  0.6492    0.62203 0.008 0.140 0.188 0.664
#> GSM486773     3  0.9471   -0.13062 0.280 0.160 0.396 0.164
#> GSM486775     3  0.0000    0.72093 0.000 0.000 1.000 0.000
#> GSM486777     1  0.8006    0.18568 0.440 0.136 0.392 0.032
#> GSM486779     4  0.7295    0.59149 0.116 0.148 0.080 0.656
#> GSM486781     2  0.5797    0.56958 0.180 0.724 0.084 0.012
#> GSM486783     2  0.4572    0.59819 0.024 0.796 0.164 0.016
#> GSM486785     1  0.6640    0.31192 0.552 0.096 0.352 0.000
#> GSM486787     3  0.3528    0.63131 0.192 0.000 0.808 0.000
#> GSM486789     4  0.1488    0.72929 0.032 0.012 0.000 0.956
#> GSM486791     3  0.6443    0.46498 0.068 0.016 0.636 0.280
#> GSM486793     1  0.2402    0.47504 0.912 0.076 0.012 0.000
#> GSM486795     3  0.2011    0.70994 0.080 0.000 0.920 0.000
#> GSM486797     2  0.7385    0.34032 0.284 0.544 0.164 0.008
#> GSM486799     1  0.5552    0.07009 0.544 0.008 0.440 0.008
#> GSM486801     3  0.0000    0.72093 0.000 0.000 1.000 0.000
#> GSM486803     3  0.6676    0.09996 0.448 0.056 0.484 0.012
#> GSM486805     2  0.5962    0.48870 0.264 0.676 0.032 0.028
#> GSM486807     3  0.6404    0.42850 0.220 0.136 0.644 0.000
#> GSM486809     4  0.7248    0.44858 0.032 0.284 0.096 0.588
#> GSM486811     1  0.5097    0.17789 0.568 0.004 0.428 0.000
#> GSM486813     3  0.2563    0.71046 0.000 0.072 0.908 0.020
#> GSM486815     1  0.5797    0.36332 0.684 0.064 0.004 0.248
#> GSM486817     2  0.8245    0.42571 0.084 0.520 0.292 0.104
#> GSM486819     3  0.5797    0.59476 0.024 0.060 0.728 0.188
#> GSM486822     2  0.4700    0.58688 0.000 0.792 0.084 0.124
#> GSM486824     3  0.6642    0.36474 0.348 0.028 0.580 0.044
#> GSM486828     4  0.9121   -0.08078 0.076 0.328 0.224 0.372
#> GSM486831     3  0.1824    0.71857 0.060 0.004 0.936 0.000
#> GSM486833     1  0.5119   -0.01524 0.556 0.440 0.000 0.004
#> GSM486835     3  0.1305    0.72636 0.036 0.004 0.960 0.000
#> GSM486837     2  0.3853    0.56341 0.160 0.820 0.020 0.000
#> GSM486839     3  0.1118    0.72592 0.036 0.000 0.964 0.000
#> GSM486841     1  0.3280    0.45675 0.860 0.124 0.016 0.000
#> GSM486843     3  0.4314    0.67161 0.152 0.024 0.812 0.012
#> GSM486845     2  0.5282    0.54162 0.036 0.688 0.276 0.000
#> GSM486847     3  0.4933    0.22619 0.432 0.000 0.568 0.000
#> GSM486849     2  0.6552    0.38125 0.328 0.576 0.000 0.096
#> GSM486851     4  0.4936    0.44666 0.340 0.000 0.008 0.652
#> GSM486853     2  0.4519    0.58136 0.140 0.804 0.052 0.004
#> GSM486855     2  0.5802    0.57634 0.008 0.724 0.164 0.104
#> GSM486857     1  0.8220    0.13543 0.408 0.236 0.340 0.016
#> GSM486736     4  0.1631    0.73390 0.016 0.008 0.020 0.956
#> GSM486738     2  0.6016    0.52144 0.016 0.692 0.228 0.064
#> GSM486740     4  0.0336    0.72543 0.000 0.000 0.008 0.992
#> GSM486742     2  0.4695    0.55342 0.012 0.732 0.252 0.004
#> GSM486744     4  0.7973    0.45922 0.060 0.112 0.288 0.540
#> GSM486746     4  0.4832    0.56520 0.004 0.004 0.312 0.680
#> GSM486748     1  0.7767    0.14547 0.432 0.268 0.300 0.000
#> GSM486750     2  0.9153    0.11290 0.076 0.376 0.240 0.308
#> GSM486752     1  0.7730    0.25813 0.512 0.196 0.280 0.012
#> GSM486754     4  0.6108    0.66223 0.096 0.112 0.052 0.740
#> GSM486756     4  0.6851    0.50893 0.208 0.136 0.016 0.640
#> GSM486758     1  0.8078    0.05219 0.464 0.232 0.016 0.288
#> GSM486760     1  0.5400    0.41660 0.684 0.012 0.284 0.020
#> GSM486762     1  0.6249    0.21881 0.580 0.352 0.068 0.000
#> GSM486764     4  0.2353    0.73178 0.040 0.008 0.024 0.928
#> GSM486766     1  0.1059    0.48906 0.972 0.012 0.016 0.000
#> GSM486768     3  0.0937    0.72414 0.000 0.012 0.976 0.012
#> GSM486770     4  0.0188    0.72389 0.000 0.004 0.000 0.996
#> GSM486772     3  0.5457    0.61701 0.016 0.100 0.764 0.120
#> GSM486774     2  0.6946    0.50945 0.196 0.652 0.032 0.120
#> GSM486776     3  0.6343    0.26760 0.392 0.036 0.556 0.016
#> GSM486778     3  0.6956    0.14663 0.352 0.108 0.536 0.004
#> GSM486780     2  0.4726    0.56409 0.004 0.784 0.048 0.164
#> GSM486782     1  0.7876   -0.06917 0.396 0.224 0.004 0.376
#> GSM486784     3  0.5099    0.61507 0.004 0.200 0.748 0.048
#> GSM486786     1  0.6310    0.24134 0.540 0.052 0.404 0.004
#> GSM486788     3  0.0817    0.72452 0.024 0.000 0.976 0.000
#> GSM486790     4  0.1674    0.72947 0.032 0.012 0.004 0.952
#> GSM486792     3  0.7473    0.36216 0.232 0.008 0.548 0.212
#> GSM486794     1  0.5088    0.20806 0.572 0.004 0.424 0.000
#> GSM486796     3  0.3417    0.69985 0.008 0.052 0.880 0.060
#> GSM486798     1  0.6844    0.34640 0.648 0.236 0.044 0.072
#> GSM486800     3  0.2125    0.71516 0.076 0.004 0.920 0.000
#> GSM486802     3  0.0000    0.72093 0.000 0.000 1.000 0.000
#> GSM486804     3  0.0469    0.72451 0.012 0.000 0.988 0.000
#> GSM486806     2  0.8184    0.00942 0.304 0.352 0.336 0.008
#> GSM486808     1  0.2973    0.47462 0.884 0.096 0.020 0.000
#> GSM486810     2  0.4801    0.53813 0.188 0.764 0.000 0.048
#> GSM486812     1  0.4888    0.20041 0.588 0.000 0.412 0.000
#> GSM486814     3  0.7332    0.50318 0.172 0.168 0.624 0.036
#> GSM486816     1  0.3959    0.49003 0.856 0.076 0.052 0.016
#> GSM486818     3  0.7706    0.33353 0.320 0.080 0.540 0.060
#> GSM486821     3  0.7578    0.27922 0.040 0.092 0.532 0.336
#> GSM486823     2  0.6256    0.55697 0.204 0.688 0.016 0.092
#> GSM486826     3  0.5351    0.51385 0.280 0.024 0.688 0.008
#> GSM486830     4  0.5099    0.33063 0.008 0.380 0.000 0.612
#> GSM486832     3  0.2610    0.71426 0.088 0.000 0.900 0.012
#> GSM486834     1  0.6767    0.09949 0.536 0.372 0.088 0.004
#> GSM486836     3  0.1398    0.72455 0.040 0.000 0.956 0.004
#> GSM486838     2  0.7610    0.31026 0.284 0.500 0.212 0.004
#> GSM486840     3  0.0469    0.72354 0.012 0.000 0.988 0.000
#> GSM486842     1  0.5244    0.27429 0.600 0.012 0.388 0.000
#> GSM486844     3  0.0000    0.72093 0.000 0.000 1.000 0.000
#> GSM486846     2  0.5141    0.54928 0.032 0.700 0.268 0.000
#> GSM486848     3  0.0817    0.72541 0.024 0.000 0.976 0.000
#> GSM486850     2  0.5751    0.59343 0.092 0.760 0.108 0.040
#> GSM486852     4  0.6158    0.63144 0.172 0.024 0.092 0.712
#> GSM486854     2  0.7947    0.45233 0.188 0.580 0.060 0.172
#> GSM486856     3  0.4647    0.50232 0.000 0.288 0.704 0.008
#> GSM486858     2  0.6850    0.43506 0.188 0.600 0.212 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
#> GSM486735     5  0.3427    0.63813 0.008 0.000 0.128 0.028 0.836
#> GSM486737     2  0.6791    0.15622 0.024 0.508 0.048 0.372 0.048
#> GSM486739     5  0.0162    0.68793 0.000 0.000 0.000 0.004 0.996
#> GSM486741     4  0.4464    0.55732 0.020 0.028 0.160 0.780 0.012
#> GSM486743     5  0.7882    0.35519 0.056 0.312 0.072 0.080 0.480
#> GSM486745     5  0.3838    0.65528 0.008 0.176 0.008 0.012 0.796
#> GSM486747     3  0.5714    0.26983 0.412 0.020 0.524 0.044 0.000
#> GSM486749     4  0.7982    0.20852 0.308 0.008 0.100 0.428 0.156
#> GSM486751     3  0.4631    0.56359 0.076 0.164 0.752 0.008 0.000
#> GSM486753     5  0.4965    0.62561 0.020 0.004 0.048 0.200 0.728
#> GSM486755     5  0.6098    0.62810 0.012 0.092 0.060 0.148 0.688
#> GSM486757     3  0.6897    0.51864 0.152 0.108 0.628 0.096 0.016
#> GSM486759     2  0.4908    0.48278 0.324 0.644 0.016 0.004 0.012
#> GSM486761     3  0.5374    0.49747 0.060 0.064 0.724 0.152 0.000
#> GSM486763     5  0.3349    0.66978 0.120 0.008 0.012 0.012 0.848
#> GSM486765     1  0.5881    0.39623 0.656 0.040 0.220 0.084 0.000
#> GSM486767     5  0.8207    0.31480 0.136 0.056 0.296 0.060 0.452
#> GSM486769     5  0.2054    0.67972 0.008 0.000 0.072 0.004 0.916
#> GSM486771     5  0.8007    0.50227 0.044 0.128 0.112 0.180 0.536
#> GSM486773     3  0.6797    0.41720 0.016 0.284 0.556 0.024 0.120
#> GSM486775     2  0.0000    0.69500 0.000 1.000 0.000 0.000 0.000
#> GSM486777     1  0.6211    0.49550 0.572 0.312 0.008 0.096 0.012
#> GSM486779     5  0.7937    0.49060 0.140 0.056 0.144 0.104 0.556
#> GSM486781     4  0.5979    0.36101 0.016 0.060 0.348 0.568 0.008
#> GSM486783     4  0.3001    0.57966 0.012 0.044 0.056 0.884 0.004
#> GSM486785     1  0.7381    0.41808 0.456 0.320 0.164 0.060 0.000
#> GSM486787     2  0.3508    0.50953 0.252 0.748 0.000 0.000 0.000
#> GSM486789     5  0.1877    0.68822 0.000 0.000 0.064 0.012 0.924
#> GSM486791     2  0.6329    0.44418 0.064 0.592 0.064 0.000 0.280
#> GSM486793     1  0.4305    0.46091 0.744 0.004 0.216 0.036 0.000
#> GSM486795     2  0.1732    0.67812 0.080 0.920 0.000 0.000 0.000
#> GSM486797     4  0.8118    0.24915 0.256 0.108 0.192 0.436 0.008
#> GSM486799     1  0.4503    0.59614 0.704 0.256 0.040 0.000 0.000
#> GSM486801     2  0.0000    0.69500 0.000 1.000 0.000 0.000 0.000
#> GSM486803     1  0.5079    0.49810 0.644 0.316 0.012 0.020 0.008
#> GSM486805     3  0.5767    0.14099 0.028 0.012 0.548 0.392 0.020
#> GSM486807     2  0.6885    0.32062 0.208 0.572 0.160 0.060 0.000
#> GSM486809     5  0.6614    0.40340 0.032 0.088 0.012 0.308 0.560
#> GSM486811     1  0.3636    0.64630 0.728 0.272 0.000 0.000 0.000
#> GSM486813     2  0.4308    0.66200 0.024 0.816 0.080 0.068 0.012
#> GSM486815     1  0.5591    0.45392 0.696 0.004 0.088 0.028 0.184
#> GSM486817     4  0.8146    0.35484 0.064 0.188 0.188 0.504 0.056
#> GSM486819     2  0.5316    0.59476 0.028 0.720 0.008 0.060 0.184
#> GSM486822     4  0.2909    0.57630 0.008 0.012 0.048 0.892 0.040
#> GSM486824     2  0.6277    0.03555 0.424 0.488 0.052 0.012 0.024
#> GSM486828     5  0.8738   -0.09258 0.052 0.204 0.076 0.332 0.336
#> GSM486831     2  0.2248    0.68749 0.088 0.900 0.012 0.000 0.000
#> GSM486833     3  0.6736    0.26252 0.344 0.000 0.396 0.260 0.000
#> GSM486835     2  0.2046    0.69668 0.068 0.916 0.016 0.000 0.000
#> GSM486837     4  0.4961    0.32965 0.028 0.004 0.372 0.596 0.000
#> GSM486839     2  0.1043    0.69797 0.040 0.960 0.000 0.000 0.000
#> GSM486841     1  0.4272    0.50866 0.780 0.008 0.152 0.060 0.000
#> GSM486843     2  0.5528    0.57590 0.196 0.696 0.076 0.028 0.004
#> GSM486845     4  0.4197    0.55329 0.036 0.156 0.020 0.788 0.000
#> GSM486847     1  0.4367    0.40653 0.580 0.416 0.004 0.000 0.000
#> GSM486849     4  0.6266    0.43290 0.232 0.000 0.088 0.624 0.056
#> GSM486851     5  0.4524    0.26798 0.420 0.004 0.004 0.000 0.572
#> GSM486853     4  0.4607    0.49283 0.024 0.020 0.212 0.740 0.004
#> GSM486855     4  0.4394    0.56674 0.028 0.068 0.056 0.820 0.028
#> GSM486857     3  0.8721    0.16512 0.200 0.276 0.312 0.204 0.008
#> GSM486736     5  0.1871    0.69620 0.004 0.012 0.020 0.024 0.940
#> GSM486738     4  0.7222    0.42487 0.048 0.148 0.184 0.588 0.032
#> GSM486740     5  0.0162    0.68707 0.000 0.000 0.000 0.004 0.996
#> GSM486742     4  0.5781    0.50642 0.032 0.148 0.140 0.680 0.000
#> GSM486744     5  0.8674    0.39006 0.044 0.228 0.164 0.128 0.436
#> GSM486746     5  0.4804    0.54982 0.020 0.284 0.012 0.004 0.680
#> GSM486748     3  0.6690    0.52339 0.112 0.184 0.612 0.092 0.000
#> GSM486750     4  0.9152   -0.00740 0.028 0.216 0.244 0.260 0.252
#> GSM486752     3  0.5173    0.57584 0.128 0.128 0.728 0.012 0.004
#> GSM486754     5  0.6441    0.38854 0.028 0.020 0.348 0.056 0.548
#> GSM486756     3  0.6747    0.03379 0.044 0.012 0.476 0.064 0.404
#> GSM486758     3  0.3681    0.53213 0.048 0.008 0.848 0.016 0.080
#> GSM486760     1  0.4042    0.64289 0.792 0.156 0.044 0.000 0.008
#> GSM486762     3  0.7241    0.40486 0.288 0.056 0.492 0.164 0.000
#> GSM486764     5  0.2869    0.69489 0.052 0.020 0.012 0.020 0.896
#> GSM486766     1  0.3388    0.51910 0.792 0.008 0.200 0.000 0.000
#> GSM486768     2  0.3613    0.68414 0.040 0.856 0.060 0.040 0.004
#> GSM486770     5  0.0162    0.68707 0.000 0.000 0.000 0.004 0.996
#> GSM486772     2  0.7046    0.50250 0.016 0.612 0.104 0.164 0.104
#> GSM486774     4  0.7686    0.19981 0.076 0.024 0.332 0.468 0.100
#> GSM486776     1  0.5700    0.21707 0.536 0.404 0.040 0.016 0.004
#> GSM486778     2  0.6807    0.04164 0.328 0.520 0.088 0.064 0.000
#> GSM486780     4  0.4706    0.54668 0.040 0.016 0.108 0.792 0.044
#> GSM486782     3  0.5604    0.44971 0.068 0.000 0.712 0.080 0.140
#> GSM486784     2  0.6984    0.46052 0.020 0.576 0.148 0.224 0.032
#> GSM486786     1  0.6016    0.55169 0.576 0.324 0.076 0.024 0.000
#> GSM486788     2  0.1270    0.69724 0.052 0.948 0.000 0.000 0.000
#> GSM486790     5  0.1270    0.68767 0.000 0.000 0.052 0.000 0.948
#> GSM486792     2  0.7150    0.17322 0.336 0.452 0.036 0.000 0.176
#> GSM486794     1  0.4805    0.59611 0.648 0.312 0.040 0.000 0.000
#> GSM486796     2  0.4955    0.66197 0.040 0.792 0.060 0.052 0.056
#> GSM486798     3  0.6757    0.35076 0.336 0.024 0.540 0.056 0.044
#> GSM486800     2  0.3047    0.65953 0.160 0.832 0.004 0.004 0.000
#> GSM486802     2  0.0162    0.69518 0.000 0.996 0.000 0.004 0.000
#> GSM486804     2  0.0727    0.69890 0.012 0.980 0.004 0.004 0.000
#> GSM486806     3  0.5467    0.49705 0.020 0.196 0.688 0.096 0.000
#> GSM486808     1  0.4629    0.42823 0.708 0.012 0.252 0.028 0.000
#> GSM486810     4  0.4311    0.56112 0.116 0.000 0.048 0.800 0.036
#> GSM486812     1  0.3607    0.65040 0.752 0.244 0.004 0.000 0.000
#> GSM486814     2  0.8355    0.30290 0.212 0.436 0.124 0.212 0.016
#> GSM486816     1  0.4845    0.47722 0.736 0.028 0.200 0.032 0.004
#> GSM486818     2  0.7861    0.23642 0.284 0.452 0.192 0.052 0.020
#> GSM486821     2  0.7628    0.22697 0.036 0.484 0.100 0.056 0.324
#> GSM486823     4  0.5539    0.40974 0.020 0.008 0.308 0.628 0.036
#> GSM486826     2  0.6081    0.39003 0.208 0.628 0.148 0.008 0.008
#> GSM486830     5  0.4928    0.18048 0.004 0.000 0.020 0.428 0.548
#> GSM486832     2  0.3938    0.67244 0.112 0.824 0.044 0.012 0.008
#> GSM486834     3  0.5962    0.53278 0.172 0.044 0.668 0.116 0.000
#> GSM486836     2  0.2116    0.69257 0.076 0.912 0.008 0.000 0.004
#> GSM486838     4  0.8343    0.11875 0.192 0.172 0.276 0.360 0.000
#> GSM486840     2  0.0404    0.69668 0.012 0.988 0.000 0.000 0.000
#> GSM486842     1  0.4848    0.60412 0.656 0.304 0.036 0.004 0.000
#> GSM486844     2  0.0000    0.69500 0.000 1.000 0.000 0.000 0.000
#> GSM486846     4  0.4191    0.55267 0.012 0.160 0.044 0.784 0.000
#> GSM486848     2  0.1082    0.69783 0.028 0.964 0.008 0.000 0.000
#> GSM486850     4  0.5332    0.52008 0.032 0.032 0.224 0.700 0.012
#> GSM486852     5  0.5742    0.58353 0.228 0.072 0.024 0.008 0.668
#> GSM486854     3  0.7728    0.00339 0.020 0.056 0.416 0.372 0.136
#> GSM486856     2  0.6004    0.40155 0.020 0.580 0.084 0.316 0.000
#> GSM486858     4  0.7316    0.08420 0.044 0.176 0.380 0.400 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
#> GSM486735     6  0.3346     0.6194 0.000 0.008 0.140 0.036 0.000 0.816
#> GSM486737     1  0.6521    -0.0655 0.476 0.052 0.020 0.388 0.020 0.044
#> GSM486739     6  0.0146     0.6661 0.000 0.004 0.000 0.000 0.000 0.996
#> GSM486741     4  0.5062     0.4289 0.020 0.128 0.128 0.712 0.004 0.008
#> GSM486743     6  0.7296     0.1555 0.304 0.172 0.012 0.028 0.040 0.444
#> GSM486745     6  0.3352     0.6087 0.176 0.032 0.000 0.000 0.000 0.792
#> GSM486747     3  0.4871     0.2154 0.012 0.000 0.532 0.036 0.420 0.000
#> GSM486749     4  0.7659     0.2178 0.004 0.044 0.088 0.428 0.296 0.140
#> GSM486751     3  0.3208     0.5498 0.120 0.008 0.832 0.000 0.040 0.000
#> GSM486753     6  0.4996     0.5410 0.004 0.232 0.004 0.104 0.000 0.656
#> GSM486755     6  0.6051     0.4987 0.084 0.220 0.012 0.072 0.000 0.612
#> GSM486757     3  0.6797     0.4670 0.076 0.112 0.612 0.088 0.108 0.004
#> GSM486759     1  0.4968     0.4132 0.580 0.048 0.008 0.000 0.360 0.004
#> GSM486761     3  0.5576     0.4405 0.040 0.084 0.660 0.200 0.016 0.000
#> GSM486763     6  0.3463     0.6422 0.008 0.024 0.008 0.008 0.124 0.828
#> GSM486765     5  0.5661     0.3837 0.032 0.008 0.244 0.096 0.620 0.000
#> GSM486767     6  0.7664     0.2483 0.028 0.260 0.244 0.004 0.072 0.392
#> GSM486769     6  0.2245     0.6646 0.000 0.012 0.068 0.012 0.004 0.904
#> GSM486771     6  0.6542     0.1615 0.092 0.416 0.020 0.048 0.000 0.424
#> GSM486773     3  0.7029     0.3899 0.256 0.052 0.536 0.064 0.008 0.084
#> GSM486775     1  0.0000     0.6390 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486777     5  0.5227     0.5202 0.292 0.004 0.008 0.076 0.616 0.004
#> GSM486779     6  0.7457     0.3471 0.040 0.284 0.060 0.044 0.076 0.496
#> GSM486781     4  0.5670     0.3711 0.048 0.064 0.264 0.616 0.004 0.004
#> GSM486783     4  0.4049     0.3521 0.024 0.224 0.012 0.736 0.000 0.004
#> GSM486785     5  0.7165     0.3726 0.304 0.024 0.156 0.068 0.448 0.000
#> GSM486787     1  0.3371     0.4488 0.708 0.000 0.000 0.000 0.292 0.000
#> GSM486789     6  0.1970     0.6658 0.000 0.000 0.092 0.008 0.000 0.900
#> GSM486791     1  0.6294     0.3265 0.576 0.036 0.064 0.000 0.056 0.268
#> GSM486793     5  0.3584     0.4866 0.000 0.004 0.244 0.012 0.740 0.000
#> GSM486795     1  0.1610     0.6367 0.916 0.000 0.000 0.000 0.084 0.000
#> GSM486797     4  0.7798     0.2448 0.088 0.092 0.128 0.496 0.188 0.008
#> GSM486799     5  0.4830     0.5779 0.204 0.048 0.048 0.000 0.700 0.000
#> GSM486801     1  0.0000     0.6390 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486803     5  0.5022     0.5120 0.268 0.060 0.004 0.008 0.652 0.008
#> GSM486805     3  0.4500     0.1990 0.008 0.008 0.612 0.360 0.008 0.004
#> GSM486807     1  0.7582     0.1940 0.500 0.092 0.108 0.100 0.200 0.000
#> GSM486809     6  0.6213     0.3798 0.088 0.024 0.004 0.300 0.028 0.556
#> GSM486811     5  0.2793     0.6404 0.200 0.000 0.000 0.000 0.800 0.000
#> GSM486813     1  0.3602     0.4998 0.784 0.176 0.000 0.032 0.000 0.008
#> GSM486815     5  0.4179     0.5128 0.000 0.000 0.060 0.020 0.760 0.160
#> GSM486817     4  0.8088     0.2494 0.136 0.120 0.188 0.476 0.032 0.048
#> GSM486819     1  0.5074     0.4813 0.704 0.000 0.012 0.060 0.040 0.184
#> GSM486822     4  0.3559     0.4356 0.008 0.116 0.028 0.824 0.000 0.024
#> GSM486824     1  0.6591    -0.0183 0.428 0.092 0.024 0.016 0.420 0.020
#> GSM486828     4  0.8085     0.0361 0.196 0.008 0.068 0.340 0.064 0.324
#> GSM486831     1  0.2763     0.6224 0.868 0.036 0.008 0.000 0.088 0.000
#> GSM486833     3  0.6211     0.2497 0.000 0.008 0.420 0.244 0.328 0.000
#> GSM486835     1  0.2151     0.6418 0.904 0.008 0.016 0.000 0.072 0.000
#> GSM486837     4  0.4405     0.3679 0.004 0.040 0.272 0.680 0.004 0.000
#> GSM486839     1  0.1010     0.6468 0.960 0.000 0.000 0.004 0.036 0.000
#> GSM486841     5  0.3266     0.5673 0.008 0.000 0.132 0.036 0.824 0.000
#> GSM486843     1  0.5600     0.5202 0.672 0.076 0.052 0.012 0.184 0.004
#> GSM486845     4  0.2656     0.4387 0.120 0.000 0.012 0.860 0.008 0.000
#> GSM486847     5  0.4221     0.3917 0.396 0.008 0.008 0.000 0.588 0.000
#> GSM486849     4  0.6747     0.2975 0.000 0.116 0.048 0.536 0.260 0.040
#> GSM486851     6  0.4517     0.1767 0.004 0.012 0.008 0.000 0.440 0.536
#> GSM486853     4  0.3053     0.4851 0.012 0.004 0.172 0.812 0.000 0.000
#> GSM486855     4  0.4785     0.1957 0.040 0.312 0.000 0.632 0.004 0.012
#> GSM486857     3  0.8391     0.2177 0.236 0.048 0.372 0.172 0.160 0.012
#> GSM486736     6  0.2202     0.6731 0.012 0.028 0.024 0.012 0.004 0.920
#> GSM486738     2  0.6543    -0.0669 0.088 0.484 0.056 0.352 0.000 0.020
#> GSM486740     6  0.0146     0.6660 0.000 0.000 0.000 0.004 0.000 0.996
#> GSM486742     4  0.5801     0.0846 0.124 0.284 0.028 0.564 0.000 0.000
#> GSM486744     6  0.7257     0.0385 0.204 0.340 0.028 0.036 0.004 0.388
#> GSM486746     6  0.4289     0.4921 0.276 0.040 0.000 0.000 0.004 0.680
#> GSM486748     3  0.5260     0.5162 0.168 0.008 0.696 0.064 0.064 0.000
#> GSM486750     4  0.9062    -0.1006 0.196 0.196 0.132 0.248 0.008 0.220
#> GSM486752     3  0.4404     0.5564 0.096 0.028 0.788 0.020 0.064 0.004
#> GSM486754     6  0.6288     0.3314 0.008 0.204 0.292 0.012 0.000 0.484
#> GSM486756     3  0.6520     0.0280 0.008 0.176 0.420 0.008 0.012 0.376
#> GSM486758     3  0.3773     0.4789 0.004 0.168 0.788 0.016 0.004 0.020
#> GSM486760     5  0.3854     0.6396 0.116 0.052 0.024 0.000 0.804 0.004
#> GSM486762     3  0.7558     0.3320 0.052 0.060 0.424 0.184 0.280 0.000
#> GSM486764     6  0.4139     0.6358 0.012 0.144 0.020 0.000 0.044 0.780
#> GSM486766     5  0.2854     0.5318 0.000 0.000 0.208 0.000 0.792 0.000
#> GSM486768     1  0.3371     0.5321 0.788 0.192 0.000 0.008 0.008 0.004
#> GSM486770     6  0.0508     0.6668 0.000 0.000 0.004 0.012 0.000 0.984
#> GSM486772     1  0.5894    -0.1096 0.516 0.364 0.008 0.028 0.000 0.084
#> GSM486774     4  0.7229     0.2098 0.016 0.036 0.312 0.480 0.060 0.096
#> GSM486776     5  0.6196     0.2243 0.360 0.140 0.008 0.012 0.476 0.004
#> GSM486778     1  0.6093     0.0150 0.504 0.000 0.072 0.072 0.352 0.000
#> GSM486780     4  0.4814     0.0573 0.008 0.404 0.012 0.556 0.000 0.020
#> GSM486782     3  0.6075     0.3959 0.000 0.212 0.612 0.036 0.024 0.116
#> GSM486784     1  0.6458    -0.3347 0.444 0.416 0.044 0.068 0.004 0.024
#> GSM486786     5  0.5124     0.5653 0.288 0.004 0.044 0.032 0.632 0.000
#> GSM486788     1  0.1141     0.6465 0.948 0.000 0.000 0.000 0.052 0.000
#> GSM486790     6  0.1226     0.6714 0.000 0.000 0.040 0.004 0.004 0.952
#> GSM486792     1  0.7298     0.1465 0.412 0.064 0.032 0.000 0.336 0.156
#> GSM486794     5  0.4266     0.6154 0.252 0.000 0.040 0.008 0.700 0.000
#> GSM486796     1  0.4766     0.5151 0.748 0.152 0.004 0.024 0.032 0.040
#> GSM486798     3  0.7932     0.3156 0.024 0.100 0.416 0.112 0.308 0.040
#> GSM486800     1  0.3295     0.6150 0.816 0.056 0.000 0.000 0.128 0.000
#> GSM486802     1  0.0146     0.6381 0.996 0.004 0.000 0.000 0.000 0.000
#> GSM486804     1  0.0653     0.6432 0.980 0.004 0.004 0.000 0.012 0.000
#> GSM486806     3  0.6714     0.4305 0.160 0.148 0.548 0.140 0.004 0.000
#> GSM486808     5  0.4995     0.4196 0.000 0.040 0.172 0.088 0.700 0.000
#> GSM486810     4  0.3411     0.4700 0.000 0.044 0.016 0.848 0.072 0.020
#> GSM486812     5  0.2814     0.6419 0.172 0.000 0.008 0.000 0.820 0.000
#> GSM486814     2  0.6532     0.1702 0.352 0.484 0.008 0.068 0.084 0.004
#> GSM486816     5  0.4180     0.5065 0.016 0.012 0.204 0.016 0.748 0.004
#> GSM486818     1  0.7690     0.1606 0.432 0.180 0.132 0.020 0.232 0.004
#> GSM486821     1  0.7389     0.0319 0.456 0.140 0.036 0.072 0.004 0.292
#> GSM486823     4  0.5398     0.4011 0.004 0.064 0.288 0.612 0.000 0.032
#> GSM486826     1  0.5895     0.3688 0.604 0.016 0.140 0.012 0.224 0.004
#> GSM486830     6  0.4175     0.0980 0.000 0.000 0.012 0.464 0.000 0.524
#> GSM486832     1  0.4030     0.6035 0.796 0.068 0.028 0.000 0.104 0.004
#> GSM486834     3  0.6537     0.4843 0.028 0.068 0.592 0.172 0.140 0.000
#> GSM486836     1  0.2706     0.6337 0.880 0.040 0.008 0.000 0.068 0.004
#> GSM486838     4  0.8411     0.1184 0.156 0.136 0.184 0.392 0.132 0.000
#> GSM486840     1  0.0363     0.6422 0.988 0.000 0.000 0.000 0.012 0.000
#> GSM486842     5  0.4541     0.6145 0.272 0.012 0.036 0.004 0.676 0.000
#> GSM486844     1  0.0000     0.6390 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486846     4  0.2706     0.4385 0.124 0.000 0.024 0.852 0.000 0.000
#> GSM486848     1  0.1003     0.6453 0.964 0.004 0.004 0.000 0.028 0.000
#> GSM486850     4  0.5603     0.2998 0.016 0.244 0.120 0.612 0.000 0.008
#> GSM486852     6  0.6113     0.5373 0.068 0.088 0.012 0.008 0.192 0.632
#> GSM486854     4  0.7465     0.0169 0.044 0.076 0.324 0.432 0.004 0.120
#> GSM486856     1  0.5536    -0.2054 0.504 0.352 0.000 0.144 0.000 0.000
#> GSM486858     4  0.7015     0.0985 0.156 0.048 0.352 0.420 0.024 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 agent(p) individual(p) k
#> CV:pam 84    1.000      4.84e-03 2
#> CV:pam 81    0.601      8.58e-04 3
#> CV:pam 63    0.611      5.77e-03 4
#> CV:pam 63    0.788      5.35e-05 5
#> CV:pam 47    0.837      7.83e-04 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 120 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 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 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.327           0.494       0.751         0.4770 0.576   0.576
#> 3 3 0.357           0.297       0.629         0.2575 0.570   0.410
#> 4 4 0.441           0.505       0.726         0.1444 0.703   0.460
#> 5 5 0.576           0.495       0.728         0.0707 0.813   0.512
#> 6 6 0.601           0.593       0.722         0.0689 0.888   0.578

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

suggest_best_k(res)
#> [1] 6

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
#> GSM486735     2  0.0376      0.625 0.004 0.996
#> GSM486737     2  0.9933      0.128 0.452 0.548
#> GSM486739     2  0.9944      0.125 0.456 0.544
#> GSM486741     2  0.4298      0.573 0.088 0.912
#> GSM486743     2  0.9933      0.128 0.452 0.548
#> GSM486745     2  0.9933      0.128 0.452 0.548
#> GSM486747     2  0.9795      0.267 0.416 0.584
#> GSM486749     2  0.0000      0.626 0.000 1.000
#> GSM486751     2  0.3879      0.589 0.076 0.924
#> GSM486753     2  0.9933      0.128 0.452 0.548
#> GSM486755     2  0.9933      0.128 0.452 0.548
#> GSM486757     2  0.9427      0.331 0.360 0.640
#> GSM486759     1  0.0376      0.843 0.996 0.004
#> GSM486761     2  0.9815      0.264 0.420 0.580
#> GSM486763     1  0.7674      0.683 0.776 0.224
#> GSM486765     2  0.9850      0.253 0.428 0.572
#> GSM486767     2  0.9933      0.128 0.452 0.548
#> GSM486769     2  0.0376      0.625 0.004 0.996
#> GSM486771     2  0.9933      0.128 0.452 0.548
#> GSM486773     2  0.0000      0.626 0.000 1.000
#> GSM486775     1  0.0376      0.843 0.996 0.004
#> GSM486777     2  0.9909      0.237 0.444 0.556
#> GSM486779     2  0.9933      0.128 0.452 0.548
#> GSM486781     2  0.0000      0.626 0.000 1.000
#> GSM486783     2  0.9933      0.128 0.452 0.548
#> GSM486785     2  0.9850      0.253 0.428 0.572
#> GSM486787     1  0.0376      0.843 0.996 0.004
#> GSM486789     2  0.0000      0.626 0.000 1.000
#> GSM486791     1  0.5294      0.815 0.880 0.120
#> GSM486793     2  0.9850      0.253 0.428 0.572
#> GSM486795     1  0.8861      0.532 0.696 0.304
#> GSM486797     2  0.1414      0.618 0.020 0.980
#> GSM486799     1  0.2043      0.853 0.968 0.032
#> GSM486801     1  0.3114      0.852 0.944 0.056
#> GSM486803     1  0.4161      0.841 0.916 0.084
#> GSM486805     2  0.0000      0.626 0.000 1.000
#> GSM486807     2  0.9996      0.187 0.488 0.512
#> GSM486809     2  0.0376      0.625 0.004 0.996
#> GSM486811     2  0.9998      0.180 0.492 0.508
#> GSM486813     2  0.9933      0.128 0.452 0.548
#> GSM486815     2  0.9850      0.253 0.428 0.572
#> GSM486817     1  0.9909      0.157 0.556 0.444
#> GSM486819     1  0.9522      0.373 0.628 0.372
#> GSM486822     2  0.0000      0.626 0.000 1.000
#> GSM486824     1  0.3114      0.851 0.944 0.056
#> GSM486828     2  0.0000      0.626 0.000 1.000
#> GSM486831     1  0.2948      0.849 0.948 0.052
#> GSM486833     2  0.4690      0.573 0.100 0.900
#> GSM486835     1  0.0376      0.843 0.996 0.004
#> GSM486837     2  0.0000      0.626 0.000 1.000
#> GSM486839     1  0.0376      0.843 0.996 0.004
#> GSM486841     2  0.9998      0.181 0.492 0.508
#> GSM486843     1  0.2043      0.853 0.968 0.032
#> GSM486845     2  0.0000      0.626 0.000 1.000
#> GSM486847     1  0.0376      0.843 0.996 0.004
#> GSM486849     2  0.0000      0.626 0.000 1.000
#> GSM486851     1  0.5294      0.815 0.880 0.120
#> GSM486853     2  0.0000      0.626 0.000 1.000
#> GSM486855     2  0.9933      0.128 0.452 0.548
#> GSM486857     2  0.0000      0.626 0.000 1.000
#> GSM486736     2  0.0376      0.625 0.004 0.996
#> GSM486738     2  0.9933      0.128 0.452 0.548
#> GSM486740     2  0.9944      0.125 0.456 0.544
#> GSM486742     2  0.8144      0.408 0.252 0.748
#> GSM486744     2  0.9933      0.128 0.452 0.548
#> GSM486746     2  0.9933      0.128 0.452 0.548
#> GSM486748     2  0.8861      0.389 0.304 0.696
#> GSM486750     2  0.0000      0.626 0.000 1.000
#> GSM486752     2  0.4815      0.570 0.104 0.896
#> GSM486754     2  0.9933      0.128 0.452 0.548
#> GSM486756     2  0.9933      0.128 0.452 0.548
#> GSM486758     2  0.9795      0.272 0.416 0.584
#> GSM486760     1  0.0672      0.845 0.992 0.008
#> GSM486762     2  0.9775      0.272 0.412 0.588
#> GSM486764     1  0.5294      0.815 0.880 0.120
#> GSM486766     2  0.9983      0.200 0.476 0.524
#> GSM486768     2  0.9933      0.128 0.452 0.548
#> GSM486770     2  0.0376      0.625 0.004 0.996
#> GSM486772     2  0.9933      0.128 0.452 0.548
#> GSM486774     2  0.0000      0.626 0.000 1.000
#> GSM486776     1  0.0672      0.845 0.992 0.008
#> GSM486778     2  0.9896      0.240 0.440 0.560
#> GSM486780     2  0.9933      0.128 0.452 0.548
#> GSM486782     2  0.0000      0.626 0.000 1.000
#> GSM486784     2  0.9933      0.128 0.452 0.548
#> GSM486786     2  0.9850      0.253 0.428 0.572
#> GSM486788     1  0.2236      0.853 0.964 0.036
#> GSM486790     2  0.0376      0.625 0.004 0.996
#> GSM486792     1  0.5294      0.815 0.880 0.120
#> GSM486794     2  0.9881      0.245 0.436 0.564
#> GSM486796     1  0.7950      0.658 0.760 0.240
#> GSM486798     2  0.0376      0.625 0.004 0.996
#> GSM486800     1  0.0376      0.843 0.996 0.004
#> GSM486802     1  0.4939      0.826 0.892 0.108
#> GSM486804     1  0.3431      0.849 0.936 0.064
#> GSM486806     2  0.0000      0.626 0.000 1.000
#> GSM486808     2  0.9993      0.191 0.484 0.516
#> GSM486810     2  0.0376      0.625 0.004 0.996
#> GSM486812     2  1.0000      0.169 0.500 0.500
#> GSM486814     2  0.9933      0.128 0.452 0.548
#> GSM486816     2  0.9850      0.253 0.428 0.572
#> GSM486818     1  0.9580      0.352 0.620 0.380
#> GSM486821     1  0.9491      0.385 0.632 0.368
#> GSM486823     2  0.0000      0.626 0.000 1.000
#> GSM486826     1  0.4161      0.841 0.916 0.084
#> GSM486830     2  0.0000      0.626 0.000 1.000
#> GSM486832     1  0.1184      0.848 0.984 0.016
#> GSM486834     2  0.1633      0.616 0.024 0.976
#> GSM486836     1  0.0376      0.843 0.996 0.004
#> GSM486838     2  0.0000      0.626 0.000 1.000
#> GSM486840     1  0.2043      0.852 0.968 0.032
#> GSM486842     2  0.9993      0.191 0.484 0.516
#> GSM486844     1  0.5059      0.823 0.888 0.112
#> GSM486846     2  0.0000      0.626 0.000 1.000
#> GSM486848     1  0.0376      0.843 0.996 0.004
#> GSM486850     2  0.0000      0.626 0.000 1.000
#> GSM486852     1  0.5408      0.812 0.876 0.124
#> GSM486854     2  0.0000      0.626 0.000 1.000
#> GSM486856     2  0.9933      0.128 0.452 0.548
#> GSM486858     2  0.0000      0.626 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
#> GSM486735     1  0.9841    -0.2365 0.400 0.252 0.348
#> GSM486737     2  0.0592     0.4728 0.000 0.988 0.012
#> GSM486739     2  0.8322    -0.4814 0.080 0.492 0.428
#> GSM486741     2  0.8122     0.5410 0.184 0.648 0.168
#> GSM486743     2  0.0747     0.4596 0.000 0.984 0.016
#> GSM486745     2  0.6435     0.0493 0.076 0.756 0.168
#> GSM486747     1  0.1585     0.3550 0.964 0.028 0.008
#> GSM486749     2  0.8375     0.5296 0.368 0.540 0.092
#> GSM486751     1  0.8135    -0.4234 0.484 0.448 0.068
#> GSM486753     2  0.0475     0.4731 0.004 0.992 0.004
#> GSM486755     2  0.2056     0.4719 0.024 0.952 0.024
#> GSM486757     1  0.5798     0.1761 0.780 0.044 0.176
#> GSM486759     1  0.9950     0.1896 0.372 0.340 0.288
#> GSM486761     1  0.0661     0.3630 0.988 0.008 0.004
#> GSM486763     3  0.8689     0.9338 0.164 0.248 0.588
#> GSM486765     1  0.1289     0.3603 0.968 0.000 0.032
#> GSM486767     2  0.2187     0.4623 0.028 0.948 0.024
#> GSM486769     1  0.9786    -0.2169 0.400 0.236 0.364
#> GSM486771     2  0.0424     0.4683 0.000 0.992 0.008
#> GSM486773     2  0.8683     0.5373 0.340 0.540 0.120
#> GSM486775     1  0.9959     0.1911 0.368 0.340 0.292
#> GSM486777     1  0.2682     0.3757 0.920 0.004 0.076
#> GSM486779     2  0.0661     0.4682 0.004 0.988 0.008
#> GSM486781     2  0.8518     0.5345 0.356 0.540 0.104
#> GSM486783     2  0.0424     0.4683 0.000 0.992 0.008
#> GSM486785     1  0.1453     0.3611 0.968 0.008 0.024
#> GSM486787     1  0.9946     0.1868 0.368 0.348 0.284
#> GSM486789     2  0.9086     0.4956 0.372 0.484 0.144
#> GSM486791     3  0.9100     0.9562 0.204 0.248 0.548
#> GSM486793     1  0.1289     0.3603 0.968 0.000 0.032
#> GSM486795     2  0.8236    -0.3589 0.416 0.508 0.076
#> GSM486797     2  0.8403     0.5042 0.400 0.512 0.088
#> GSM486799     1  0.9684     0.1600 0.436 0.340 0.224
#> GSM486801     1  0.9569     0.1242 0.420 0.384 0.196
#> GSM486803     1  0.9256     0.1053 0.488 0.344 0.168
#> GSM486805     2  0.8402     0.5233 0.376 0.532 0.092
#> GSM486807     1  0.3686     0.3813 0.860 0.000 0.140
#> GSM486809     1  0.9862    -0.3132 0.412 0.316 0.272
#> GSM486811     1  0.4293     0.3797 0.832 0.004 0.164
#> GSM486813     2  0.1163     0.4461 0.000 0.972 0.028
#> GSM486815     1  0.1964     0.3455 0.944 0.000 0.056
#> GSM486817     2  0.6349     0.1430 0.156 0.764 0.080
#> GSM486819     2  0.9213    -0.4496 0.236 0.536 0.228
#> GSM486822     2  0.9183     0.4960 0.360 0.484 0.156
#> GSM486824     1  0.9642     0.1516 0.440 0.344 0.216
#> GSM486828     2  0.8628     0.5382 0.340 0.544 0.116
#> GSM486831     1  0.9793     0.1555 0.388 0.376 0.236
#> GSM486833     1  0.8285    -0.1507 0.600 0.288 0.112
#> GSM486835     1  0.9953     0.1894 0.368 0.344 0.288
#> GSM486837     2  0.8066     0.5074 0.404 0.528 0.068
#> GSM486839     1  0.9964     0.1923 0.368 0.336 0.296
#> GSM486841     1  0.3752     0.3806 0.856 0.000 0.144
#> GSM486843     1  0.9797     0.1665 0.404 0.356 0.240
#> GSM486845     2  0.8588     0.5386 0.344 0.544 0.112
#> GSM486847     1  0.9964     0.1923 0.368 0.336 0.296
#> GSM486849     2  0.8703     0.5383 0.332 0.544 0.124
#> GSM486851     3  0.9009     0.9613 0.204 0.236 0.560
#> GSM486853     2  0.8503     0.5367 0.352 0.544 0.104
#> GSM486855     2  0.0592     0.4676 0.000 0.988 0.012
#> GSM486857     2  0.8699     0.5198 0.376 0.512 0.112
#> GSM486736     1  0.9820    -0.2268 0.396 0.244 0.360
#> GSM486738     2  0.0592     0.4692 0.000 0.988 0.012
#> GSM486740     2  0.8316    -0.4728 0.080 0.496 0.424
#> GSM486742     2  0.6231     0.5168 0.080 0.772 0.148
#> GSM486744     2  0.0747     0.4687 0.000 0.984 0.016
#> GSM486746     2  0.6572     0.0366 0.080 0.748 0.172
#> GSM486748     1  0.4802     0.2751 0.824 0.156 0.020
#> GSM486750     2  0.8666     0.5384 0.336 0.544 0.120
#> GSM486752     1  0.6869    -0.3261 0.560 0.424 0.016
#> GSM486754     2  0.1129     0.4787 0.004 0.976 0.020
#> GSM486756     2  0.1585     0.4807 0.008 0.964 0.028
#> GSM486758     1  0.5147     0.1882 0.800 0.020 0.180
#> GSM486760     1  0.9959     0.1912 0.368 0.340 0.292
#> GSM486762     1  0.1711     0.3538 0.960 0.032 0.008
#> GSM486764     3  0.8657     0.9372 0.164 0.244 0.592
#> GSM486766     1  0.3038     0.3800 0.896 0.000 0.104
#> GSM486768     2  0.0983     0.4618 0.004 0.980 0.016
#> GSM486770     1  0.9786    -0.2169 0.400 0.236 0.364
#> GSM486772     2  0.0592     0.4676 0.000 0.988 0.012
#> GSM486774     2  0.8066     0.5074 0.404 0.528 0.068
#> GSM486776     1  0.9959     0.1911 0.368 0.340 0.292
#> GSM486778     1  0.3573     0.3824 0.876 0.004 0.120
#> GSM486780     2  0.1182     0.4588 0.012 0.976 0.012
#> GSM486782     2  0.8604     0.5362 0.348 0.540 0.112
#> GSM486784     2  0.0892     0.4677 0.000 0.980 0.020
#> GSM486786     1  0.1411     0.3591 0.964 0.000 0.036
#> GSM486788     1  0.9936     0.1882 0.380 0.336 0.284
#> GSM486790     2  0.9106     0.5330 0.284 0.536 0.180
#> GSM486792     3  0.9100     0.9562 0.204 0.248 0.548
#> GSM486794     1  0.1860     0.3686 0.948 0.000 0.052
#> GSM486796     1  0.8550    -0.0314 0.492 0.412 0.096
#> GSM486798     2  0.7940     0.4959 0.416 0.524 0.060
#> GSM486800     1  0.9964     0.1923 0.368 0.336 0.296
#> GSM486802     1  0.9074     0.0847 0.500 0.352 0.148
#> GSM486804     1  0.9379     0.1260 0.472 0.348 0.180
#> GSM486806     2  0.8191     0.5127 0.396 0.528 0.076
#> GSM486808     1  0.3816     0.3800 0.852 0.000 0.148
#> GSM486810     1  0.9737    -0.3982 0.392 0.384 0.224
#> GSM486812     1  0.4351     0.3791 0.828 0.004 0.168
#> GSM486814     2  0.0424     0.4662 0.000 0.992 0.008
#> GSM486816     1  0.1529     0.3566 0.960 0.000 0.040
#> GSM486818     2  0.7710    -0.0785 0.240 0.660 0.100
#> GSM486821     2  0.9423    -0.4992 0.304 0.492 0.204
#> GSM486823     2  0.8790     0.5370 0.328 0.540 0.132
#> GSM486826     1  0.8973     0.0693 0.500 0.364 0.136
#> GSM486830     2  0.8546     0.5374 0.348 0.544 0.108
#> GSM486832     2  0.9793    -0.4608 0.376 0.388 0.236
#> GSM486834     1  0.6669    -0.4024 0.524 0.468 0.008
#> GSM486836     1  0.9964     0.1923 0.368 0.336 0.296
#> GSM486838     2  0.8120     0.5129 0.396 0.532 0.072
#> GSM486840     1  0.9956     0.1921 0.372 0.336 0.292
#> GSM486842     1  0.2796     0.3794 0.908 0.000 0.092
#> GSM486844     1  0.9098     0.0858 0.456 0.404 0.140
#> GSM486846     2  0.8628     0.5390 0.340 0.544 0.116
#> GSM486848     1  0.9964     0.1923 0.368 0.336 0.296
#> GSM486850     2  0.8666     0.5387 0.336 0.544 0.120
#> GSM486852     3  0.9009     0.9613 0.204 0.236 0.560
#> GSM486854     2  0.8588     0.5387 0.344 0.544 0.112
#> GSM486856     2  0.0424     0.4662 0.000 0.992 0.008
#> GSM486858     2  0.8661     0.5357 0.348 0.536 0.116

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM486735     2  0.5526     0.0973 0.020 0.564 0.000 0.416
#> GSM486737     2  0.6744     0.4908 0.004 0.528 0.084 0.384
#> GSM486739     4  0.5021     0.5491 0.116 0.100 0.004 0.780
#> GSM486741     2  0.3043     0.6543 0.008 0.876 0.004 0.112
#> GSM486743     2  0.6777     0.4894 0.004 0.532 0.088 0.376
#> GSM486745     4  0.7092     0.3257 0.072 0.184 0.084 0.660
#> GSM486747     1  0.5950     0.7807 0.696 0.156 0.148 0.000
#> GSM486749     2  0.0000     0.6760 0.000 1.000 0.000 0.000
#> GSM486751     2  0.2853     0.6468 0.076 0.900 0.016 0.008
#> GSM486753     2  0.6615     0.4820 0.000 0.512 0.084 0.404
#> GSM486755     2  0.6610     0.4318 0.000 0.468 0.080 0.452
#> GSM486757     1  0.7922     0.4121 0.532 0.288 0.040 0.140
#> GSM486759     3  0.0927     0.7003 0.016 0.000 0.976 0.008
#> GSM486761     1  0.6492     0.7903 0.656 0.156 0.184 0.004
#> GSM486763     4  0.7631     0.6380 0.272 0.004 0.224 0.500
#> GSM486765     1  0.6795     0.7931 0.644 0.112 0.224 0.020
#> GSM486767     2  0.7424     0.4568 0.028 0.496 0.088 0.388
#> GSM486769     2  0.5535     0.0875 0.020 0.560 0.000 0.420
#> GSM486771     2  0.6753     0.4878 0.004 0.524 0.084 0.388
#> GSM486773     2  0.0895     0.6748 0.020 0.976 0.000 0.004
#> GSM486775     3  0.1022     0.6976 0.032 0.000 0.968 0.000
#> GSM486777     1  0.7801     0.5789 0.440 0.112 0.416 0.032
#> GSM486779     2  0.7574     0.4676 0.028 0.500 0.104 0.368
#> GSM486781     2  0.0592     0.6763 0.016 0.984 0.000 0.000
#> GSM486783     2  0.6734     0.4911 0.004 0.532 0.084 0.380
#> GSM486785     1  0.6129     0.7993 0.688 0.124 0.184 0.004
#> GSM486787     3  0.0336     0.7004 0.008 0.000 0.992 0.000
#> GSM486789     2  0.2831     0.6101 0.004 0.876 0.000 0.120
#> GSM486791     4  0.7407     0.6360 0.224 0.000 0.260 0.516
#> GSM486793     1  0.6756     0.8005 0.664 0.112 0.196 0.028
#> GSM486795     3  0.7487     0.3454 0.084 0.156 0.640 0.120
#> GSM486797     2  0.1822     0.6686 0.044 0.944 0.004 0.008
#> GSM486799     3  0.2773     0.6579 0.116 0.000 0.880 0.004
#> GSM486801     3  0.2360     0.6904 0.052 0.004 0.924 0.020
#> GSM486803     3  0.4590     0.5822 0.192 0.000 0.772 0.036
#> GSM486805     2  0.1543     0.6709 0.032 0.956 0.004 0.008
#> GSM486807     3  0.7134    -0.5687 0.436 0.112 0.448 0.004
#> GSM486809     2  0.5323     0.2327 0.020 0.628 0.000 0.352
#> GSM486811     3  0.7214    -0.4828 0.388 0.112 0.492 0.008
#> GSM486813     2  0.7342     0.4797 0.020 0.516 0.100 0.364
#> GSM486815     1  0.6943     0.7823 0.672 0.112 0.164 0.052
#> GSM486817     2  0.9540     0.0927 0.132 0.368 0.288 0.212
#> GSM486819     3  0.9303    -0.2272 0.164 0.140 0.424 0.272
#> GSM486822     2  0.2053     0.6474 0.004 0.924 0.000 0.072
#> GSM486824     3  0.3647     0.6388 0.152 0.000 0.832 0.016
#> GSM486828     2  0.0188     0.6760 0.000 0.996 0.000 0.004
#> GSM486831     3  0.2040     0.6873 0.048 0.004 0.936 0.012
#> GSM486833     2  0.6696     0.1948 0.328 0.580 0.008 0.084
#> GSM486835     3  0.0657     0.7022 0.012 0.000 0.984 0.004
#> GSM486837     2  0.1909     0.6683 0.048 0.940 0.004 0.008
#> GSM486839     3  0.0336     0.7007 0.008 0.000 0.992 0.000
#> GSM486841     3  0.7129    -0.5443 0.424 0.112 0.460 0.004
#> GSM486843     3  0.2142     0.6927 0.056 0.000 0.928 0.016
#> GSM486845     2  0.0524     0.6767 0.008 0.988 0.000 0.004
#> GSM486847     3  0.0592     0.7005 0.016 0.000 0.984 0.000
#> GSM486849     2  0.0592     0.6742 0.000 0.984 0.000 0.016
#> GSM486851     4  0.7387     0.6404 0.224 0.000 0.256 0.520
#> GSM486853     2  0.0707     0.6731 0.000 0.980 0.000 0.020
#> GSM486855     2  0.7021     0.4861 0.012 0.524 0.088 0.376
#> GSM486857     2  0.1543     0.6714 0.032 0.956 0.004 0.008
#> GSM486736     2  0.5535     0.0875 0.020 0.560 0.000 0.420
#> GSM486738     2  0.6761     0.4875 0.004 0.520 0.084 0.392
#> GSM486740     4  0.4961     0.5540 0.116 0.096 0.004 0.784
#> GSM486742     2  0.5564     0.5864 0.008 0.712 0.052 0.228
#> GSM486744     2  0.6734     0.4907 0.004 0.532 0.084 0.380
#> GSM486746     4  0.7945     0.3171 0.104 0.212 0.096 0.588
#> GSM486748     2  0.7302    -0.2186 0.332 0.500 0.168 0.000
#> GSM486750     2  0.0895     0.6724 0.004 0.976 0.000 0.020
#> GSM486752     2  0.4900     0.5181 0.200 0.760 0.032 0.008
#> GSM486754     2  0.6615     0.4820 0.000 0.512 0.084 0.404
#> GSM486756     2  0.6554     0.4877 0.000 0.520 0.080 0.400
#> GSM486758     1  0.6994     0.5968 0.668 0.144 0.048 0.140
#> GSM486760     3  0.0376     0.6984 0.004 0.000 0.992 0.004
#> GSM486762     1  0.6476     0.7747 0.644 0.176 0.180 0.000
#> GSM486764     4  0.7551     0.6314 0.272 0.000 0.240 0.488
#> GSM486766     1  0.7044     0.6481 0.516 0.112 0.368 0.004
#> GSM486768     2  0.6977     0.4846 0.008 0.532 0.096 0.364
#> GSM486770     2  0.5535     0.0875 0.020 0.560 0.000 0.420
#> GSM486772     2  0.6769     0.4852 0.004 0.516 0.084 0.396
#> GSM486774     2  0.1443     0.6734 0.028 0.960 0.004 0.008
#> GSM486776     3  0.0817     0.6999 0.024 0.000 0.976 0.000
#> GSM486778     3  0.7702    -0.5141 0.392 0.112 0.468 0.028
#> GSM486780     2  0.7458     0.4692 0.028 0.500 0.092 0.380
#> GSM486782     2  0.0672     0.6763 0.008 0.984 0.000 0.008
#> GSM486784     2  0.6744     0.4908 0.004 0.528 0.084 0.384
#> GSM486786     1  0.6604     0.8036 0.676 0.116 0.184 0.024
#> GSM486788     3  0.0188     0.6997 0.000 0.000 0.996 0.004
#> GSM486790     2  0.1978     0.6537 0.004 0.928 0.000 0.068
#> GSM486792     4  0.7407     0.6360 0.224 0.000 0.260 0.516
#> GSM486794     1  0.7137     0.7425 0.576 0.112 0.296 0.016
#> GSM486796     3  0.6944     0.4509 0.092 0.084 0.684 0.140
#> GSM486798     2  0.2076     0.6656 0.056 0.932 0.004 0.008
#> GSM486800     3  0.0188     0.6997 0.000 0.000 0.996 0.004
#> GSM486802     3  0.4001     0.6253 0.044 0.008 0.844 0.104
#> GSM486804     3  0.4323     0.5924 0.204 0.000 0.776 0.020
#> GSM486806     2  0.1994     0.6671 0.052 0.936 0.004 0.008
#> GSM486808     3  0.7126    -0.5400 0.420 0.112 0.464 0.004
#> GSM486810     2  0.4121     0.5239 0.020 0.796 0.000 0.184
#> GSM486812     3  0.7191    -0.4621 0.376 0.112 0.504 0.008
#> GSM486814     2  0.6907     0.4892 0.008 0.528 0.088 0.376
#> GSM486816     1  0.6860     0.7989 0.664 0.112 0.188 0.036
#> GSM486818     3  0.8648    -0.1348 0.104 0.392 0.404 0.100
#> GSM486821     3  0.9069    -0.0816 0.152 0.132 0.464 0.252
#> GSM486823     2  0.1902     0.6530 0.004 0.932 0.000 0.064
#> GSM486826     3  0.5174     0.5416 0.248 0.004 0.716 0.032
#> GSM486830     2  0.0188     0.6757 0.000 0.996 0.000 0.004
#> GSM486832     3  0.1639     0.6919 0.036 0.004 0.952 0.008
#> GSM486834     2  0.4661     0.4710 0.264 0.724 0.004 0.008
#> GSM486836     3  0.0524     0.7017 0.008 0.000 0.988 0.004
#> GSM486838     2  0.1543     0.6718 0.032 0.956 0.004 0.008
#> GSM486840     3  0.0804     0.7022 0.012 0.000 0.980 0.008
#> GSM486842     1  0.6969     0.5403 0.452 0.112 0.436 0.000
#> GSM486844     3  0.5601     0.5947 0.100 0.028 0.764 0.108
#> GSM486846     2  0.0524     0.6762 0.008 0.988 0.000 0.004
#> GSM486848     3  0.0469     0.7003 0.012 0.000 0.988 0.000
#> GSM486850     2  0.0469     0.6749 0.000 0.988 0.000 0.012
#> GSM486852     4  0.7387     0.6404 0.224 0.000 0.256 0.520
#> GSM486854     2  0.0592     0.6740 0.000 0.984 0.000 0.016
#> GSM486856     2  0.7012     0.4880 0.012 0.528 0.088 0.372
#> GSM486858     2  0.0804     0.6744 0.012 0.980 0.000 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
#> GSM486735     4  0.3064     0.3459 0.000 0.036 0.000 0.856 0.108
#> GSM486737     2  0.1282     0.6566 0.000 0.952 0.004 0.044 0.000
#> GSM486739     4  0.6885    -0.4789 0.004 0.260 0.000 0.372 0.364
#> GSM486741     2  0.5057    -0.3725 0.000 0.556 0.004 0.412 0.028
#> GSM486743     2  0.0693     0.6633 0.000 0.980 0.000 0.008 0.012
#> GSM486745     2  0.6370    -0.0528 0.000 0.480 0.000 0.344 0.176
#> GSM486747     3  0.4979     0.6437 0.152 0.008 0.728 0.112 0.000
#> GSM486749     2  0.4307    -0.6068 0.000 0.500 0.000 0.500 0.000
#> GSM486751     4  0.6116     0.5454 0.020 0.440 0.072 0.468 0.000
#> GSM486753     2  0.1106     0.6647 0.000 0.964 0.000 0.024 0.012
#> GSM486755     2  0.3574     0.5398 0.000 0.804 0.000 0.168 0.028
#> GSM486757     3  0.5572     0.2488 0.000 0.008 0.652 0.232 0.108
#> GSM486759     1  0.0290     0.7907 0.992 0.000 0.000 0.000 0.008
#> GSM486761     3  0.4610     0.6654 0.188 0.004 0.740 0.068 0.000
#> GSM486763     5  0.3229     0.9043 0.056 0.032 0.040 0.000 0.872
#> GSM486765     3  0.3774     0.6643 0.196 0.004 0.784 0.004 0.012
#> GSM486767     2  0.2409     0.6465 0.000 0.908 0.012 0.060 0.020
#> GSM486769     4  0.3115     0.3401 0.000 0.036 0.000 0.852 0.112
#> GSM486771     2  0.0794     0.6650 0.000 0.972 0.000 0.028 0.000
#> GSM486773     4  0.4425     0.5871 0.000 0.452 0.004 0.544 0.000
#> GSM486775     1  0.0833     0.7859 0.976 0.004 0.016 0.000 0.004
#> GSM486777     3  0.4796     0.4323 0.468 0.000 0.516 0.004 0.012
#> GSM486779     2  0.3164     0.6297 0.016 0.876 0.012 0.076 0.020
#> GSM486781     4  0.4451     0.5853 0.000 0.492 0.004 0.504 0.000
#> GSM486783     2  0.0865     0.6631 0.000 0.972 0.004 0.024 0.000
#> GSM486785     3  0.3966     0.6718 0.168 0.004 0.788 0.040 0.000
#> GSM486787     1  0.0290     0.7904 0.992 0.000 0.000 0.000 0.008
#> GSM486789     4  0.4677     0.5234 0.000 0.300 0.000 0.664 0.036
#> GSM486791     5  0.3395     0.9347 0.104 0.000 0.004 0.048 0.844
#> GSM486793     3  0.3264     0.6633 0.140 0.000 0.836 0.004 0.020
#> GSM486795     1  0.5798     0.4142 0.624 0.288 0.024 0.004 0.060
#> GSM486797     4  0.5100     0.5817 0.000 0.448 0.036 0.516 0.000
#> GSM486799     1  0.1408     0.7700 0.948 0.000 0.044 0.000 0.008
#> GSM486801     1  0.1517     0.7816 0.952 0.012 0.004 0.004 0.028
#> GSM486803     1  0.3693     0.6496 0.808 0.000 0.156 0.004 0.032
#> GSM486805     4  0.4632     0.5901 0.000 0.448 0.012 0.540 0.000
#> GSM486807     3  0.4278     0.4713 0.452 0.000 0.548 0.000 0.000
#> GSM486809     4  0.3255     0.3820 0.000 0.052 0.000 0.848 0.100
#> GSM486811     1  0.4304    -0.3775 0.516 0.000 0.484 0.000 0.000
#> GSM486813     2  0.1948     0.6512 0.008 0.928 0.004 0.056 0.004
#> GSM486815     3  0.3273     0.6401 0.112 0.000 0.848 0.004 0.036
#> GSM486817     2  0.6820     0.4005 0.188 0.628 0.104 0.048 0.032
#> GSM486819     1  0.7553    -0.0993 0.380 0.296 0.024 0.008 0.292
#> GSM486822     4  0.4382     0.5240 0.000 0.288 0.000 0.688 0.024
#> GSM486824     1  0.3235     0.7076 0.860 0.008 0.104 0.008 0.020
#> GSM486828     2  0.4451    -0.6059 0.000 0.504 0.004 0.492 0.000
#> GSM486831     1  0.1121     0.7777 0.956 0.000 0.000 0.000 0.044
#> GSM486833     3  0.7656    -0.3758 0.004 0.328 0.348 0.284 0.036
#> GSM486835     1  0.0290     0.7904 0.992 0.000 0.000 0.000 0.008
#> GSM486837     4  0.5406     0.5610 0.000 0.468 0.056 0.476 0.000
#> GSM486839     1  0.0162     0.7898 0.996 0.000 0.000 0.000 0.004
#> GSM486841     3  0.4305     0.4013 0.488 0.000 0.512 0.000 0.000
#> GSM486843     1  0.1074     0.7884 0.968 0.004 0.012 0.000 0.016
#> GSM486845     4  0.4443     0.5737 0.000 0.472 0.004 0.524 0.000
#> GSM486847     1  0.0324     0.7902 0.992 0.000 0.004 0.000 0.004
#> GSM486849     4  0.4307     0.5806 0.000 0.500 0.000 0.500 0.000
#> GSM486851     5  0.2747     0.9389 0.060 0.000 0.004 0.048 0.888
#> GSM486853     4  0.4452     0.5758 0.000 0.496 0.004 0.500 0.000
#> GSM486855     2  0.1205     0.6630 0.000 0.956 0.004 0.040 0.000
#> GSM486857     4  0.4390     0.5851 0.000 0.428 0.004 0.568 0.000
#> GSM486736     4  0.3214     0.3362 0.000 0.036 0.000 0.844 0.120
#> GSM486738     2  0.0671     0.6649 0.000 0.980 0.004 0.016 0.000
#> GSM486740     4  0.6876    -0.4825 0.004 0.256 0.000 0.372 0.368
#> GSM486742     2  0.4085     0.2918 0.000 0.760 0.004 0.208 0.028
#> GSM486744     2  0.1282     0.6624 0.000 0.952 0.004 0.044 0.000
#> GSM486746     2  0.7063    -0.1405 0.004 0.424 0.008 0.304 0.260
#> GSM486748     3  0.8615     0.2861 0.284 0.168 0.288 0.256 0.004
#> GSM486750     4  0.4450     0.5861 0.000 0.488 0.004 0.508 0.000
#> GSM486752     2  0.7269    -0.3467 0.040 0.432 0.184 0.344 0.000
#> GSM486754     2  0.0771     0.6653 0.000 0.976 0.004 0.020 0.000
#> GSM486756     2  0.1697     0.6561 0.000 0.932 0.000 0.060 0.008
#> GSM486758     3  0.3682     0.4323 0.000 0.000 0.820 0.072 0.108
#> GSM486760     1  0.0162     0.7904 0.996 0.000 0.000 0.000 0.004
#> GSM486762     3  0.5054     0.6494 0.184 0.004 0.708 0.104 0.000
#> GSM486764     5  0.3096     0.9145 0.084 0.008 0.040 0.000 0.868
#> GSM486766     3  0.4321     0.5346 0.396 0.004 0.600 0.000 0.000
#> GSM486768     2  0.0898     0.6658 0.000 0.972 0.000 0.020 0.008
#> GSM486770     4  0.3339     0.3255 0.000 0.040 0.000 0.836 0.124
#> GSM486772     2  0.1282     0.6650 0.000 0.952 0.004 0.044 0.000
#> GSM486774     4  0.4803     0.5821 0.000 0.444 0.020 0.536 0.000
#> GSM486776     1  0.0324     0.7901 0.992 0.004 0.000 0.000 0.004
#> GSM486778     1  0.4704    -0.3865 0.508 0.000 0.480 0.004 0.008
#> GSM486780     2  0.2144     0.6435 0.000 0.912 0.020 0.068 0.000
#> GSM486782     4  0.4306     0.5842 0.000 0.492 0.000 0.508 0.000
#> GSM486784     2  0.1124     0.6640 0.000 0.960 0.004 0.036 0.000
#> GSM486786     3  0.3629     0.6710 0.156 0.004 0.816 0.012 0.012
#> GSM486788     1  0.0324     0.7909 0.992 0.000 0.000 0.004 0.004
#> GSM486790     4  0.5030     0.5254 0.000 0.352 0.000 0.604 0.044
#> GSM486792     5  0.3342     0.9373 0.100 0.000 0.004 0.048 0.848
#> GSM486794     3  0.4298     0.5779 0.352 0.000 0.640 0.000 0.008
#> GSM486796     1  0.5475     0.5408 0.704 0.180 0.024 0.004 0.088
#> GSM486798     4  0.5047     0.5907 0.004 0.468 0.024 0.504 0.000
#> GSM486800     1  0.0162     0.7898 0.996 0.000 0.000 0.000 0.004
#> GSM486802     1  0.1314     0.7840 0.960 0.008 0.004 0.004 0.024
#> GSM486804     1  0.3779     0.6411 0.800 0.004 0.172 0.008 0.016
#> GSM486806     4  0.5178     0.5741 0.000 0.476 0.040 0.484 0.000
#> GSM486808     3  0.4291     0.4526 0.464 0.000 0.536 0.000 0.000
#> GSM486810     4  0.3888     0.4344 0.000 0.148 0.000 0.796 0.056
#> GSM486812     1  0.4297    -0.3455 0.528 0.000 0.472 0.000 0.000
#> GSM486814     2  0.0963     0.6648 0.000 0.964 0.000 0.036 0.000
#> GSM486816     3  0.3387     0.6532 0.128 0.000 0.836 0.004 0.032
#> GSM486818     2  0.6903     0.2583 0.336 0.524 0.084 0.036 0.020
#> GSM486821     1  0.7308     0.0468 0.440 0.284 0.024 0.004 0.248
#> GSM486823     4  0.4538     0.5574 0.000 0.364 0.000 0.620 0.016
#> GSM486826     1  0.4372     0.5785 0.748 0.008 0.216 0.008 0.020
#> GSM486830     2  0.4307    -0.6057 0.000 0.500 0.000 0.500 0.000
#> GSM486832     1  0.0963     0.7816 0.964 0.000 0.000 0.000 0.036
#> GSM486834     2  0.7049    -0.2466 0.012 0.412 0.272 0.304 0.000
#> GSM486836     1  0.0162     0.7898 0.996 0.000 0.000 0.000 0.004
#> GSM486838     4  0.5234     0.5786 0.000 0.460 0.044 0.496 0.000
#> GSM486840     1  0.0324     0.7904 0.992 0.000 0.000 0.004 0.004
#> GSM486842     3  0.4300     0.4254 0.476 0.000 0.524 0.000 0.000
#> GSM486844     1  0.3687     0.6923 0.836 0.112 0.032 0.004 0.016
#> GSM486846     4  0.4443     0.5737 0.000 0.472 0.004 0.524 0.000
#> GSM486848     1  0.0324     0.7901 0.992 0.004 0.000 0.000 0.004
#> GSM486850     4  0.4596     0.5795 0.000 0.492 0.004 0.500 0.004
#> GSM486852     5  0.2813     0.9411 0.064 0.000 0.004 0.048 0.884
#> GSM486854     4  0.4451     0.5792 0.000 0.492 0.004 0.504 0.000
#> GSM486856     2  0.1205     0.6630 0.000 0.956 0.004 0.040 0.000
#> GSM486858     4  0.4291     0.5935 0.000 0.464 0.000 0.536 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
#> GSM486735     6  0.4169    0.66187 0.000 0.008 0.000 0.116 0.116 0.760
#> GSM486737     2  0.3967    0.70399 0.000 0.632 0.000 0.356 0.000 0.012
#> GSM486739     5  0.5532    0.34548 0.000 0.136 0.000 0.000 0.480 0.384
#> GSM486741     4  0.3892    0.49911 0.000 0.212 0.000 0.740 0.000 0.048
#> GSM486743     2  0.4351    0.72047 0.000 0.564 0.000 0.416 0.008 0.012
#> GSM486745     2  0.6232    0.00351 0.000 0.468 0.000 0.024 0.176 0.332
#> GSM486747     3  0.5698    0.60661 0.096 0.056 0.700 0.080 0.000 0.068
#> GSM486749     4  0.2070    0.68548 0.000 0.044 0.000 0.908 0.000 0.048
#> GSM486751     4  0.4571    0.65462 0.008 0.156 0.036 0.748 0.000 0.052
#> GSM486753     2  0.4219    0.71785 0.000 0.592 0.000 0.388 0.000 0.020
#> GSM486755     2  0.5769    0.60463 0.000 0.580 0.008 0.236 0.008 0.168
#> GSM486757     3  0.7559    0.19227 0.000 0.120 0.484 0.232 0.076 0.088
#> GSM486759     1  0.1152    0.80278 0.952 0.004 0.000 0.000 0.000 0.044
#> GSM486761     3  0.5513    0.64989 0.132 0.040 0.704 0.060 0.000 0.064
#> GSM486763     5  0.2817    0.70134 0.008 0.076 0.040 0.000 0.872 0.004
#> GSM486765     3  0.2544    0.69098 0.140 0.000 0.852 0.000 0.004 0.004
#> GSM486767     2  0.4625    0.62796 0.000 0.656 0.008 0.296 0.012 0.028
#> GSM486769     6  0.4126    0.65945 0.000 0.008 0.000 0.112 0.116 0.764
#> GSM486771     2  0.4726    0.71527 0.000 0.572 0.000 0.380 0.004 0.044
#> GSM486773     4  0.3062    0.69459 0.000 0.144 0.000 0.824 0.000 0.032
#> GSM486775     1  0.1257    0.80521 0.952 0.000 0.028 0.000 0.000 0.020
#> GSM486777     3  0.4819    0.54752 0.424 0.004 0.532 0.000 0.004 0.036
#> GSM486779     2  0.4447    0.59454 0.016 0.696 0.012 0.260 0.012 0.004
#> GSM486781     4  0.0993    0.70534 0.000 0.024 0.000 0.964 0.000 0.012
#> GSM486783     2  0.4268    0.70535 0.000 0.556 0.004 0.428 0.000 0.012
#> GSM486785     3  0.3944    0.67128 0.112 0.032 0.808 0.024 0.000 0.024
#> GSM486787     1  0.0622    0.80959 0.980 0.000 0.012 0.000 0.000 0.008
#> GSM486789     6  0.5962    0.40964 0.000 0.092 0.008 0.404 0.024 0.472
#> GSM486791     5  0.2221    0.71322 0.072 0.000 0.000 0.000 0.896 0.032
#> GSM486793     3  0.2722    0.66090 0.088 0.016 0.876 0.000 0.008 0.012
#> GSM486795     1  0.6502    0.38255 0.556 0.284 0.004 0.064 0.044 0.048
#> GSM486797     4  0.3753    0.67115 0.000 0.156 0.016 0.788 0.000 0.040
#> GSM486799     1  0.1753    0.77831 0.912 0.000 0.084 0.000 0.004 0.000
#> GSM486801     1  0.2677    0.77883 0.884 0.036 0.000 0.000 0.024 0.056
#> GSM486803     1  0.3879    0.62513 0.748 0.008 0.220 0.000 0.012 0.012
#> GSM486805     4  0.2442    0.69621 0.000 0.144 0.004 0.852 0.000 0.000
#> GSM486807     3  0.4152    0.57523 0.440 0.000 0.548 0.000 0.000 0.012
#> GSM486809     6  0.4682    0.67231 0.000 0.028 0.000 0.148 0.096 0.728
#> GSM486811     3  0.4834    0.46671 0.468 0.004 0.484 0.000 0.000 0.044
#> GSM486813     2  0.3937    0.62413 0.008 0.700 0.008 0.280 0.004 0.000
#> GSM486815     3  0.3115    0.63173 0.060 0.028 0.868 0.000 0.028 0.016
#> GSM486817     2  0.7275    0.25447 0.208 0.504 0.100 0.164 0.016 0.008
#> GSM486819     5  0.7906    0.26409 0.276 0.256 0.004 0.056 0.352 0.056
#> GSM486822     6  0.5450    0.42698 0.000 0.072 0.004 0.412 0.012 0.500
#> GSM486824     1  0.2987    0.71466 0.832 0.008 0.148 0.000 0.008 0.004
#> GSM486828     4  0.2499    0.68364 0.000 0.048 0.000 0.880 0.000 0.072
#> GSM486831     1  0.1788    0.80009 0.928 0.012 0.004 0.000 0.004 0.052
#> GSM486833     4  0.7625    0.29325 0.004 0.208 0.248 0.432 0.036 0.072
#> GSM486835     1  0.0858    0.80993 0.968 0.000 0.004 0.000 0.000 0.028
#> GSM486837     4  0.3948    0.68008 0.008 0.096 0.032 0.808 0.000 0.056
#> GSM486839     1  0.0622    0.80959 0.980 0.000 0.012 0.000 0.000 0.008
#> GSM486841     3  0.4463    0.53109 0.456 0.000 0.516 0.000 0.000 0.028
#> GSM486843     1  0.0935    0.80776 0.964 0.004 0.032 0.000 0.000 0.000
#> GSM486845     4  0.2199    0.66880 0.000 0.088 0.000 0.892 0.000 0.020
#> GSM486847     1  0.1074    0.80681 0.960 0.000 0.028 0.000 0.000 0.012
#> GSM486849     4  0.2685    0.67009 0.000 0.060 0.000 0.868 0.000 0.072
#> GSM486851     5  0.1245    0.72316 0.016 0.000 0.000 0.000 0.952 0.032
#> GSM486853     4  0.2451    0.66418 0.000 0.068 0.004 0.888 0.000 0.040
#> GSM486855     2  0.4234    0.70910 0.000 0.576 0.000 0.408 0.004 0.012
#> GSM486857     4  0.3073    0.65370 0.000 0.204 0.008 0.788 0.000 0.000
#> GSM486736     6  0.4016    0.65244 0.000 0.004 0.000 0.108 0.120 0.768
#> GSM486738     2  0.4109    0.71879 0.000 0.576 0.000 0.412 0.000 0.012
#> GSM486740     5  0.5532    0.34548 0.000 0.136 0.000 0.000 0.480 0.384
#> GSM486742     4  0.4633   -0.34903 0.000 0.392 0.004 0.568 0.000 0.036
#> GSM486744     2  0.4158    0.70900 0.000 0.572 0.000 0.416 0.004 0.008
#> GSM486746     2  0.6850   -0.25869 0.000 0.356 0.000 0.044 0.308 0.292
#> GSM486748     4  0.8135   -0.15705 0.204 0.112 0.264 0.360 0.000 0.060
#> GSM486750     4  0.3667    0.60034 0.000 0.080 0.000 0.788 0.000 0.132
#> GSM486752     4  0.6552    0.51530 0.060 0.104 0.136 0.620 0.000 0.080
#> GSM486754     2  0.4301    0.71272 0.000 0.584 0.000 0.392 0.000 0.024
#> GSM486756     2  0.4420    0.69635 0.000 0.604 0.000 0.360 0.000 0.036
#> GSM486758     3  0.5817    0.44160 0.000 0.104 0.688 0.048 0.076 0.084
#> GSM486760     1  0.1500    0.80062 0.936 0.012 0.000 0.000 0.000 0.052
#> GSM486762     3  0.6027    0.62782 0.136 0.048 0.664 0.084 0.000 0.068
#> GSM486764     5  0.2781    0.70190 0.016 0.060 0.040 0.000 0.880 0.004
#> GSM486766     3  0.4180    0.63344 0.348 0.000 0.628 0.000 0.000 0.024
#> GSM486768     2  0.4144    0.71491 0.000 0.580 0.000 0.408 0.008 0.004
#> GSM486770     6  0.4016    0.65244 0.000 0.004 0.000 0.108 0.120 0.768
#> GSM486772     2  0.4560    0.71738 0.000 0.592 0.000 0.372 0.008 0.028
#> GSM486774     4  0.3275    0.68814 0.000 0.140 0.008 0.820 0.000 0.032
#> GSM486776     1  0.1176    0.80673 0.956 0.000 0.024 0.000 0.000 0.020
#> GSM486778     3  0.5335    0.46287 0.444 0.016 0.476 0.000 0.000 0.064
#> GSM486780     2  0.4073    0.58827 0.012 0.724 0.020 0.240 0.000 0.004
#> GSM486782     4  0.1562    0.69837 0.000 0.032 0.004 0.940 0.000 0.024
#> GSM486784     2  0.4292    0.70944 0.000 0.568 0.004 0.416 0.004 0.008
#> GSM486786     3  0.2451    0.67729 0.108 0.008 0.876 0.000 0.004 0.004
#> GSM486788     1  0.1528    0.80335 0.936 0.016 0.000 0.000 0.000 0.048
#> GSM486790     6  0.5014    0.27857 0.000 0.048 0.004 0.460 0.004 0.484
#> GSM486792     5  0.2046    0.71919 0.060 0.000 0.000 0.000 0.908 0.032
#> GSM486794     3  0.4424    0.63520 0.344 0.000 0.624 0.000 0.012 0.020
#> GSM486796     1  0.5811    0.49074 0.620 0.256 0.004 0.020 0.036 0.064
#> GSM486798     4  0.2868    0.70851 0.000 0.112 0.004 0.852 0.000 0.032
#> GSM486800     1  0.0547    0.81049 0.980 0.000 0.000 0.000 0.000 0.020
#> GSM486802     1  0.2189    0.79095 0.904 0.032 0.000 0.000 0.004 0.060
#> GSM486804     1  0.3941    0.61669 0.748 0.016 0.216 0.000 0.008 0.012
#> GSM486806     4  0.3005    0.69597 0.000 0.060 0.024 0.864 0.000 0.052
#> GSM486808     3  0.4305    0.56944 0.436 0.000 0.544 0.000 0.000 0.020
#> GSM486810     6  0.4761    0.66750 0.000 0.048 0.000 0.212 0.040 0.700
#> GSM486812     1  0.5035   -0.47937 0.472 0.008 0.468 0.000 0.000 0.052
#> GSM486814     2  0.4189    0.71429 0.000 0.572 0.004 0.416 0.004 0.004
#> GSM486816     3  0.2787    0.64749 0.072 0.020 0.880 0.000 0.012 0.016
#> GSM486818     2  0.7634    0.12671 0.312 0.388 0.092 0.184 0.012 0.012
#> GSM486821     1  0.8024   -0.21214 0.328 0.272 0.008 0.056 0.280 0.056
#> GSM486823     4  0.4782   -0.04532 0.000 0.048 0.004 0.568 0.000 0.380
#> GSM486826     1  0.4540    0.54460 0.692 0.036 0.252 0.000 0.008 0.012
#> GSM486830     4  0.2712    0.66522 0.000 0.048 0.000 0.864 0.000 0.088
#> GSM486832     1  0.2119    0.79169 0.912 0.008 0.000 0.000 0.036 0.044
#> GSM486834     4  0.6173    0.48013 0.000 0.172 0.184 0.580 0.000 0.064
#> GSM486836     1  0.0622    0.81081 0.980 0.000 0.008 0.000 0.000 0.012
#> GSM486838     4  0.3772    0.68724 0.008 0.116 0.024 0.812 0.000 0.040
#> GSM486840     1  0.1148    0.81256 0.960 0.004 0.016 0.000 0.000 0.020
#> GSM486842     3  0.3955    0.57735 0.436 0.000 0.560 0.000 0.000 0.004
#> GSM486844     1  0.3179    0.75772 0.856 0.060 0.064 0.000 0.012 0.008
#> GSM486846     4  0.2282    0.66736 0.000 0.088 0.000 0.888 0.000 0.024
#> GSM486848     1  0.1092    0.80690 0.960 0.000 0.020 0.000 0.000 0.020
#> GSM486850     4  0.2568    0.66197 0.000 0.068 0.000 0.876 0.000 0.056
#> GSM486852     5  0.1320    0.72347 0.016 0.000 0.000 0.000 0.948 0.036
#> GSM486854     4  0.1536    0.69042 0.000 0.040 0.004 0.940 0.000 0.016
#> GSM486856     2  0.4144    0.70955 0.000 0.580 0.000 0.408 0.004 0.008
#> GSM486858     4  0.2445    0.70703 0.000 0.120 0.004 0.868 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-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 agent(p) individual(p) k
#> CV:mclust 69    1.000      3.59e-04 2
#> CV:mclust 31    1.000      1.35e-02 3
#> CV:mclust 77    0.999      4.92e-09 4
#> CV:mclust 86    0.998      5.88e-13 5
#> CV:mclust 96    0.999      3.65e-18 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 120 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 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-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.480           0.830       0.907         0.5010 0.497   0.497
#> 3 3 0.361           0.503       0.722         0.3079 0.749   0.536
#> 4 4 0.385           0.448       0.644         0.1228 0.859   0.613
#> 5 5 0.427           0.317       0.564         0.0729 0.840   0.499
#> 6 6 0.473           0.299       0.524         0.0444 0.828   0.405

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
#> GSM486735     2  0.0000   0.905519 0.000 1.000
#> GSM486737     2  0.6247   0.844802 0.156 0.844
#> GSM486739     2  0.6048   0.848983 0.148 0.852
#> GSM486741     2  0.0000   0.905519 0.000 1.000
#> GSM486743     2  0.8813   0.684469 0.300 0.700
#> GSM486745     2  0.7453   0.799207 0.212 0.788
#> GSM486747     1  0.7883   0.758381 0.764 0.236
#> GSM486749     2  0.0376   0.905186 0.004 0.996
#> GSM486751     2  0.0672   0.903614 0.008 0.992
#> GSM486753     2  0.6148   0.846850 0.152 0.848
#> GSM486755     2  0.6048   0.850273 0.148 0.852
#> GSM486757     2  0.4161   0.842435 0.084 0.916
#> GSM486759     1  0.0376   0.878777 0.996 0.004
#> GSM486761     1  0.7139   0.798633 0.804 0.196
#> GSM486763     1  0.9933   0.000376 0.548 0.452
#> GSM486765     1  0.6148   0.829034 0.848 0.152
#> GSM486767     2  0.7883   0.775056 0.236 0.764
#> GSM486769     2  0.0000   0.905519 0.000 1.000
#> GSM486771     2  0.6623   0.834335 0.172 0.828
#> GSM486773     2  0.0376   0.905186 0.004 0.996
#> GSM486775     1  0.0000   0.879679 1.000 0.000
#> GSM486777     1  0.6801   0.810383 0.820 0.180
#> GSM486779     2  0.8499   0.721517 0.276 0.724
#> GSM486781     2  0.0376   0.905186 0.004 0.996
#> GSM486783     2  0.6712   0.831312 0.176 0.824
#> GSM486785     1  0.6148   0.829304 0.848 0.152
#> GSM486787     1  0.0000   0.879679 1.000 0.000
#> GSM486789     2  0.0000   0.905519 0.000 1.000
#> GSM486791     1  0.0000   0.879679 1.000 0.000
#> GSM486793     1  0.6048   0.831618 0.852 0.148
#> GSM486795     1  0.1633   0.870459 0.976 0.024
#> GSM486797     2  0.1184   0.899373 0.016 0.984
#> GSM486799     1  0.0000   0.879679 1.000 0.000
#> GSM486801     1  0.0000   0.879679 1.000 0.000
#> GSM486803     1  0.0376   0.878777 0.996 0.004
#> GSM486805     2  0.0376   0.905186 0.004 0.996
#> GSM486807     1  0.6887   0.806771 0.816 0.184
#> GSM486809     2  0.0376   0.905186 0.004 0.996
#> GSM486811     1  0.5294   0.844505 0.880 0.120
#> GSM486813     2  0.9833   0.418095 0.424 0.576
#> GSM486815     1  0.5842   0.835601 0.860 0.140
#> GSM486817     1  0.9286   0.384100 0.656 0.344
#> GSM486819     1  0.9491   0.309991 0.632 0.368
#> GSM486822     2  0.0000   0.905519 0.000 1.000
#> GSM486824     1  0.0376   0.878777 0.996 0.004
#> GSM486828     2  0.0000   0.905519 0.000 1.000
#> GSM486831     1  0.0000   0.879679 1.000 0.000
#> GSM486833     2  0.4022   0.849935 0.080 0.920
#> GSM486835     1  0.0000   0.879679 1.000 0.000
#> GSM486837     2  0.0376   0.905186 0.004 0.996
#> GSM486839     1  0.0376   0.878777 0.996 0.004
#> GSM486841     1  0.6048   0.831618 0.852 0.148
#> GSM486843     1  0.0000   0.879679 1.000 0.000
#> GSM486845     2  0.0376   0.905186 0.004 0.996
#> GSM486847     1  0.0000   0.879679 1.000 0.000
#> GSM486849     2  0.0376   0.905186 0.004 0.996
#> GSM486851     1  0.0376   0.878777 0.996 0.004
#> GSM486853     2  0.0376   0.905186 0.004 0.996
#> GSM486855     2  0.6247   0.845228 0.156 0.844
#> GSM486857     2  0.0376   0.905186 0.004 0.996
#> GSM486736     2  0.0000   0.905519 0.000 1.000
#> GSM486738     2  0.6148   0.847759 0.152 0.848
#> GSM486740     2  0.6048   0.848983 0.148 0.852
#> GSM486742     2  0.0000   0.905519 0.000 1.000
#> GSM486744     2  0.5842   0.853730 0.140 0.860
#> GSM486746     2  0.8207   0.749097 0.256 0.744
#> GSM486748     1  0.9963   0.350235 0.536 0.464
#> GSM486750     2  0.0000   0.905519 0.000 1.000
#> GSM486752     2  0.2043   0.889190 0.032 0.968
#> GSM486754     2  0.5519   0.858666 0.128 0.872
#> GSM486756     2  0.6247   0.845496 0.156 0.844
#> GSM486758     1  0.9970   0.342463 0.532 0.468
#> GSM486760     1  0.0000   0.879679 1.000 0.000
#> GSM486762     1  0.9000   0.654502 0.684 0.316
#> GSM486764     1  0.2603   0.858649 0.956 0.044
#> GSM486766     1  0.6148   0.829034 0.848 0.152
#> GSM486768     2  0.7056   0.818063 0.192 0.808
#> GSM486770     2  0.0000   0.905519 0.000 1.000
#> GSM486772     2  0.5946   0.851246 0.144 0.856
#> GSM486774     2  0.0376   0.905186 0.004 0.996
#> GSM486776     1  0.0000   0.879679 1.000 0.000
#> GSM486778     1  0.6887   0.808423 0.816 0.184
#> GSM486780     2  0.9000   0.657046 0.316 0.684
#> GSM486782     2  0.0376   0.905186 0.004 0.996
#> GSM486784     2  0.5946   0.851661 0.144 0.856
#> GSM486786     1  0.5946   0.833386 0.856 0.144
#> GSM486788     1  0.0376   0.878777 0.996 0.004
#> GSM486790     2  0.0000   0.905519 0.000 1.000
#> GSM486792     1  0.0000   0.879679 1.000 0.000
#> GSM486794     1  0.6438   0.821236 0.836 0.164
#> GSM486796     1  0.3431   0.845189 0.936 0.064
#> GSM486798     2  0.0376   0.905186 0.004 0.996
#> GSM486800     1  0.0376   0.878777 0.996 0.004
#> GSM486802     1  0.0376   0.878777 0.996 0.004
#> GSM486804     1  0.0376   0.878777 0.996 0.004
#> GSM486806     2  0.0376   0.905186 0.004 0.996
#> GSM486808     1  0.6247   0.827179 0.844 0.156
#> GSM486810     2  0.0000   0.905519 0.000 1.000
#> GSM486812     1  0.4815   0.850697 0.896 0.104
#> GSM486814     2  0.7219   0.811139 0.200 0.800
#> GSM486816     1  0.5842   0.835433 0.860 0.140
#> GSM486818     1  0.7674   0.649133 0.776 0.224
#> GSM486821     1  0.7883   0.630902 0.764 0.236
#> GSM486823     2  0.0376   0.905186 0.004 0.996
#> GSM486826     1  0.0000   0.879679 1.000 0.000
#> GSM486830     2  0.0376   0.905186 0.004 0.996
#> GSM486832     1  0.0376   0.878777 0.996 0.004
#> GSM486834     2  0.0672   0.903608 0.008 0.992
#> GSM486836     1  0.0000   0.879679 1.000 0.000
#> GSM486838     2  0.2043   0.890750 0.032 0.968
#> GSM486840     1  0.0376   0.878777 0.996 0.004
#> GSM486842     1  0.5629   0.839303 0.868 0.132
#> GSM486844     1  0.0376   0.878777 0.996 0.004
#> GSM486846     2  0.0376   0.905186 0.004 0.996
#> GSM486848     1  0.0000   0.879679 1.000 0.000
#> GSM486850     2  0.0000   0.905519 0.000 1.000
#> GSM486852     1  0.1184   0.874325 0.984 0.016
#> GSM486854     2  0.0000   0.905519 0.000 1.000
#> GSM486856     2  0.7950   0.769355 0.240 0.760
#> GSM486858     2  0.0376   0.905186 0.004 0.996

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM486735     2  0.3879     0.7091 0.152 0.848 0.000
#> GSM486737     2  0.6215     0.1572 0.428 0.572 0.000
#> GSM486739     1  0.5785     0.4538 0.668 0.332 0.000
#> GSM486741     2  0.4228     0.7176 0.148 0.844 0.008
#> GSM486743     1  0.5216     0.5414 0.740 0.260 0.000
#> GSM486745     1  0.4702     0.5787 0.788 0.212 0.000
#> GSM486747     3  0.8094     0.4205 0.124 0.240 0.636
#> GSM486749     2  0.5285     0.7411 0.112 0.824 0.064
#> GSM486751     2  0.4902     0.7430 0.064 0.844 0.092
#> GSM486753     2  0.6235     0.0282 0.436 0.564 0.000
#> GSM486755     1  0.6309     0.1399 0.504 0.496 0.000
#> GSM486757     2  0.8098     0.5579 0.140 0.644 0.216
#> GSM486759     1  0.5810     0.2711 0.664 0.000 0.336
#> GSM486761     3  0.7079     0.5084 0.104 0.176 0.720
#> GSM486763     1  0.4206     0.5794 0.872 0.088 0.040
#> GSM486765     3  0.1832     0.6642 0.036 0.008 0.956
#> GSM486767     1  0.6678     0.0637 0.512 0.480 0.008
#> GSM486769     2  0.3551     0.7239 0.132 0.868 0.000
#> GSM486771     1  0.5016     0.5549 0.760 0.240 0.000
#> GSM486773     2  0.4172     0.7335 0.104 0.868 0.028
#> GSM486775     3  0.4291     0.6341 0.180 0.000 0.820
#> GSM486777     3  0.4443     0.6492 0.052 0.084 0.864
#> GSM486779     1  0.6675     0.2455 0.584 0.404 0.012
#> GSM486781     2  0.2434     0.7623 0.024 0.940 0.036
#> GSM486783     2  0.6309    -0.1375 0.496 0.504 0.000
#> GSM486785     3  0.6063     0.5609 0.132 0.084 0.784
#> GSM486787     3  0.4399     0.6245 0.188 0.000 0.812
#> GSM486789     2  0.1643     0.7615 0.044 0.956 0.000
#> GSM486791     1  0.5327     0.3797 0.728 0.000 0.272
#> GSM486793     3  0.2173     0.6602 0.048 0.008 0.944
#> GSM486795     1  0.4834     0.4714 0.792 0.004 0.204
#> GSM486797     2  0.6653     0.6614 0.112 0.752 0.136
#> GSM486799     3  0.3686     0.6451 0.140 0.000 0.860
#> GSM486801     1  0.5859     0.2488 0.656 0.000 0.344
#> GSM486803     3  0.6225     0.3977 0.432 0.000 0.568
#> GSM486805     2  0.3983     0.7444 0.068 0.884 0.048
#> GSM486807     3  0.3043     0.6460 0.008 0.084 0.908
#> GSM486809     2  0.3120     0.7597 0.080 0.908 0.012
#> GSM486811     3  0.3116     0.6537 0.108 0.000 0.892
#> GSM486813     1  0.6570     0.4298 0.668 0.308 0.024
#> GSM486815     3  0.1267     0.6696 0.024 0.004 0.972
#> GSM486817     1  0.8835     0.3386 0.576 0.244 0.180
#> GSM486819     1  0.5339     0.5628 0.824 0.096 0.080
#> GSM486822     2  0.2537     0.7552 0.080 0.920 0.000
#> GSM486824     3  0.6309     0.2504 0.496 0.000 0.504
#> GSM486828     2  0.3213     0.7664 0.060 0.912 0.028
#> GSM486831     1  0.6154     0.0975 0.592 0.000 0.408
#> GSM486833     2  0.7712     0.5664 0.092 0.652 0.256
#> GSM486835     3  0.6302     0.2177 0.480 0.000 0.520
#> GSM486837     2  0.5889     0.6966 0.108 0.796 0.096
#> GSM486839     3  0.6045     0.4345 0.380 0.000 0.620
#> GSM486841     3  0.1751     0.6699 0.028 0.012 0.960
#> GSM486843     3  0.5968     0.4878 0.364 0.000 0.636
#> GSM486845     2  0.2446     0.7645 0.052 0.936 0.012
#> GSM486847     3  0.5098     0.5885 0.248 0.000 0.752
#> GSM486849     2  0.2866     0.7622 0.076 0.916 0.008
#> GSM486851     1  0.4654     0.4625 0.792 0.000 0.208
#> GSM486853     2  0.1289     0.7627 0.032 0.968 0.000
#> GSM486855     1  0.5968     0.4144 0.636 0.364 0.000
#> GSM486857     2  0.6448     0.6784 0.132 0.764 0.104
#> GSM486736     2  0.4605     0.6538 0.204 0.796 0.000
#> GSM486738     2  0.6308    -0.0899 0.492 0.508 0.000
#> GSM486740     1  0.5835     0.4424 0.660 0.340 0.000
#> GSM486742     2  0.3619     0.7251 0.136 0.864 0.000
#> GSM486744     1  0.6308     0.1337 0.508 0.492 0.000
#> GSM486746     1  0.4605     0.5876 0.796 0.204 0.000
#> GSM486748     3  0.8577    -0.0406 0.096 0.436 0.468
#> GSM486750     2  0.3482     0.7262 0.128 0.872 0.000
#> GSM486752     2  0.5780     0.7258 0.080 0.800 0.120
#> GSM486754     2  0.5988     0.2777 0.368 0.632 0.000
#> GSM486756     2  0.6008     0.2472 0.372 0.628 0.000
#> GSM486758     3  0.9027    -0.0616 0.132 0.428 0.440
#> GSM486760     3  0.5785     0.5034 0.332 0.000 0.668
#> GSM486762     3  0.8332     0.3150 0.104 0.316 0.580
#> GSM486764     1  0.5202     0.4311 0.772 0.008 0.220
#> GSM486766     3  0.1919     0.6652 0.024 0.020 0.956
#> GSM486768     1  0.5859     0.4577 0.656 0.344 0.000
#> GSM486770     2  0.4178     0.6889 0.172 0.828 0.000
#> GSM486772     1  0.6260     0.2073 0.552 0.448 0.000
#> GSM486774     2  0.5874     0.6986 0.116 0.796 0.088
#> GSM486776     3  0.4555     0.6181 0.200 0.000 0.800
#> GSM486778     3  0.5981     0.6159 0.132 0.080 0.788
#> GSM486780     1  0.7043     0.2313 0.576 0.400 0.024
#> GSM486782     2  0.0424     0.7654 0.000 0.992 0.008
#> GSM486784     2  0.6244     0.0793 0.440 0.560 0.000
#> GSM486786     3  0.5631     0.5753 0.132 0.064 0.804
#> GSM486788     1  0.6291    -0.0930 0.532 0.000 0.468
#> GSM486790     2  0.3116     0.7407 0.108 0.892 0.000
#> GSM486792     1  0.6468    -0.0522 0.552 0.004 0.444
#> GSM486794     3  0.2176     0.6690 0.020 0.032 0.948
#> GSM486796     1  0.4897     0.5021 0.812 0.016 0.172
#> GSM486798     2  0.5435     0.7231 0.048 0.808 0.144
#> GSM486800     3  0.6045     0.4260 0.380 0.000 0.620
#> GSM486802     1  0.5254     0.3932 0.736 0.000 0.264
#> GSM486804     3  0.6825     0.2681 0.488 0.012 0.500
#> GSM486806     2  0.2903     0.7601 0.028 0.924 0.048
#> GSM486808     3  0.1129     0.6695 0.004 0.020 0.976
#> GSM486810     2  0.3038     0.7413 0.104 0.896 0.000
#> GSM486812     3  0.2448     0.6624 0.076 0.000 0.924
#> GSM486814     1  0.6095     0.3725 0.608 0.392 0.000
#> GSM486816     3  0.1877     0.6664 0.032 0.012 0.956
#> GSM486818     1  0.7564     0.4086 0.692 0.156 0.152
#> GSM486821     1  0.5500     0.5543 0.816 0.084 0.100
#> GSM486823     2  0.2537     0.7533 0.080 0.920 0.000
#> GSM486826     3  0.7256     0.3555 0.440 0.028 0.532
#> GSM486830     2  0.3293     0.7536 0.088 0.900 0.012
#> GSM486832     3  0.6274     0.2670 0.456 0.000 0.544
#> GSM486834     2  0.6595     0.6508 0.076 0.744 0.180
#> GSM486836     3  0.6008     0.4364 0.372 0.000 0.628
#> GSM486838     2  0.8304     0.5442 0.144 0.624 0.232
#> GSM486840     3  0.5785     0.5121 0.332 0.000 0.668
#> GSM486842     3  0.0892     0.6691 0.020 0.000 0.980
#> GSM486844     1  0.7091    -0.1168 0.560 0.024 0.416
#> GSM486846     2  0.2599     0.7673 0.052 0.932 0.016
#> GSM486848     3  0.6192     0.3660 0.420 0.000 0.580
#> GSM486850     2  0.2356     0.7558 0.072 0.928 0.000
#> GSM486852     1  0.4723     0.5096 0.824 0.016 0.160
#> GSM486854     2  0.2599     0.7571 0.052 0.932 0.016
#> GSM486856     1  0.5859     0.4586 0.656 0.344 0.000
#> GSM486858     2  0.6191     0.6891 0.140 0.776 0.084

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM486735     4   0.474     0.6169 0.252 0.020 0.000 0.728
#> GSM486737     2   0.514     0.4982 0.048 0.728 0.000 0.224
#> GSM486739     1   0.506     0.3058 0.692 0.024 0.000 0.284
#> GSM486741     4   0.607     0.3445 0.008 0.464 0.028 0.500
#> GSM486743     2   0.670     0.1957 0.436 0.476 0.000 0.088
#> GSM486745     1   0.582     0.3731 0.704 0.176 0.000 0.120
#> GSM486747     3   0.713     0.3992 0.008 0.188 0.596 0.208
#> GSM486749     4   0.514     0.6724 0.180 0.020 0.036 0.764
#> GSM486751     4   0.457     0.7098 0.024 0.052 0.100 0.824
#> GSM486753     2   0.717     0.2904 0.144 0.496 0.000 0.360
#> GSM486755     2   0.746     0.3806 0.288 0.500 0.000 0.212
#> GSM486757     4   0.810     0.3118 0.008 0.340 0.260 0.392
#> GSM486759     1   0.691     0.2661 0.532 0.348 0.120 0.000
#> GSM486761     3   0.586     0.5391 0.008 0.108 0.720 0.164
#> GSM486763     1   0.603     0.3033 0.644 0.296 0.008 0.052
#> GSM486765     3   0.246     0.6393 0.008 0.036 0.924 0.032
#> GSM486767     2   0.621     0.5253 0.100 0.704 0.020 0.176
#> GSM486769     4   0.474     0.6290 0.240 0.024 0.000 0.736
#> GSM486771     1   0.615    -0.0807 0.492 0.460 0.000 0.048
#> GSM486773     4   0.654     0.5421 0.008 0.332 0.072 0.588
#> GSM486775     3   0.617     0.4889 0.124 0.208 0.668 0.000
#> GSM486777     3   0.531     0.5996 0.164 0.008 0.756 0.072
#> GSM486779     2   0.345     0.5466 0.052 0.868 0.000 0.080
#> GSM486781     4   0.324     0.7140 0.008 0.064 0.040 0.888
#> GSM486783     2   0.615     0.5324 0.112 0.664 0.000 0.224
#> GSM486785     3   0.629     0.4869 0.004 0.240 0.656 0.100
#> GSM486787     3   0.643     0.4874 0.192 0.160 0.648 0.000
#> GSM486789     4   0.323     0.7106 0.072 0.048 0.000 0.880
#> GSM486791     1   0.512     0.4663 0.740 0.028 0.220 0.012
#> GSM486793     3   0.264     0.6315 0.012 0.052 0.916 0.020
#> GSM486795     1   0.676     0.4775 0.648 0.164 0.176 0.012
#> GSM486797     4   0.664     0.6266 0.020 0.144 0.164 0.672
#> GSM486799     3   0.577     0.5590 0.136 0.152 0.712 0.000
#> GSM486801     1   0.693     0.4232 0.580 0.164 0.256 0.000
#> GSM486803     2   0.743     0.0671 0.260 0.512 0.228 0.000
#> GSM486805     4   0.465     0.7059 0.020 0.076 0.084 0.820
#> GSM486807     3   0.319     0.6436 0.048 0.004 0.888 0.060
#> GSM486809     4   0.470     0.6796 0.172 0.036 0.008 0.784
#> GSM486811     3   0.465     0.5861 0.184 0.008 0.780 0.028
#> GSM486813     2   0.495     0.5198 0.180 0.760 0.000 0.060
#> GSM486815     3   0.317     0.6338 0.020 0.080 0.888 0.012
#> GSM486817     2   0.532     0.5275 0.128 0.780 0.036 0.056
#> GSM486819     1   0.528     0.4772 0.784 0.028 0.076 0.112
#> GSM486822     4   0.355     0.7055 0.096 0.044 0.000 0.860
#> GSM486824     2   0.695     0.1375 0.304 0.556 0.140 0.000
#> GSM486828     4   0.340     0.7176 0.064 0.036 0.016 0.884
#> GSM486831     1   0.712     0.2140 0.496 0.136 0.368 0.000
#> GSM486833     4   0.769     0.3967 0.032 0.116 0.332 0.520
#> GSM486835     1   0.785     0.2416 0.400 0.292 0.308 0.000
#> GSM486837     4   0.607     0.6392 0.008 0.180 0.112 0.700
#> GSM486839     3   0.775     0.0774 0.280 0.280 0.440 0.000
#> GSM486841     3   0.350     0.6444 0.084 0.008 0.872 0.036
#> GSM486843     2   0.786    -0.0846 0.288 0.392 0.320 0.000
#> GSM486845     4   0.349     0.7161 0.064 0.040 0.016 0.880
#> GSM486847     3   0.691     0.4307 0.216 0.192 0.592 0.000
#> GSM486849     4   0.501     0.6953 0.060 0.136 0.016 0.788
#> GSM486851     1   0.402     0.5102 0.848 0.068 0.076 0.008
#> GSM486853     4   0.438     0.6623 0.012 0.200 0.008 0.780
#> GSM486855     2   0.769     0.3491 0.308 0.448 0.000 0.244
#> GSM486857     4   0.714     0.5010 0.008 0.328 0.120 0.544
#> GSM486736     4   0.513     0.4968 0.344 0.004 0.008 0.644
#> GSM486738     2   0.669     0.5150 0.160 0.616 0.000 0.224
#> GSM486740     1   0.491     0.2701 0.676 0.012 0.000 0.312
#> GSM486742     4   0.629     0.2621 0.040 0.440 0.008 0.512
#> GSM486744     4   0.790    -0.3873 0.292 0.352 0.000 0.356
#> GSM486746     1   0.514     0.4018 0.744 0.064 0.000 0.192
#> GSM486748     3   0.712     0.1751 0.012 0.100 0.532 0.356
#> GSM486750     4   0.385     0.6730 0.180 0.012 0.000 0.808
#> GSM486752     4   0.515     0.6623 0.088 0.004 0.140 0.768
#> GSM486754     4   0.753     0.0203 0.208 0.316 0.000 0.476
#> GSM486756     2   0.739     0.3598 0.176 0.484 0.000 0.340
#> GSM486758     3   0.830    -0.0423 0.016 0.268 0.392 0.324
#> GSM486760     3   0.604     0.3748 0.332 0.060 0.608 0.000
#> GSM486762     3   0.690     0.3759 0.008 0.124 0.600 0.268
#> GSM486764     1   0.672     0.1762 0.540 0.388 0.052 0.020
#> GSM486766     3   0.164     0.6468 0.012 0.012 0.956 0.020
#> GSM486768     1   0.781    -0.1574 0.416 0.308 0.000 0.276
#> GSM486770     4   0.484     0.5945 0.272 0.012 0.004 0.712
#> GSM486772     1   0.779    -0.1061 0.384 0.244 0.000 0.372
#> GSM486774     4   0.678     0.5713 0.008 0.248 0.124 0.620
#> GSM486776     3   0.674     0.4233 0.160 0.232 0.608 0.000
#> GSM486778     3   0.676     0.4537 0.260 0.008 0.616 0.116
#> GSM486780     2   0.402     0.5511 0.052 0.840 0.004 0.104
#> GSM486782     4   0.255     0.7159 0.012 0.048 0.020 0.920
#> GSM486784     2   0.701     0.4766 0.156 0.560 0.000 0.284
#> GSM486786     3   0.624     0.4589 0.008 0.308 0.624 0.060
#> GSM486788     1   0.761     0.2924 0.476 0.260 0.264 0.000
#> GSM486790     4   0.456     0.6813 0.152 0.056 0.000 0.792
#> GSM486792     1   0.532     0.2326 0.628 0.008 0.356 0.008
#> GSM486794     3   0.313     0.6427 0.068 0.008 0.892 0.032
#> GSM486796     1   0.629     0.4953 0.716 0.148 0.100 0.036
#> GSM486798     4   0.524     0.6660 0.040 0.024 0.172 0.764
#> GSM486800     3   0.744     0.2334 0.252 0.236 0.512 0.000
#> GSM486802     1   0.698     0.3757 0.584 0.268 0.144 0.004
#> GSM486804     2   0.564     0.4133 0.112 0.732 0.152 0.004
#> GSM486806     4   0.319     0.7186 0.020 0.036 0.048 0.896
#> GSM486808     3   0.259     0.6474 0.036 0.012 0.920 0.032
#> GSM486810     4   0.422     0.6715 0.184 0.012 0.008 0.796
#> GSM486812     3   0.415     0.6011 0.156 0.012 0.816 0.016
#> GSM486814     2   0.655     0.4930 0.240 0.624 0.000 0.136
#> GSM486816     3   0.308     0.6400 0.020 0.052 0.900 0.028
#> GSM486818     2   0.584     0.3813 0.276 0.668 0.048 0.008
#> GSM486821     1   0.540     0.5065 0.776 0.116 0.080 0.028
#> GSM486823     4   0.340     0.6952 0.128 0.012 0.004 0.856
#> GSM486826     2   0.553     0.4208 0.092 0.736 0.168 0.004
#> GSM486830     4   0.382     0.6928 0.140 0.016 0.008 0.836
#> GSM486832     3   0.683     0.1565 0.388 0.104 0.508 0.000
#> GSM486834     4   0.612     0.6077 0.008 0.092 0.216 0.684
#> GSM486836     3   0.767     0.0504 0.340 0.224 0.436 0.000
#> GSM486838     4   0.748     0.4877 0.008 0.264 0.188 0.540
#> GSM486840     3   0.783     0.0327 0.280 0.312 0.408 0.000
#> GSM486842     3   0.293     0.6385 0.068 0.024 0.900 0.008
#> GSM486844     2   0.731     0.3474 0.176 0.592 0.216 0.016
#> GSM486846     4   0.453     0.6930 0.032 0.144 0.016 0.808
#> GSM486848     2   0.789    -0.1590 0.324 0.376 0.300 0.000
#> GSM486850     4   0.454     0.7027 0.104 0.072 0.008 0.816
#> GSM486852     1   0.430     0.4972 0.828 0.116 0.044 0.012
#> GSM486854     4   0.477     0.6715 0.020 0.172 0.024 0.784
#> GSM486856     2   0.719     0.4246 0.292 0.536 0.000 0.172
#> GSM486858     4   0.679     0.5497 0.016 0.300 0.084 0.600

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM486735     5   0.488    -0.1105 0.000 0.000 0.024 0.444 0.532
#> GSM486737     3   0.629     0.4120 0.000 0.280 0.580 0.116 0.024
#> GSM486739     5   0.514     0.3687 0.000 0.088 0.024 0.160 0.728
#> GSM486741     3   0.597     0.0154 0.000 0.052 0.548 0.368 0.032
#> GSM486743     2   0.586     0.3176 0.000 0.676 0.144 0.036 0.144
#> GSM486745     5   0.632     0.0430 0.000 0.428 0.056 0.044 0.472
#> GSM486747     1   0.724     0.1578 0.440 0.000 0.268 0.264 0.028
#> GSM486749     4   0.628     0.4170 0.016 0.016 0.080 0.584 0.304
#> GSM486751     4   0.567     0.5948 0.116 0.000 0.092 0.712 0.080
#> GSM486753     2   0.836    -0.1760 0.000 0.300 0.292 0.272 0.136
#> GSM486755     3   0.752     0.3027 0.000 0.208 0.488 0.076 0.228
#> GSM486757     3   0.681     0.1985 0.164 0.000 0.584 0.192 0.060
#> GSM486759     2   0.476     0.4344 0.084 0.768 0.028 0.000 0.120
#> GSM486761     1   0.628     0.4101 0.608 0.004 0.132 0.236 0.020
#> GSM486763     5   0.680     0.0853 0.008 0.308 0.224 0.000 0.460
#> GSM486765     1   0.374     0.6082 0.840 0.000 0.080 0.052 0.028
#> GSM486767     3   0.695     0.3845 0.008 0.336 0.516 0.064 0.076
#> GSM486769     4   0.491     0.1621 0.000 0.000 0.024 0.496 0.480
#> GSM486771     2   0.654     0.2669 0.000 0.548 0.180 0.016 0.256
#> GSM486773     4   0.599     0.2580 0.028 0.004 0.464 0.464 0.040
#> GSM486775     1   0.511     0.4302 0.648 0.304 0.024 0.000 0.024
#> GSM486777     1   0.477     0.6228 0.788 0.024 0.028 0.048 0.112
#> GSM486779     3   0.577     0.4371 0.000 0.292 0.620 0.052 0.036
#> GSM486781     4   0.270     0.6147 0.012 0.000 0.048 0.896 0.044
#> GSM486783     2   0.701    -0.0620 0.000 0.476 0.340 0.144 0.040
#> GSM486785     1   0.704     0.2185 0.504 0.024 0.344 0.100 0.028
#> GSM486787     1   0.580     0.4246 0.604 0.312 0.048 0.000 0.036
#> GSM486789     4   0.563     0.4446 0.000 0.000 0.092 0.572 0.336
#> GSM486791     5   0.737     0.0729 0.244 0.292 0.036 0.000 0.428
#> GSM486793     1   0.416     0.5790 0.804 0.004 0.136 0.028 0.028
#> GSM486795     2   0.790     0.1512 0.200 0.416 0.060 0.012 0.312
#> GSM486797     4   0.735     0.4373 0.180 0.008 0.192 0.548 0.072
#> GSM486799     1   0.555     0.5030 0.668 0.236 0.068 0.000 0.028
#> GSM486801     2   0.699     0.2173 0.268 0.524 0.024 0.008 0.176
#> GSM486803     2   0.720     0.1572 0.108 0.508 0.296 0.000 0.088
#> GSM486805     4   0.538     0.6126 0.084 0.004 0.088 0.744 0.080
#> GSM486807     1   0.451     0.6120 0.792 0.020 0.040 0.132 0.016
#> GSM486809     5   0.651    -0.2148 0.008 0.000 0.148 0.400 0.444
#> GSM486811     1   0.517     0.5953 0.756 0.116 0.020 0.020 0.088
#> GSM486813     2   0.549    -0.2182 0.000 0.476 0.472 0.008 0.044
#> GSM486815     1   0.561     0.5538 0.712 0.016 0.176 0.036 0.060
#> GSM486817     3   0.567     0.3428 0.016 0.360 0.580 0.012 0.032
#> GSM486819     5   0.703     0.2317 0.104 0.316 0.004 0.060 0.516
#> GSM486822     4   0.540     0.4780 0.000 0.000 0.100 0.636 0.264
#> GSM486824     2   0.612     0.3249 0.100 0.640 0.216 0.000 0.044
#> GSM486828     4   0.533     0.5902 0.020 0.004 0.104 0.720 0.152
#> GSM486831     1   0.636     0.1192 0.444 0.436 0.016 0.000 0.104
#> GSM486833     4   0.809     0.2549 0.304 0.000 0.208 0.376 0.112
#> GSM486835     2   0.531     0.3342 0.260 0.672 0.020 0.004 0.044
#> GSM486837     4   0.504     0.5850 0.048 0.020 0.144 0.760 0.028
#> GSM486839     2   0.617     0.2508 0.316 0.576 0.040 0.000 0.068
#> GSM486841     1   0.385     0.6429 0.852 0.028 0.040 0.052 0.028
#> GSM486843     2   0.552     0.4265 0.192 0.704 0.064 0.008 0.032
#> GSM486845     4   0.528     0.5984 0.008 0.040 0.108 0.748 0.096
#> GSM486847     1   0.654     0.2859 0.520 0.352 0.084 0.000 0.044
#> GSM486849     4   0.724     0.3893 0.008 0.012 0.304 0.424 0.252
#> GSM486851     5   0.670     0.1033 0.076 0.396 0.056 0.000 0.472
#> GSM486853     4   0.501     0.5601 0.000 0.028 0.196 0.724 0.052
#> GSM486855     2   0.667     0.2741 0.000 0.616 0.156 0.148 0.080
#> GSM486857     4   0.657     0.3064 0.060 0.004 0.380 0.504 0.052
#> GSM486736     5   0.454    -0.1229 0.000 0.000 0.008 0.452 0.540
#> GSM486738     2   0.687     0.0254 0.000 0.524 0.316 0.092 0.068
#> GSM486740     5   0.483     0.3272 0.000 0.072 0.004 0.208 0.716
#> GSM486742     4   0.740    -0.0842 0.000 0.208 0.364 0.388 0.040
#> GSM486744     2   0.748     0.1455 0.000 0.456 0.096 0.328 0.120
#> GSM486746     5   0.588     0.3322 0.004 0.312 0.004 0.096 0.584
#> GSM486748     4   0.739     0.1292 0.360 0.028 0.112 0.464 0.036
#> GSM486750     4   0.445     0.4860 0.000 0.004 0.028 0.708 0.260
#> GSM486752     4   0.569     0.5414 0.164 0.012 0.028 0.704 0.092
#> GSM486754     4   0.819     0.0960 0.000 0.244 0.176 0.408 0.172
#> GSM486756     3   0.772     0.3527 0.000 0.200 0.496 0.156 0.148
#> GSM486758     3   0.783     0.1784 0.192 0.016 0.500 0.212 0.080
#> GSM486760     1   0.594     0.4294 0.616 0.288 0.020 0.008 0.068
#> GSM486762     1   0.729     0.0977 0.448 0.020 0.132 0.372 0.028
#> GSM486764     5   0.753    -0.0996 0.020 0.328 0.316 0.008 0.328
#> GSM486766     1   0.346     0.6189 0.860 0.012 0.036 0.080 0.012
#> GSM486768     2   0.715     0.2761 0.000 0.540 0.068 0.224 0.168
#> GSM486770     5   0.487    -0.1356 0.000 0.004 0.016 0.444 0.536
#> GSM486772     2   0.813     0.1312 0.000 0.400 0.124 0.240 0.236
#> GSM486774     4   0.564     0.5294 0.052 0.000 0.232 0.668 0.048
#> GSM486776     1   0.579     0.2702 0.540 0.396 0.028 0.004 0.032
#> GSM486778     1   0.654     0.5557 0.656 0.084 0.016 0.084 0.160
#> GSM486780     3   0.571     0.2990 0.000 0.396 0.540 0.036 0.028
#> GSM486782     4   0.334     0.5955 0.004 0.000 0.048 0.848 0.100
#> GSM486784     2   0.753     0.0895 0.000 0.480 0.228 0.220 0.072
#> GSM486786     3   0.699    -0.1068 0.412 0.048 0.460 0.036 0.044
#> GSM486788     2   0.582     0.3469 0.220 0.672 0.028 0.012 0.068
#> GSM486790     4   0.585     0.3681 0.000 0.016 0.064 0.544 0.376
#> GSM486792     1   0.750     0.0392 0.356 0.256 0.028 0.004 0.356
#> GSM486794     1   0.304     0.6380 0.888 0.008 0.020 0.040 0.044
#> GSM486796     2   0.642     0.2147 0.072 0.584 0.024 0.020 0.300
#> GSM486798     4   0.568     0.5555 0.180 0.012 0.040 0.704 0.064
#> GSM486800     1   0.532     0.1792 0.504 0.460 0.020 0.004 0.012
#> GSM486802     2   0.607     0.3964 0.168 0.664 0.028 0.008 0.132
#> GSM486804     3   0.598     0.2877 0.044 0.360 0.560 0.004 0.032
#> GSM486806     4   0.365     0.6098 0.032 0.000 0.056 0.848 0.064
#> GSM486808     1   0.397     0.6126 0.820 0.024 0.024 0.124 0.008
#> GSM486810     4   0.541     0.2272 0.008 0.000 0.040 0.512 0.440
#> GSM486812     1   0.397     0.6178 0.836 0.084 0.016 0.020 0.044
#> GSM486814     2   0.616     0.1714 0.000 0.604 0.280 0.064 0.052
#> GSM486816     1   0.521     0.5692 0.732 0.012 0.176 0.024 0.056
#> GSM486818     2   0.614     0.0617 0.028 0.564 0.340 0.004 0.064
#> GSM486821     2   0.743     0.1164 0.096 0.512 0.016 0.080 0.296
#> GSM486823     4   0.443     0.4921 0.000 0.000 0.036 0.708 0.256
#> GSM486826     3   0.624     0.3453 0.060 0.332 0.568 0.008 0.032
#> GSM486830     4   0.416     0.5365 0.004 0.004 0.016 0.744 0.232
#> GSM486832     1   0.629     0.2797 0.516 0.368 0.020 0.000 0.096
#> GSM486834     4   0.592     0.5381 0.172 0.000 0.112 0.672 0.044
#> GSM486836     2   0.616     0.0742 0.364 0.552 0.016 0.028 0.040
#> GSM486838     4   0.740     0.3927 0.080 0.044 0.256 0.556 0.064
#> GSM486840     2   0.479     0.3664 0.248 0.704 0.020 0.000 0.028
#> GSM486842     1   0.264     0.6366 0.908 0.036 0.024 0.024 0.008
#> GSM486844     2   0.758     0.2535 0.136 0.572 0.180 0.068 0.044
#> GSM486846     4   0.449     0.6081 0.004 0.048 0.100 0.800 0.048
#> GSM486848     2   0.535     0.4010 0.240 0.680 0.048 0.000 0.032
#> GSM486850     4   0.651     0.5154 0.000 0.060 0.096 0.596 0.248
#> GSM486852     5   0.678     0.0765 0.056 0.416 0.060 0.008 0.460
#> GSM486854     4   0.442     0.5886 0.000 0.040 0.108 0.796 0.056
#> GSM486856     2   0.609     0.2686 0.000 0.660 0.180 0.104 0.056
#> GSM486858     4   0.650     0.2935 0.028 0.028 0.380 0.520 0.044

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM486735     6   0.387    0.52225 0.004 0.000 0.008 0.192 0.032 0.764
#> GSM486737     2   0.582    0.30126 0.000 0.600 0.220 0.152 0.008 0.020
#> GSM486739     6   0.526    0.41410 0.000 0.088 0.036 0.016 0.160 0.700
#> GSM486741     4   0.714   -0.02934 0.004 0.352 0.188 0.388 0.008 0.060
#> GSM486743     2   0.628    0.34868 0.000 0.588 0.076 0.032 0.248 0.056
#> GSM486745     6   0.671   -0.17318 0.000 0.232 0.024 0.008 0.348 0.388
#> GSM486747     1   0.673    0.06812 0.408 0.008 0.296 0.268 0.016 0.004
#> GSM486749     6   0.660    0.29338 0.032 0.020 0.068 0.300 0.036 0.544
#> GSM486751     4   0.759    0.21582 0.176 0.012 0.092 0.436 0.016 0.268
#> GSM486753     2   0.741    0.29624 0.000 0.456 0.084 0.200 0.028 0.232
#> GSM486755     2   0.765    0.24796 0.000 0.484 0.148 0.104 0.068 0.196
#> GSM486757     3   0.786    0.30053 0.160 0.080 0.476 0.204 0.012 0.068
#> GSM486759     5   0.601    0.19844 0.048 0.412 0.032 0.008 0.484 0.016
#> GSM486761     1   0.562    0.36610 0.596 0.004 0.160 0.232 0.004 0.004
#> GSM486763     5   0.754   -0.05297 0.004 0.100 0.276 0.008 0.384 0.228
#> GSM486765     1   0.332    0.55715 0.824 0.000 0.132 0.024 0.020 0.000
#> GSM486767     2   0.758    0.20338 0.004 0.452 0.284 0.128 0.052 0.080
#> GSM486769     6   0.326    0.53606 0.000 0.000 0.008 0.184 0.012 0.796
#> GSM486771     2   0.660    0.38597 0.000 0.576 0.044 0.040 0.196 0.144
#> GSM486773     4   0.723    0.33275 0.044 0.100 0.200 0.524 0.000 0.132
#> GSM486775     1   0.655    0.12078 0.536 0.168 0.068 0.004 0.224 0.000
#> GSM486777     1   0.571    0.53150 0.700 0.004 0.068 0.044 0.120 0.064
#> GSM486779     2   0.648    0.15329 0.000 0.488 0.332 0.128 0.040 0.012
#> GSM486781     4   0.456    0.40057 0.024 0.008 0.036 0.732 0.004 0.196
#> GSM486783     2   0.504    0.48291 0.000 0.704 0.064 0.188 0.016 0.028
#> GSM486785     1   0.754   -0.08770 0.376 0.096 0.364 0.132 0.028 0.004
#> GSM486787     5   0.705    0.17231 0.380 0.116 0.108 0.000 0.388 0.008
#> GSM486789     6   0.584    0.29266 0.000 0.048 0.068 0.332 0.004 0.548
#> GSM486791     5   0.615    0.43879 0.140 0.020 0.040 0.000 0.608 0.192
#> GSM486793     1   0.447    0.48795 0.716 0.000 0.224 0.032 0.020 0.008
#> GSM486795     5   0.869    0.25363 0.228 0.236 0.060 0.024 0.332 0.120
#> GSM486797     4   0.764    0.22488 0.316 0.068 0.112 0.436 0.012 0.056
#> GSM486799     1   0.683    0.13844 0.488 0.076 0.148 0.008 0.280 0.000
#> GSM486801     5   0.637    0.44940 0.216 0.092 0.032 0.004 0.604 0.052
#> GSM486803     5   0.699    0.06502 0.016 0.268 0.300 0.008 0.392 0.016
#> GSM486805     4   0.785    0.35209 0.184 0.040 0.100 0.480 0.020 0.176
#> GSM486807     1   0.441    0.57348 0.788 0.004 0.052 0.092 0.052 0.012
#> GSM486809     6   0.636    0.38927 0.028 0.004 0.160 0.144 0.048 0.616
#> GSM486811     1   0.612    0.40053 0.624 0.012 0.036 0.044 0.232 0.052
#> GSM486813     2   0.609    0.32632 0.000 0.584 0.256 0.048 0.100 0.012
#> GSM486815     1   0.607    0.46666 0.644 0.008 0.188 0.044 0.088 0.028
#> GSM486817     2   0.658    0.28383 0.020 0.568 0.256 0.048 0.092 0.016
#> GSM486819     5   0.696    0.40547 0.088 0.052 0.032 0.036 0.576 0.216
#> GSM486822     6   0.489    0.35351 0.000 0.008 0.044 0.352 0.004 0.592
#> GSM486824     2   0.691   -0.05872 0.040 0.380 0.224 0.008 0.348 0.000
#> GSM486828     4   0.693    0.23202 0.056 0.052 0.064 0.500 0.008 0.320
#> GSM486831     5   0.573    0.39617 0.300 0.068 0.032 0.004 0.588 0.008
#> GSM486833     1   0.828    0.06417 0.404 0.040 0.160 0.212 0.016 0.168
#> GSM486835     5   0.708    0.43502 0.212 0.264 0.064 0.012 0.448 0.000
#> GSM486837     4   0.532    0.48696 0.052 0.044 0.064 0.732 0.004 0.104
#> GSM486839     5   0.721    0.33132 0.288 0.292 0.048 0.008 0.360 0.004
#> GSM486841     1   0.434    0.55997 0.780 0.000 0.056 0.064 0.096 0.004
#> GSM486843     5   0.737    0.31396 0.136 0.304 0.104 0.024 0.432 0.000
#> GSM486845     4   0.632    0.37363 0.036 0.100 0.040 0.608 0.004 0.212
#> GSM486847     1   0.703   -0.09570 0.400 0.116 0.140 0.000 0.344 0.000
#> GSM486849     6   0.784   -0.00589 0.024 0.100 0.136 0.348 0.020 0.372
#> GSM486851     5   0.578    0.35149 0.016 0.056 0.084 0.000 0.648 0.196
#> GSM486853     4   0.443    0.45958 0.000 0.104 0.036 0.768 0.004 0.088
#> GSM486855     2   0.596    0.48641 0.000 0.656 0.036 0.152 0.108 0.048
#> GSM486857     4   0.753    0.25642 0.076 0.168 0.200 0.500 0.008 0.048
#> GSM486736     6   0.356    0.53077 0.000 0.004 0.000 0.184 0.032 0.780
#> GSM486738     2   0.371    0.49177 0.000 0.816 0.016 0.120 0.024 0.024
#> GSM486740     6   0.516    0.45059 0.004 0.048 0.016 0.048 0.172 0.712
#> GSM486742     2   0.685    0.08297 0.004 0.428 0.092 0.384 0.012 0.080
#> GSM486744     2   0.755    0.35797 0.000 0.432 0.036 0.288 0.108 0.136
#> GSM486746     5   0.549    0.14635 0.000 0.052 0.012 0.016 0.500 0.420
#> GSM486748     4   0.748    0.09299 0.332 0.032 0.128 0.436 0.040 0.032
#> GSM486750     4   0.497   -0.02065 0.004 0.004 0.016 0.516 0.020 0.440
#> GSM486752     4   0.693    0.24140 0.212 0.000 0.032 0.432 0.020 0.304
#> GSM486754     2   0.769    0.09647 0.000 0.364 0.060 0.256 0.044 0.276
#> GSM486756     2   0.746    0.24158 0.000 0.476 0.180 0.144 0.024 0.176
#> GSM486758     3   0.760    0.40246 0.156 0.056 0.548 0.112 0.032 0.096
#> GSM486760     5   0.512    0.14710 0.440 0.012 0.036 0.000 0.504 0.008
#> GSM486762     1   0.745    0.10992 0.392 0.008 0.188 0.336 0.036 0.040
#> GSM486764     3   0.754    0.02329 0.004 0.152 0.352 0.004 0.336 0.152
#> GSM486766     1   0.294    0.57544 0.868 0.000 0.068 0.048 0.012 0.004
#> GSM486768     2   0.763    0.38112 0.000 0.456 0.036 0.196 0.196 0.116
#> GSM486770     6   0.353    0.53847 0.000 0.004 0.012 0.176 0.016 0.792
#> GSM486772     2   0.718    0.27028 0.000 0.456 0.008 0.160 0.112 0.264
#> GSM486774     4   0.565    0.46804 0.044 0.032 0.168 0.684 0.004 0.068
#> GSM486776     1   0.727   -0.16786 0.412 0.152 0.092 0.016 0.328 0.000
#> GSM486778     1   0.640    0.35454 0.560 0.000 0.024 0.040 0.256 0.120
#> GSM486780     2   0.568    0.34442 0.008 0.652 0.216 0.076 0.036 0.012
#> GSM486782     4   0.481    0.22756 0.008 0.008 0.028 0.620 0.004 0.332
#> GSM486784     2   0.592    0.46708 0.000 0.608 0.024 0.256 0.068 0.044
#> GSM486786     3   0.680    0.30635 0.260 0.112 0.528 0.076 0.024 0.000
#> GSM486788     5   0.640    0.48647 0.164 0.184 0.068 0.008 0.576 0.000
#> GSM486790     6   0.617    0.18361 0.000 0.088 0.036 0.380 0.012 0.484
#> GSM486792     5   0.611    0.41834 0.176 0.004 0.072 0.000 0.608 0.140
#> GSM486794     1   0.383    0.58049 0.824 0.000 0.060 0.020 0.072 0.024
#> GSM486796     5   0.724    0.39970 0.092 0.208 0.020 0.024 0.540 0.116
#> GSM486798     4   0.682    0.39291 0.240 0.020 0.036 0.556 0.028 0.120
#> GSM486800     5   0.669    0.23354 0.384 0.156 0.044 0.008 0.408 0.000
#> GSM486802     5   0.698    0.40663 0.156 0.280 0.028 0.024 0.496 0.016
#> GSM486804     2   0.679   -0.10152 0.036 0.424 0.404 0.036 0.096 0.004
#> GSM486806     4   0.590    0.32294 0.048 0.016 0.052 0.612 0.008 0.264
#> GSM486808     1   0.476    0.55934 0.756 0.004 0.072 0.096 0.068 0.004
#> GSM486810     6   0.509    0.48147 0.008 0.012 0.048 0.228 0.020 0.684
#> GSM486812     1   0.468    0.45469 0.720 0.008 0.020 0.020 0.212 0.020
#> GSM486814     2   0.540    0.47470 0.000 0.700 0.044 0.136 0.100 0.020
#> GSM486816     1   0.520    0.50517 0.704 0.008 0.192 0.040 0.028 0.028
#> GSM486818     2   0.685    0.20798 0.016 0.508 0.232 0.028 0.204 0.012
#> GSM486821     5   0.743    0.36566 0.036 0.140 0.064 0.076 0.572 0.112
#> GSM486823     6   0.464    0.22188 0.000 0.008 0.020 0.416 0.004 0.552
#> GSM486826     3   0.690   -0.06055 0.040 0.384 0.428 0.032 0.112 0.004
#> GSM486830     4   0.561    0.03107 0.008 0.024 0.028 0.492 0.016 0.432
#> GSM486832     5   0.687    0.35751 0.268 0.060 0.104 0.008 0.532 0.028
#> GSM486834     4   0.716    0.40680 0.152 0.012 0.132 0.544 0.016 0.144
#> GSM486836     5   0.724    0.40217 0.240 0.156 0.096 0.024 0.484 0.000
#> GSM486838     4   0.672    0.44073 0.048 0.096 0.184 0.600 0.008 0.064
#> GSM486840     5   0.696    0.33867 0.180 0.336 0.060 0.008 0.416 0.000
#> GSM486842     1   0.420    0.50979 0.760 0.000 0.092 0.012 0.136 0.000
#> GSM486844     2   0.733    0.18376 0.084 0.504 0.068 0.104 0.240 0.000
#> GSM486846     4   0.534    0.40830 0.012 0.100 0.020 0.680 0.004 0.184
#> GSM486848     2   0.712   -0.31614 0.200 0.372 0.076 0.000 0.348 0.004
#> GSM486850     4   0.712    0.24341 0.012 0.108 0.060 0.504 0.032 0.284
#> GSM486852     5   0.631    0.24673 0.004 0.056 0.136 0.004 0.576 0.224
#> GSM486854     4   0.439    0.46155 0.004 0.112 0.016 0.772 0.008 0.088
#> GSM486856     2   0.549    0.47681 0.000 0.644 0.020 0.204 0.124 0.008
#> GSM486858     4   0.570    0.42446 0.008 0.152 0.156 0.652 0.008 0.024

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)

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 agent(p) individual(p) k
#> CV:NMF 114    0.987      2.30e-05 2
#> CV:NMF  72    0.960      2.82e-05 3
#> CV:NMF  57    0.784      2.24e-05 4
#> CV:NMF  32    0.739      2.20e-02 5
#> CV:NMF  13    1.000      7.21e-02 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 120 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.790       0.896         0.4817 0.496   0.496
#> 3 3 0.536           0.748       0.868         0.1764 0.942   0.882
#> 4 4 0.487           0.565       0.711         0.1491 0.845   0.672
#> 5 5 0.504           0.596       0.716         0.0979 0.885   0.686
#> 6 6 0.537           0.627       0.706         0.0524 0.960   0.852

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
#> GSM486735     2  0.1414   0.855902 0.020 0.980
#> GSM486737     2  0.2236   0.864489 0.036 0.964
#> GSM486739     2  0.5059   0.830531 0.112 0.888
#> GSM486741     2  0.2043   0.864412 0.032 0.968
#> GSM486743     2  0.2043   0.864785 0.032 0.968
#> GSM486745     2  0.5178   0.828575 0.116 0.884
#> GSM486747     1  0.9000   0.475891 0.684 0.316
#> GSM486749     2  0.1184   0.860802 0.016 0.984
#> GSM486751     1  0.9922   0.015360 0.552 0.448
#> GSM486753     2  0.1414   0.862574 0.020 0.980
#> GSM486755     2  0.1633   0.863543 0.024 0.976
#> GSM486757     1  0.5408   0.817291 0.876 0.124
#> GSM486759     1  0.1843   0.903807 0.972 0.028
#> GSM486761     1  0.0938   0.912272 0.988 0.012
#> GSM486763     1  0.4298   0.869814 0.912 0.088
#> GSM486765     1  0.0000   0.911293 1.000 0.000
#> GSM486767     2  0.8016   0.740360 0.244 0.756
#> GSM486769     2  0.1184   0.856244 0.016 0.984
#> GSM486771     2  0.1184   0.860802 0.016 0.984
#> GSM486773     2  0.8713   0.680414 0.292 0.708
#> GSM486775     1  0.0000   0.911293 1.000 0.000
#> GSM486777     1  0.0376   0.910950 0.996 0.004
#> GSM486779     2  0.2236   0.864489 0.036 0.964
#> GSM486781     2  0.8555   0.694946 0.280 0.720
#> GSM486783     2  0.2236   0.864489 0.036 0.964
#> GSM486785     1  0.0000   0.911293 1.000 0.000
#> GSM486787     1  0.0938   0.911992 0.988 0.012
#> GSM486789     2  0.1414   0.862574 0.020 0.980
#> GSM486791     1  0.2423   0.895304 0.960 0.040
#> GSM486793     1  0.0376   0.910950 0.996 0.004
#> GSM486795     1  0.7950   0.653107 0.760 0.240
#> GSM486797     2  0.9993   0.238966 0.484 0.516
#> GSM486799     1  0.0000   0.911293 1.000 0.000
#> GSM486801     1  0.0938   0.911849 0.988 0.012
#> GSM486803     1  0.1414   0.909799 0.980 0.020
#> GSM486805     2  0.9963   0.303727 0.464 0.536
#> GSM486807     1  0.1843   0.904925 0.972 0.028
#> GSM486809     2  0.3584   0.846502 0.068 0.932
#> GSM486811     1  0.0672   0.912022 0.992 0.008
#> GSM486813     2  0.2948   0.862275 0.052 0.948
#> GSM486815     1  0.0000   0.911293 1.000 0.000
#> GSM486817     1  0.9933   0.008429 0.548 0.452
#> GSM486819     1  0.7745   0.699040 0.772 0.228
#> GSM486822     2  0.0938   0.859017 0.012 0.988
#> GSM486824     1  0.1184   0.911324 0.984 0.016
#> GSM486828     2  0.8813   0.667102 0.300 0.700
#> GSM486831     1  0.0938   0.912472 0.988 0.012
#> GSM486833     2  0.9983   0.264339 0.476 0.524
#> GSM486835     1  0.0938   0.911992 0.988 0.012
#> GSM486837     2  0.8386   0.715180 0.268 0.732
#> GSM486839     1  0.0000   0.911293 1.000 0.000
#> GSM486841     1  0.0000   0.911293 1.000 0.000
#> GSM486843     1  0.1633   0.908820 0.976 0.024
#> GSM486845     2  0.8763   0.672014 0.296 0.704
#> GSM486847     1  0.0000   0.911293 1.000 0.000
#> GSM486849     2  0.1633   0.863698 0.024 0.976
#> GSM486851     1  0.4298   0.869814 0.912 0.088
#> GSM486853     2  0.2236   0.864489 0.036 0.964
#> GSM486855     2  0.2236   0.864489 0.036 0.964
#> GSM486857     2  0.7376   0.773971 0.208 0.792
#> GSM486736     2  0.1414   0.855902 0.020 0.980
#> GSM486738     2  0.2236   0.864489 0.036 0.964
#> GSM486740     2  0.5059   0.830531 0.112 0.888
#> GSM486742     2  0.2043   0.864412 0.032 0.968
#> GSM486744     2  0.2043   0.864785 0.032 0.968
#> GSM486746     2  0.5178   0.828575 0.116 0.884
#> GSM486748     1  0.9000   0.477404 0.684 0.316
#> GSM486750     2  0.1184   0.860802 0.016 0.984
#> GSM486752     1  0.9933   0.000925 0.548 0.452
#> GSM486754     2  0.1414   0.862574 0.020 0.980
#> GSM486756     2  0.1633   0.863543 0.024 0.976
#> GSM486758     1  0.5408   0.817291 0.876 0.124
#> GSM486760     1  0.1843   0.903807 0.972 0.028
#> GSM486762     1  0.0938   0.912272 0.988 0.012
#> GSM486764     1  0.4298   0.869814 0.912 0.088
#> GSM486766     1  0.0000   0.911293 1.000 0.000
#> GSM486768     2  0.8016   0.740360 0.244 0.756
#> GSM486770     2  0.1184   0.856244 0.016 0.984
#> GSM486772     2  0.1184   0.860802 0.016 0.984
#> GSM486774     2  0.8713   0.680205 0.292 0.708
#> GSM486776     1  0.0000   0.911293 1.000 0.000
#> GSM486778     1  0.0376   0.910950 0.996 0.004
#> GSM486780     2  0.2236   0.864489 0.036 0.964
#> GSM486782     2  0.8499   0.699885 0.276 0.724
#> GSM486784     2  0.2236   0.864489 0.036 0.964
#> GSM486786     1  0.0000   0.911293 1.000 0.000
#> GSM486788     1  0.0938   0.911992 0.988 0.012
#> GSM486790     2  0.1414   0.862574 0.020 0.980
#> GSM486792     1  0.2423   0.895304 0.960 0.040
#> GSM486794     1  0.0376   0.910950 0.996 0.004
#> GSM486796     1  0.7950   0.653107 0.760 0.240
#> GSM486798     2  0.9983   0.267276 0.476 0.524
#> GSM486800     1  0.0000   0.911293 1.000 0.000
#> GSM486802     1  0.0938   0.911849 0.988 0.012
#> GSM486804     1  0.1414   0.909799 0.980 0.020
#> GSM486806     2  0.9866   0.397870 0.432 0.568
#> GSM486808     1  0.1843   0.904925 0.972 0.028
#> GSM486810     2  0.3584   0.846502 0.068 0.932
#> GSM486812     1  0.0672   0.912022 0.992 0.008
#> GSM486814     2  0.2948   0.862275 0.052 0.948
#> GSM486816     1  0.0000   0.911293 1.000 0.000
#> GSM486818     1  0.9933   0.008429 0.548 0.452
#> GSM486821     1  0.7745   0.699040 0.772 0.228
#> GSM486823     2  0.0938   0.859017 0.012 0.988
#> GSM486826     1  0.1184   0.911324 0.984 0.016
#> GSM486830     2  0.8813   0.667102 0.300 0.700
#> GSM486832     1  0.0938   0.912472 0.988 0.012
#> GSM486834     2  0.9977   0.277646 0.472 0.528
#> GSM486836     1  0.0938   0.911992 0.988 0.012
#> GSM486838     2  0.8016   0.741391 0.244 0.756
#> GSM486840     1  0.0000   0.911293 1.000 0.000
#> GSM486842     1  0.0000   0.911293 1.000 0.000
#> GSM486844     1  0.1843   0.906949 0.972 0.028
#> GSM486846     2  0.8763   0.672014 0.296 0.704
#> GSM486848     1  0.0000   0.911293 1.000 0.000
#> GSM486850     2  0.1633   0.863698 0.024 0.976
#> GSM486852     1  0.4298   0.869814 0.912 0.088
#> GSM486854     2  0.2236   0.864489 0.036 0.964
#> GSM486856     2  0.2236   0.864489 0.036 0.964
#> GSM486858     2  0.7056   0.786417 0.192 0.808

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM486735     2  0.3551    0.77418 0.000 0.868 0.132
#> GSM486737     2  0.1129    0.81018 0.004 0.976 0.020
#> GSM486739     2  0.4602    0.75678 0.016 0.832 0.152
#> GSM486741     2  0.1031    0.81039 0.000 0.976 0.024
#> GSM486743     2  0.1643    0.81027 0.000 0.956 0.044
#> GSM486745     2  0.4663    0.75410 0.016 0.828 0.156
#> GSM486747     1  0.6908    0.46100 0.656 0.308 0.036
#> GSM486749     2  0.1753    0.80819 0.000 0.952 0.048
#> GSM486751     1  0.7466    0.00883 0.520 0.444 0.036
#> GSM486753     2  0.1411    0.81005 0.000 0.964 0.036
#> GSM486755     2  0.1411    0.81073 0.000 0.964 0.036
#> GSM486757     1  0.5004    0.74959 0.840 0.088 0.072
#> GSM486759     1  0.1751    0.87086 0.960 0.028 0.012
#> GSM486761     1  0.1015    0.87613 0.980 0.012 0.008
#> GSM486763     3  0.3295    0.88539 0.096 0.008 0.896
#> GSM486765     1  0.0237    0.87592 0.996 0.000 0.004
#> GSM486767     2  0.6297    0.68999 0.184 0.756 0.060
#> GSM486769     2  0.3482    0.77689 0.000 0.872 0.128
#> GSM486771     2  0.1753    0.81075 0.000 0.952 0.048
#> GSM486773     2  0.6337    0.64348 0.264 0.708 0.028
#> GSM486775     1  0.0747    0.87750 0.984 0.000 0.016
#> GSM486777     1  0.1643    0.85501 0.956 0.000 0.044
#> GSM486779     2  0.1399    0.80926 0.004 0.968 0.028
#> GSM486781     2  0.6303    0.65713 0.248 0.720 0.032
#> GSM486783     2  0.1267    0.80947 0.004 0.972 0.024
#> GSM486785     1  0.0592    0.87637 0.988 0.000 0.012
#> GSM486787     1  0.1620    0.87768 0.964 0.012 0.024
#> GSM486789     2  0.2625    0.79652 0.000 0.916 0.084
#> GSM486791     3  0.4702    0.83185 0.212 0.000 0.788
#> GSM486793     1  0.1753    0.85510 0.952 0.000 0.048
#> GSM486795     1  0.6887    0.55161 0.704 0.236 0.060
#> GSM486797     2  0.7484    0.20101 0.460 0.504 0.036
#> GSM486799     1  0.0747    0.87642 0.984 0.000 0.016
#> GSM486801     1  0.1751    0.87672 0.960 0.012 0.028
#> GSM486803     1  0.2313    0.87174 0.944 0.024 0.032
#> GSM486805     2  0.7526    0.30949 0.424 0.536 0.040
#> GSM486807     1  0.1399    0.86907 0.968 0.028 0.004
#> GSM486809     2  0.4465    0.74492 0.004 0.820 0.176
#> GSM486811     1  0.1453    0.87552 0.968 0.008 0.024
#> GSM486813     2  0.2056    0.81061 0.024 0.952 0.024
#> GSM486815     1  0.0424    0.87732 0.992 0.000 0.008
#> GSM486817     1  0.7913   -0.00221 0.492 0.452 0.056
#> GSM486819     3  0.8216    0.73463 0.172 0.188 0.640
#> GSM486822     2  0.2711    0.79299 0.000 0.912 0.088
#> GSM486824     1  0.1636    0.87721 0.964 0.016 0.020
#> GSM486828     2  0.6633    0.63907 0.260 0.700 0.040
#> GSM486831     1  0.1877    0.87160 0.956 0.012 0.032
#> GSM486833     2  0.7913    0.21891 0.452 0.492 0.056
#> GSM486835     1  0.1482    0.87771 0.968 0.012 0.020
#> GSM486837     2  0.6211    0.67544 0.228 0.736 0.036
#> GSM486839     1  0.0892    0.87619 0.980 0.000 0.020
#> GSM486841     1  0.0592    0.87700 0.988 0.000 0.012
#> GSM486843     1  0.1774    0.87541 0.960 0.024 0.016
#> GSM486845     2  0.6490    0.64455 0.256 0.708 0.036
#> GSM486847     1  0.0892    0.87619 0.980 0.000 0.020
#> GSM486849     2  0.1529    0.81030 0.000 0.960 0.040
#> GSM486851     3  0.3375    0.88665 0.100 0.008 0.892
#> GSM486853     2  0.1267    0.80947 0.004 0.972 0.024
#> GSM486855     2  0.1267    0.80947 0.004 0.972 0.024
#> GSM486857     2  0.5348    0.72396 0.176 0.796 0.028
#> GSM486736     2  0.3551    0.77418 0.000 0.868 0.132
#> GSM486738     2  0.1129    0.81018 0.004 0.976 0.020
#> GSM486740     2  0.4602    0.75678 0.016 0.832 0.152
#> GSM486742     2  0.1031    0.81039 0.000 0.976 0.024
#> GSM486744     2  0.1643    0.81027 0.000 0.956 0.044
#> GSM486746     2  0.4663    0.75410 0.016 0.828 0.156
#> GSM486748     1  0.6908    0.46198 0.656 0.308 0.036
#> GSM486750     2  0.1753    0.80819 0.000 0.952 0.048
#> GSM486752     1  0.7372    0.00296 0.520 0.448 0.032
#> GSM486754     2  0.1411    0.81005 0.000 0.964 0.036
#> GSM486756     2  0.1411    0.81073 0.000 0.964 0.036
#> GSM486758     1  0.5004    0.74959 0.840 0.088 0.072
#> GSM486760     1  0.1751    0.87086 0.960 0.028 0.012
#> GSM486762     1  0.1015    0.87613 0.980 0.012 0.008
#> GSM486764     3  0.3295    0.88539 0.096 0.008 0.896
#> GSM486766     1  0.0237    0.87592 0.996 0.000 0.004
#> GSM486768     2  0.6297    0.68999 0.184 0.756 0.060
#> GSM486770     2  0.3482    0.77689 0.000 0.872 0.128
#> GSM486772     2  0.1753    0.81075 0.000 0.952 0.048
#> GSM486774     2  0.6337    0.64361 0.264 0.708 0.028
#> GSM486776     1  0.0747    0.87750 0.984 0.000 0.016
#> GSM486778     1  0.1643    0.85501 0.956 0.000 0.044
#> GSM486780     2  0.1399    0.80926 0.004 0.968 0.028
#> GSM486782     2  0.6264    0.66114 0.244 0.724 0.032
#> GSM486784     2  0.1267    0.80947 0.004 0.972 0.024
#> GSM486786     1  0.0592    0.87637 0.988 0.000 0.012
#> GSM486788     1  0.1620    0.87768 0.964 0.012 0.024
#> GSM486790     2  0.2625    0.79652 0.000 0.916 0.084
#> GSM486792     3  0.4702    0.83185 0.212 0.000 0.788
#> GSM486794     1  0.1753    0.85510 0.952 0.000 0.048
#> GSM486796     1  0.6887    0.55161 0.704 0.236 0.060
#> GSM486798     2  0.7566    0.23945 0.448 0.512 0.040
#> GSM486800     1  0.0747    0.87642 0.984 0.000 0.016
#> GSM486802     1  0.1751    0.87672 0.960 0.012 0.028
#> GSM486804     1  0.2313    0.87174 0.944 0.024 0.032
#> GSM486806     2  0.7438    0.40289 0.392 0.568 0.040
#> GSM486808     1  0.1399    0.86907 0.968 0.028 0.004
#> GSM486810     2  0.4465    0.74492 0.004 0.820 0.176
#> GSM486812     1  0.1453    0.87552 0.968 0.008 0.024
#> GSM486814     2  0.2056    0.81061 0.024 0.952 0.024
#> GSM486816     1  0.0424    0.87732 0.992 0.000 0.008
#> GSM486818     1  0.7913   -0.00221 0.492 0.452 0.056
#> GSM486821     3  0.8216    0.73463 0.172 0.188 0.640
#> GSM486823     2  0.2711    0.79299 0.000 0.912 0.088
#> GSM486826     1  0.1636    0.87721 0.964 0.016 0.020
#> GSM486830     2  0.6633    0.63907 0.260 0.700 0.040
#> GSM486832     1  0.1877    0.87160 0.956 0.012 0.032
#> GSM486834     2  0.7909    0.23282 0.448 0.496 0.056
#> GSM486836     1  0.1482    0.87771 0.968 0.012 0.020
#> GSM486838     2  0.5891    0.69991 0.200 0.764 0.036
#> GSM486840     1  0.0892    0.87619 0.980 0.000 0.020
#> GSM486842     1  0.0592    0.87700 0.988 0.000 0.012
#> GSM486844     1  0.2050    0.87288 0.952 0.028 0.020
#> GSM486846     2  0.6490    0.64455 0.256 0.708 0.036
#> GSM486848     1  0.0892    0.87619 0.980 0.000 0.020
#> GSM486850     2  0.1529    0.81030 0.000 0.960 0.040
#> GSM486852     3  0.3375    0.88665 0.100 0.008 0.892
#> GSM486854     2  0.1267    0.80947 0.004 0.972 0.024
#> GSM486856     2  0.1267    0.80947 0.004 0.972 0.024
#> GSM486858     2  0.5239    0.73462 0.160 0.808 0.032

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM486735     4  0.5137     0.7766 0.000 0.296 0.024 0.680
#> GSM486737     2  0.1118     0.4713 0.000 0.964 0.000 0.036
#> GSM486739     4  0.6979     0.5898 0.008 0.416 0.088 0.488
#> GSM486741     2  0.2530     0.4302 0.000 0.888 0.000 0.112
#> GSM486743     2  0.3942     0.2467 0.000 0.764 0.000 0.236
#> GSM486745     4  0.7028     0.5718 0.008 0.416 0.092 0.484
#> GSM486747     1  0.7028     0.4543 0.596 0.204 0.004 0.196
#> GSM486749     2  0.4920    -0.2607 0.000 0.628 0.004 0.368
#> GSM486751     1  0.7809     0.1208 0.464 0.276 0.004 0.256
#> GSM486753     2  0.4008     0.2186 0.000 0.756 0.000 0.244
#> GSM486755     2  0.3528     0.3168 0.000 0.808 0.000 0.192
#> GSM486757     1  0.4682     0.6979 0.760 0.004 0.024 0.212
#> GSM486759     1  0.1516     0.8298 0.960 0.016 0.008 0.016
#> GSM486761     1  0.2384     0.8140 0.916 0.008 0.004 0.072
#> GSM486763     3  0.0376     0.8638 0.004 0.000 0.992 0.004
#> GSM486765     1  0.0707     0.8299 0.980 0.000 0.000 0.020
#> GSM486767     2  0.8155     0.2422 0.160 0.524 0.048 0.268
#> GSM486769     4  0.5038     0.7768 0.000 0.296 0.020 0.684
#> GSM486771     2  0.3873     0.2400 0.000 0.772 0.000 0.228
#> GSM486773     2  0.7654     0.2600 0.212 0.420 0.000 0.368
#> GSM486775     1  0.0657     0.8307 0.984 0.000 0.012 0.004
#> GSM486777     1  0.2111     0.8087 0.932 0.000 0.044 0.024
#> GSM486779     2  0.3831     0.3816 0.000 0.792 0.004 0.204
#> GSM486781     2  0.7495     0.3108 0.192 0.468 0.000 0.340
#> GSM486783     2  0.0592     0.4772 0.000 0.984 0.000 0.016
#> GSM486785     1  0.0921     0.8283 0.972 0.000 0.000 0.028
#> GSM486787     1  0.1394     0.8296 0.964 0.008 0.012 0.016
#> GSM486789     4  0.5296     0.5789 0.000 0.492 0.008 0.500
#> GSM486791     3  0.3390     0.8155 0.132 0.000 0.852 0.016
#> GSM486793     1  0.2214     0.8087 0.928 0.000 0.044 0.028
#> GSM486795     1  0.6678     0.5974 0.692 0.156 0.048 0.104
#> GSM486797     1  0.8015    -0.0805 0.396 0.292 0.004 0.308
#> GSM486799     1  0.0804     0.8294 0.980 0.000 0.008 0.012
#> GSM486801     1  0.1631     0.8298 0.956 0.008 0.020 0.016
#> GSM486803     1  0.2089     0.8254 0.940 0.020 0.012 0.028
#> GSM486805     1  0.8072    -0.2079 0.356 0.320 0.004 0.320
#> GSM486807     1  0.2002     0.8242 0.936 0.020 0.000 0.044
#> GSM486809     4  0.5772     0.7388 0.000 0.260 0.068 0.672
#> GSM486811     1  0.1471     0.8277 0.960 0.004 0.012 0.024
#> GSM486813     2  0.2742     0.4701 0.008 0.900 0.008 0.084
#> GSM486815     1  0.0895     0.8292 0.976 0.000 0.004 0.020
#> GSM486817     1  0.8260     0.1384 0.468 0.308 0.032 0.192
#> GSM486819     3  0.6326     0.7195 0.080 0.120 0.728 0.072
#> GSM486822     4  0.5055     0.7511 0.000 0.368 0.008 0.624
#> GSM486824     1  0.1229     0.8302 0.968 0.004 0.008 0.020
#> GSM486828     2  0.7591     0.3128 0.208 0.452 0.000 0.340
#> GSM486831     1  0.2066     0.8248 0.940 0.008 0.028 0.024
#> GSM486833     1  0.7982    -0.0731 0.392 0.260 0.004 0.344
#> GSM486835     1  0.1509     0.8297 0.960 0.008 0.012 0.020
#> GSM486837     2  0.6958     0.3855 0.184 0.584 0.000 0.232
#> GSM486839     1  0.0672     0.8281 0.984 0.000 0.008 0.008
#> GSM486841     1  0.0707     0.8283 0.980 0.000 0.000 0.020
#> GSM486843     1  0.1617     0.8300 0.956 0.012 0.008 0.024
#> GSM486845     2  0.7540     0.3265 0.204 0.468 0.000 0.328
#> GSM486847     1  0.0927     0.8289 0.976 0.000 0.008 0.016
#> GSM486849     2  0.2647     0.4133 0.000 0.880 0.000 0.120
#> GSM486851     3  0.0524     0.8653 0.008 0.000 0.988 0.004
#> GSM486853     2  0.0817     0.4796 0.000 0.976 0.000 0.024
#> GSM486855     2  0.2011     0.4740 0.000 0.920 0.000 0.080
#> GSM486857     2  0.6133     0.4272 0.136 0.676 0.000 0.188
#> GSM486736     4  0.5137     0.7766 0.000 0.296 0.024 0.680
#> GSM486738     2  0.1118     0.4713 0.000 0.964 0.000 0.036
#> GSM486740     4  0.6979     0.5898 0.008 0.416 0.088 0.488
#> GSM486742     2  0.2408     0.4359 0.000 0.896 0.000 0.104
#> GSM486744     2  0.3873     0.2620 0.000 0.772 0.000 0.228
#> GSM486746     4  0.7028     0.5718 0.008 0.416 0.092 0.484
#> GSM486748     1  0.7059     0.4509 0.592 0.204 0.004 0.200
#> GSM486750     2  0.4920    -0.2607 0.000 0.628 0.004 0.368
#> GSM486752     1  0.7634     0.1093 0.464 0.300 0.000 0.236
#> GSM486754     2  0.4008     0.2186 0.000 0.756 0.000 0.244
#> GSM486756     2  0.3528     0.3168 0.000 0.808 0.000 0.192
#> GSM486758     1  0.4682     0.6979 0.760 0.004 0.024 0.212
#> GSM486760     1  0.1516     0.8298 0.960 0.016 0.008 0.016
#> GSM486762     1  0.2384     0.8140 0.916 0.008 0.004 0.072
#> GSM486764     3  0.0376     0.8638 0.004 0.000 0.992 0.004
#> GSM486766     1  0.0707     0.8299 0.980 0.000 0.000 0.020
#> GSM486768     2  0.8174     0.2454 0.160 0.520 0.048 0.272
#> GSM486770     4  0.5038     0.7768 0.000 0.296 0.020 0.684
#> GSM486772     2  0.3873     0.2400 0.000 0.772 0.000 0.228
#> GSM486774     2  0.7654     0.2798 0.212 0.420 0.000 0.368
#> GSM486776     1  0.0657     0.8307 0.984 0.000 0.012 0.004
#> GSM486778     1  0.2111     0.8087 0.932 0.000 0.044 0.024
#> GSM486780     2  0.3831     0.3816 0.000 0.792 0.004 0.204
#> GSM486782     2  0.7486     0.3187 0.188 0.464 0.000 0.348
#> GSM486784     2  0.0592     0.4772 0.000 0.984 0.000 0.016
#> GSM486786     1  0.0921     0.8283 0.972 0.000 0.000 0.028
#> GSM486788     1  0.1394     0.8296 0.964 0.008 0.012 0.016
#> GSM486790     4  0.5296     0.5789 0.000 0.492 0.008 0.500
#> GSM486792     3  0.3390     0.8155 0.132 0.000 0.852 0.016
#> GSM486794     1  0.2214     0.8087 0.928 0.000 0.044 0.028
#> GSM486796     1  0.6678     0.5974 0.692 0.156 0.048 0.104
#> GSM486798     1  0.8031    -0.1239 0.384 0.324 0.004 0.288
#> GSM486800     1  0.0804     0.8294 0.980 0.000 0.008 0.012
#> GSM486802     1  0.1631     0.8298 0.956 0.008 0.020 0.016
#> GSM486804     1  0.2089     0.8254 0.940 0.020 0.012 0.028
#> GSM486806     2  0.7913     0.2203 0.324 0.360 0.000 0.316
#> GSM486808     1  0.2002     0.8242 0.936 0.020 0.000 0.044
#> GSM486810     4  0.5772     0.7388 0.000 0.260 0.068 0.672
#> GSM486812     1  0.1471     0.8277 0.960 0.004 0.012 0.024
#> GSM486814     2  0.2742     0.4701 0.008 0.900 0.008 0.084
#> GSM486816     1  0.0895     0.8292 0.976 0.000 0.004 0.020
#> GSM486818     1  0.8260     0.1384 0.468 0.308 0.032 0.192
#> GSM486821     3  0.6326     0.7195 0.080 0.120 0.728 0.072
#> GSM486823     4  0.5055     0.7511 0.000 0.368 0.008 0.624
#> GSM486826     1  0.1229     0.8302 0.968 0.004 0.008 0.020
#> GSM486830     2  0.7591     0.3128 0.208 0.452 0.000 0.340
#> GSM486832     1  0.2066     0.8248 0.940 0.008 0.028 0.024
#> GSM486834     1  0.7993    -0.0881 0.388 0.264 0.004 0.344
#> GSM486836     1  0.1509     0.8297 0.960 0.008 0.012 0.020
#> GSM486838     2  0.6576     0.3990 0.152 0.628 0.000 0.220
#> GSM486840     1  0.0672     0.8281 0.984 0.000 0.008 0.008
#> GSM486842     1  0.0707     0.8283 0.980 0.000 0.000 0.020
#> GSM486844     1  0.1985     0.8282 0.944 0.020 0.012 0.024
#> GSM486846     2  0.7540     0.3265 0.204 0.468 0.000 0.328
#> GSM486848     1  0.0927     0.8289 0.976 0.000 0.008 0.016
#> GSM486850     2  0.2647     0.4133 0.000 0.880 0.000 0.120
#> GSM486852     3  0.0524     0.8653 0.008 0.000 0.988 0.004
#> GSM486854     2  0.0817     0.4796 0.000 0.976 0.000 0.024
#> GSM486856     2  0.2011     0.4740 0.000 0.920 0.000 0.080
#> GSM486858     2  0.5783     0.4377 0.120 0.708 0.000 0.172

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM486735     4  0.2813     0.7506 0.000 0.168 0.000 0.832 0.000
#> GSM486737     2  0.1626     0.5997 0.000 0.940 0.016 0.044 0.000
#> GSM486739     4  0.7057     0.4826 0.000 0.332 0.088 0.496 0.084
#> GSM486741     2  0.2674     0.5587 0.000 0.856 0.004 0.140 0.000
#> GSM486743     2  0.4646     0.4260 0.000 0.712 0.060 0.228 0.000
#> GSM486745     4  0.7128     0.4609 0.000 0.344 0.088 0.480 0.088
#> GSM486747     1  0.7364    -0.4163 0.396 0.156 0.392 0.056 0.000
#> GSM486749     2  0.4489    -0.0773 0.000 0.572 0.008 0.420 0.000
#> GSM486751     3  0.7875     0.6291 0.232 0.204 0.452 0.112 0.000
#> GSM486753     2  0.4691     0.3588 0.000 0.680 0.044 0.276 0.000
#> GSM486755     2  0.4168     0.4735 0.000 0.756 0.044 0.200 0.000
#> GSM486757     3  0.5122     0.2116 0.312 0.000 0.628 0.060 0.000
#> GSM486759     1  0.1845     0.8635 0.928 0.016 0.056 0.000 0.000
#> GSM486761     1  0.4030     0.7367 0.736 0.008 0.248 0.008 0.000
#> GSM486763     5  0.0404     0.8617 0.000 0.000 0.012 0.000 0.988
#> GSM486765     1  0.1831     0.8612 0.920 0.000 0.076 0.004 0.000
#> GSM486767     2  0.8278    -0.0958 0.056 0.416 0.276 0.216 0.036
#> GSM486769     4  0.3010     0.7511 0.000 0.172 0.004 0.824 0.000
#> GSM486771     2  0.3863     0.4231 0.000 0.740 0.012 0.248 0.000
#> GSM486773     3  0.7799     0.4932 0.068 0.328 0.372 0.232 0.000
#> GSM486775     1  0.1121     0.8718 0.956 0.000 0.044 0.000 0.000
#> GSM486777     1  0.3548     0.8261 0.836 0.000 0.112 0.008 0.044
#> GSM486779     2  0.5759     0.3539 0.000 0.596 0.276 0.128 0.000
#> GSM486781     2  0.7535    -0.4769 0.060 0.384 0.376 0.180 0.000
#> GSM486783     2  0.0865     0.5996 0.000 0.972 0.004 0.024 0.000
#> GSM486785     1  0.2136     0.8547 0.904 0.000 0.088 0.008 0.000
#> GSM486787     1  0.1638     0.8613 0.932 0.004 0.064 0.000 0.000
#> GSM486789     4  0.4908     0.5727 0.000 0.356 0.036 0.608 0.000
#> GSM486791     5  0.3012     0.8130 0.124 0.000 0.024 0.000 0.852
#> GSM486793     1  0.3646     0.8232 0.828 0.000 0.120 0.008 0.044
#> GSM486795     1  0.6771     0.4460 0.648 0.140 0.124 0.048 0.040
#> GSM486797     3  0.8119     0.6491 0.180 0.224 0.428 0.168 0.000
#> GSM486799     1  0.0963     0.8701 0.964 0.000 0.036 0.000 0.000
#> GSM486801     1  0.2116     0.8650 0.924 0.008 0.052 0.004 0.012
#> GSM486803     1  0.2284     0.8455 0.896 0.004 0.096 0.004 0.000
#> GSM486805     3  0.7843     0.6460 0.144 0.244 0.464 0.148 0.000
#> GSM486807     1  0.3336     0.8199 0.832 0.016 0.144 0.008 0.000
#> GSM486809     4  0.3523     0.7093 0.000 0.120 0.004 0.832 0.044
#> GSM486811     1  0.2804     0.8557 0.880 0.004 0.096 0.008 0.012
#> GSM486813     2  0.3459     0.5814 0.000 0.844 0.080 0.072 0.004
#> GSM486815     1  0.3081     0.8193 0.832 0.000 0.156 0.012 0.000
#> GSM486817     3  0.7594     0.4973 0.256 0.220 0.472 0.036 0.016
#> GSM486819     5  0.6135     0.7244 0.048 0.100 0.084 0.056 0.712
#> GSM486822     4  0.3689     0.7210 0.000 0.256 0.004 0.740 0.000
#> GSM486824     1  0.1697     0.8603 0.932 0.000 0.060 0.008 0.000
#> GSM486828     3  0.7355     0.4693 0.052 0.376 0.408 0.164 0.000
#> GSM486831     1  0.2588     0.8620 0.900 0.008 0.068 0.004 0.020
#> GSM486833     3  0.7865     0.6407 0.156 0.176 0.476 0.192 0.000
#> GSM486835     1  0.1928     0.8574 0.920 0.004 0.072 0.004 0.000
#> GSM486837     2  0.6659    -0.1817 0.076 0.520 0.344 0.060 0.000
#> GSM486839     1  0.0290     0.8673 0.992 0.000 0.008 0.000 0.000
#> GSM486841     1  0.1764     0.8619 0.928 0.000 0.064 0.008 0.000
#> GSM486843     1  0.2054     0.8565 0.916 0.004 0.072 0.008 0.000
#> GSM486845     3  0.7388     0.4522 0.060 0.392 0.396 0.152 0.000
#> GSM486847     1  0.0609     0.8687 0.980 0.000 0.020 0.000 0.000
#> GSM486849     2  0.2707     0.5623 0.000 0.860 0.008 0.132 0.000
#> GSM486851     5  0.0324     0.8647 0.004 0.000 0.000 0.004 0.992
#> GSM486853     2  0.1195     0.5990 0.000 0.960 0.012 0.028 0.000
#> GSM486855     2  0.2291     0.5879 0.000 0.908 0.056 0.036 0.000
#> GSM486857     2  0.5781     0.1438 0.032 0.616 0.296 0.056 0.000
#> GSM486736     4  0.2813     0.7506 0.000 0.168 0.000 0.832 0.000
#> GSM486738     2  0.1626     0.5997 0.000 0.940 0.016 0.044 0.000
#> GSM486740     4  0.7057     0.4826 0.000 0.332 0.088 0.496 0.084
#> GSM486742     2  0.2583     0.5628 0.000 0.864 0.004 0.132 0.000
#> GSM486744     2  0.4588     0.4385 0.000 0.720 0.060 0.220 0.000
#> GSM486746     4  0.7128     0.4609 0.000 0.344 0.088 0.480 0.088
#> GSM486748     1  0.7334    -0.3895 0.408 0.160 0.380 0.052 0.000
#> GSM486750     2  0.4489    -0.0773 0.000 0.572 0.008 0.420 0.000
#> GSM486752     3  0.7968     0.6062 0.272 0.228 0.404 0.096 0.000
#> GSM486754     2  0.4691     0.3588 0.000 0.680 0.044 0.276 0.000
#> GSM486756     2  0.4168     0.4735 0.000 0.756 0.044 0.200 0.000
#> GSM486758     3  0.5122     0.2116 0.312 0.000 0.628 0.060 0.000
#> GSM486760     1  0.1774     0.8637 0.932 0.016 0.052 0.000 0.000
#> GSM486762     1  0.4030     0.7367 0.736 0.008 0.248 0.008 0.000
#> GSM486764     5  0.0404     0.8617 0.000 0.000 0.012 0.000 0.988
#> GSM486766     1  0.1831     0.8612 0.920 0.000 0.076 0.004 0.000
#> GSM486768     2  0.8271    -0.0938 0.056 0.416 0.280 0.212 0.036
#> GSM486770     4  0.3010     0.7511 0.000 0.172 0.004 0.824 0.000
#> GSM486772     2  0.3863     0.4231 0.000 0.740 0.012 0.248 0.000
#> GSM486774     3  0.7724     0.5008 0.068 0.336 0.388 0.208 0.000
#> GSM486776     1  0.1121     0.8718 0.956 0.000 0.044 0.000 0.000
#> GSM486778     1  0.3548     0.8261 0.836 0.000 0.112 0.008 0.044
#> GSM486780     2  0.5759     0.3539 0.000 0.596 0.276 0.128 0.000
#> GSM486782     2  0.7409    -0.4658 0.056 0.392 0.388 0.164 0.000
#> GSM486784     2  0.0865     0.5996 0.000 0.972 0.004 0.024 0.000
#> GSM486786     1  0.2136     0.8547 0.904 0.000 0.088 0.008 0.000
#> GSM486788     1  0.1571     0.8612 0.936 0.004 0.060 0.000 0.000
#> GSM486790     4  0.4908     0.5727 0.000 0.356 0.036 0.608 0.000
#> GSM486792     5  0.3012     0.8130 0.124 0.000 0.024 0.000 0.852
#> GSM486794     1  0.3646     0.8232 0.828 0.000 0.120 0.008 0.044
#> GSM486796     1  0.6771     0.4460 0.648 0.140 0.124 0.048 0.040
#> GSM486798     3  0.8095     0.6403 0.180 0.260 0.416 0.144 0.000
#> GSM486800     1  0.0963     0.8701 0.964 0.000 0.036 0.000 0.000
#> GSM486802     1  0.2116     0.8650 0.924 0.008 0.052 0.004 0.012
#> GSM486804     1  0.2228     0.8458 0.900 0.004 0.092 0.004 0.000
#> GSM486806     3  0.7823     0.6248 0.140 0.292 0.440 0.128 0.000
#> GSM486808     1  0.3336     0.8199 0.832 0.016 0.144 0.008 0.000
#> GSM486810     4  0.3523     0.7093 0.000 0.120 0.004 0.832 0.044
#> GSM486812     1  0.2804     0.8557 0.880 0.004 0.096 0.008 0.012
#> GSM486814     2  0.3459     0.5814 0.000 0.844 0.080 0.072 0.004
#> GSM486816     1  0.3081     0.8193 0.832 0.000 0.156 0.012 0.000
#> GSM486818     3  0.7594     0.4973 0.256 0.220 0.472 0.036 0.016
#> GSM486821     5  0.6135     0.7244 0.048 0.100 0.084 0.056 0.712
#> GSM486823     4  0.3689     0.7210 0.000 0.256 0.004 0.740 0.000
#> GSM486826     1  0.1697     0.8603 0.932 0.000 0.060 0.008 0.000
#> GSM486830     3  0.7355     0.4693 0.052 0.376 0.408 0.164 0.000
#> GSM486832     1  0.2588     0.8620 0.900 0.008 0.068 0.004 0.020
#> GSM486834     3  0.7889     0.6409 0.156 0.180 0.472 0.192 0.000
#> GSM486836     1  0.1928     0.8574 0.920 0.004 0.072 0.004 0.000
#> GSM486838     2  0.6192    -0.0663 0.052 0.564 0.332 0.052 0.000
#> GSM486840     1  0.0290     0.8673 0.992 0.000 0.008 0.000 0.000
#> GSM486842     1  0.1764     0.8619 0.928 0.000 0.064 0.008 0.000
#> GSM486844     1  0.2354     0.8522 0.904 0.012 0.076 0.008 0.000
#> GSM486846     3  0.7388     0.4522 0.060 0.392 0.396 0.152 0.000
#> GSM486848     1  0.0609     0.8687 0.980 0.000 0.020 0.000 0.000
#> GSM486850     2  0.2707     0.5623 0.000 0.860 0.008 0.132 0.000
#> GSM486852     5  0.0324     0.8647 0.004 0.000 0.000 0.004 0.992
#> GSM486854     2  0.1195     0.5990 0.000 0.960 0.012 0.028 0.000
#> GSM486856     2  0.2291     0.5879 0.000 0.908 0.056 0.036 0.000
#> GSM486858     2  0.5471     0.2139 0.032 0.652 0.272 0.044 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
#> GSM486735     6  0.1327     0.7225 0.000 0.064 0.000 0.000 0.000 0.936
#> GSM486737     2  0.1857     0.5807 0.000 0.924 0.028 0.004 0.000 0.044
#> GSM486739     6  0.7044     0.4272 0.000 0.276 0.052 0.092 0.072 0.508
#> GSM486741     2  0.2768     0.5905 0.000 0.832 0.012 0.000 0.000 0.156
#> GSM486743     2  0.5019     0.4931 0.000 0.664 0.044 0.048 0.000 0.244
#> GSM486745     6  0.7149     0.4124 0.000 0.284 0.052 0.096 0.076 0.492
#> GSM486747     4  0.6563     0.4429 0.320 0.120 0.028 0.500 0.000 0.032
#> GSM486749     2  0.4211     0.0462 0.000 0.532 0.004 0.008 0.000 0.456
#> GSM486751     4  0.6889     0.6159 0.152 0.156 0.032 0.564 0.000 0.096
#> GSM486753     2  0.5028     0.4254 0.000 0.628 0.040 0.036 0.000 0.296
#> GSM486755     2  0.4523     0.5378 0.000 0.712 0.044 0.028 0.000 0.216
#> GSM486757     4  0.3926     0.1583 0.036 0.000 0.156 0.780 0.000 0.028
#> GSM486759     1  0.2151     0.8696 0.912 0.016 0.024 0.048 0.000 0.000
#> GSM486761     1  0.4892     0.6578 0.644 0.008 0.064 0.280 0.000 0.004
#> GSM486763     5  0.1285     0.8055 0.000 0.000 0.052 0.000 0.944 0.004
#> GSM486765     1  0.2263     0.8626 0.896 0.000 0.056 0.048 0.000 0.000
#> GSM486767     2  0.8185    -0.2233 0.016 0.332 0.120 0.292 0.024 0.216
#> GSM486769     6  0.1588     0.7262 0.000 0.072 0.000 0.004 0.000 0.924
#> GSM486771     2  0.3964     0.5009 0.000 0.724 0.016 0.016 0.000 0.244
#> GSM486773     4  0.6818     0.5817 0.024 0.236 0.028 0.480 0.000 0.232
#> GSM486775     1  0.1257     0.8781 0.952 0.000 0.028 0.020 0.000 0.000
#> GSM486777     1  0.4264     0.8091 0.776 0.000 0.072 0.108 0.044 0.000
#> GSM486779     3  0.4569     1.0000 0.000 0.304 0.636 0.060 0.000 0.000
#> GSM486781     4  0.6801     0.5548 0.028 0.292 0.024 0.468 0.000 0.188
#> GSM486783     2  0.0909     0.5596 0.000 0.968 0.020 0.000 0.000 0.012
#> GSM486785     1  0.2511     0.8596 0.880 0.000 0.064 0.056 0.000 0.000
#> GSM486787     1  0.1934     0.8660 0.916 0.000 0.040 0.044 0.000 0.000
#> GSM486789     6  0.4334     0.5597 0.000 0.268 0.016 0.028 0.000 0.688
#> GSM486791     5  0.3033     0.7571 0.108 0.000 0.032 0.012 0.848 0.000
#> GSM486793     1  0.4463     0.8033 0.768 0.000 0.080 0.104 0.044 0.004
#> GSM486795     1  0.6905     0.4829 0.620 0.100 0.076 0.124 0.032 0.048
#> GSM486797     4  0.6754     0.6513 0.084 0.148 0.028 0.572 0.000 0.168
#> GSM486799     1  0.0993     0.8765 0.964 0.000 0.012 0.024 0.000 0.000
#> GSM486801     1  0.2501     0.8675 0.896 0.004 0.048 0.040 0.012 0.000
#> GSM486803     1  0.2714     0.8477 0.872 0.000 0.064 0.060 0.000 0.004
#> GSM486805     4  0.6507     0.6571 0.072 0.168 0.020 0.588 0.000 0.152
#> GSM486807     1  0.3708     0.8200 0.800 0.008 0.052 0.136 0.000 0.004
#> GSM486809     6  0.1768     0.6635 0.000 0.012 0.008 0.012 0.032 0.936
#> GSM486811     1  0.3007     0.8619 0.864 0.004 0.056 0.064 0.012 0.000
#> GSM486813     2  0.3659     0.5428 0.000 0.824 0.068 0.064 0.000 0.044
#> GSM486815     1  0.4601     0.7188 0.688 0.000 0.112 0.200 0.000 0.000
#> GSM486817     4  0.7238     0.3883 0.148 0.184 0.144 0.504 0.000 0.020
#> GSM486819     5  0.6068     0.6558 0.028 0.064 0.084 0.072 0.696 0.056
#> GSM486822     6  0.2845     0.6968 0.000 0.172 0.004 0.004 0.000 0.820
#> GSM486824     1  0.1984     0.8634 0.912 0.000 0.056 0.032 0.000 0.000
#> GSM486828     4  0.6424     0.5685 0.020 0.288 0.016 0.504 0.000 0.172
#> GSM486831     1  0.2749     0.8682 0.884 0.004 0.044 0.048 0.020 0.000
#> GSM486833     4  0.6020     0.6191 0.040 0.108 0.032 0.636 0.000 0.184
#> GSM486835     1  0.2325     0.8588 0.892 0.000 0.060 0.048 0.000 0.000
#> GSM486837     2  0.6775    -0.2984 0.052 0.432 0.080 0.396 0.000 0.040
#> GSM486839     1  0.0363     0.8743 0.988 0.000 0.012 0.000 0.000 0.000
#> GSM486841     1  0.2066     0.8649 0.908 0.000 0.052 0.040 0.000 0.000
#> GSM486843     1  0.2328     0.8590 0.892 0.000 0.056 0.052 0.000 0.000
#> GSM486845     4  0.6547     0.5575 0.024 0.300 0.024 0.500 0.000 0.152
#> GSM486847     1  0.0717     0.8751 0.976 0.000 0.016 0.008 0.000 0.000
#> GSM486849     2  0.2905     0.5917 0.000 0.836 0.012 0.008 0.000 0.144
#> GSM486851     5  0.0291     0.8179 0.004 0.000 0.000 0.000 0.992 0.004
#> GSM486853     2  0.2340     0.5372 0.000 0.900 0.060 0.016 0.000 0.024
#> GSM486855     2  0.3054     0.4715 0.000 0.852 0.096 0.036 0.000 0.016
#> GSM486857     2  0.5870     0.0507 0.016 0.552 0.052 0.336 0.000 0.044
#> GSM486736     6  0.1327     0.7225 0.000 0.064 0.000 0.000 0.000 0.936
#> GSM486738     2  0.1857     0.5807 0.000 0.924 0.028 0.004 0.000 0.044
#> GSM486740     6  0.7044     0.4272 0.000 0.276 0.052 0.092 0.072 0.508
#> GSM486742     2  0.2692     0.5889 0.000 0.840 0.012 0.000 0.000 0.148
#> GSM486744     2  0.4973     0.5033 0.000 0.672 0.044 0.048 0.000 0.236
#> GSM486746     6  0.7149     0.4124 0.000 0.284 0.052 0.096 0.076 0.492
#> GSM486748     4  0.6637     0.4191 0.340 0.124 0.032 0.476 0.000 0.028
#> GSM486750     2  0.4211     0.0462 0.000 0.532 0.004 0.008 0.000 0.456
#> GSM486752     4  0.6871     0.5842 0.200 0.176 0.020 0.532 0.000 0.072
#> GSM486754     2  0.5028     0.4254 0.000 0.628 0.040 0.036 0.000 0.296
#> GSM486756     2  0.4523     0.5378 0.000 0.712 0.044 0.028 0.000 0.216
#> GSM486758     4  0.3926     0.1583 0.036 0.000 0.156 0.780 0.000 0.028
#> GSM486760     1  0.2084     0.8701 0.916 0.016 0.024 0.044 0.000 0.000
#> GSM486762     1  0.4892     0.6578 0.644 0.008 0.064 0.280 0.000 0.004
#> GSM486764     5  0.1285     0.8055 0.000 0.000 0.052 0.000 0.944 0.004
#> GSM486766     1  0.2263     0.8626 0.896 0.000 0.056 0.048 0.000 0.000
#> GSM486768     2  0.8178    -0.2220 0.016 0.332 0.120 0.296 0.024 0.212
#> GSM486770     6  0.1588     0.7262 0.000 0.072 0.000 0.004 0.000 0.924
#> GSM486772     2  0.3964     0.5009 0.000 0.724 0.016 0.016 0.000 0.244
#> GSM486774     4  0.6759     0.5895 0.028 0.248 0.024 0.492 0.000 0.208
#> GSM486776     1  0.1257     0.8781 0.952 0.000 0.028 0.020 0.000 0.000
#> GSM486778     1  0.4264     0.8091 0.776 0.000 0.072 0.108 0.044 0.000
#> GSM486780     3  0.4569     1.0000 0.000 0.304 0.636 0.060 0.000 0.000
#> GSM486782     4  0.6723     0.5450 0.028 0.304 0.024 0.476 0.000 0.168
#> GSM486784     2  0.0909     0.5596 0.000 0.968 0.020 0.000 0.000 0.012
#> GSM486786     1  0.2511     0.8596 0.880 0.000 0.064 0.056 0.000 0.000
#> GSM486788     1  0.1865     0.8658 0.920 0.000 0.040 0.040 0.000 0.000
#> GSM486790     6  0.4334     0.5597 0.000 0.268 0.016 0.028 0.000 0.688
#> GSM486792     5  0.3033     0.7571 0.108 0.000 0.032 0.012 0.848 0.000
#> GSM486794     1  0.4463     0.8033 0.768 0.000 0.080 0.104 0.044 0.004
#> GSM486796     1  0.6905     0.4829 0.620 0.100 0.076 0.124 0.032 0.048
#> GSM486798     4  0.6746     0.6434 0.084 0.192 0.024 0.564 0.000 0.136
#> GSM486800     1  0.0993     0.8765 0.964 0.000 0.012 0.024 0.000 0.000
#> GSM486802     1  0.2501     0.8675 0.896 0.004 0.048 0.040 0.012 0.000
#> GSM486804     1  0.2653     0.8479 0.876 0.000 0.064 0.056 0.000 0.004
#> GSM486806     4  0.6427     0.6411 0.072 0.224 0.012 0.572 0.000 0.120
#> GSM486808     1  0.3708     0.8200 0.800 0.008 0.052 0.136 0.000 0.004
#> GSM486810     6  0.1768     0.6635 0.000 0.012 0.008 0.012 0.032 0.936
#> GSM486812     1  0.3007     0.8619 0.864 0.004 0.056 0.064 0.012 0.000
#> GSM486814     2  0.3659     0.5428 0.000 0.824 0.068 0.064 0.000 0.044
#> GSM486816     1  0.4601     0.7188 0.688 0.000 0.112 0.200 0.000 0.000
#> GSM486818     4  0.7238     0.3883 0.148 0.184 0.144 0.504 0.000 0.020
#> GSM486821     5  0.6068     0.6558 0.028 0.064 0.084 0.072 0.696 0.056
#> GSM486823     6  0.2845     0.6968 0.000 0.172 0.004 0.004 0.000 0.820
#> GSM486826     1  0.1984     0.8634 0.912 0.000 0.056 0.032 0.000 0.000
#> GSM486830     4  0.6424     0.5685 0.020 0.288 0.016 0.504 0.000 0.172
#> GSM486832     1  0.2749     0.8682 0.884 0.004 0.044 0.048 0.020 0.000
#> GSM486834     4  0.5951     0.6199 0.040 0.108 0.028 0.640 0.000 0.184
#> GSM486836     1  0.2325     0.8588 0.892 0.000 0.060 0.048 0.000 0.000
#> GSM486838     2  0.6364    -0.1987 0.032 0.476 0.092 0.376 0.000 0.024
#> GSM486840     1  0.0363     0.8743 0.988 0.000 0.012 0.000 0.000 0.000
#> GSM486842     1  0.2066     0.8649 0.908 0.000 0.052 0.040 0.000 0.000
#> GSM486844     1  0.2644     0.8551 0.880 0.008 0.060 0.052 0.000 0.000
#> GSM486846     4  0.6547     0.5575 0.024 0.300 0.024 0.500 0.000 0.152
#> GSM486848     1  0.0717     0.8751 0.976 0.000 0.016 0.008 0.000 0.000
#> GSM486850     2  0.2905     0.5917 0.000 0.836 0.012 0.008 0.000 0.144
#> GSM486852     5  0.0291     0.8179 0.004 0.000 0.000 0.000 0.992 0.004
#> GSM486854     2  0.2340     0.5372 0.000 0.900 0.060 0.016 0.000 0.024
#> GSM486856     2  0.3054     0.4715 0.000 0.852 0.096 0.036 0.000 0.016
#> GSM486858     2  0.5666     0.1265 0.016 0.584 0.056 0.312 0.000 0.032

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)

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 agent(p) individual(p) k
#> MAD:hclust 108    1.000      1.24e-05 2
#> MAD:hclust 108    1.000      1.61e-09 3
#> MAD:hclust  68    1.000      9.01e-07 4
#> MAD:hclust  83    0.999      1.81e-13 5
#> MAD:hclust  95    1.000      2.21e-18 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 120 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.922           0.913       0.950         0.5032 0.498   0.498
#> 3 3 0.511           0.585       0.741         0.2774 0.913   0.826
#> 4 4 0.520           0.298       0.576         0.1311 0.756   0.472
#> 5 5 0.561           0.457       0.646         0.0707 0.783   0.375
#> 6 6 0.618           0.548       0.658         0.0411 0.898   0.586

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
#> GSM486735     2  0.0000      0.973 0.000 1.000
#> GSM486737     2  0.0376      0.973 0.004 0.996
#> GSM486739     2  0.0376      0.973 0.004 0.996
#> GSM486741     2  0.0000      0.973 0.000 1.000
#> GSM486743     2  0.0376      0.973 0.004 0.996
#> GSM486745     2  0.0376      0.973 0.004 0.996
#> GSM486747     1  0.2778      0.925 0.952 0.048
#> GSM486749     2  0.0000      0.973 0.000 1.000
#> GSM486751     1  0.7453      0.783 0.788 0.212
#> GSM486753     2  0.0376      0.973 0.004 0.996
#> GSM486755     2  0.0376      0.973 0.004 0.996
#> GSM486757     1  0.2778      0.925 0.952 0.048
#> GSM486759     1  0.2603      0.925 0.956 0.044
#> GSM486761     1  0.2778      0.925 0.952 0.048
#> GSM486763     1  0.5946      0.856 0.856 0.144
#> GSM486765     1  0.2778      0.925 0.952 0.048
#> GSM486767     2  0.0376      0.973 0.004 0.996
#> GSM486769     2  0.0000      0.973 0.000 1.000
#> GSM486771     2  0.0376      0.973 0.004 0.996
#> GSM486773     2  0.0000      0.973 0.000 1.000
#> GSM486775     1  0.2603      0.925 0.956 0.044
#> GSM486777     1  0.2778      0.925 0.952 0.048
#> GSM486779     2  0.0376      0.973 0.004 0.996
#> GSM486781     2  0.0000      0.973 0.000 1.000
#> GSM486783     2  0.0376      0.973 0.004 0.996
#> GSM486785     1  0.2778      0.925 0.952 0.048
#> GSM486787     1  0.2603      0.925 0.956 0.044
#> GSM486789     2  0.0000      0.973 0.000 1.000
#> GSM486791     1  0.2603      0.925 0.956 0.044
#> GSM486793     1  0.2778      0.925 0.952 0.048
#> GSM486795     1  0.2603      0.925 0.956 0.044
#> GSM486797     1  0.9850      0.404 0.572 0.428
#> GSM486799     1  0.2603      0.925 0.956 0.044
#> GSM486801     1  0.2603      0.925 0.956 0.044
#> GSM486803     1  0.2603      0.925 0.956 0.044
#> GSM486805     2  0.0000      0.973 0.000 1.000
#> GSM486807     1  0.2778      0.925 0.952 0.048
#> GSM486809     2  0.0000      0.973 0.000 1.000
#> GSM486811     1  0.2778      0.925 0.952 0.048
#> GSM486813     2  0.0376      0.973 0.004 0.996
#> GSM486815     1  0.2778      0.925 0.952 0.048
#> GSM486817     1  0.9983      0.260 0.524 0.476
#> GSM486819     1  0.7815      0.757 0.768 0.232
#> GSM486822     2  0.0000      0.973 0.000 1.000
#> GSM486824     1  0.2603      0.925 0.956 0.044
#> GSM486828     2  0.0000      0.973 0.000 1.000
#> GSM486831     1  0.2603      0.925 0.956 0.044
#> GSM486833     1  0.9608      0.507 0.616 0.384
#> GSM486835     1  0.2603      0.925 0.956 0.044
#> GSM486837     2  0.0000      0.973 0.000 1.000
#> GSM486839     1  0.2603      0.925 0.956 0.044
#> GSM486841     1  0.2778      0.925 0.952 0.048
#> GSM486843     1  0.2603      0.925 0.956 0.044
#> GSM486845     2  0.0000      0.973 0.000 1.000
#> GSM486847     1  0.2603      0.925 0.956 0.044
#> GSM486849     2  0.0000      0.973 0.000 1.000
#> GSM486851     1  0.2603      0.925 0.956 0.044
#> GSM486853     2  0.0000      0.973 0.000 1.000
#> GSM486855     2  0.0376      0.973 0.004 0.996
#> GSM486857     2  0.0000      0.973 0.000 1.000
#> GSM486736     2  0.2603      0.973 0.044 0.956
#> GSM486738     2  0.2778      0.973 0.048 0.952
#> GSM486740     2  0.2778      0.973 0.048 0.952
#> GSM486742     2  0.2603      0.973 0.044 0.956
#> GSM486744     2  0.2778      0.973 0.048 0.952
#> GSM486746     2  0.2778      0.973 0.048 0.952
#> GSM486748     1  0.0376      0.925 0.996 0.004
#> GSM486750     2  0.2603      0.973 0.044 0.956
#> GSM486752     1  0.2948      0.899 0.948 0.052
#> GSM486754     2  0.2778      0.973 0.048 0.952
#> GSM486756     2  0.2778      0.973 0.048 0.952
#> GSM486758     1  0.0376      0.925 0.996 0.004
#> GSM486760     1  0.0000      0.926 1.000 0.000
#> GSM486762     1  0.0376      0.925 0.996 0.004
#> GSM486764     1  0.3431      0.888 0.936 0.064
#> GSM486766     1  0.0376      0.925 0.996 0.004
#> GSM486768     2  0.2778      0.973 0.048 0.952
#> GSM486770     2  0.2603      0.973 0.044 0.956
#> GSM486772     2  0.2778      0.973 0.048 0.952
#> GSM486774     2  0.2603      0.973 0.044 0.956
#> GSM486776     1  0.0000      0.926 1.000 0.000
#> GSM486778     1  0.0376      0.925 0.996 0.004
#> GSM486780     2  0.2778      0.973 0.048 0.952
#> GSM486782     2  0.2603      0.973 0.044 0.956
#> GSM486784     2  0.2778      0.973 0.048 0.952
#> GSM486786     1  0.0376      0.925 0.996 0.004
#> GSM486788     1  0.0000      0.926 1.000 0.000
#> GSM486790     2  0.2603      0.973 0.044 0.956
#> GSM486792     1  0.0000      0.926 1.000 0.000
#> GSM486794     1  0.0376      0.925 0.996 0.004
#> GSM486796     1  0.0000      0.926 1.000 0.000
#> GSM486798     1  0.9988      0.105 0.520 0.480
#> GSM486800     1  0.0000      0.926 1.000 0.000
#> GSM486802     1  0.0000      0.926 1.000 0.000
#> GSM486804     1  0.0000      0.926 1.000 0.000
#> GSM486806     2  0.2603      0.973 0.044 0.956
#> GSM486808     1  0.0376      0.925 0.996 0.004
#> GSM486810     2  0.2603      0.973 0.044 0.956
#> GSM486812     1  0.0376      0.925 0.996 0.004
#> GSM486814     2  0.2778      0.973 0.048 0.952
#> GSM486816     1  0.0376      0.925 0.996 0.004
#> GSM486818     1  0.9661      0.375 0.608 0.392
#> GSM486821     1  0.8267      0.651 0.740 0.260
#> GSM486823     2  0.2603      0.973 0.044 0.956
#> GSM486826     1  0.0000      0.926 1.000 0.000
#> GSM486830     2  0.2603      0.973 0.044 0.956
#> GSM486832     1  0.0000      0.926 1.000 0.000
#> GSM486834     1  0.9209      0.516 0.664 0.336
#> GSM486836     1  0.0000      0.926 1.000 0.000
#> GSM486838     2  0.2603      0.973 0.044 0.956
#> GSM486840     1  0.0000      0.926 1.000 0.000
#> GSM486842     1  0.0376      0.925 0.996 0.004
#> GSM486844     1  0.0000      0.926 1.000 0.000
#> GSM486846     2  0.2603      0.973 0.044 0.956
#> GSM486848     1  0.0000      0.926 1.000 0.000
#> GSM486850     2  0.2603      0.973 0.044 0.956
#> GSM486852     1  0.0000      0.926 1.000 0.000
#> GSM486854     2  0.2603      0.973 0.044 0.956
#> GSM486856     2  0.2778      0.973 0.048 0.952
#> GSM486858     2  0.2603      0.973 0.044 0.956

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM486735     2  0.6274    0.58210 0.456 0.544 0.000
#> GSM486737     2  0.4062    0.73566 0.164 0.836 0.000
#> GSM486739     2  0.6267    0.56854 0.452 0.548 0.000
#> GSM486741     2  0.4235    0.73683 0.176 0.824 0.000
#> GSM486743     2  0.4346    0.73221 0.184 0.816 0.000
#> GSM486745     2  0.6168    0.62035 0.412 0.588 0.000
#> GSM486747     3  0.6235    0.44130 0.436 0.000 0.564
#> GSM486749     2  0.5291    0.72885 0.268 0.732 0.000
#> GSM486751     1  0.6723    0.49950 0.704 0.048 0.248
#> GSM486753     2  0.4796    0.73060 0.220 0.780 0.000
#> GSM486755     2  0.4555    0.73196 0.200 0.800 0.000
#> GSM486757     1  0.5363    0.40686 0.724 0.000 0.276
#> GSM486759     3  0.5216    0.64191 0.260 0.000 0.740
#> GSM486761     3  0.5591    0.62616 0.304 0.000 0.696
#> GSM486763     1  0.5267    0.55124 0.816 0.044 0.140
#> GSM486765     3  0.5465    0.63597 0.288 0.000 0.712
#> GSM486767     2  0.6180    0.61549 0.416 0.584 0.000
#> GSM486769     2  0.6260    0.59521 0.448 0.552 0.000
#> GSM486771     2  0.4291    0.73258 0.180 0.820 0.000
#> GSM486773     2  0.6307    0.55308 0.488 0.512 0.000
#> GSM486775     3  0.5178    0.64221 0.256 0.000 0.744
#> GSM486777     3  0.5621    0.62741 0.308 0.000 0.692
#> GSM486779     2  0.4178    0.73585 0.172 0.828 0.000
#> GSM486781     2  0.6168    0.63341 0.412 0.588 0.000
#> GSM486783     2  0.4062    0.73566 0.164 0.836 0.000
#> GSM486785     3  0.5465    0.63597 0.288 0.000 0.712
#> GSM486787     3  0.5178    0.64221 0.256 0.000 0.744
#> GSM486789     2  0.5465    0.72291 0.288 0.712 0.000
#> GSM486791     3  0.6235    0.43591 0.436 0.000 0.564
#> GSM486793     3  0.5706    0.62022 0.320 0.000 0.680
#> GSM486795     3  0.6813    0.19768 0.468 0.012 0.520
#> GSM486797     1  0.7004    0.60347 0.728 0.112 0.160
#> GSM486799     3  0.5178    0.64221 0.256 0.000 0.744
#> GSM486801     3  0.5216    0.64191 0.260 0.000 0.740
#> GSM486803     3  0.5216    0.64191 0.260 0.000 0.740
#> GSM486805     1  0.5327    0.22508 0.728 0.272 0.000
#> GSM486807     3  0.5560    0.62894 0.300 0.000 0.700
#> GSM486809     1  0.6305   -0.55088 0.516 0.484 0.000
#> GSM486811     3  0.5431    0.63740 0.284 0.000 0.716
#> GSM486813     2  0.4291    0.73456 0.180 0.820 0.000
#> GSM486815     3  0.5678    0.62327 0.316 0.000 0.684
#> GSM486817     1  0.7710    0.60831 0.680 0.144 0.176
#> GSM486819     1  0.4779    0.58041 0.840 0.036 0.124
#> GSM486822     2  0.5810    0.70116 0.336 0.664 0.000
#> GSM486824     3  0.5216    0.64191 0.260 0.000 0.740
#> GSM486828     2  0.6302    0.55859 0.480 0.520 0.000
#> GSM486831     3  0.5216    0.64191 0.260 0.000 0.740
#> GSM486833     1  0.5744    0.61982 0.800 0.072 0.128
#> GSM486835     3  0.5216    0.64191 0.260 0.000 0.740
#> GSM486837     2  0.6079    0.59428 0.388 0.612 0.000
#> GSM486839     3  0.5178    0.64221 0.256 0.000 0.744
#> GSM486841     3  0.5431    0.63740 0.284 0.000 0.716
#> GSM486843     3  0.5216    0.64191 0.260 0.000 0.740
#> GSM486845     2  0.5948    0.67087 0.360 0.640 0.000
#> GSM486847     3  0.5178    0.64221 0.256 0.000 0.744
#> GSM486849     2  0.4504    0.73831 0.196 0.804 0.000
#> GSM486851     1  0.6008    0.18228 0.664 0.004 0.332
#> GSM486853     2  0.4452    0.73693 0.192 0.808 0.000
#> GSM486855     2  0.4178    0.73585 0.172 0.828 0.000
#> GSM486857     2  0.5905    0.65941 0.352 0.648 0.000
#> GSM486736     2  0.5497    0.62612 0.292 0.708 0.000
#> GSM486738     2  0.0000    0.74873 0.000 1.000 0.000
#> GSM486740     2  0.5465    0.61583 0.288 0.712 0.000
#> GSM486742     2  0.0592    0.74961 0.012 0.988 0.000
#> GSM486744     2  0.0000    0.74873 0.000 1.000 0.000
#> GSM486746     2  0.4842    0.67760 0.224 0.776 0.000
#> GSM486748     3  0.7348    0.34950 0.176 0.120 0.704
#> GSM486750     2  0.2878    0.74839 0.096 0.904 0.000
#> GSM486752     3  0.8924    0.00833 0.268 0.172 0.560
#> GSM486754     2  0.1163    0.74927 0.028 0.972 0.000
#> GSM486756     2  0.1031    0.74900 0.024 0.976 0.000
#> GSM486758     3  0.8172    0.18094 0.272 0.112 0.616
#> GSM486760     3  0.0237    0.68646 0.004 0.000 0.996
#> GSM486762     3  0.1753    0.67458 0.048 0.000 0.952
#> GSM486764     3  0.9213   -0.21606 0.396 0.152 0.452
#> GSM486766     3  0.1289    0.68177 0.032 0.000 0.968
#> GSM486768     2  0.4654    0.68615 0.208 0.792 0.000
#> GSM486770     2  0.5327    0.64527 0.272 0.728 0.000
#> GSM486772     2  0.0237    0.74864 0.004 0.996 0.000
#> GSM486774     2  0.5431    0.63116 0.284 0.716 0.000
#> GSM486776     3  0.0000    0.68653 0.000 0.000 1.000
#> GSM486778     3  0.1753    0.67761 0.048 0.000 0.952
#> GSM486780     2  0.0424    0.74869 0.008 0.992 0.000
#> GSM486782     2  0.4750    0.68267 0.216 0.784 0.000
#> GSM486784     2  0.0000    0.74873 0.000 1.000 0.000
#> GSM486786     3  0.1289    0.68177 0.032 0.000 0.968
#> GSM486788     3  0.0237    0.68646 0.004 0.000 0.996
#> GSM486790     2  0.3192    0.74483 0.112 0.888 0.000
#> GSM486792     3  0.4291    0.52968 0.180 0.000 0.820
#> GSM486794     3  0.2066    0.67280 0.060 0.000 0.940
#> GSM486796     3  0.5524    0.45803 0.040 0.164 0.796
#> GSM486798     3  0.9887   -0.29104 0.268 0.336 0.396
#> GSM486800     3  0.0000    0.68653 0.000 0.000 1.000
#> GSM486802     3  0.0237    0.68646 0.004 0.000 0.996
#> GSM486804     3  0.0237    0.68646 0.004 0.000 0.996
#> GSM486806     2  0.8212    0.42816 0.296 0.600 0.104
#> GSM486808     3  0.1860    0.67208 0.052 0.000 0.948
#> GSM486810     2  0.5882    0.56357 0.348 0.652 0.000
#> GSM486812     3  0.1163    0.68286 0.028 0.000 0.972
#> GSM486814     2  0.0592    0.74836 0.012 0.988 0.000
#> GSM486816     3  0.2066    0.67280 0.060 0.000 0.940
#> GSM486818     3  0.9767   -0.28751 0.248 0.320 0.432
#> GSM486821     1  0.9620    0.22935 0.416 0.204 0.380
#> GSM486823     2  0.4062    0.72476 0.164 0.836 0.000
#> GSM486826     3  0.0237    0.68646 0.004 0.000 0.996
#> GSM486830     2  0.5465    0.62383 0.288 0.712 0.000
#> GSM486832     3  0.0237    0.68646 0.004 0.000 0.996
#> GSM486834     3  0.9789   -0.29224 0.368 0.236 0.396
#> GSM486836     3  0.0237    0.68646 0.004 0.000 0.996
#> GSM486838     2  0.6572    0.58053 0.172 0.748 0.080
#> GSM486840     3  0.0000    0.68653 0.000 0.000 1.000
#> GSM486842     3  0.1163    0.68286 0.028 0.000 0.972
#> GSM486844     3  0.0237    0.68646 0.004 0.000 0.996
#> GSM486846     2  0.4235    0.70007 0.176 0.824 0.000
#> GSM486848     3  0.0000    0.68653 0.000 0.000 1.000
#> GSM486850     2  0.1411    0.75016 0.036 0.964 0.000
#> GSM486852     3  0.7705    0.08247 0.348 0.060 0.592
#> GSM486854     2  0.1163    0.74938 0.028 0.972 0.000
#> GSM486856     2  0.0424    0.74869 0.008 0.992 0.000
#> GSM486858     2  0.4062    0.69453 0.164 0.836 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM486735     2  0.7197     0.0546 0.000 0.468 0.140 0.392
#> GSM486737     2  0.0336     0.5031 0.000 0.992 0.008 0.000
#> GSM486739     2  0.6983     0.0955 0.000 0.516 0.124 0.360
#> GSM486741     2  0.1174     0.5019 0.000 0.968 0.020 0.012
#> GSM486743     2  0.1807     0.4967 0.000 0.940 0.008 0.052
#> GSM486745     2  0.6249     0.1982 0.000 0.592 0.072 0.336
#> GSM486747     1  0.6307     0.3948 0.672 0.016 0.080 0.232
#> GSM486749     2  0.5392     0.3112 0.000 0.680 0.040 0.280
#> GSM486751     1  0.8733     0.2192 0.452 0.144 0.084 0.320
#> GSM486753     2  0.4137     0.3919 0.000 0.780 0.012 0.208
#> GSM486755     2  0.3032     0.4529 0.000 0.868 0.008 0.124
#> GSM486757     1  0.8593     0.2874 0.488 0.108 0.108 0.296
#> GSM486759     1  0.0000     0.5629 1.000 0.000 0.000 0.000
#> GSM486761     1  0.2984     0.5453 0.888 0.000 0.084 0.028
#> GSM486763     1  0.9225     0.1821 0.376 0.088 0.316 0.220
#> GSM486765     1  0.2198     0.5523 0.920 0.000 0.072 0.008
#> GSM486767     2  0.5883     0.2218 0.000 0.640 0.060 0.300
#> GSM486769     2  0.7090     0.0895 0.000 0.496 0.132 0.372
#> GSM486771     2  0.1305     0.5006 0.000 0.960 0.004 0.036
#> GSM486773     4  0.5594    -0.0912 0.000 0.460 0.020 0.520
#> GSM486775     1  0.0336     0.5632 0.992 0.000 0.008 0.000
#> GSM486777     1  0.2542     0.5531 0.904 0.000 0.084 0.012
#> GSM486779     2  0.0927     0.4987 0.000 0.976 0.008 0.016
#> GSM486781     2  0.5364     0.1441 0.000 0.592 0.016 0.392
#> GSM486783     2  0.0188     0.5030 0.000 0.996 0.004 0.000
#> GSM486785     1  0.2048     0.5541 0.928 0.000 0.064 0.008
#> GSM486787     1  0.0000     0.5629 1.000 0.000 0.000 0.000
#> GSM486789     2  0.5972     0.2577 0.000 0.632 0.064 0.304
#> GSM486791     1  0.6523     0.3296 0.628 0.000 0.236 0.136
#> GSM486793     1  0.3047     0.5439 0.872 0.000 0.116 0.012
#> GSM486795     1  0.5977     0.4439 0.744 0.128 0.044 0.084
#> GSM486797     1  0.9220     0.0686 0.364 0.228 0.084 0.324
#> GSM486799     1  0.0000     0.5629 1.000 0.000 0.000 0.000
#> GSM486801     1  0.0524     0.5635 0.988 0.000 0.008 0.004
#> GSM486803     1  0.0657     0.5634 0.984 0.000 0.012 0.004
#> GSM486805     4  0.8890     0.0331 0.288 0.296 0.048 0.368
#> GSM486807     1  0.2984     0.5453 0.888 0.000 0.084 0.028
#> GSM486809     4  0.7314    -0.0739 0.000 0.424 0.152 0.424
#> GSM486811     1  0.2048     0.5541 0.928 0.000 0.064 0.008
#> GSM486813     2  0.0657     0.5011 0.000 0.984 0.012 0.004
#> GSM486815     1  0.2675     0.5478 0.892 0.000 0.100 0.008
#> GSM486817     1  0.8673     0.0965 0.428 0.244 0.044 0.284
#> GSM486819     1  0.9000     0.2398 0.440 0.080 0.228 0.252
#> GSM486822     2  0.6222     0.2362 0.000 0.616 0.080 0.304
#> GSM486824     1  0.0376     0.5625 0.992 0.000 0.004 0.004
#> GSM486828     2  0.5508     0.1192 0.000 0.572 0.020 0.408
#> GSM486831     1  0.0524     0.5635 0.988 0.000 0.008 0.004
#> GSM486833     1  0.9185     0.0722 0.360 0.204 0.088 0.348
#> GSM486835     1  0.0524     0.5635 0.988 0.000 0.008 0.004
#> GSM486837     2  0.6557     0.1514 0.060 0.628 0.024 0.288
#> GSM486839     1  0.0000     0.5629 1.000 0.000 0.000 0.000
#> GSM486841     1  0.1970     0.5551 0.932 0.000 0.060 0.008
#> GSM486843     1  0.0657     0.5635 0.984 0.000 0.012 0.004
#> GSM486845     2  0.5038     0.2052 0.000 0.652 0.012 0.336
#> GSM486847     1  0.0000     0.5629 1.000 0.000 0.000 0.000
#> GSM486849     2  0.2111     0.4926 0.000 0.932 0.024 0.044
#> GSM486851     1  0.7905     0.2486 0.480 0.012 0.292 0.216
#> GSM486853     2  0.1820     0.4929 0.000 0.944 0.020 0.036
#> GSM486855     2  0.0804     0.5011 0.000 0.980 0.008 0.012
#> GSM486857     2  0.4957     0.2240 0.000 0.684 0.016 0.300
#> GSM486736     4  0.6993     0.2756 0.000 0.260 0.168 0.572
#> GSM486738     2  0.4482     0.2932 0.000 0.728 0.008 0.264
#> GSM486740     4  0.7066     0.2610 0.000 0.304 0.152 0.544
#> GSM486742     2  0.4855     0.2894 0.000 0.712 0.020 0.268
#> GSM486744     2  0.4776     0.2795 0.000 0.712 0.016 0.272
#> GSM486746     4  0.6634     0.2598 0.000 0.336 0.100 0.564
#> GSM486748     3  0.6815     0.4748 0.136 0.000 0.580 0.284
#> GSM486750     4  0.6323     0.0991 0.000 0.440 0.060 0.500
#> GSM486752     3  0.5915     0.3883 0.036 0.004 0.592 0.368
#> GSM486754     2  0.5517     0.0861 0.000 0.568 0.020 0.412
#> GSM486756     2  0.5284     0.1739 0.000 0.616 0.016 0.368
#> GSM486758     3  0.5898     0.4580 0.056 0.000 0.628 0.316
#> GSM486760     1  0.4996    -0.5197 0.516 0.000 0.484 0.000
#> GSM486762     3  0.5508     0.5531 0.408 0.000 0.572 0.020
#> GSM486764     3  0.6138     0.3424 0.072 0.028 0.708 0.192
#> GSM486766     3  0.5112     0.5449 0.436 0.000 0.560 0.004
#> GSM486768     4  0.6743     0.2535 0.000 0.392 0.096 0.512
#> GSM486770     4  0.7067     0.2695 0.000 0.288 0.160 0.552
#> GSM486772     2  0.4193     0.2945 0.000 0.732 0.000 0.268
#> GSM486774     4  0.5716     0.3485 0.000 0.252 0.068 0.680
#> GSM486776     1  0.4999    -0.5256 0.508 0.000 0.492 0.000
#> GSM486778     3  0.5088     0.5504 0.424 0.000 0.572 0.004
#> GSM486780     2  0.4690     0.2816 0.000 0.712 0.012 0.276
#> GSM486782     4  0.6163     0.2788 0.000 0.364 0.060 0.576
#> GSM486784     2  0.4343     0.2931 0.000 0.732 0.004 0.264
#> GSM486786     3  0.5126     0.5427 0.444 0.000 0.552 0.004
#> GSM486788     1  0.5296    -0.5386 0.496 0.000 0.496 0.008
#> GSM486790     4  0.6702     0.1707 0.000 0.396 0.092 0.512
#> GSM486792     3  0.6560     0.4025 0.248 0.000 0.620 0.132
#> GSM486794     3  0.5028     0.5538 0.400 0.000 0.596 0.004
#> GSM486796     3  0.7048     0.5297 0.288 0.004 0.568 0.140
#> GSM486798     4  0.6536    -0.1265 0.020 0.036 0.456 0.488
#> GSM486800     1  0.4996    -0.5197 0.516 0.000 0.484 0.000
#> GSM486802     1  0.5168    -0.5279 0.504 0.000 0.492 0.004
#> GSM486804     3  0.5295     0.5147 0.488 0.000 0.504 0.008
#> GSM486806     4  0.6617     0.3153 0.000 0.128 0.264 0.608
#> GSM486808     3  0.5793     0.5594 0.384 0.000 0.580 0.036
#> GSM486810     4  0.6941     0.2938 0.000 0.220 0.192 0.588
#> GSM486812     3  0.5126     0.5427 0.444 0.000 0.552 0.004
#> GSM486814     2  0.4720     0.2841 0.000 0.720 0.016 0.264
#> GSM486816     3  0.5050     0.5529 0.408 0.000 0.588 0.004
#> GSM486818     3  0.7827     0.2764 0.084 0.056 0.496 0.364
#> GSM486821     3  0.7243     0.1979 0.072 0.040 0.568 0.320
#> GSM486823     4  0.6859     0.1888 0.000 0.380 0.108 0.512
#> GSM486826     1  0.5165    -0.5226 0.512 0.000 0.484 0.004
#> GSM486830     4  0.6037     0.3196 0.000 0.304 0.068 0.628
#> GSM486832     3  0.5296     0.5053 0.496 0.000 0.496 0.008
#> GSM486834     3  0.5392     0.2819 0.008 0.004 0.564 0.424
#> GSM486836     3  0.5296     0.5104 0.492 0.000 0.500 0.008
#> GSM486838     4  0.6979     0.2149 0.000 0.376 0.120 0.504
#> GSM486840     1  0.4996    -0.5197 0.516 0.000 0.484 0.000
#> GSM486842     3  0.5132     0.5409 0.448 0.000 0.548 0.004
#> GSM486844     3  0.5294     0.5169 0.484 0.000 0.508 0.008
#> GSM486846     4  0.6222     0.2288 0.000 0.412 0.056 0.532
#> GSM486848     1  0.4996    -0.5197 0.516 0.000 0.484 0.000
#> GSM486850     2  0.5038     0.2621 0.000 0.684 0.020 0.296
#> GSM486852     3  0.5940     0.3672 0.120 0.000 0.692 0.188
#> GSM486854     2  0.5013     0.2644 0.000 0.688 0.020 0.292
#> GSM486856     2  0.4539     0.2868 0.000 0.720 0.008 0.272
#> GSM486858     4  0.6200     0.1690 0.000 0.444 0.052 0.504

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM486735     5  0.5850    0.10561 0.000 0.096 0.000 0.428 0.476
#> GSM486737     2  0.5214    0.09197 0.008 0.604 0.000 0.348 0.040
#> GSM486739     5  0.6375    0.01857 0.008 0.128 0.000 0.412 0.452
#> GSM486741     2  0.5394    0.07657 0.008 0.580 0.000 0.364 0.048
#> GSM486743     2  0.5341   -0.04712 0.008 0.524 0.000 0.432 0.036
#> GSM486745     4  0.6035    0.30075 0.016 0.124 0.000 0.612 0.248
#> GSM486747     1  0.5626    0.50903 0.640 0.000 0.080 0.264 0.016
#> GSM486749     4  0.5833    0.31572 0.008 0.144 0.000 0.632 0.216
#> GSM486751     1  0.4865    0.07877 0.536 0.004 0.000 0.444 0.016
#> GSM486753     4  0.5855    0.25146 0.008 0.340 0.000 0.564 0.088
#> GSM486755     4  0.6024    0.09495 0.008 0.432 0.000 0.472 0.088
#> GSM486757     1  0.4538    0.30153 0.620 0.000 0.000 0.364 0.016
#> GSM486759     1  0.4482    0.80734 0.636 0.000 0.348 0.000 0.016
#> GSM486761     1  0.4000    0.76387 0.784 0.000 0.180 0.016 0.020
#> GSM486763     5  0.5906    0.27272 0.324 0.012 0.012 0.060 0.592
#> GSM486765     1  0.4033    0.78606 0.744 0.000 0.236 0.004 0.016
#> GSM486767     4  0.5137    0.49441 0.028 0.188 0.000 0.720 0.064
#> GSM486769     5  0.6180    0.06854 0.008 0.104 0.000 0.432 0.456
#> GSM486771     2  0.5242    0.00444 0.004 0.556 0.000 0.400 0.040
#> GSM486773     4  0.2544    0.53860 0.028 0.064 0.000 0.900 0.008
#> GSM486775     1  0.4938    0.80455 0.632 0.000 0.332 0.008 0.028
#> GSM486777     1  0.3751    0.78530 0.772 0.000 0.212 0.004 0.012
#> GSM486779     2  0.5992    0.04858 0.032 0.540 0.000 0.376 0.052
#> GSM486781     4  0.2909    0.52550 0.012 0.140 0.000 0.848 0.000
#> GSM486783     2  0.5146    0.08977 0.008 0.608 0.000 0.348 0.036
#> GSM486785     1  0.3737    0.79188 0.764 0.000 0.224 0.008 0.004
#> GSM486787     1  0.4804    0.80221 0.624 0.000 0.348 0.004 0.024
#> GSM486789     4  0.6201    0.17607 0.004 0.148 0.000 0.544 0.304
#> GSM486791     1  0.6094    0.21352 0.488 0.000 0.128 0.000 0.384
#> GSM486793     1  0.3769    0.76880 0.796 0.000 0.176 0.012 0.016
#> GSM486795     1  0.6321    0.63408 0.632 0.004 0.152 0.180 0.032
#> GSM486797     4  0.4661    0.37729 0.356 0.004 0.000 0.624 0.016
#> GSM486799     1  0.4984    0.80247 0.620 0.000 0.344 0.008 0.028
#> GSM486801     1  0.4482    0.80734 0.636 0.000 0.348 0.000 0.016
#> GSM486803     1  0.4703    0.80530 0.640 0.000 0.336 0.008 0.016
#> GSM486805     4  0.4089    0.45875 0.244 0.004 0.000 0.736 0.016
#> GSM486807     1  0.3982    0.77373 0.772 0.000 0.200 0.012 0.016
#> GSM486809     5  0.5566    0.14859 0.004 0.060 0.000 0.416 0.520
#> GSM486811     1  0.3550    0.79013 0.760 0.000 0.236 0.000 0.004
#> GSM486813     2  0.5307    0.07986 0.008 0.592 0.000 0.356 0.044
#> GSM486815     1  0.3840    0.77662 0.780 0.000 0.196 0.008 0.016
#> GSM486817     4  0.5855    0.37175 0.288 0.008 0.056 0.624 0.024
#> GSM486819     5  0.7278    0.11791 0.380 0.000 0.036 0.192 0.392
#> GSM486822     4  0.6260    0.01535 0.008 0.120 0.000 0.500 0.372
#> GSM486824     1  0.5072    0.79904 0.620 0.000 0.340 0.012 0.028
#> GSM486828     4  0.3169    0.52560 0.016 0.140 0.000 0.840 0.004
#> GSM486831     1  0.4467    0.80748 0.640 0.000 0.344 0.000 0.016
#> GSM486833     4  0.4701    0.34482 0.368 0.004 0.000 0.612 0.016
#> GSM486835     1  0.4482    0.80734 0.636 0.000 0.348 0.000 0.016
#> GSM486837     4  0.4870    0.46267 0.052 0.224 0.000 0.712 0.012
#> GSM486839     1  0.4890    0.80356 0.628 0.000 0.340 0.008 0.024
#> GSM486841     1  0.3700    0.79131 0.752 0.000 0.240 0.000 0.008
#> GSM486843     1  0.4570    0.80648 0.648 0.000 0.332 0.004 0.016
#> GSM486845     4  0.3851    0.48665 0.004 0.212 0.000 0.768 0.016
#> GSM486847     1  0.4890    0.80356 0.628 0.000 0.340 0.008 0.024
#> GSM486849     2  0.5511   -0.01216 0.004 0.524 0.000 0.416 0.056
#> GSM486851     5  0.6127    0.13766 0.376 0.000 0.052 0.040 0.532
#> GSM486853     2  0.5632    0.03003 0.012 0.540 0.000 0.396 0.052
#> GSM486855     2  0.5576    0.05031 0.016 0.556 0.000 0.384 0.044
#> GSM486857     4  0.3789    0.47494 0.016 0.224 0.000 0.760 0.000
#> GSM486736     5  0.6442    0.24964 0.000 0.300 0.000 0.208 0.492
#> GSM486738     2  0.0613    0.52843 0.004 0.984 0.000 0.004 0.008
#> GSM486740     5  0.6473    0.18588 0.004 0.364 0.000 0.164 0.468
#> GSM486742     2  0.1074    0.52998 0.004 0.968 0.000 0.012 0.016
#> GSM486744     2  0.1369    0.53276 0.008 0.956 0.000 0.008 0.028
#> GSM486746     2  0.7044    0.08197 0.028 0.504 0.004 0.180 0.284
#> GSM486748     3  0.7263    0.50653 0.120 0.064 0.584 0.204 0.028
#> GSM486750     2  0.6492    0.16552 0.016 0.560 0.000 0.184 0.240
#> GSM486752     3  0.7883    0.42902 0.116 0.080 0.524 0.236 0.044
#> GSM486754     2  0.4480    0.41569 0.008 0.772 0.000 0.128 0.092
#> GSM486756     2  0.4034    0.44671 0.008 0.808 0.000 0.100 0.084
#> GSM486758     3  0.7568    0.46760 0.148 0.048 0.540 0.228 0.036
#> GSM486760     3  0.0404    0.75043 0.012 0.000 0.988 0.000 0.000
#> GSM486762     3  0.3463    0.72796 0.156 0.000 0.820 0.008 0.016
#> GSM486764     5  0.6684    0.21986 0.124 0.020 0.268 0.016 0.572
#> GSM486766     3  0.3124    0.73363 0.136 0.000 0.844 0.004 0.016
#> GSM486768     2  0.6637    0.36144 0.036 0.604 0.016 0.240 0.104
#> GSM486770     5  0.6713    0.20421 0.008 0.332 0.000 0.196 0.464
#> GSM486772     2  0.0865    0.53186 0.000 0.972 0.000 0.004 0.024
#> GSM486774     2  0.6550    0.28131 0.028 0.476 0.012 0.416 0.068
#> GSM486776     3  0.1483    0.74930 0.028 0.000 0.952 0.008 0.012
#> GSM486778     3  0.3044    0.73332 0.148 0.000 0.840 0.004 0.008
#> GSM486780     2  0.2351    0.51952 0.028 0.916 0.000 0.036 0.020
#> GSM486782     2  0.6221    0.33905 0.028 0.556 0.008 0.348 0.060
#> GSM486784     2  0.0162    0.53006 0.000 0.996 0.000 0.000 0.004
#> GSM486786     3  0.2956    0.73816 0.140 0.000 0.848 0.008 0.004
#> GSM486788     3  0.0290    0.75341 0.008 0.000 0.992 0.000 0.000
#> GSM486790     2  0.6555    0.04506 0.004 0.492 0.000 0.200 0.304
#> GSM486792     3  0.6092    0.21600 0.132 0.000 0.504 0.000 0.364
#> GSM486794     3  0.3482    0.72484 0.168 0.000 0.812 0.008 0.012
#> GSM486796     3  0.4207    0.66849 0.036 0.092 0.824 0.028 0.020
#> GSM486798     3  0.8755    0.01638 0.064 0.316 0.324 0.240 0.056
#> GSM486800     3  0.1074    0.74672 0.016 0.000 0.968 0.004 0.012
#> GSM486802     3  0.0290    0.75238 0.008 0.000 0.992 0.000 0.000
#> GSM486804     3  0.0771    0.75371 0.020 0.000 0.976 0.004 0.000
#> GSM486806     2  0.8160    0.19749 0.056 0.408 0.104 0.364 0.068
#> GSM486808     3  0.3022    0.74073 0.136 0.000 0.848 0.004 0.012
#> GSM486810     5  0.6378    0.29596 0.004 0.252 0.000 0.204 0.540
#> GSM486812     3  0.2629    0.73670 0.136 0.000 0.860 0.000 0.004
#> GSM486814     2  0.0579    0.53011 0.000 0.984 0.000 0.008 0.008
#> GSM486816     3  0.3544    0.72596 0.164 0.000 0.812 0.008 0.016
#> GSM486818     3  0.8304    0.23456 0.056 0.204 0.456 0.232 0.052
#> GSM486821     5  0.9022    0.24146 0.124 0.120 0.232 0.104 0.420
#> GSM486823     2  0.6887   -0.13002 0.012 0.408 0.000 0.200 0.380
#> GSM486826     3  0.1413    0.74319 0.020 0.000 0.956 0.012 0.012
#> GSM486830     2  0.6443    0.30499 0.028 0.520 0.012 0.376 0.064
#> GSM486832     3  0.0290    0.75434 0.008 0.000 0.992 0.000 0.000
#> GSM486834     3  0.8637    0.27953 0.116 0.120 0.416 0.292 0.056
#> GSM486836     3  0.0162    0.75539 0.000 0.000 0.996 0.004 0.000
#> GSM486838     2  0.6131    0.36405 0.032 0.624 0.024 0.276 0.044
#> GSM486840     3  0.1299    0.74655 0.020 0.000 0.960 0.008 0.012
#> GSM486842     3  0.2127    0.74600 0.108 0.000 0.892 0.000 0.000
#> GSM486844     3  0.0671    0.75428 0.016 0.000 0.980 0.004 0.000
#> GSM486846     2  0.5885    0.36563 0.024 0.608 0.008 0.308 0.052
#> GSM486848     3  0.1299    0.74655 0.020 0.000 0.960 0.008 0.012
#> GSM486850     2  0.1918    0.52751 0.000 0.928 0.000 0.036 0.036
#> GSM486852     5  0.6593    0.14979 0.128 0.004 0.312 0.020 0.536
#> GSM486854     2  0.2075    0.52749 0.004 0.924 0.000 0.040 0.032
#> GSM486856     2  0.1483    0.52700 0.008 0.952 0.000 0.028 0.012
#> GSM486858     2  0.5771    0.37654 0.028 0.636 0.008 0.280 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
#> GSM486735     6  0.4162    0.66881 0.000 0.028 0.004 0.116 0.068 0.784
#> GSM486737     2  0.5983    0.44506 0.000 0.568 0.016 0.280 0.020 0.116
#> GSM486739     6  0.5564    0.65425 0.000 0.060 0.012 0.164 0.088 0.676
#> GSM486741     2  0.6124    0.43831 0.000 0.556 0.024 0.280 0.016 0.124
#> GSM486743     2  0.6525    0.37681 0.000 0.460 0.024 0.368 0.028 0.120
#> GSM486745     6  0.6607    0.37413 0.000 0.080 0.020 0.392 0.064 0.444
#> GSM486747     3  0.5248    0.07200 0.036 0.000 0.496 0.440 0.024 0.004
#> GSM486749     6  0.6326    0.24267 0.000 0.140 0.024 0.408 0.008 0.420
#> GSM486751     4  0.4636    0.29375 0.000 0.000 0.376 0.584 0.032 0.008
#> GSM486753     4  0.7115   -0.34538 0.000 0.332 0.024 0.352 0.028 0.264
#> GSM486755     2  0.6945    0.29024 0.000 0.424 0.020 0.312 0.032 0.212
#> GSM486757     4  0.5251    0.09993 0.000 0.000 0.448 0.484 0.036 0.032
#> GSM486759     3  0.3575    0.86120 0.284 0.000 0.708 0.000 0.008 0.000
#> GSM486761     3  0.4239    0.76653 0.132 0.000 0.768 0.072 0.028 0.000
#> GSM486763     5  0.4302    0.67181 0.008 0.000 0.136 0.012 0.764 0.080
#> GSM486765     3  0.3907    0.83462 0.188 0.000 0.768 0.016 0.020 0.008
#> GSM486767     4  0.5425    0.35070 0.000 0.104 0.024 0.696 0.036 0.140
#> GSM486769     6  0.3718    0.67894 0.000 0.032 0.008 0.124 0.024 0.812
#> GSM486771     2  0.5992    0.40184 0.000 0.508 0.020 0.352 0.008 0.112
#> GSM486773     4  0.2903    0.50177 0.000 0.028 0.016 0.872 0.008 0.076
#> GSM486775     3  0.4163    0.85934 0.268 0.000 0.700 0.008 0.016 0.008
#> GSM486777     3  0.3716    0.81431 0.156 0.000 0.796 0.016 0.024 0.008
#> GSM486779     2  0.7056    0.42371 0.000 0.480 0.056 0.292 0.036 0.136
#> GSM486781     4  0.2563    0.50634 0.000 0.040 0.008 0.884 0.000 0.068
#> GSM486783     2  0.5558    0.45088 0.000 0.596 0.012 0.276 0.008 0.108
#> GSM486785     3  0.3546    0.84292 0.188 0.000 0.784 0.008 0.012 0.008
#> GSM486787     3  0.3851    0.85983 0.284 0.000 0.700 0.004 0.008 0.004
#> GSM486789     6  0.5222    0.59443 0.000 0.088 0.008 0.208 0.024 0.672
#> GSM486791     5  0.4891    0.51798 0.068 0.000 0.292 0.004 0.632 0.004
#> GSM486793     3  0.4089    0.78609 0.132 0.000 0.788 0.040 0.032 0.008
#> GSM486795     3  0.5560    0.52124 0.096 0.000 0.636 0.232 0.016 0.020
#> GSM486797     4  0.3883    0.45588 0.000 0.000 0.220 0.744 0.024 0.012
#> GSM486799     3  0.4226    0.85875 0.280 0.000 0.688 0.008 0.016 0.008
#> GSM486801     3  0.3713    0.86181 0.284 0.000 0.704 0.004 0.008 0.000
#> GSM486803     3  0.3916    0.85902 0.276 0.000 0.704 0.008 0.008 0.004
#> GSM486805     4  0.3226    0.51830 0.000 0.000 0.116 0.836 0.028 0.020
#> GSM486807     3  0.3924    0.81760 0.168 0.000 0.772 0.044 0.016 0.000
#> GSM486809     6  0.4698    0.63085 0.000 0.020 0.004 0.116 0.128 0.732
#> GSM486811     3  0.3229    0.84070 0.188 0.000 0.796 0.008 0.004 0.004
#> GSM486813     2  0.5833    0.45279 0.000 0.584 0.020 0.280 0.016 0.100
#> GSM486815     3  0.4602    0.79138 0.156 0.000 0.752 0.032 0.032 0.028
#> GSM486817     4  0.4658    0.45568 0.028 0.004 0.172 0.744 0.024 0.028
#> GSM486819     5  0.6684    0.43408 0.020 0.000 0.172 0.284 0.492 0.032
#> GSM486822     6  0.4141    0.65091 0.000 0.084 0.012 0.140 0.000 0.764
#> GSM486824     3  0.4278    0.85362 0.280 0.000 0.684 0.004 0.024 0.008
#> GSM486828     4  0.2618    0.51015 0.000 0.036 0.012 0.888 0.004 0.060
#> GSM486831     3  0.3575    0.86228 0.284 0.000 0.708 0.000 0.008 0.000
#> GSM486833     4  0.3988    0.48337 0.000 0.000 0.180 0.764 0.028 0.028
#> GSM486835     3  0.3693    0.86060 0.280 0.000 0.708 0.004 0.008 0.000
#> GSM486837     4  0.3298    0.49534 0.000 0.072 0.056 0.848 0.004 0.020
#> GSM486839     3  0.3905    0.86217 0.276 0.000 0.704 0.004 0.012 0.004
#> GSM486841     3  0.3152    0.84495 0.196 0.000 0.792 0.008 0.004 0.000
#> GSM486843     3  0.3746    0.85857 0.272 0.000 0.712 0.004 0.012 0.000
#> GSM486845     4  0.3499    0.46590 0.000 0.068 0.024 0.836 0.004 0.068
#> GSM486847     3  0.4257    0.85783 0.276 0.000 0.688 0.004 0.024 0.008
#> GSM486849     2  0.6340    0.40725 0.000 0.492 0.028 0.336 0.012 0.132
#> GSM486851     5  0.4251    0.67833 0.016 0.000 0.156 0.008 0.764 0.056
#> GSM486853     2  0.6344    0.42167 0.000 0.512 0.032 0.312 0.012 0.132
#> GSM486855     2  0.6335    0.44030 0.000 0.520 0.040 0.312 0.012 0.116
#> GSM486857     4  0.2610    0.48580 0.000 0.088 0.016 0.880 0.004 0.012
#> GSM486736     6  0.4549    0.66067 0.000 0.168 0.004 0.020 0.072 0.736
#> GSM486738     2  0.1363    0.52370 0.000 0.952 0.004 0.004 0.012 0.028
#> GSM486740     6  0.5642    0.63710 0.000 0.236 0.016 0.028 0.088 0.632
#> GSM486742     2  0.1375    0.52345 0.000 0.952 0.008 0.004 0.008 0.028
#> GSM486744     2  0.2460    0.50552 0.000 0.904 0.012 0.020 0.024 0.040
#> GSM486746     6  0.6948    0.33272 0.000 0.372 0.052 0.032 0.116 0.428
#> GSM486748     1  0.7651    0.16691 0.476 0.032 0.064 0.268 0.124 0.036
#> GSM486750     2  0.5730   -0.21392 0.000 0.520 0.036 0.032 0.024 0.388
#> GSM486752     1  0.8131   -0.00879 0.408 0.044 0.068 0.304 0.128 0.048
#> GSM486754     2  0.4233    0.31022 0.000 0.748 0.016 0.016 0.024 0.196
#> GSM486756     2  0.3875    0.39709 0.000 0.800 0.016 0.020 0.028 0.136
#> GSM486758     1  0.8203    0.08944 0.396 0.012 0.120 0.276 0.136 0.060
#> GSM486760     1  0.0458    0.82247 0.984 0.000 0.016 0.000 0.000 0.000
#> GSM486762     1  0.3433    0.78430 0.832 0.000 0.108 0.024 0.032 0.004
#> GSM486764     5  0.3797    0.66895 0.108 0.004 0.012 0.000 0.804 0.072
#> GSM486766     1  0.3139    0.80245 0.852 0.000 0.100 0.012 0.024 0.012
#> GSM486768     2  0.7888   -0.07940 0.008 0.440 0.044 0.248 0.124 0.136
#> GSM486770     6  0.4085    0.66000 0.000 0.200 0.012 0.012 0.024 0.752
#> GSM486772     2  0.1488    0.52000 0.000 0.948 0.008 0.008 0.008 0.028
#> GSM486774     4  0.7955    0.24254 0.012 0.320 0.048 0.392 0.108 0.120
#> GSM486776     1  0.1565    0.82155 0.944 0.000 0.032 0.008 0.008 0.008
#> GSM486778     1  0.3384    0.78502 0.836 0.000 0.108 0.012 0.032 0.012
#> GSM486780     2  0.3469    0.51024 0.000 0.852 0.044 0.028 0.032 0.044
#> GSM486782     4  0.7811    0.21372 0.008 0.348 0.048 0.380 0.100 0.116
#> GSM486784     2  0.0458    0.52702 0.000 0.984 0.000 0.000 0.000 0.016
#> GSM486786     1  0.3182    0.80393 0.852 0.000 0.096 0.012 0.024 0.016
#> GSM486788     1  0.0458    0.82247 0.984 0.000 0.016 0.000 0.000 0.000
#> GSM486790     6  0.5291    0.54181 0.000 0.324 0.016 0.028 0.032 0.600
#> GSM486792     5  0.4424    0.48879 0.340 0.000 0.024 0.004 0.628 0.004
#> GSM486794     1  0.4043    0.76975 0.800 0.000 0.116 0.032 0.036 0.016
#> GSM486796     1  0.4613    0.62686 0.796 0.048 0.052 0.024 0.048 0.032
#> GSM486798     4  0.8954    0.21762 0.252 0.224 0.060 0.300 0.120 0.044
#> GSM486800     1  0.0862    0.82213 0.972 0.000 0.016 0.008 0.000 0.004
#> GSM486802     1  0.0363    0.82299 0.988 0.000 0.012 0.000 0.000 0.000
#> GSM486804     1  0.0798    0.81673 0.976 0.000 0.012 0.004 0.004 0.004
#> GSM486806     4  0.8535    0.30065 0.056 0.252 0.056 0.408 0.128 0.100
#> GSM486808     1  0.3169    0.79172 0.856 0.000 0.088 0.020 0.024 0.012
#> GSM486810     6  0.4907    0.61678 0.000 0.144 0.004 0.012 0.140 0.700
#> GSM486812     1  0.2660    0.80635 0.872 0.000 0.100 0.004 0.016 0.008
#> GSM486814     2  0.0924    0.53026 0.000 0.972 0.004 0.008 0.008 0.008
#> GSM486816     1  0.4451    0.75781 0.780 0.000 0.112 0.032 0.040 0.036
#> GSM486818     4  0.8848    0.18763 0.312 0.144 0.064 0.312 0.116 0.052
#> GSM486821     5  0.7206    0.43460 0.128 0.096 0.020 0.128 0.580 0.048
#> GSM486823     6  0.4002    0.60898 0.000 0.284 0.008 0.016 0.000 0.692
#> GSM486826     1  0.1223    0.81634 0.960 0.000 0.012 0.004 0.016 0.008
#> GSM486830     4  0.7859    0.24986 0.008 0.316 0.052 0.404 0.108 0.112
#> GSM486832     1  0.0260    0.82387 0.992 0.000 0.008 0.000 0.000 0.000
#> GSM486834     4  0.8606    0.26414 0.244 0.080 0.068 0.408 0.136 0.064
#> GSM486836     1  0.0260    0.82273 0.992 0.000 0.008 0.000 0.000 0.000
#> GSM486838     2  0.7795   -0.20709 0.040 0.388 0.068 0.368 0.100 0.036
#> GSM486840     1  0.1036    0.82341 0.964 0.000 0.024 0.000 0.004 0.008
#> GSM486842     1  0.2462    0.81529 0.892 0.000 0.076 0.008 0.016 0.008
#> GSM486844     1  0.0622    0.81794 0.980 0.000 0.012 0.000 0.008 0.000
#> GSM486846     2  0.7631   -0.19993 0.008 0.400 0.056 0.356 0.096 0.084
#> GSM486848     1  0.1490    0.81958 0.948 0.000 0.024 0.004 0.016 0.008
#> GSM486850     2  0.2918    0.49620 0.000 0.880 0.036 0.028 0.012 0.044
#> GSM486852     5  0.3395    0.67603 0.124 0.000 0.004 0.000 0.816 0.056
#> GSM486854     2  0.2527    0.50547 0.000 0.900 0.032 0.036 0.008 0.024
#> GSM486856     2  0.2218    0.52436 0.000 0.916 0.028 0.028 0.008 0.020
#> GSM486858     2  0.7113   -0.17178 0.008 0.436 0.056 0.368 0.096 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-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)

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 agent(p) individual(p) k
#> MAD:kmeans 116 1.00e+00      6.52e-06 2
#> MAD:kmeans 101 8.39e-02      5.75e-08 3
#> MAD:kmeans  41 1.25e-09      6.19e-01 4
#> MAD:kmeans  59 9.61e-13      1.82e-01 5
#> MAD:kmeans  74 4.71e-11      2.06e-04 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 120 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.948           0.936       0.975         0.5042 0.496   0.496
#> 3 3 0.608           0.746       0.786         0.3026 0.806   0.625
#> 4 4 0.478           0.559       0.726         0.1337 0.878   0.657
#> 5 5 0.482           0.428       0.613         0.0634 0.919   0.706
#> 6 6 0.512           0.391       0.580         0.0402 0.947   0.773

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
#> GSM486735     2  0.0000      0.984 0.000 1.000
#> GSM486737     2  0.0000      0.984 0.000 1.000
#> GSM486739     2  0.0000      0.984 0.000 1.000
#> GSM486741     2  0.0000      0.984 0.000 1.000
#> GSM486743     2  0.0000      0.984 0.000 1.000
#> GSM486745     2  0.0000      0.984 0.000 1.000
#> GSM486747     1  0.0000      0.963 1.000 0.000
#> GSM486749     2  0.0000      0.984 0.000 1.000
#> GSM486751     1  0.3733      0.903 0.928 0.072
#> GSM486753     2  0.0000      0.984 0.000 1.000
#> GSM486755     2  0.0000      0.984 0.000 1.000
#> GSM486757     1  0.0000      0.963 1.000 0.000
#> GSM486759     1  0.0000      0.963 1.000 0.000
#> GSM486761     1  0.0000      0.963 1.000 0.000
#> GSM486763     1  0.5178      0.857 0.884 0.116
#> GSM486765     1  0.0000      0.963 1.000 0.000
#> GSM486767     2  0.0000      0.984 0.000 1.000
#> GSM486769     2  0.0000      0.984 0.000 1.000
#> GSM486771     2  0.0000      0.984 0.000 1.000
#> GSM486773     2  0.0000      0.984 0.000 1.000
#> GSM486775     1  0.0000      0.963 1.000 0.000
#> GSM486777     1  0.0000      0.963 1.000 0.000
#> GSM486779     2  0.0000      0.984 0.000 1.000
#> GSM486781     2  0.0000      0.984 0.000 1.000
#> GSM486783     2  0.0000      0.984 0.000 1.000
#> GSM486785     1  0.0000      0.963 1.000 0.000
#> GSM486787     1  0.0000      0.963 1.000 0.000
#> GSM486789     2  0.0000      0.984 0.000 1.000
#> GSM486791     1  0.0000      0.963 1.000 0.000
#> GSM486793     1  0.0000      0.963 1.000 0.000
#> GSM486795     1  0.0000      0.963 1.000 0.000
#> GSM486797     1  0.9833      0.288 0.576 0.424
#> GSM486799     1  0.0000      0.963 1.000 0.000
#> GSM486801     1  0.0000      0.963 1.000 0.000
#> GSM486803     1  0.0000      0.963 1.000 0.000
#> GSM486805     2  0.0000      0.984 0.000 1.000
#> GSM486807     1  0.0000      0.963 1.000 0.000
#> GSM486809     2  0.0000      0.984 0.000 1.000
#> GSM486811     1  0.0000      0.963 1.000 0.000
#> GSM486813     2  0.0000      0.984 0.000 1.000
#> GSM486815     1  0.0000      0.963 1.000 0.000
#> GSM486817     2  0.9954      0.101 0.460 0.540
#> GSM486819     1  0.6148      0.815 0.848 0.152
#> GSM486822     2  0.0000      0.984 0.000 1.000
#> GSM486824     1  0.0000      0.963 1.000 0.000
#> GSM486828     2  0.0000      0.984 0.000 1.000
#> GSM486831     1  0.0000      0.963 1.000 0.000
#> GSM486833     1  0.8016      0.687 0.756 0.244
#> GSM486835     1  0.0000      0.963 1.000 0.000
#> GSM486837     2  0.0000      0.984 0.000 1.000
#> GSM486839     1  0.0000      0.963 1.000 0.000
#> GSM486841     1  0.0000      0.963 1.000 0.000
#> GSM486843     1  0.0000      0.963 1.000 0.000
#> GSM486845     2  0.0000      0.984 0.000 1.000
#> GSM486847     1  0.0000      0.963 1.000 0.000
#> GSM486849     2  0.0000      0.984 0.000 1.000
#> GSM486851     1  0.0000      0.963 1.000 0.000
#> GSM486853     2  0.0000      0.984 0.000 1.000
#> GSM486855     2  0.0000      0.984 0.000 1.000
#> GSM486857     2  0.0000      0.984 0.000 1.000
#> GSM486736     2  0.0000      0.984 0.000 1.000
#> GSM486738     2  0.0000      0.984 0.000 1.000
#> GSM486740     2  0.0000      0.984 0.000 1.000
#> GSM486742     2  0.0000      0.984 0.000 1.000
#> GSM486744     2  0.0000      0.984 0.000 1.000
#> GSM486746     2  0.0000      0.984 0.000 1.000
#> GSM486748     1  0.0000      0.963 1.000 0.000
#> GSM486750     2  0.0000      0.984 0.000 1.000
#> GSM486752     1  0.0938      0.954 0.988 0.012
#> GSM486754     2  0.0000      0.984 0.000 1.000
#> GSM486756     2  0.0000      0.984 0.000 1.000
#> GSM486758     1  0.0000      0.963 1.000 0.000
#> GSM486760     1  0.0000      0.963 1.000 0.000
#> GSM486762     1  0.0000      0.963 1.000 0.000
#> GSM486764     1  0.3733      0.902 0.928 0.072
#> GSM486766     1  0.0000      0.963 1.000 0.000
#> GSM486768     2  0.0000      0.984 0.000 1.000
#> GSM486770     2  0.0000      0.984 0.000 1.000
#> GSM486772     2  0.0000      0.984 0.000 1.000
#> GSM486774     2  0.0000      0.984 0.000 1.000
#> GSM486776     1  0.0000      0.963 1.000 0.000
#> GSM486778     1  0.0000      0.963 1.000 0.000
#> GSM486780     2  0.0000      0.984 0.000 1.000
#> GSM486782     2  0.0000      0.984 0.000 1.000
#> GSM486784     2  0.0000      0.984 0.000 1.000
#> GSM486786     1  0.0000      0.963 1.000 0.000
#> GSM486788     1  0.0000      0.963 1.000 0.000
#> GSM486790     2  0.0000      0.984 0.000 1.000
#> GSM486792     1  0.0000      0.963 1.000 0.000
#> GSM486794     1  0.0000      0.963 1.000 0.000
#> GSM486796     1  0.0000      0.963 1.000 0.000
#> GSM486798     2  0.9732      0.289 0.404 0.596
#> GSM486800     1  0.0000      0.963 1.000 0.000
#> GSM486802     1  0.0000      0.963 1.000 0.000
#> GSM486804     1  0.0000      0.963 1.000 0.000
#> GSM486806     2  0.0000      0.984 0.000 1.000
#> GSM486808     1  0.0000      0.963 1.000 0.000
#> GSM486810     2  0.0000      0.984 0.000 1.000
#> GSM486812     1  0.0000      0.963 1.000 0.000
#> GSM486814     2  0.0000      0.984 0.000 1.000
#> GSM486816     1  0.0000      0.963 1.000 0.000
#> GSM486818     1  0.9866      0.265 0.568 0.432
#> GSM486821     1  0.9460      0.451 0.636 0.364
#> GSM486823     2  0.0000      0.984 0.000 1.000
#> GSM486826     1  0.0000      0.963 1.000 0.000
#> GSM486830     2  0.0000      0.984 0.000 1.000
#> GSM486832     1  0.0000      0.963 1.000 0.000
#> GSM486834     1  0.8661      0.611 0.712 0.288
#> GSM486836     1  0.0000      0.963 1.000 0.000
#> GSM486838     2  0.0000      0.984 0.000 1.000
#> GSM486840     1  0.0000      0.963 1.000 0.000
#> GSM486842     1  0.0000      0.963 1.000 0.000
#> GSM486844     1  0.0000      0.963 1.000 0.000
#> GSM486846     2  0.0000      0.984 0.000 1.000
#> GSM486848     1  0.0000      0.963 1.000 0.000
#> GSM486850     2  0.0000      0.984 0.000 1.000
#> GSM486852     1  0.0000      0.963 1.000 0.000
#> GSM486854     2  0.0000      0.984 0.000 1.000
#> GSM486856     2  0.0000      0.984 0.000 1.000
#> GSM486858     2  0.0000      0.984 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
#> GSM486735     2  0.1753     0.8095 0.000 0.952 0.048
#> GSM486737     2  0.0747     0.8218 0.000 0.984 0.016
#> GSM486739     2  0.1860     0.8095 0.000 0.948 0.052
#> GSM486741     2  0.0424     0.8214 0.000 0.992 0.008
#> GSM486743     2  0.1163     0.8216 0.000 0.972 0.028
#> GSM486745     2  0.2636     0.7997 0.020 0.932 0.048
#> GSM486747     1  0.5506     0.7391 0.816 0.092 0.092
#> GSM486749     2  0.1163     0.8188 0.000 0.972 0.028
#> GSM486751     1  0.7979     0.6135 0.628 0.272 0.100
#> GSM486753     2  0.1411     0.8194 0.000 0.964 0.036
#> GSM486755     2  0.1289     0.8194 0.000 0.968 0.032
#> GSM486757     1  0.7603     0.6430 0.668 0.236 0.096
#> GSM486759     1  0.0237     0.7978 0.996 0.000 0.004
#> GSM486761     1  0.1964     0.7911 0.944 0.000 0.056
#> GSM486763     1  0.7091     0.6187 0.676 0.268 0.056
#> GSM486765     1  0.2537     0.7668 0.920 0.000 0.080
#> GSM486767     2  0.4290     0.7789 0.064 0.872 0.064
#> GSM486769     2  0.1860     0.8118 0.000 0.948 0.052
#> GSM486771     2  0.0892     0.8196 0.000 0.980 0.020
#> GSM486773     2  0.5970     0.6139 0.160 0.780 0.060
#> GSM486775     1  0.1289     0.7802 0.968 0.000 0.032
#> GSM486777     1  0.1643     0.7950 0.956 0.000 0.044
#> GSM486779     2  0.2443     0.8184 0.028 0.940 0.032
#> GSM486781     2  0.1878     0.8115 0.004 0.952 0.044
#> GSM486783     2  0.1163     0.8259 0.000 0.972 0.028
#> GSM486785     1  0.1753     0.7937 0.952 0.000 0.048
#> GSM486787     1  0.1643     0.7557 0.956 0.000 0.044
#> GSM486789     2  0.1753     0.8187 0.000 0.952 0.048
#> GSM486791     1  0.1163     0.7925 0.972 0.000 0.028
#> GSM486793     1  0.1753     0.7937 0.952 0.000 0.048
#> GSM486795     1  0.5012     0.6927 0.788 0.204 0.008
#> GSM486797     1  0.8055     0.5997 0.612 0.292 0.096
#> GSM486799     1  0.1163     0.7775 0.972 0.000 0.028
#> GSM486801     1  0.0237     0.7957 0.996 0.000 0.004
#> GSM486803     1  0.0000     0.7968 1.000 0.000 0.000
#> GSM486805     1  0.8663     0.4959 0.524 0.364 0.112
#> GSM486807     1  0.1964     0.7920 0.944 0.000 0.056
#> GSM486809     2  0.2903     0.7941 0.028 0.924 0.048
#> GSM486811     1  0.1643     0.7950 0.956 0.000 0.044
#> GSM486813     2  0.1289     0.8269 0.000 0.968 0.032
#> GSM486815     1  0.1753     0.7935 0.952 0.000 0.048
#> GSM486817     1  0.7084     0.5785 0.628 0.336 0.036
#> GSM486819     1  0.6761     0.6373 0.700 0.252 0.048
#> GSM486822     2  0.1163     0.8215 0.000 0.972 0.028
#> GSM486824     1  0.1411     0.7699 0.964 0.000 0.036
#> GSM486828     2  0.4384     0.7467 0.068 0.868 0.064
#> GSM486831     1  0.0237     0.7957 0.996 0.000 0.004
#> GSM486833     1  0.8430     0.5816 0.588 0.292 0.120
#> GSM486835     1  0.0237     0.7959 0.996 0.000 0.004
#> GSM486837     2  0.7003     0.4574 0.248 0.692 0.060
#> GSM486839     1  0.0237     0.7957 0.996 0.000 0.004
#> GSM486841     1  0.1643     0.7952 0.956 0.000 0.044
#> GSM486843     1  0.0000     0.7968 1.000 0.000 0.000
#> GSM486845     2  0.2152     0.8080 0.016 0.948 0.036
#> GSM486847     1  0.0592     0.7911 0.988 0.000 0.012
#> GSM486849     2  0.0747     0.8247 0.000 0.984 0.016
#> GSM486851     1  0.4505     0.7402 0.860 0.092 0.048
#> GSM486853     2  0.0747     0.8237 0.000 0.984 0.016
#> GSM486855     2  0.0892     0.8238 0.000 0.980 0.020
#> GSM486857     2  0.3406     0.7648 0.068 0.904 0.028
#> GSM486736     2  0.5529     0.8208 0.000 0.704 0.296
#> GSM486738     2  0.5497     0.8165 0.000 0.708 0.292
#> GSM486740     2  0.5678     0.8159 0.000 0.684 0.316
#> GSM486742     2  0.5397     0.8182 0.000 0.720 0.280
#> GSM486744     2  0.5431     0.8181 0.000 0.716 0.284
#> GSM486746     2  0.5733     0.8145 0.000 0.676 0.324
#> GSM486748     3  0.4409     0.6841 0.172 0.004 0.824
#> GSM486750     2  0.5529     0.8174 0.000 0.704 0.296
#> GSM486752     3  0.3375     0.6327 0.100 0.008 0.892
#> GSM486754     2  0.5431     0.8181 0.000 0.716 0.284
#> GSM486756     2  0.5529     0.8190 0.000 0.704 0.296
#> GSM486758     3  0.4912     0.6997 0.196 0.008 0.796
#> GSM486760     3  0.6168     0.7739 0.412 0.000 0.588
#> GSM486762     3  0.5948     0.7654 0.360 0.000 0.640
#> GSM486764     3  0.6168     0.6703 0.224 0.036 0.740
#> GSM486766     3  0.6008     0.7679 0.372 0.000 0.628
#> GSM486768     2  0.5905     0.7882 0.000 0.648 0.352
#> GSM486770     2  0.5760     0.8133 0.000 0.672 0.328
#> GSM486772     2  0.5529     0.8160 0.000 0.704 0.296
#> GSM486774     2  0.6154     0.7428 0.000 0.592 0.408
#> GSM486776     3  0.6180     0.7717 0.416 0.000 0.584
#> GSM486778     3  0.6045     0.7640 0.380 0.000 0.620
#> GSM486780     2  0.5591     0.8095 0.000 0.696 0.304
#> GSM486782     2  0.5678     0.8087 0.000 0.684 0.316
#> GSM486784     2  0.5465     0.8165 0.000 0.712 0.288
#> GSM486786     3  0.6045     0.7632 0.380 0.000 0.620
#> GSM486788     3  0.6180     0.7737 0.416 0.000 0.584
#> GSM486790     2  0.5591     0.8162 0.000 0.696 0.304
#> GSM486792     3  0.6204     0.7630 0.424 0.000 0.576
#> GSM486794     3  0.6062     0.7597 0.384 0.000 0.616
#> GSM486796     3  0.4755     0.6568 0.184 0.008 0.808
#> GSM486798     3  0.3141     0.5436 0.020 0.068 0.912
#> GSM486800     3  0.6180     0.7737 0.416 0.000 0.584
#> GSM486802     3  0.6180     0.7737 0.416 0.000 0.584
#> GSM486804     3  0.6154     0.7751 0.408 0.000 0.592
#> GSM486806     3  0.5138     0.0758 0.000 0.252 0.748
#> GSM486808     3  0.5882     0.7634 0.348 0.000 0.652
#> GSM486810     2  0.5529     0.8209 0.000 0.704 0.296
#> GSM486812     3  0.6008     0.7676 0.372 0.000 0.628
#> GSM486814     2  0.5465     0.8165 0.000 0.712 0.288
#> GSM486816     3  0.6095     0.7525 0.392 0.000 0.608
#> GSM486818     3  0.4925     0.5497 0.076 0.080 0.844
#> GSM486821     3  0.5408     0.5608 0.136 0.052 0.812
#> GSM486823     2  0.5591     0.8156 0.000 0.696 0.304
#> GSM486826     3  0.6180     0.7737 0.416 0.000 0.584
#> GSM486830     2  0.6045     0.7715 0.000 0.620 0.380
#> GSM486832     3  0.6168     0.7741 0.412 0.000 0.588
#> GSM486834     3  0.2903     0.5769 0.048 0.028 0.924
#> GSM486836     3  0.6180     0.7737 0.416 0.000 0.584
#> GSM486838     3  0.6235    -0.4476 0.000 0.436 0.564
#> GSM486840     3  0.6180     0.7737 0.416 0.000 0.584
#> GSM486842     3  0.6008     0.7679 0.372 0.000 0.628
#> GSM486844     3  0.6180     0.7737 0.416 0.000 0.584
#> GSM486846     2  0.5678     0.8091 0.000 0.684 0.316
#> GSM486848     3  0.6192     0.7699 0.420 0.000 0.580
#> GSM486850     2  0.5431     0.8166 0.000 0.716 0.284
#> GSM486852     3  0.5465     0.7267 0.288 0.000 0.712
#> GSM486854     2  0.5431     0.8166 0.000 0.716 0.284
#> GSM486856     2  0.5465     0.8165 0.000 0.712 0.288
#> GSM486858     2  0.5785     0.7957 0.000 0.668 0.332

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM486735     4  0.5067      0.512 0.048 0.216 0.000 0.736
#> GSM486737     2  0.5399     -0.444 0.012 0.520 0.000 0.468
#> GSM486739     4  0.4677      0.515 0.048 0.176 0.000 0.776
#> GSM486741     4  0.5402      0.466 0.012 0.472 0.000 0.516
#> GSM486743     4  0.5427      0.530 0.016 0.416 0.000 0.568
#> GSM486745     4  0.5123      0.509 0.044 0.232 0.000 0.724
#> GSM486747     1  0.5886      0.700 0.732 0.020 0.156 0.092
#> GSM486749     4  0.5254      0.594 0.028 0.300 0.000 0.672
#> GSM486751     1  0.5886      0.472 0.640 0.016 0.028 0.316
#> GSM486753     4  0.4792      0.593 0.008 0.312 0.000 0.680
#> GSM486755     4  0.5444      0.516 0.016 0.424 0.000 0.560
#> GSM486757     1  0.4348      0.643 0.780 0.000 0.024 0.196
#> GSM486759     1  0.4277      0.764 0.720 0.000 0.280 0.000
#> GSM486761     1  0.3626      0.762 0.812 0.000 0.184 0.004
#> GSM486763     1  0.6977      0.340 0.584 0.036 0.060 0.320
#> GSM486765     1  0.4584      0.708 0.696 0.000 0.300 0.004
#> GSM486767     4  0.6240      0.477 0.080 0.276 0.004 0.640
#> GSM486769     4  0.4993      0.510 0.028 0.260 0.000 0.712
#> GSM486771     4  0.5638      0.560 0.028 0.388 0.000 0.584
#> GSM486773     4  0.4605      0.550 0.108 0.092 0.000 0.800
#> GSM486775     1  0.4585      0.727 0.668 0.000 0.332 0.000
#> GSM486777     1  0.3486      0.768 0.812 0.000 0.188 0.000
#> GSM486779     2  0.5917     -0.427 0.036 0.520 0.000 0.444
#> GSM486781     4  0.5207      0.551 0.028 0.292 0.000 0.680
#> GSM486783     2  0.5126     -0.378 0.004 0.552 0.000 0.444
#> GSM486785     1  0.3873      0.764 0.772 0.000 0.228 0.000
#> GSM486787     1  0.4624      0.723 0.660 0.000 0.340 0.000
#> GSM486789     4  0.4957      0.518 0.012 0.320 0.000 0.668
#> GSM486791     1  0.5184      0.684 0.732 0.000 0.212 0.056
#> GSM486793     1  0.3172      0.763 0.840 0.000 0.160 0.000
#> GSM486795     1  0.6124      0.680 0.728 0.032 0.108 0.132
#> GSM486797     1  0.7006      0.185 0.508 0.068 0.020 0.404
#> GSM486799     1  0.4679      0.707 0.648 0.000 0.352 0.000
#> GSM486801     1  0.4250      0.765 0.724 0.000 0.276 0.000
#> GSM486803     1  0.4193      0.770 0.732 0.000 0.268 0.000
#> GSM486805     4  0.6052      0.411 0.284 0.076 0.000 0.640
#> GSM486807     1  0.4248      0.757 0.768 0.000 0.220 0.012
#> GSM486809     4  0.5292      0.504 0.088 0.168 0.000 0.744
#> GSM486811     1  0.3801      0.766 0.780 0.000 0.220 0.000
#> GSM486813     2  0.5693     -0.435 0.024 0.504 0.000 0.472
#> GSM486815     1  0.3873      0.762 0.772 0.000 0.228 0.000
#> GSM486817     1  0.7561      0.169 0.480 0.064 0.052 0.404
#> GSM486819     1  0.6356      0.478 0.636 0.012 0.068 0.284
#> GSM486822     4  0.5269      0.485 0.016 0.364 0.000 0.620
#> GSM486824     1  0.4632      0.751 0.688 0.004 0.308 0.000
#> GSM486828     4  0.5458      0.562 0.076 0.204 0.000 0.720
#> GSM486831     1  0.3975      0.768 0.760 0.000 0.240 0.000
#> GSM486833     1  0.5798      0.161 0.524 0.012 0.012 0.452
#> GSM486835     1  0.4454      0.756 0.692 0.000 0.308 0.000
#> GSM486837     4  0.7203      0.402 0.164 0.312 0.000 0.524
#> GSM486839     1  0.4250      0.762 0.724 0.000 0.276 0.000
#> GSM486841     1  0.3764      0.767 0.784 0.000 0.216 0.000
#> GSM486843     1  0.4313      0.771 0.736 0.000 0.260 0.004
#> GSM486845     4  0.5883      0.554 0.064 0.288 0.000 0.648
#> GSM486847     1  0.4356      0.759 0.708 0.000 0.292 0.000
#> GSM486849     4  0.5650      0.510 0.024 0.432 0.000 0.544
#> GSM486851     1  0.5690      0.576 0.708 0.000 0.096 0.196
#> GSM486853     4  0.5510      0.443 0.016 0.480 0.000 0.504
#> GSM486855     4  0.5696      0.456 0.024 0.484 0.000 0.492
#> GSM486857     4  0.6206      0.529 0.088 0.280 0.000 0.632
#> GSM486736     4  0.6147     -0.170 0.048 0.464 0.000 0.488
#> GSM486738     2  0.2675      0.590 0.008 0.892 0.000 0.100
#> GSM486740     2  0.6204      0.186 0.052 0.500 0.000 0.448
#> GSM486742     2  0.2530      0.606 0.000 0.888 0.000 0.112
#> GSM486744     2  0.2530      0.616 0.000 0.896 0.004 0.100
#> GSM486746     2  0.5715      0.440 0.028 0.636 0.008 0.328
#> GSM486748     3  0.6428      0.678 0.080 0.128 0.720 0.072
#> GSM486750     2  0.4123      0.590 0.008 0.772 0.000 0.220
#> GSM486752     3  0.7686      0.598 0.100 0.180 0.620 0.100
#> GSM486754     2  0.3529      0.602 0.012 0.836 0.000 0.152
#> GSM486756     2  0.3494      0.592 0.004 0.824 0.000 0.172
#> GSM486758     3  0.6309      0.693 0.188 0.064 0.704 0.044
#> GSM486760     3  0.1211      0.776 0.040 0.000 0.960 0.000
#> GSM486762     3  0.3351      0.757 0.148 0.000 0.844 0.008
#> GSM486764     3  0.9416      0.274 0.208 0.136 0.416 0.240
#> GSM486766     3  0.2654      0.766 0.108 0.000 0.888 0.004
#> GSM486768     2  0.4687      0.580 0.008 0.776 0.028 0.188
#> GSM486770     2  0.5673      0.393 0.032 0.596 0.000 0.372
#> GSM486772     2  0.2958      0.616 0.004 0.876 0.004 0.116
#> GSM486774     2  0.6193      0.497 0.024 0.624 0.032 0.320
#> GSM486776     3  0.2081      0.762 0.084 0.000 0.916 0.000
#> GSM486778     3  0.2868      0.767 0.136 0.000 0.864 0.000
#> GSM486780     2  0.3108      0.546 0.000 0.872 0.016 0.112
#> GSM486782     2  0.4267      0.579 0.004 0.772 0.008 0.216
#> GSM486784     2  0.1930      0.590 0.004 0.936 0.004 0.056
#> GSM486786     3  0.3074      0.741 0.152 0.000 0.848 0.000
#> GSM486788     3  0.0707      0.778 0.020 0.000 0.980 0.000
#> GSM486790     2  0.4509      0.516 0.004 0.708 0.000 0.288
#> GSM486792     3  0.4839      0.685 0.184 0.000 0.764 0.052
#> GSM486794     3  0.3355      0.755 0.160 0.000 0.836 0.004
#> GSM486796     3  0.4889      0.692 0.044 0.152 0.788 0.016
#> GSM486798     3  0.8303      0.190 0.084 0.392 0.436 0.088
#> GSM486800     3  0.1557      0.774 0.056 0.000 0.944 0.000
#> GSM486802     3  0.1489      0.776 0.044 0.000 0.952 0.004
#> GSM486804     3  0.1520      0.777 0.020 0.024 0.956 0.000
#> GSM486806     2  0.8215      0.340 0.044 0.512 0.176 0.268
#> GSM486808     3  0.2714      0.769 0.112 0.000 0.884 0.004
#> GSM486810     2  0.6737      0.225 0.068 0.484 0.008 0.440
#> GSM486812     3  0.2647      0.767 0.120 0.000 0.880 0.000
#> GSM486814     2  0.1909      0.604 0.008 0.940 0.004 0.048
#> GSM486816     3  0.3444      0.739 0.184 0.000 0.816 0.000
#> GSM486818     3  0.7655      0.455 0.056 0.276 0.572 0.096
#> GSM486821     3  0.9483      0.199 0.148 0.244 0.408 0.200
#> GSM486823     2  0.4647      0.530 0.008 0.704 0.000 0.288
#> GSM486826     3  0.1867      0.765 0.072 0.000 0.928 0.000
#> GSM486830     2  0.5926      0.501 0.028 0.648 0.020 0.304
#> GSM486832     3  0.1022      0.778 0.032 0.000 0.968 0.000
#> GSM486834     3  0.9017      0.421 0.136 0.216 0.484 0.164
#> GSM486836     3  0.1022      0.778 0.032 0.000 0.968 0.000
#> GSM486838     2  0.6031      0.491 0.028 0.732 0.108 0.132
#> GSM486840     3  0.1792      0.768 0.068 0.000 0.932 0.000
#> GSM486842     3  0.1940      0.775 0.076 0.000 0.924 0.000
#> GSM486844     3  0.1786      0.780 0.036 0.008 0.948 0.008
#> GSM486846     2  0.3950      0.572 0.008 0.804 0.004 0.184
#> GSM486848     3  0.2593      0.740 0.104 0.000 0.892 0.004
#> GSM486850     2  0.2714      0.612 0.004 0.884 0.000 0.112
#> GSM486852     3  0.7332      0.547 0.172 0.036 0.624 0.168
#> GSM486854     2  0.2457      0.597 0.004 0.912 0.008 0.076
#> GSM486856     2  0.2048      0.590 0.000 0.928 0.008 0.064
#> GSM486858     2  0.3730      0.581 0.004 0.836 0.016 0.144

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM486735     4   0.455    0.46310 0.000 0.120 0.000 0.752 0.128
#> GSM486737     2   0.572    0.11230 0.008 0.544 0.000 0.380 0.068
#> GSM486739     4   0.485    0.45245 0.004 0.096 0.000 0.728 0.172
#> GSM486741     2   0.552    0.08842 0.004 0.544 0.000 0.392 0.060
#> GSM486743     4   0.588    0.16294 0.004 0.400 0.000 0.508 0.088
#> GSM486745     4   0.549    0.45805 0.008 0.128 0.004 0.688 0.172
#> GSM486747     1   0.627    0.46533 0.636 0.004 0.100 0.044 0.216
#> GSM486749     4   0.538    0.39797 0.004 0.276 0.000 0.640 0.080
#> GSM486751     1   0.717    0.12308 0.504 0.004 0.036 0.188 0.268
#> GSM486753     4   0.535    0.31536 0.004 0.316 0.000 0.616 0.064
#> GSM486755     4   0.547    0.15071 0.004 0.428 0.000 0.516 0.052
#> GSM486757     1   0.614    0.28427 0.588 0.000 0.012 0.136 0.264
#> GSM486759     1   0.409    0.72735 0.756 0.000 0.208 0.000 0.036
#> GSM486761     1   0.473    0.66298 0.752 0.000 0.128 0.008 0.112
#> GSM486763     5   0.743    0.21633 0.296 0.016 0.008 0.312 0.368
#> GSM486765     1   0.433    0.68772 0.740 0.000 0.212 0.000 0.048
#> GSM486767     4   0.691    0.33872 0.032 0.232 0.000 0.528 0.208
#> GSM486769     4   0.485    0.43616 0.004 0.196 0.000 0.720 0.080
#> GSM486771     4   0.583    0.19414 0.012 0.384 0.000 0.536 0.068
#> GSM486773     4   0.515    0.42693 0.032 0.048 0.000 0.708 0.212
#> GSM486775     1   0.411    0.69492 0.700 0.000 0.288 0.000 0.012
#> GSM486777     1   0.316    0.70874 0.860 0.000 0.092 0.004 0.044
#> GSM486779     2   0.644    0.07680 0.024 0.508 0.000 0.364 0.104
#> GSM486781     4   0.655    0.37295 0.028 0.156 0.000 0.572 0.244
#> GSM486783     2   0.548    0.14957 0.008 0.568 0.000 0.372 0.052
#> GSM486785     1   0.292    0.71923 0.856 0.000 0.124 0.000 0.020
#> GSM486787     1   0.434    0.67394 0.684 0.000 0.296 0.000 0.020
#> GSM486789     4   0.501    0.42140 0.008 0.208 0.000 0.708 0.076
#> GSM486791     1   0.679    0.42437 0.560 0.000 0.140 0.048 0.252
#> GSM486793     1   0.432    0.68614 0.780 0.000 0.120 0.004 0.096
#> GSM486795     1   0.755    0.41230 0.572 0.028 0.092 0.144 0.164
#> GSM486797     1   0.813   -0.11913 0.368 0.056 0.016 0.268 0.292
#> GSM486799     1   0.438    0.67061 0.676 0.000 0.304 0.000 0.020
#> GSM486801     1   0.459    0.71372 0.724 0.000 0.212 0.000 0.064
#> GSM486803     1   0.495    0.71788 0.712 0.000 0.208 0.008 0.072
#> GSM486805     4   0.725    0.00187 0.252 0.012 0.008 0.416 0.312
#> GSM486807     1   0.467    0.69013 0.748 0.000 0.148 0.004 0.100
#> GSM486809     4   0.532    0.42237 0.012 0.092 0.004 0.704 0.188
#> GSM486811     1   0.333    0.72241 0.828 0.000 0.144 0.000 0.028
#> GSM486813     2   0.615    0.07340 0.020 0.512 0.000 0.388 0.080
#> GSM486815     1   0.349    0.71007 0.820 0.000 0.144 0.000 0.036
#> GSM486817     4   0.911   -0.11914 0.304 0.076 0.088 0.316 0.216
#> GSM486819     1   0.753   -0.09599 0.392 0.012 0.032 0.188 0.376
#> GSM486822     4   0.521    0.31771 0.000 0.320 0.000 0.616 0.064
#> GSM486824     1   0.491    0.69000 0.680 0.000 0.264 0.004 0.052
#> GSM486828     4   0.637    0.40928 0.040 0.116 0.000 0.604 0.240
#> GSM486831     1   0.453    0.71916 0.724 0.000 0.220 0.000 0.056
#> GSM486833     5   0.762    0.04674 0.308 0.016 0.016 0.328 0.332
#> GSM486835     1   0.462    0.70810 0.700 0.000 0.252 0.000 0.048
#> GSM486837     4   0.869    0.17593 0.204 0.248 0.004 0.296 0.248
#> GSM486839     1   0.379    0.72439 0.768 0.000 0.212 0.000 0.020
#> GSM486841     1   0.268    0.72142 0.872 0.000 0.112 0.000 0.016
#> GSM486843     1   0.448    0.71597 0.756 0.000 0.184 0.012 0.048
#> GSM486845     4   0.693    0.29630 0.024 0.248 0.000 0.504 0.224
#> GSM486847     1   0.394    0.72267 0.756 0.000 0.220 0.000 0.024
#> GSM486849     2   0.625   -0.07330 0.008 0.448 0.004 0.444 0.096
#> GSM486851     1   0.718    0.00335 0.440 0.000 0.044 0.156 0.360
#> GSM486853     2   0.598    0.02464 0.004 0.492 0.000 0.408 0.096
#> GSM486855     2   0.625    0.03778 0.020 0.500 0.000 0.392 0.088
#> GSM486857     4   0.734    0.23391 0.036 0.296 0.000 0.436 0.232
#> GSM486736     4   0.601    0.27499 0.000 0.264 0.000 0.572 0.164
#> GSM486738     2   0.251    0.54511 0.000 0.892 0.000 0.080 0.028
#> GSM486740     4   0.650    0.16934 0.004 0.296 0.004 0.524 0.172
#> GSM486742     2   0.261    0.54930 0.004 0.892 0.000 0.076 0.028
#> GSM486744     2   0.337    0.53793 0.000 0.848 0.004 0.092 0.056
#> GSM486746     2   0.711    0.05047 0.004 0.396 0.012 0.364 0.224
#> GSM486748     3   0.648    0.51285 0.072 0.052 0.636 0.020 0.220
#> GSM486750     2   0.558    0.39685 0.004 0.632 0.000 0.260 0.104
#> GSM486752     3   0.739    0.27677 0.072 0.068 0.528 0.036 0.296
#> GSM486754     2   0.458    0.49590 0.000 0.740 0.004 0.192 0.064
#> GSM486756     2   0.447    0.50110 0.000 0.752 0.000 0.164 0.084
#> GSM486758     3   0.755    0.31457 0.124 0.052 0.508 0.028 0.288
#> GSM486760     3   0.262    0.73279 0.100 0.000 0.880 0.000 0.020
#> GSM486762     3   0.481    0.67095 0.168 0.000 0.724 0.000 0.108
#> GSM486764     5   0.869    0.39373 0.128 0.032 0.236 0.196 0.408
#> GSM486766     3   0.360    0.72146 0.140 0.000 0.816 0.000 0.044
#> GSM486768     2   0.668    0.34547 0.004 0.560 0.020 0.180 0.236
#> GSM486770     4   0.597   -0.05520 0.000 0.440 0.000 0.452 0.108
#> GSM486772     2   0.343    0.53903 0.004 0.848 0.004 0.100 0.044
#> GSM486774     2   0.725    0.22727 0.000 0.448 0.032 0.292 0.228
#> GSM486776     3   0.201    0.73703 0.072 0.000 0.916 0.000 0.012
#> GSM486778     3   0.483    0.68975 0.200 0.000 0.712 0.000 0.088
#> GSM486780     2   0.385    0.52658 0.004 0.828 0.008 0.088 0.072
#> GSM486782     2   0.638    0.38854 0.004 0.588 0.012 0.180 0.216
#> GSM486784     2   0.158    0.54726 0.000 0.944 0.000 0.024 0.032
#> GSM486786     3   0.439    0.69793 0.168 0.000 0.756 0.000 0.076
#> GSM486788     3   0.141    0.73067 0.044 0.000 0.948 0.000 0.008
#> GSM486790     2   0.578    0.25759 0.000 0.528 0.000 0.376 0.096
#> GSM486792     3   0.636    0.35652 0.116 0.000 0.576 0.028 0.280
#> GSM486794     3   0.506    0.66065 0.204 0.000 0.692 0.000 0.104
#> GSM486796     3   0.563    0.52776 0.036 0.112 0.716 0.008 0.128
#> GSM486798     3   0.852   -0.21406 0.048 0.300 0.360 0.052 0.240
#> GSM486800     3   0.167    0.73421 0.076 0.000 0.924 0.000 0.000
#> GSM486802     3   0.282    0.73312 0.096 0.000 0.872 0.000 0.032
#> GSM486804     3   0.268    0.72551 0.048 0.004 0.892 0.000 0.056
#> GSM486806     5   0.840   -0.03317 0.020 0.340 0.128 0.140 0.372
#> GSM486808     3   0.315    0.71744 0.092 0.000 0.856 0.000 0.052
#> GSM486810     4   0.723    0.20774 0.008 0.264 0.024 0.484 0.220
#> GSM486812     3   0.391    0.71759 0.196 0.000 0.772 0.000 0.032
#> GSM486814     2   0.321    0.54452 0.004 0.860 0.000 0.072 0.064
#> GSM486816     3   0.520    0.64473 0.224 0.000 0.672 0.000 0.104
#> GSM486818     3   0.870   -0.09343 0.064 0.172 0.436 0.092 0.236
#> GSM486821     5   0.897    0.34664 0.064 0.124 0.300 0.144 0.368
#> GSM486823     2   0.548    0.30457 0.000 0.584 0.000 0.336 0.080
#> GSM486826     3   0.359    0.71135 0.128 0.008 0.828 0.000 0.036
#> GSM486830     2   0.680    0.30580 0.000 0.488 0.012 0.228 0.272
#> GSM486832     3   0.205    0.73497 0.052 0.000 0.920 0.000 0.028
#> GSM486834     5   0.901    0.19732 0.084 0.128 0.300 0.116 0.372
#> GSM486836     3   0.167    0.73429 0.028 0.000 0.940 0.000 0.032
#> GSM486838     2   0.697    0.34639 0.016 0.608 0.124 0.068 0.184
#> GSM486840     3   0.252    0.72888 0.108 0.000 0.880 0.000 0.012
#> GSM486842     3   0.271    0.73099 0.088 0.000 0.880 0.000 0.032
#> GSM486844     3   0.224    0.73427 0.040 0.004 0.916 0.000 0.040
#> GSM486846     2   0.564    0.46094 0.000 0.660 0.008 0.156 0.176
#> GSM486848     3   0.311    0.71535 0.140 0.000 0.840 0.000 0.020
#> GSM486850     2   0.386    0.53764 0.000 0.812 0.004 0.120 0.064
#> GSM486852     3   0.780   -0.19881 0.096 0.008 0.408 0.124 0.364
#> GSM486854     2   0.278    0.54938 0.000 0.880 0.000 0.048 0.072
#> GSM486856     2   0.276    0.53993 0.000 0.872 0.000 0.024 0.104
#> GSM486858     2   0.573    0.45549 0.008 0.652 0.008 0.096 0.236

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM486735     6   0.575    0.45357 0.000 0.124 0.032 0.000 0.256 0.588
#> GSM486737     2   0.558    0.05054 0.000 0.500 0.036 0.004 0.048 0.412
#> GSM486739     6   0.589    0.41572 0.000 0.076 0.056 0.008 0.264 0.596
#> GSM486741     6   0.524    0.02934 0.000 0.436 0.024 0.004 0.036 0.500
#> GSM486743     6   0.638    0.23012 0.000 0.304 0.104 0.004 0.068 0.520
#> GSM486745     6   0.677    0.36010 0.000 0.104 0.100 0.016 0.248 0.532
#> GSM486747     4   0.715    0.34949 0.100 0.004 0.264 0.512 0.072 0.048
#> GSM486749     6   0.578    0.40254 0.000 0.208 0.068 0.004 0.088 0.632
#> GSM486751     4   0.758    0.05618 0.020 0.004 0.280 0.424 0.108 0.164
#> GSM486753     6   0.514    0.36310 0.000 0.232 0.056 0.004 0.040 0.668
#> GSM486755     6   0.621    0.03867 0.000 0.432 0.048 0.012 0.072 0.436
#> GSM486757     4   0.742    0.26513 0.028 0.004 0.172 0.500 0.180 0.116
#> GSM486759     4   0.488    0.67534 0.212 0.000 0.048 0.692 0.048 0.000
#> GSM486761     4   0.542    0.62073 0.088 0.000 0.100 0.712 0.076 0.024
#> GSM486763     5   0.569    0.48038 0.012 0.008 0.016 0.180 0.648 0.136
#> GSM486765     4   0.462    0.60537 0.236 0.000 0.064 0.688 0.012 0.000
#> GSM486767     6   0.770    0.26624 0.000 0.124 0.156 0.032 0.276 0.412
#> GSM486769     6   0.607    0.44274 0.000 0.164 0.040 0.004 0.208 0.584
#> GSM486771     6   0.547    0.24672 0.000 0.316 0.032 0.000 0.072 0.580
#> GSM486773     6   0.623    0.28383 0.004 0.020 0.184 0.040 0.140 0.612
#> GSM486775     4   0.422    0.59301 0.304 0.000 0.028 0.664 0.004 0.000
#> GSM486777     4   0.400    0.66947 0.104 0.000 0.048 0.796 0.052 0.000
#> GSM486779     2   0.715    0.07324 0.000 0.444 0.104 0.040 0.072 0.340
#> GSM486781     6   0.684    0.19107 0.000 0.128 0.288 0.012 0.080 0.492
#> GSM486783     2   0.563    0.18287 0.000 0.556 0.076 0.000 0.036 0.332
#> GSM486785     4   0.376    0.68876 0.112 0.000 0.044 0.812 0.028 0.004
#> GSM486787     4   0.453    0.63451 0.264 0.000 0.020 0.684 0.028 0.004
#> GSM486789     6   0.562    0.41794 0.000 0.200 0.060 0.000 0.100 0.640
#> GSM486791     4   0.627    0.12540 0.084 0.000 0.040 0.480 0.380 0.016
#> GSM486793     4   0.507    0.61582 0.092 0.000 0.096 0.724 0.084 0.004
#> GSM486795     4   0.788    0.37691 0.060 0.048 0.124 0.532 0.132 0.104
#> GSM486797     4   0.762   -0.02276 0.004 0.028 0.324 0.384 0.080 0.180
#> GSM486799     4   0.474    0.60699 0.292 0.000 0.052 0.644 0.012 0.000
#> GSM486801     4   0.517    0.67219 0.184 0.000 0.052 0.700 0.048 0.016
#> GSM486803     4   0.579    0.63501 0.172 0.000 0.060 0.660 0.088 0.020
#> GSM486805     3   0.809    0.10347 0.000 0.056 0.324 0.228 0.096 0.296
#> GSM486807     4   0.501    0.65007 0.116 0.000 0.116 0.724 0.032 0.012
#> GSM486809     6   0.603    0.29268 0.000 0.068 0.048 0.008 0.372 0.504
#> GSM486811     4   0.384    0.68918 0.132 0.000 0.036 0.800 0.028 0.004
#> GSM486813     2   0.636    0.10648 0.000 0.480 0.068 0.004 0.088 0.360
#> GSM486815     4   0.424    0.66595 0.128 0.000 0.040 0.772 0.060 0.000
#> GSM486817     4   0.882   -0.10954 0.028 0.044 0.204 0.288 0.188 0.248
#> GSM486819     5   0.691    0.39542 0.020 0.004 0.076 0.248 0.528 0.124
#> GSM486822     6   0.648    0.28866 0.000 0.292 0.072 0.000 0.132 0.504
#> GSM486824     4   0.542    0.62856 0.264 0.000 0.048 0.632 0.048 0.008
#> GSM486828     6   0.729    0.13776 0.000 0.088 0.276 0.032 0.136 0.468
#> GSM486831     4   0.577    0.62223 0.180 0.000 0.044 0.632 0.140 0.004
#> GSM486833     3   0.834    0.07599 0.024 0.012 0.300 0.260 0.168 0.236
#> GSM486835     4   0.548    0.64977 0.240 0.000 0.048 0.648 0.048 0.016
#> GSM486837     3   0.810    0.04340 0.004 0.172 0.348 0.096 0.060 0.320
#> GSM486839     4   0.383    0.67933 0.200 0.000 0.020 0.760 0.020 0.000
#> GSM486841     4   0.289    0.68635 0.108 0.000 0.016 0.856 0.020 0.000
#> GSM486843     4   0.533    0.66655 0.144 0.000 0.052 0.712 0.056 0.036
#> GSM486845     6   0.711    0.23755 0.000 0.196 0.204 0.008 0.108 0.484
#> GSM486847     4   0.405    0.67343 0.220 0.000 0.028 0.736 0.016 0.000
#> GSM486849     2   0.572    0.02799 0.000 0.468 0.048 0.000 0.056 0.428
#> GSM486851     5   0.546    0.35035 0.024 0.000 0.008 0.328 0.580 0.060
#> GSM486853     2   0.555    0.08146 0.000 0.492 0.056 0.000 0.036 0.416
#> GSM486855     2   0.623   -0.00326 0.000 0.444 0.104 0.000 0.052 0.400
#> GSM486857     6   0.742    0.12931 0.000 0.232 0.224 0.036 0.064 0.444
#> GSM486736     6   0.678    0.30832 0.000 0.220 0.064 0.000 0.256 0.460
#> GSM486738     2   0.347    0.49144 0.000 0.828 0.032 0.000 0.036 0.104
#> GSM486740     6   0.704    0.25278 0.000 0.236 0.080 0.000 0.268 0.416
#> GSM486742     2   0.347    0.50464 0.000 0.828 0.056 0.000 0.020 0.096
#> GSM486744     2   0.429    0.49291 0.000 0.764 0.088 0.000 0.024 0.124
#> GSM486746     2   0.776   -0.04051 0.016 0.344 0.136 0.000 0.204 0.300
#> GSM486748     1   0.660    0.34182 0.496 0.044 0.356 0.056 0.040 0.008
#> GSM486750     2   0.635    0.29919 0.000 0.544 0.116 0.000 0.084 0.256
#> GSM486752     1   0.698    0.07608 0.424 0.032 0.412 0.048 0.044 0.040
#> GSM486754     2   0.489    0.38813 0.000 0.680 0.044 0.000 0.044 0.232
#> GSM486756     2   0.522    0.40952 0.000 0.684 0.056 0.004 0.064 0.192
#> GSM486758     1   0.786    0.23582 0.408 0.012 0.284 0.144 0.128 0.024
#> GSM486760     1   0.266    0.72590 0.880 0.000 0.024 0.076 0.020 0.000
#> GSM486762     1   0.521    0.67098 0.700 0.004 0.100 0.156 0.036 0.004
#> GSM486764     5   0.615    0.47681 0.124 0.044 0.036 0.040 0.680 0.076
#> GSM486766     1   0.399    0.70289 0.776 0.000 0.040 0.156 0.028 0.000
#> GSM486768     2   0.793    0.13037 0.044 0.416 0.176 0.000 0.220 0.144
#> GSM486770     6   0.700    0.09927 0.000 0.344 0.080 0.000 0.192 0.384
#> GSM486772     2   0.405    0.48429 0.000 0.780 0.048 0.000 0.032 0.140
#> GSM486774     3   0.810    0.15456 0.044 0.284 0.372 0.008 0.104 0.188
#> GSM486776     1   0.311    0.71144 0.840 0.000 0.024 0.120 0.016 0.000
#> GSM486778     1   0.501    0.64970 0.680 0.000 0.032 0.212 0.076 0.000
#> GSM486780     2   0.452    0.50026 0.016 0.772 0.096 0.000 0.032 0.084
#> GSM486782     2   0.685    0.14659 0.016 0.464 0.300 0.000 0.044 0.176
#> GSM486784     2   0.237    0.51150 0.000 0.900 0.024 0.000 0.020 0.056
#> GSM486786     1   0.526    0.61452 0.656 0.000 0.052 0.228 0.064 0.000
#> GSM486788     1   0.233    0.72208 0.904 0.000 0.024 0.044 0.028 0.000
#> GSM486790     2   0.656    0.13111 0.000 0.468 0.108 0.000 0.088 0.336
#> GSM486792     1   0.635    0.02466 0.444 0.004 0.044 0.088 0.412 0.008
#> GSM486794     1   0.578    0.58877 0.608 0.000 0.088 0.240 0.064 0.000
#> GSM486796     1   0.704    0.34866 0.568 0.192 0.104 0.020 0.092 0.024
#> GSM486798     3   0.852    0.26496 0.216 0.264 0.352 0.056 0.076 0.036
#> GSM486800     1   0.195    0.71690 0.912 0.000 0.004 0.072 0.012 0.000
#> GSM486802     1   0.327    0.71945 0.848 0.000 0.032 0.072 0.048 0.000
#> GSM486804     1   0.373    0.71747 0.824 0.008 0.088 0.044 0.036 0.000
#> GSM486806     3   0.734    0.34299 0.068 0.152 0.552 0.008 0.084 0.136
#> GSM486808     1   0.426    0.69944 0.764 0.000 0.120 0.096 0.020 0.000
#> GSM486810     5   0.737   -0.27136 0.000 0.232 0.100 0.004 0.364 0.300
#> GSM486812     1   0.445    0.66281 0.716 0.000 0.044 0.216 0.024 0.000
#> GSM486814     2   0.343    0.50525 0.000 0.840 0.048 0.000 0.056 0.056
#> GSM486816     1   0.509    0.63951 0.672 0.000 0.040 0.220 0.068 0.000
#> GSM486818     1   0.826   -0.11995 0.356 0.116 0.348 0.044 0.092 0.044
#> GSM486821     5   0.768    0.31690 0.144 0.092 0.136 0.024 0.536 0.068
#> GSM486823     2   0.645    0.18457 0.000 0.516 0.092 0.000 0.104 0.288
#> GSM486826     1   0.460    0.64540 0.740 0.004 0.052 0.164 0.040 0.000
#> GSM486830     3   0.785    0.11233 0.028 0.304 0.380 0.004 0.136 0.148
#> GSM486832     1   0.370    0.72141 0.816 0.000 0.032 0.056 0.096 0.000
#> GSM486834     3   0.852    0.21028 0.232 0.076 0.404 0.044 0.176 0.068
#> GSM486836     1   0.324    0.72091 0.852 0.000 0.060 0.040 0.048 0.000
#> GSM486838     2   0.707   -0.02847 0.116 0.456 0.340 0.008 0.028 0.052
#> GSM486840     1   0.292    0.69716 0.840 0.000 0.012 0.136 0.012 0.000
#> GSM486842     1   0.270    0.72074 0.864 0.000 0.008 0.108 0.020 0.000
#> GSM486844     1   0.356    0.71038 0.840 0.004 0.072 0.036 0.044 0.004
#> GSM486846     2   0.653    0.20199 0.004 0.516 0.288 0.000 0.080 0.112
#> GSM486848     1   0.347    0.67105 0.804 0.000 0.016 0.156 0.024 0.000
#> GSM486850     2   0.497    0.50134 0.000 0.720 0.120 0.000 0.060 0.100
#> GSM486852     5   0.528    0.41092 0.256 0.000 0.024 0.040 0.652 0.028
#> GSM486854     2   0.359    0.51336 0.000 0.812 0.124 0.000 0.020 0.044
#> GSM486856     2   0.419    0.49758 0.000 0.776 0.120 0.000 0.032 0.072
#> GSM486858     2   0.627    0.23788 0.016 0.552 0.292 0.000 0.056 0.084

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 agent(p) individual(p) k
#> MAD:skmeans 115 1.00e+00      8.53e-06 2
#> MAD:skmeans 116 1.27e-14      4.30e-01 3
#> MAD:skmeans  90 2.19e-19      9.52e-01 4
#> MAD:skmeans  55 1.14e-12      7.66e-01 5
#> MAD:skmeans  48 3.78e-11      6.32e-01 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 120 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 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-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.139           0.445       0.698         0.4749 0.523   0.523
#> 3 3 0.420           0.690       0.827         0.3884 0.675   0.453
#> 4 4 0.486           0.558       0.713         0.1248 0.845   0.583
#> 5 5 0.604           0.613       0.785         0.0756 0.893   0.612
#> 6 6 0.682           0.638       0.808         0.0361 0.959   0.797

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
#> GSM486735     2  0.2948    0.57922 0.052 0.948
#> GSM486737     2  0.6801    0.30919 0.180 0.820
#> GSM486739     2  0.5408    0.41210 0.124 0.876
#> GSM486741     2  0.3431    0.49013 0.064 0.936
#> GSM486743     2  0.6247    0.38037 0.156 0.844
#> GSM486745     2  0.9286    0.61950 0.344 0.656
#> GSM486747     1  0.9993   -0.38178 0.516 0.484
#> GSM486749     2  0.0000    0.54159 0.000 1.000
#> GSM486751     2  0.9608    0.60270 0.384 0.616
#> GSM486753     2  0.0938    0.53398 0.012 0.988
#> GSM486755     2  0.4562    0.60432 0.096 0.904
#> GSM486757     2  0.9209    0.56644 0.336 0.664
#> GSM486759     1  0.0000    0.58569 1.000 0.000
#> GSM486761     1  0.4431    0.57732 0.908 0.092
#> GSM486763     1  0.8081    0.57617 0.752 0.248
#> GSM486765     1  0.1184    0.59212 0.984 0.016
#> GSM486767     1  0.9993    0.41811 0.516 0.484
#> GSM486769     2  0.2423    0.57169 0.040 0.960
#> GSM486771     2  0.5294    0.42377 0.120 0.880
#> GSM486773     2  0.9358    0.30980 0.352 0.648
#> GSM486775     1  0.6623    0.60066 0.828 0.172
#> GSM486777     1  0.9286    0.52352 0.656 0.344
#> GSM486779     1  0.9977    0.41862 0.528 0.472
#> GSM486781     2  0.2778    0.52501 0.048 0.952
#> GSM486783     2  0.3879    0.47633 0.076 0.924
#> GSM486785     1  0.7139    0.59541 0.804 0.196
#> GSM486787     1  0.0000    0.58569 1.000 0.000
#> GSM486789     2  0.0000    0.54159 0.000 1.000
#> GSM486791     1  0.0376    0.58531 0.996 0.004
#> GSM486793     1  0.9393    0.52151 0.644 0.356
#> GSM486795     2  0.9552    0.22466 0.376 0.624
#> GSM486797     1  0.9996    0.41342 0.512 0.488
#> GSM486799     1  0.0938    0.59180 0.988 0.012
#> GSM486801     1  0.8499    0.55988 0.724 0.276
#> GSM486803     1  0.9393    0.51598 0.644 0.356
#> GSM486805     2  0.7815    0.59753 0.232 0.768
#> GSM486807     1  0.6438    0.59515 0.836 0.164
#> GSM486809     2  0.8955   -0.05802 0.312 0.688
#> GSM486811     1  0.2423    0.59999 0.960 0.040
#> GSM486813     2  0.8813    0.00718 0.300 0.700
#> GSM486815     1  0.9248    0.03729 0.660 0.340
#> GSM486817     1  0.9850    0.47760 0.572 0.428
#> GSM486819     1  0.9491    0.50598 0.632 0.368
#> GSM486822     2  0.0376    0.54388 0.004 0.996
#> GSM486824     1  0.2043    0.59456 0.968 0.032
#> GSM486828     2  0.9988   -0.40448 0.480 0.520
#> GSM486831     1  0.7602    0.58786 0.780 0.220
#> GSM486833     2  0.9795    0.49726 0.416 0.584
#> GSM486835     1  0.1633    0.59542 0.976 0.024
#> GSM486837     2  0.9933   -0.37104 0.452 0.548
#> GSM486839     1  0.8713    0.54976 0.708 0.292
#> GSM486841     1  0.7299    0.59361 0.796 0.204
#> GSM486843     1  0.6531    0.60258 0.832 0.168
#> GSM486845     2  0.9988   -0.40189 0.480 0.520
#> GSM486847     1  0.8608    0.55493 0.716 0.284
#> GSM486849     2  0.0000    0.54159 0.000 1.000
#> GSM486851     1  0.9358    0.51996 0.648 0.352
#> GSM486853     2  0.0376    0.53940 0.004 0.996
#> GSM486855     1  0.9909    0.44451 0.556 0.444
#> GSM486857     2  0.8016    0.18551 0.244 0.756
#> GSM486736     2  0.6712    0.63760 0.176 0.824
#> GSM486738     2  0.6712    0.63506 0.176 0.824
#> GSM486740     2  0.9000    0.63960 0.316 0.684
#> GSM486742     2  0.6148    0.61927 0.152 0.848
#> GSM486744     2  0.9000    0.63870 0.316 0.684
#> GSM486746     2  0.9491    0.61244 0.368 0.632
#> GSM486748     2  0.9815    0.57819 0.420 0.580
#> GSM486750     2  0.9323    0.62450 0.348 0.652
#> GSM486752     2  0.9896    0.55881 0.440 0.560
#> GSM486754     2  0.9170    0.63279 0.332 0.668
#> GSM486756     2  0.8763    0.64184 0.296 0.704
#> GSM486758     2  0.9866    0.56730 0.432 0.568
#> GSM486760     1  0.9896   -0.39720 0.560 0.440
#> GSM486762     2  0.9896    0.55881 0.440 0.560
#> GSM486764     1  0.6438    0.43099 0.836 0.164
#> GSM486766     2  0.9944    0.54401 0.456 0.544
#> GSM486768     2  0.8608    0.61370 0.284 0.716
#> GSM486770     2  0.8713    0.64267 0.292 0.708
#> GSM486772     2  0.9954    0.53139 0.460 0.540
#> GSM486774     2  0.9000    0.63876 0.316 0.684
#> GSM486776     1  0.0000    0.58569 1.000 0.000
#> GSM486778     2  0.9963    0.53661 0.464 0.536
#> GSM486780     2  0.6247    0.62688 0.156 0.844
#> GSM486782     2  0.8763    0.64155 0.296 0.704
#> GSM486784     2  0.6048    0.62389 0.148 0.852
#> GSM486786     2  0.9970    0.52986 0.468 0.532
#> GSM486788     1  0.9993   -0.46714 0.516 0.484
#> GSM486790     2  0.8763    0.64155 0.296 0.704
#> GSM486792     1  0.9977   -0.44018 0.528 0.472
#> GSM486794     2  0.9954    0.53843 0.460 0.540
#> GSM486796     2  0.9795    0.57977 0.416 0.584
#> GSM486798     2  0.9850    0.57119 0.428 0.572
#> GSM486800     1  0.0672    0.58361 0.992 0.008
#> GSM486802     1  0.9661   -0.29124 0.608 0.392
#> GSM486804     1  0.9909   -0.40962 0.556 0.444
#> GSM486806     2  0.9522    0.61586 0.372 0.628
#> GSM486808     2  0.9909    0.55588 0.444 0.556
#> GSM486810     2  0.7815    0.64641 0.232 0.768
#> GSM486812     2  0.9970    0.53259 0.468 0.532
#> GSM486814     2  0.6148    0.50786 0.152 0.848
#> GSM486816     2  0.9922    0.55188 0.448 0.552
#> GSM486818     2  0.9775    0.58320 0.412 0.588
#> GSM486821     1  0.9248    0.16742 0.660 0.340
#> GSM486823     2  0.8608    0.64395 0.284 0.716
#> GSM486826     2  0.9970    0.53204 0.468 0.532
#> GSM486830     2  0.5737    0.62098 0.136 0.864
#> GSM486832     1  0.5294    0.47931 0.880 0.120
#> GSM486834     2  0.9850    0.57110 0.428 0.572
#> GSM486836     1  0.9129   -0.03142 0.672 0.328
#> GSM486838     2  0.9393    0.61975 0.356 0.644
#> GSM486840     1  0.9460   -0.21894 0.636 0.364
#> GSM486842     1  0.9775   -0.29135 0.588 0.412
#> GSM486844     2  0.9933    0.54711 0.452 0.548
#> GSM486846     2  0.1414    0.54565 0.020 0.980
#> GSM486848     1  0.3274    0.54690 0.940 0.060
#> GSM486850     2  0.8713    0.64652 0.292 0.708
#> GSM486852     1  0.4431    0.53205 0.908 0.092
#> GSM486854     2  0.8016    0.64763 0.244 0.756
#> GSM486856     2  0.3733    0.51244 0.072 0.928
#> GSM486858     2  0.9248    0.63054 0.340 0.660

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM486735     2  0.4931     0.6635 0.000 0.768 0.232
#> GSM486737     2  0.0592     0.7811 0.000 0.988 0.012
#> GSM486739     2  0.0000     0.7820 0.000 1.000 0.000
#> GSM486741     2  0.0892     0.7809 0.000 0.980 0.020
#> GSM486743     2  0.2448     0.7684 0.000 0.924 0.076
#> GSM486745     3  0.5318     0.7080 0.016 0.204 0.780
#> GSM486747     3  0.5860     0.6307 0.228 0.024 0.748
#> GSM486749     2  0.4062     0.7452 0.000 0.836 0.164
#> GSM486751     3  0.1774     0.7891 0.024 0.016 0.960
#> GSM486753     2  0.0747     0.7803 0.000 0.984 0.016
#> GSM486755     2  0.4121     0.7137 0.000 0.832 0.168
#> GSM486757     3  0.6567     0.6404 0.088 0.160 0.752
#> GSM486759     1  0.1163     0.8659 0.972 0.000 0.028
#> GSM486761     1  0.3377     0.8460 0.896 0.012 0.092
#> GSM486763     1  0.4930     0.7958 0.836 0.120 0.044
#> GSM486765     1  0.2448     0.8518 0.924 0.000 0.076
#> GSM486767     2  0.4033     0.7360 0.136 0.856 0.008
#> GSM486769     2  0.3551     0.7592 0.000 0.868 0.132
#> GSM486771     2  0.0747     0.7846 0.016 0.984 0.000
#> GSM486773     2  0.7874     0.5063 0.064 0.568 0.368
#> GSM486775     1  0.0237     0.8643 0.996 0.000 0.004
#> GSM486777     1  0.3129     0.8296 0.904 0.088 0.008
#> GSM486779     2  0.7339     0.2301 0.392 0.572 0.036
#> GSM486781     2  0.5292     0.7360 0.028 0.800 0.172
#> GSM486783     2  0.0000     0.7820 0.000 1.000 0.000
#> GSM486785     1  0.0661     0.8655 0.988 0.004 0.008
#> GSM486787     1  0.0592     0.8630 0.988 0.000 0.012
#> GSM486789     2  0.0592     0.7811 0.000 0.988 0.012
#> GSM486791     1  0.2448     0.8590 0.924 0.000 0.076
#> GSM486793     1  0.5667     0.7738 0.800 0.060 0.140
#> GSM486795     2  0.9736     0.1952 0.228 0.416 0.356
#> GSM486797     1  0.9285     0.0433 0.448 0.392 0.160
#> GSM486799     1  0.0592     0.8630 0.988 0.000 0.012
#> GSM486801     1  0.3918     0.7915 0.868 0.120 0.012
#> GSM486803     1  0.3031     0.8435 0.912 0.076 0.012
#> GSM486805     3  0.7446    -0.0986 0.036 0.432 0.532
#> GSM486807     1  0.2625     0.8502 0.916 0.000 0.084
#> GSM486809     2  0.1905     0.7871 0.028 0.956 0.016
#> GSM486811     1  0.1129     0.8672 0.976 0.004 0.020
#> GSM486813     2  0.2711     0.7580 0.088 0.912 0.000
#> GSM486815     1  0.6676    -0.0401 0.516 0.008 0.476
#> GSM486817     2  0.5536     0.6153 0.236 0.752 0.012
#> GSM486819     1  0.4351     0.7619 0.828 0.168 0.004
#> GSM486822     2  0.4504     0.7304 0.000 0.804 0.196
#> GSM486824     1  0.3129     0.8535 0.904 0.008 0.088
#> GSM486828     2  0.5060     0.7446 0.100 0.836 0.064
#> GSM486831     1  0.1620     0.8631 0.964 0.024 0.012
#> GSM486833     3  0.7451     0.3097 0.060 0.304 0.636
#> GSM486835     1  0.0892     0.8665 0.980 0.000 0.020
#> GSM486837     2  0.6431     0.7217 0.084 0.760 0.156
#> GSM486839     1  0.0000     0.8643 1.000 0.000 0.000
#> GSM486841     1  0.3112     0.8500 0.916 0.056 0.028
#> GSM486843     1  0.0475     0.8662 0.992 0.004 0.004
#> GSM486845     2  0.6148     0.7323 0.076 0.776 0.148
#> GSM486847     1  0.0592     0.8630 0.988 0.000 0.012
#> GSM486849     2  0.2537     0.7811 0.000 0.920 0.080
#> GSM486851     1  0.3193     0.8272 0.896 0.100 0.004
#> GSM486853     2  0.1031     0.7864 0.000 0.976 0.024
#> GSM486855     2  0.1031     0.7850 0.024 0.976 0.000
#> GSM486857     2  0.5967     0.7080 0.032 0.752 0.216
#> GSM486736     2  0.5968     0.4362 0.000 0.636 0.364
#> GSM486738     2  0.5591     0.5246 0.000 0.696 0.304
#> GSM486740     3  0.5254     0.6521 0.000 0.264 0.736
#> GSM486742     2  0.6299    -0.0503 0.000 0.524 0.476
#> GSM486744     3  0.5016     0.6739 0.000 0.240 0.760
#> GSM486746     3  0.4399     0.7138 0.000 0.188 0.812
#> GSM486748     3  0.1711     0.7911 0.032 0.008 0.960
#> GSM486750     3  0.2066     0.7809 0.000 0.060 0.940
#> GSM486752     3  0.1289     0.7932 0.032 0.000 0.968
#> GSM486754     3  0.4452     0.7112 0.000 0.192 0.808
#> GSM486756     3  0.4974     0.6772 0.000 0.236 0.764
#> GSM486758     3  0.1163     0.7928 0.028 0.000 0.972
#> GSM486760     3  0.5098     0.7166 0.248 0.000 0.752
#> GSM486762     3  0.1529     0.7939 0.040 0.000 0.960
#> GSM486764     1  0.6761     0.5918 0.700 0.048 0.252
#> GSM486766     3  0.3816     0.7848 0.148 0.000 0.852
#> GSM486768     3  0.8608     0.3712 0.104 0.384 0.512
#> GSM486770     3  0.4555     0.7117 0.000 0.200 0.800
#> GSM486772     3  0.6836     0.6627 0.056 0.240 0.704
#> GSM486774     3  0.1031     0.7887 0.000 0.024 0.976
#> GSM486776     1  0.0592     0.8630 0.988 0.000 0.012
#> GSM486778     3  0.3267     0.7837 0.116 0.000 0.884
#> GSM486780     2  0.6047     0.4787 0.008 0.680 0.312
#> GSM486782     3  0.1163     0.7874 0.000 0.028 0.972
#> GSM486784     2  0.7337     0.1140 0.032 0.540 0.428
#> GSM486786     3  0.4002     0.7743 0.160 0.000 0.840
#> GSM486788     3  0.5397     0.6743 0.280 0.000 0.720
#> GSM486790     3  0.4346     0.7162 0.000 0.184 0.816
#> GSM486792     3  0.4974     0.7068 0.236 0.000 0.764
#> GSM486794     3  0.3412     0.7865 0.124 0.000 0.876
#> GSM486796     3  0.4443     0.7919 0.084 0.052 0.864
#> GSM486798     3  0.1163     0.7938 0.028 0.000 0.972
#> GSM486800     1  0.0747     0.8630 0.984 0.000 0.016
#> GSM486802     3  0.5968     0.5581 0.364 0.000 0.636
#> GSM486804     3  0.5465     0.6751 0.288 0.000 0.712
#> GSM486806     3  0.1482     0.7893 0.020 0.012 0.968
#> GSM486808     3  0.1753     0.7928 0.048 0.000 0.952
#> GSM486810     3  0.6209     0.4660 0.004 0.368 0.628
#> GSM486812     3  0.4002     0.7720 0.160 0.000 0.840
#> GSM486814     2  0.5174     0.7348 0.076 0.832 0.092
#> GSM486816     3  0.2959     0.7911 0.100 0.000 0.900
#> GSM486818     3  0.4660     0.7907 0.072 0.072 0.856
#> GSM486821     1  0.9687    -0.1525 0.412 0.216 0.372
#> GSM486823     3  0.2796     0.7531 0.000 0.092 0.908
#> GSM486826     3  0.3551     0.7878 0.132 0.000 0.868
#> GSM486830     2  0.6468     0.4114 0.004 0.552 0.444
#> GSM486832     1  0.4062     0.7825 0.836 0.000 0.164
#> GSM486834     3  0.1031     0.7937 0.024 0.000 0.976
#> GSM486836     3  0.6291     0.1999 0.468 0.000 0.532
#> GSM486838     3  0.1999     0.7909 0.012 0.036 0.952
#> GSM486840     3  0.6126     0.5002 0.400 0.000 0.600
#> GSM486842     3  0.5835     0.5630 0.340 0.000 0.660
#> GSM486844     3  0.3816     0.7767 0.148 0.000 0.852
#> GSM486846     2  0.4887     0.7097 0.000 0.772 0.228
#> GSM486848     1  0.3752     0.7804 0.856 0.000 0.144
#> GSM486850     3  0.3851     0.7593 0.004 0.136 0.860
#> GSM486852     1  0.4452     0.7531 0.808 0.000 0.192
#> GSM486854     3  0.5254     0.6478 0.000 0.264 0.736
#> GSM486856     2  0.2663     0.7753 0.024 0.932 0.044
#> GSM486858     3  0.0747     0.7885 0.000 0.016 0.984

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM486735     4  0.5470    0.58599 0.000 0.168 0.100 0.732
#> GSM486737     4  0.4522    0.43720 0.000 0.320 0.000 0.680
#> GSM486739     4  0.3074    0.73044 0.000 0.152 0.000 0.848
#> GSM486741     4  0.4977    0.01779 0.000 0.460 0.000 0.540
#> GSM486743     2  0.4866    0.27792 0.000 0.596 0.000 0.404
#> GSM486745     2  0.5505    0.46501 0.008 0.744 0.164 0.084
#> GSM486747     3  0.7968    0.46793 0.320 0.212 0.456 0.012
#> GSM486749     4  0.0469    0.77475 0.000 0.000 0.012 0.988
#> GSM486751     3  0.7390    0.57277 0.088 0.320 0.556 0.036
#> GSM486753     4  0.3356    0.67173 0.000 0.176 0.000 0.824
#> GSM486755     2  0.5320    0.25544 0.000 0.572 0.012 0.416
#> GSM486757     3  0.9353    0.42091 0.140 0.256 0.424 0.180
#> GSM486759     1  0.2408    0.79995 0.896 0.000 0.104 0.000
#> GSM486761     1  0.1938    0.79087 0.936 0.012 0.052 0.000
#> GSM486763     1  0.3853    0.76955 0.848 0.016 0.020 0.116
#> GSM486765     1  0.1211    0.79312 0.960 0.000 0.040 0.000
#> GSM486767     4  0.3130    0.76616 0.040 0.052 0.012 0.896
#> GSM486769     4  0.4337    0.69909 0.000 0.140 0.052 0.808
#> GSM486771     4  0.1211    0.77085 0.000 0.040 0.000 0.960
#> GSM486773     4  0.7663    0.40386 0.128 0.044 0.248 0.580
#> GSM486775     1  0.1557    0.80459 0.944 0.000 0.056 0.000
#> GSM486777     1  0.3166    0.75444 0.868 0.000 0.016 0.116
#> GSM486779     2  0.7491    0.26392 0.232 0.500 0.000 0.268
#> GSM486781     4  0.1151    0.77453 0.000 0.024 0.008 0.968
#> GSM486783     4  0.1792    0.76593 0.000 0.068 0.000 0.932
#> GSM486785     1  0.0376    0.80145 0.992 0.000 0.004 0.004
#> GSM486787     1  0.2345    0.80088 0.900 0.000 0.100 0.000
#> GSM486789     4  0.4605    0.48320 0.000 0.336 0.000 0.664
#> GSM486791     1  0.2466    0.80986 0.900 0.000 0.096 0.004
#> GSM486793     1  0.3372    0.77188 0.868 0.000 0.096 0.036
#> GSM486795     4  0.9320   -0.01282 0.192 0.108 0.348 0.352
#> GSM486797     1  0.6101   -0.00523 0.496 0.012 0.024 0.468
#> GSM486799     1  0.2216    0.80407 0.908 0.000 0.092 0.000
#> GSM486801     1  0.6101    0.56171 0.560 0.000 0.388 0.052
#> GSM486803     1  0.2816    0.81087 0.900 0.000 0.064 0.036
#> GSM486805     4  0.8674    0.20087 0.112 0.128 0.256 0.504
#> GSM486807     1  0.1398    0.79713 0.956 0.000 0.040 0.004
#> GSM486809     4  0.4182    0.71905 0.036 0.140 0.004 0.820
#> GSM486811     1  0.4855    0.57747 0.644 0.000 0.352 0.004
#> GSM486813     4  0.1816    0.77260 0.024 0.024 0.004 0.948
#> GSM486815     1  0.7595   -0.11148 0.460 0.108 0.408 0.024
#> GSM486817     4  0.4274    0.66256 0.148 0.000 0.044 0.808
#> GSM486819     1  0.2973    0.74302 0.856 0.000 0.000 0.144
#> GSM486822     4  0.1389    0.77131 0.000 0.048 0.000 0.952
#> GSM486824     1  0.3257    0.79840 0.844 0.000 0.152 0.004
#> GSM486828     4  0.2164    0.76186 0.068 0.004 0.004 0.924
#> GSM486831     1  0.2741    0.80426 0.892 0.000 0.096 0.012
#> GSM486833     3  0.8939    0.23479 0.100 0.144 0.424 0.332
#> GSM486835     1  0.1302    0.80865 0.956 0.000 0.044 0.000
#> GSM486837     4  0.2860    0.74560 0.100 0.004 0.008 0.888
#> GSM486839     1  0.1211    0.80986 0.960 0.000 0.040 0.000
#> GSM486841     1  0.3638    0.77453 0.848 0.000 0.120 0.032
#> GSM486843     1  0.3726    0.73196 0.788 0.000 0.212 0.000
#> GSM486845     4  0.1690    0.77308 0.008 0.032 0.008 0.952
#> GSM486847     1  0.2921    0.79453 0.860 0.000 0.140 0.000
#> GSM486849     4  0.0895    0.77583 0.000 0.020 0.004 0.976
#> GSM486851     1  0.3691    0.79929 0.856 0.000 0.068 0.076
#> GSM486853     4  0.1305    0.77195 0.000 0.036 0.004 0.960
#> GSM486855     4  0.1209    0.77134 0.004 0.032 0.000 0.964
#> GSM486857     4  0.2465    0.76208 0.044 0.012 0.020 0.924
#> GSM486736     2  0.7081    0.23943 0.000 0.512 0.136 0.352
#> GSM486738     2  0.4889    0.35168 0.000 0.636 0.004 0.360
#> GSM486740     2  0.3144    0.59761 0.000 0.884 0.072 0.044
#> GSM486742     2  0.4286    0.63608 0.000 0.812 0.052 0.136
#> GSM486744     2  0.1474    0.62348 0.000 0.948 0.000 0.052
#> GSM486746     2  0.4711    0.33221 0.000 0.740 0.236 0.024
#> GSM486748     3  0.6149    0.58343 0.016 0.356 0.596 0.032
#> GSM486750     2  0.5827   -0.33920 0.000 0.532 0.436 0.032
#> GSM486752     3  0.5598    0.60001 0.004 0.332 0.636 0.028
#> GSM486754     2  0.2300    0.59056 0.000 0.920 0.064 0.016
#> GSM486756     2  0.3088    0.60908 0.000 0.888 0.060 0.052
#> GSM486758     3  0.6826    0.58975 0.060 0.324 0.588 0.028
#> GSM486760     3  0.3986    0.55724 0.132 0.032 0.832 0.004
#> GSM486762     3  0.6325    0.61974 0.056 0.248 0.668 0.028
#> GSM486764     1  0.6660    0.54673 0.628 0.112 0.252 0.008
#> GSM486766     3  0.6011    0.61542 0.124 0.172 0.700 0.004
#> GSM486768     2  0.7758    0.28282 0.032 0.508 0.340 0.120
#> GSM486770     2  0.4175    0.34194 0.000 0.776 0.212 0.012
#> GSM486772     2  0.4238    0.56890 0.000 0.796 0.176 0.028
#> GSM486774     3  0.6393    0.54185 0.008 0.384 0.556 0.052
#> GSM486776     1  0.4790    0.61250 0.620 0.000 0.380 0.000
#> GSM486778     3  0.2438    0.57179 0.048 0.012 0.924 0.016
#> GSM486780     2  0.5300    0.46201 0.000 0.664 0.028 0.308
#> GSM486782     3  0.5738    0.49874 0.000 0.432 0.540 0.028
#> GSM486784     2  0.5226    0.61143 0.000 0.756 0.116 0.128
#> GSM486786     3  0.3356    0.54507 0.176 0.000 0.824 0.000
#> GSM486788     3  0.3311    0.45789 0.172 0.000 0.828 0.000
#> GSM486790     2  0.0188    0.60862 0.000 0.996 0.004 0.000
#> GSM486792     3  0.6039    0.59659 0.148 0.136 0.708 0.008
#> GSM486794     3  0.4883    0.62314 0.048 0.136 0.796 0.020
#> GSM486796     3  0.5878    0.57918 0.024 0.360 0.604 0.012
#> GSM486798     3  0.5560    0.60248 0.004 0.324 0.644 0.028
#> GSM486800     1  0.4955    0.54202 0.556 0.000 0.444 0.000
#> GSM486802     3  0.3791    0.41644 0.200 0.004 0.796 0.000
#> GSM486804     3  0.4285    0.52391 0.156 0.040 0.804 0.000
#> GSM486806     3  0.6609    0.57075 0.040 0.360 0.572 0.028
#> GSM486808     3  0.7020    0.58131 0.108 0.304 0.576 0.012
#> GSM486810     2  0.6531    0.47627 0.000 0.636 0.204 0.160
#> GSM486812     3  0.1978    0.56581 0.068 0.000 0.928 0.004
#> GSM486814     2  0.6821    0.40421 0.000 0.592 0.152 0.256
#> GSM486816     3  0.5041    0.62381 0.044 0.188 0.760 0.008
#> GSM486818     3  0.6102    0.57011 0.024 0.364 0.592 0.020
#> GSM486821     3  0.8394    0.25825 0.240 0.168 0.524 0.068
#> GSM486823     3  0.6735    0.47384 0.000 0.388 0.516 0.096
#> GSM486826     3  0.6059    0.61779 0.064 0.288 0.644 0.004
#> GSM486830     4  0.6724    0.39694 0.000 0.164 0.224 0.612
#> GSM486832     1  0.3873    0.73870 0.772 0.000 0.228 0.000
#> GSM486834     3  0.5773    0.58755 0.004 0.352 0.612 0.032
#> GSM486836     3  0.5829    0.31227 0.268 0.044 0.676 0.012
#> GSM486838     3  0.5872    0.55108 0.000 0.384 0.576 0.040
#> GSM486840     3  0.3801    0.37182 0.220 0.000 0.780 0.000
#> GSM486842     3  0.2921    0.50091 0.140 0.000 0.860 0.000
#> GSM486844     3  0.4452    0.59427 0.052 0.124 0.816 0.008
#> GSM486846     4  0.2174    0.76037 0.000 0.052 0.020 0.928
#> GSM486848     3  0.4948   -0.32857 0.440 0.000 0.560 0.000
#> GSM486850     2  0.6426   -0.05383 0.000 0.568 0.352 0.080
#> GSM486852     1  0.5355    0.54806 0.580 0.004 0.408 0.008
#> GSM486854     2  0.2965    0.60360 0.000 0.892 0.072 0.036
#> GSM486856     2  0.4877    0.24263 0.000 0.592 0.000 0.408
#> GSM486858     3  0.5915    0.53031 0.000 0.400 0.560 0.040

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM486735     4  0.6712    0.40767 0.000 0.256 0.160 0.552 0.032
#> GSM486737     4  0.4060    0.21426 0.000 0.360 0.000 0.640 0.000
#> GSM486739     4  0.4497    0.58327 0.000 0.248 0.008 0.716 0.028
#> GSM486741     2  0.4321    0.48157 0.000 0.600 0.004 0.396 0.000
#> GSM486743     2  0.3835    0.63403 0.000 0.744 0.012 0.244 0.000
#> GSM486745     2  0.6311    0.42865 0.008 0.572 0.320 0.068 0.032
#> GSM486747     3  0.3774    0.55016 0.296 0.000 0.704 0.000 0.000
#> GSM486749     4  0.0671    0.76634 0.000 0.000 0.016 0.980 0.004
#> GSM486751     3  0.0671    0.82215 0.016 0.000 0.980 0.004 0.000
#> GSM486753     4  0.2929    0.61755 0.000 0.180 0.000 0.820 0.000
#> GSM486755     2  0.4275    0.60656 0.000 0.696 0.020 0.284 0.000
#> GSM486757     3  0.4657    0.65506 0.108 0.000 0.740 0.152 0.000
#> GSM486759     1  0.2891    0.77982 0.824 0.000 0.000 0.000 0.176
#> GSM486761     1  0.2036    0.79751 0.920 0.000 0.024 0.000 0.056
#> GSM486763     1  0.2604    0.79134 0.896 0.012 0.000 0.072 0.020
#> GSM486765     1  0.0404    0.80562 0.988 0.000 0.000 0.000 0.012
#> GSM486767     4  0.2151    0.75581 0.040 0.020 0.000 0.924 0.016
#> GSM486769     4  0.5829    0.55378 0.000 0.212 0.096 0.660 0.032
#> GSM486771     4  0.1121    0.76256 0.000 0.044 0.000 0.956 0.000
#> GSM486773     4  0.6247    0.41603 0.116 0.008 0.324 0.548 0.004
#> GSM486775     1  0.3305    0.64714 0.776 0.000 0.000 0.000 0.224
#> GSM486777     1  0.3019    0.76727 0.864 0.000 0.000 0.088 0.048
#> GSM486779     2  0.5964    0.52388 0.180 0.588 0.000 0.232 0.000
#> GSM486781     4  0.0963    0.76737 0.000 0.000 0.036 0.964 0.000
#> GSM486783     4  0.1270    0.75679 0.000 0.052 0.000 0.948 0.000
#> GSM486785     1  0.0794    0.80999 0.972 0.000 0.000 0.000 0.028
#> GSM486787     1  0.2020    0.81363 0.900 0.000 0.000 0.000 0.100
#> GSM486789     2  0.5001   -0.10229 0.000 0.496 0.008 0.480 0.016
#> GSM486791     1  0.1704    0.82211 0.928 0.000 0.004 0.000 0.068
#> GSM486793     1  0.3536    0.72411 0.812 0.000 0.032 0.000 0.156
#> GSM486795     4  0.9013   -0.07570 0.164 0.028 0.232 0.312 0.264
#> GSM486797     1  0.5508   -0.05112 0.476 0.000 0.064 0.460 0.000
#> GSM486799     1  0.1732    0.82165 0.920 0.000 0.000 0.000 0.080
#> GSM486801     5  0.3807    0.55148 0.240 0.000 0.000 0.012 0.748
#> GSM486803     1  0.1638    0.82147 0.932 0.000 0.000 0.004 0.064
#> GSM486805     4  0.5799    0.18955 0.092 0.000 0.416 0.492 0.000
#> GSM486807     1  0.1408    0.80525 0.948 0.000 0.008 0.000 0.044
#> GSM486809     4  0.5766    0.50915 0.028 0.280 0.016 0.640 0.036
#> GSM486811     5  0.3305    0.62096 0.224 0.000 0.000 0.000 0.776
#> GSM486813     4  0.1018    0.76220 0.016 0.016 0.000 0.968 0.000
#> GSM486815     5  0.6901    0.31709 0.320 0.000 0.244 0.008 0.428
#> GSM486817     4  0.3589    0.67720 0.132 0.000 0.004 0.824 0.040
#> GSM486819     1  0.1942    0.79458 0.920 0.000 0.000 0.068 0.012
#> GSM486822     4  0.1725    0.76019 0.000 0.044 0.020 0.936 0.000
#> GSM486824     1  0.2624    0.81194 0.872 0.000 0.012 0.000 0.116
#> GSM486828     4  0.1571    0.75867 0.060 0.004 0.000 0.936 0.000
#> GSM486831     1  0.2561    0.79798 0.856 0.000 0.000 0.000 0.144
#> GSM486833     3  0.5059    0.46505 0.056 0.000 0.660 0.280 0.004
#> GSM486835     1  0.1608    0.82181 0.928 0.000 0.000 0.000 0.072
#> GSM486837     4  0.2331    0.74804 0.080 0.000 0.020 0.900 0.000
#> GSM486839     1  0.2852    0.74629 0.828 0.000 0.000 0.000 0.172
#> GSM486841     1  0.3612    0.56139 0.732 0.000 0.000 0.000 0.268
#> GSM486843     1  0.4171    0.26829 0.604 0.000 0.000 0.000 0.396
#> GSM486845     4  0.1740    0.76544 0.012 0.000 0.056 0.932 0.000
#> GSM486847     1  0.3274    0.74525 0.780 0.000 0.000 0.000 0.220
#> GSM486849     4  0.0671    0.76645 0.000 0.016 0.000 0.980 0.004
#> GSM486851     1  0.2270    0.81969 0.904 0.000 0.000 0.020 0.076
#> GSM486853     4  0.0451    0.76597 0.000 0.004 0.008 0.988 0.000
#> GSM486855     4  0.0671    0.76166 0.000 0.016 0.004 0.980 0.000
#> GSM486857     4  0.2359    0.75766 0.036 0.000 0.060 0.904 0.000
#> GSM486736     2  0.6595    0.35899 0.000 0.580 0.180 0.208 0.032
#> GSM486738     2  0.3993    0.64515 0.000 0.756 0.028 0.216 0.000
#> GSM486740     2  0.3193    0.64342 0.000 0.852 0.112 0.004 0.032
#> GSM486742     2  0.4114    0.68096 0.000 0.776 0.164 0.060 0.000
#> GSM486744     2  0.2514    0.67966 0.000 0.896 0.044 0.060 0.000
#> GSM486746     2  0.4825    0.24125 0.000 0.568 0.408 0.000 0.024
#> GSM486748     3  0.0451    0.82294 0.004 0.000 0.988 0.000 0.008
#> GSM486750     3  0.3456    0.66243 0.000 0.184 0.800 0.016 0.000
#> GSM486752     3  0.0671    0.82156 0.004 0.000 0.980 0.000 0.016
#> GSM486754     2  0.3196    0.65860 0.000 0.804 0.192 0.004 0.000
#> GSM486756     2  0.4497    0.65601 0.000 0.732 0.208 0.060 0.000
#> GSM486758     3  0.0693    0.82331 0.012 0.008 0.980 0.000 0.000
#> GSM486760     5  0.3621    0.65552 0.020 0.000 0.192 0.000 0.788
#> GSM486762     3  0.2843    0.72252 0.008 0.000 0.848 0.000 0.144
#> GSM486764     1  0.6539    0.50248 0.588 0.032 0.176 0.000 0.204
#> GSM486766     5  0.5548    0.10935 0.068 0.000 0.440 0.000 0.492
#> GSM486768     2  0.7538    0.02713 0.000 0.396 0.148 0.076 0.380
#> GSM486770     2  0.5212    0.34400 0.000 0.620 0.332 0.016 0.032
#> GSM486772     2  0.4038    0.64216 0.000 0.808 0.032 0.028 0.132
#> GSM486774     3  0.0579    0.82317 0.000 0.008 0.984 0.008 0.000
#> GSM486776     5  0.3039    0.58625 0.192 0.000 0.000 0.000 0.808
#> GSM486778     5  0.2930    0.68426 0.004 0.000 0.164 0.000 0.832
#> GSM486780     2  0.4468    0.64871 0.000 0.728 0.040 0.228 0.004
#> GSM486782     3  0.0963    0.81801 0.000 0.036 0.964 0.000 0.000
#> GSM486784     2  0.4605    0.69124 0.000 0.780 0.124 0.060 0.036
#> GSM486786     5  0.3971    0.68736 0.100 0.000 0.100 0.000 0.800
#> GSM486788     5  0.1364    0.72283 0.012 0.000 0.036 0.000 0.952
#> GSM486790     2  0.1408    0.67004 0.000 0.948 0.044 0.000 0.008
#> GSM486792     3  0.5604   -0.10919 0.072 0.000 0.468 0.000 0.460
#> GSM486794     5  0.4538    0.23956 0.008 0.000 0.452 0.000 0.540
#> GSM486796     3  0.3278    0.71587 0.000 0.020 0.824 0.000 0.156
#> GSM486798     3  0.0771    0.82221 0.000 0.004 0.976 0.000 0.020
#> GSM486800     5  0.0963    0.70803 0.036 0.000 0.000 0.000 0.964
#> GSM486802     5  0.2903    0.70963 0.080 0.000 0.048 0.000 0.872
#> GSM486804     5  0.2625    0.72368 0.016 0.000 0.108 0.000 0.876
#> GSM486806     3  0.0451    0.82331 0.000 0.004 0.988 0.000 0.008
#> GSM486808     3  0.2248    0.78480 0.088 0.000 0.900 0.000 0.012
#> GSM486810     2  0.6700    0.29889 0.000 0.460 0.380 0.140 0.020
#> GSM486812     5  0.2825    0.71287 0.016 0.000 0.124 0.000 0.860
#> GSM486814     2  0.4986    0.65337 0.000 0.736 0.020 0.164 0.080
#> GSM486816     5  0.4562   -0.00406 0.008 0.000 0.496 0.000 0.496
#> GSM486818     3  0.3602    0.70245 0.000 0.024 0.796 0.000 0.180
#> GSM486821     5  0.8094    0.47475 0.156 0.100 0.168 0.048 0.528
#> GSM486823     3  0.3787    0.72642 0.000 0.120 0.820 0.052 0.008
#> GSM486826     3  0.4003    0.54366 0.008 0.000 0.704 0.000 0.288
#> GSM486830     4  0.6550    0.36126 0.000 0.136 0.356 0.492 0.016
#> GSM486832     1  0.3608    0.78208 0.812 0.000 0.040 0.000 0.148
#> GSM486834     3  0.0566    0.82262 0.004 0.000 0.984 0.000 0.012
#> GSM486836     5  0.4577    0.66117 0.108 0.000 0.144 0.000 0.748
#> GSM486838     3  0.1082    0.81982 0.000 0.028 0.964 0.000 0.008
#> GSM486840     5  0.0992    0.71813 0.008 0.000 0.024 0.000 0.968
#> GSM486842     5  0.1965    0.72643 0.024 0.000 0.052 0.000 0.924
#> GSM486844     5  0.4201    0.32901 0.000 0.000 0.408 0.000 0.592
#> GSM486846     4  0.1851    0.75373 0.000 0.000 0.088 0.912 0.000
#> GSM486848     5  0.0963    0.70747 0.036 0.000 0.000 0.000 0.964
#> GSM486850     3  0.5378    0.38773 0.000 0.284 0.648 0.044 0.024
#> GSM486852     5  0.6045    0.08651 0.400 0.004 0.104 0.000 0.492
#> GSM486854     2  0.3890    0.62081 0.000 0.736 0.252 0.012 0.000
#> GSM486856     2  0.3783    0.61843 0.000 0.740 0.008 0.252 0.000
#> GSM486858     3  0.0579    0.82322 0.000 0.008 0.984 0.008 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
#> GSM486735     6  0.1901     0.6618 0.000 0.004 0.008 0.076 0.000 0.912
#> GSM486737     4  0.3955     0.2758 0.000 0.384 0.000 0.608 0.000 0.008
#> GSM486739     6  0.4508     0.3621 0.000 0.036 0.000 0.396 0.000 0.568
#> GSM486741     2  0.3694     0.7286 0.000 0.784 0.000 0.140 0.000 0.076
#> GSM486743     2  0.1267     0.8598 0.000 0.940 0.000 0.060 0.000 0.000
#> GSM486745     6  0.6497     0.4607 0.000 0.256 0.128 0.076 0.004 0.536
#> GSM486747     3  0.4127     0.5260 0.000 0.000 0.684 0.004 0.284 0.028
#> GSM486749     4  0.1806     0.7270 0.000 0.000 0.004 0.908 0.000 0.088
#> GSM486751     3  0.0146     0.8257 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM486753     4  0.3806     0.5951 0.000 0.164 0.000 0.768 0.000 0.068
#> GSM486755     2  0.2100     0.8246 0.000 0.884 0.000 0.112 0.000 0.004
#> GSM486757     3  0.4347     0.6523 0.000 0.000 0.744 0.152 0.092 0.012
#> GSM486759     5  0.2805     0.7733 0.184 0.000 0.004 0.000 0.812 0.000
#> GSM486761     5  0.2886     0.7884 0.060 0.000 0.032 0.004 0.876 0.028
#> GSM486763     5  0.2119     0.7992 0.008 0.004 0.000 0.060 0.912 0.016
#> GSM486765     5  0.1457     0.8038 0.016 0.000 0.004 0.004 0.948 0.028
#> GSM486767     4  0.1887     0.7519 0.016 0.012 0.000 0.924 0.048 0.000
#> GSM486769     6  0.1700     0.6509 0.000 0.004 0.000 0.080 0.000 0.916
#> GSM486771     4  0.2250     0.7430 0.000 0.064 0.000 0.896 0.000 0.040
#> GSM486773     4  0.6442     0.4008 0.004 0.000 0.284 0.528 0.104 0.080
#> GSM486775     5  0.3259     0.6573 0.216 0.000 0.000 0.000 0.772 0.012
#> GSM486777     5  0.3287     0.7801 0.056 0.000 0.004 0.060 0.852 0.028
#> GSM486779     2  0.4613     0.6071 0.000 0.696 0.000 0.200 0.100 0.004
#> GSM486781     4  0.1333     0.7658 0.000 0.000 0.048 0.944 0.008 0.000
#> GSM486783     4  0.1588     0.7540 0.000 0.072 0.000 0.924 0.000 0.004
#> GSM486785     5  0.1546     0.8089 0.028 0.000 0.004 0.004 0.944 0.020
#> GSM486787     5  0.1610     0.8133 0.084 0.000 0.000 0.000 0.916 0.000
#> GSM486789     6  0.5896     0.4058 0.000 0.220 0.000 0.324 0.000 0.456
#> GSM486791     5  0.1349     0.8207 0.056 0.000 0.000 0.000 0.940 0.004
#> GSM486793     5  0.3887     0.7236 0.152 0.000 0.028 0.004 0.788 0.028
#> GSM486795     4  0.8130    -0.0939 0.276 0.028 0.224 0.296 0.176 0.000
#> GSM486797     5  0.5402    -0.0146 0.000 0.000 0.052 0.448 0.472 0.028
#> GSM486799     5  0.1444     0.8201 0.072 0.000 0.000 0.000 0.928 0.000
#> GSM486801     1  0.3314     0.5269 0.740 0.000 0.000 0.004 0.256 0.000
#> GSM486803     5  0.1267     0.8192 0.060 0.000 0.000 0.000 0.940 0.000
#> GSM486805     4  0.5684     0.1932 0.000 0.000 0.404 0.488 0.080 0.028
#> GSM486807     5  0.2067     0.8004 0.048 0.000 0.004 0.004 0.916 0.028
#> GSM486809     6  0.2048     0.6520 0.000 0.000 0.000 0.120 0.000 0.880
#> GSM486811     1  0.3526     0.6248 0.792 0.000 0.004 0.004 0.172 0.028
#> GSM486813     4  0.0547     0.7603 0.000 0.000 0.000 0.980 0.020 0.000
#> GSM486815     1  0.6758     0.3381 0.444 0.000 0.236 0.012 0.280 0.028
#> GSM486817     4  0.3676     0.6587 0.052 0.000 0.004 0.796 0.144 0.004
#> GSM486819     5  0.1732     0.7946 0.004 0.000 0.004 0.072 0.920 0.000
#> GSM486822     4  0.3109     0.6385 0.000 0.004 0.000 0.772 0.000 0.224
#> GSM486824     5  0.2311     0.8115 0.104 0.000 0.016 0.000 0.880 0.000
#> GSM486828     4  0.1728     0.7538 0.000 0.000 0.008 0.924 0.064 0.004
#> GSM486831     5  0.2340     0.7925 0.148 0.000 0.000 0.000 0.852 0.000
#> GSM486833     3  0.4487     0.4616 0.004 0.000 0.672 0.276 0.044 0.004
#> GSM486835     5  0.1913     0.8215 0.060 0.000 0.004 0.004 0.920 0.012
#> GSM486837     4  0.2456     0.7439 0.000 0.000 0.028 0.888 0.076 0.008
#> GSM486839     5  0.2632     0.7527 0.164 0.000 0.000 0.000 0.832 0.004
#> GSM486841     5  0.4072     0.5117 0.292 0.000 0.004 0.004 0.684 0.016
#> GSM486843     5  0.3717     0.3044 0.384 0.000 0.000 0.000 0.616 0.000
#> GSM486845     4  0.1707     0.7651 0.000 0.000 0.056 0.928 0.012 0.004
#> GSM486847     5  0.3023     0.7505 0.212 0.000 0.004 0.000 0.784 0.000
#> GSM486849     4  0.1333     0.7577 0.000 0.048 0.000 0.944 0.000 0.008
#> GSM486851     5  0.2036     0.8181 0.064 0.000 0.000 0.008 0.912 0.016
#> GSM486853     4  0.1307     0.7605 0.000 0.008 0.008 0.952 0.000 0.032
#> GSM486855     4  0.0146     0.7584 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM486857     4  0.2237     0.7574 0.000 0.000 0.068 0.896 0.036 0.000
#> GSM486736     6  0.1010     0.6542 0.000 0.036 0.000 0.004 0.000 0.960
#> GSM486738     2  0.0146     0.8621 0.000 0.996 0.000 0.004 0.000 0.000
#> GSM486740     6  0.3620     0.4377 0.000 0.352 0.000 0.000 0.000 0.648
#> GSM486742     2  0.1556     0.8298 0.000 0.920 0.000 0.000 0.000 0.080
#> GSM486744     2  0.1285     0.8617 0.000 0.944 0.000 0.052 0.000 0.004
#> GSM486746     6  0.6029     0.3194 0.000 0.324 0.260 0.000 0.000 0.416
#> GSM486748     3  0.0146     0.8257 0.000 0.000 0.996 0.004 0.000 0.000
#> GSM486750     3  0.4569     0.5926 0.000 0.096 0.700 0.004 0.000 0.200
#> GSM486752     3  0.0146     0.8256 0.004 0.000 0.996 0.000 0.000 0.000
#> GSM486754     2  0.0146     0.8617 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM486756     2  0.1398     0.8607 0.000 0.940 0.008 0.052 0.000 0.000
#> GSM486758     3  0.0000     0.8255 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM486760     1  0.3017     0.6698 0.816 0.000 0.164 0.000 0.020 0.000
#> GSM486762     3  0.2219     0.7206 0.136 0.000 0.864 0.000 0.000 0.000
#> GSM486764     5  0.6201     0.4955 0.204 0.012 0.176 0.000 0.576 0.032
#> GSM486766     1  0.5091     0.1949 0.516 0.000 0.424 0.000 0.040 0.020
#> GSM486768     6  0.8004     0.3387 0.272 0.216 0.104 0.048 0.000 0.360
#> GSM486770     6  0.1682     0.6537 0.000 0.052 0.020 0.000 0.000 0.928
#> GSM486772     2  0.6094     0.1410 0.084 0.560 0.012 0.048 0.000 0.296
#> GSM486774     3  0.0260     0.8256 0.000 0.000 0.992 0.008 0.000 0.000
#> GSM486776     1  0.2697     0.5778 0.812 0.000 0.000 0.000 0.188 0.000
#> GSM486778     1  0.2260     0.6586 0.860 0.000 0.140 0.000 0.000 0.000
#> GSM486780     2  0.1141     0.8621 0.000 0.948 0.000 0.052 0.000 0.000
#> GSM486782     3  0.0790     0.8191 0.000 0.032 0.968 0.000 0.000 0.000
#> GSM486784     2  0.0000     0.8610 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486786     1  0.3687     0.6495 0.824 0.000 0.072 0.004 0.072 0.028
#> GSM486788     1  0.0622     0.6976 0.980 0.000 0.012 0.000 0.008 0.000
#> GSM486790     2  0.3323     0.6070 0.000 0.752 0.008 0.000 0.000 0.240
#> GSM486792     1  0.4941     0.1651 0.492 0.000 0.444 0.000 0.064 0.000
#> GSM486794     1  0.3833     0.2929 0.556 0.000 0.444 0.000 0.000 0.000
#> GSM486796     3  0.2821     0.7120 0.152 0.016 0.832 0.000 0.000 0.000
#> GSM486798     3  0.0405     0.8257 0.008 0.004 0.988 0.000 0.000 0.000
#> GSM486800     1  0.0000     0.6928 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486802     1  0.2361     0.6848 0.884 0.000 0.028 0.000 0.088 0.000
#> GSM486804     1  0.2214     0.6965 0.888 0.000 0.096 0.000 0.016 0.000
#> GSM486806     3  0.0291     0.8256 0.004 0.000 0.992 0.004 0.000 0.000
#> GSM486808     3  0.2432     0.7688 0.004 0.000 0.892 0.004 0.072 0.028
#> GSM486810     6  0.6991     0.2287 0.000 0.180 0.300 0.092 0.000 0.428
#> GSM486812     1  0.2250     0.6962 0.888 0.000 0.092 0.000 0.020 0.000
#> GSM486814     2  0.0547     0.8600 0.000 0.980 0.000 0.020 0.000 0.000
#> GSM486816     1  0.3862     0.1091 0.524 0.000 0.476 0.000 0.000 0.000
#> GSM486818     3  0.3202     0.6977 0.176 0.024 0.800 0.000 0.000 0.000
#> GSM486821     1  0.7866     0.4026 0.520 0.072 0.152 0.048 0.152 0.056
#> GSM486823     3  0.4376     0.4143 0.000 0.004 0.604 0.024 0.000 0.368
#> GSM486826     3  0.3351     0.5371 0.288 0.000 0.712 0.000 0.000 0.000
#> GSM486830     4  0.6034     0.1259 0.004 0.000 0.340 0.440 0.000 0.216
#> GSM486832     5  0.3176     0.7810 0.156 0.000 0.032 0.000 0.812 0.000
#> GSM486834     3  0.0146     0.8256 0.004 0.000 0.996 0.000 0.000 0.000
#> GSM486836     1  0.4104     0.6407 0.748 0.000 0.148 0.000 0.104 0.000
#> GSM486838     3  0.1116     0.8185 0.008 0.028 0.960 0.004 0.000 0.000
#> GSM486840     1  0.0000     0.6928 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486842     1  0.1049     0.7011 0.960 0.000 0.032 0.000 0.008 0.000
#> GSM486844     1  0.3782     0.3131 0.588 0.000 0.412 0.000 0.000 0.000
#> GSM486846     4  0.1957     0.7414 0.000 0.000 0.112 0.888 0.000 0.000
#> GSM486848     1  0.0260     0.6939 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM486850     3  0.5622     0.2965 0.016 0.356 0.540 0.080 0.000 0.008
#> GSM486852     1  0.6014     0.0396 0.468 0.000 0.104 0.000 0.392 0.036
#> GSM486854     2  0.0858     0.8531 0.000 0.968 0.028 0.000 0.000 0.004
#> GSM486856     2  0.0632     0.8669 0.000 0.976 0.000 0.024 0.000 0.000
#> GSM486858     3  0.0405     0.8258 0.000 0.008 0.988 0.004 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 agent(p) individual(p) k
#> MAD:pam  87 1.84e-07       0.23763 2
#> MAD:pam 105 3.58e-13       0.46516 3
#> MAD:pam  85 4.15e-13       0.44250 4
#> MAD:pam  94 2.01e-11       0.16174 5
#> MAD:pam  93 6.14e-10       0.00515 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 120 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.508           0.921       0.924         0.5036 0.496   0.496
#> 3 3 0.581           0.659       0.824         0.1838 0.992   0.983
#> 4 4 0.667           0.858       0.857         0.2379 0.748   0.488
#> 5 5 0.697           0.677       0.834         0.0561 0.904   0.655
#> 6 6 0.720           0.710       0.814         0.0367 0.938   0.741

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
#> GSM486735     1  0.5629      0.921 0.868 0.132
#> GSM486737     1  0.0376      0.923 0.996 0.004
#> GSM486739     1  0.0376      0.923 0.996 0.004
#> GSM486741     1  0.4161      0.925 0.916 0.084
#> GSM486743     1  0.0376      0.923 0.996 0.004
#> GSM486745     1  0.0376      0.923 0.996 0.004
#> GSM486747     1  0.5842      0.921 0.860 0.140
#> GSM486749     1  0.5629      0.921 0.868 0.132
#> GSM486751     1  0.5842      0.921 0.860 0.140
#> GSM486753     1  0.0376      0.923 0.996 0.004
#> GSM486755     1  0.0376      0.923 0.996 0.004
#> GSM486757     1  0.5842      0.921 0.860 0.140
#> GSM486759     1  0.0672      0.922 0.992 0.008
#> GSM486761     1  0.5737      0.921 0.864 0.136
#> GSM486763     1  0.0376      0.923 0.996 0.004
#> GSM486765     1  0.5737      0.921 0.864 0.136
#> GSM486767     1  0.0376      0.923 0.996 0.004
#> GSM486769     1  0.5629      0.921 0.868 0.132
#> GSM486771     1  0.0376      0.923 0.996 0.004
#> GSM486773     1  0.5629      0.921 0.868 0.132
#> GSM486775     1  0.0672      0.922 0.992 0.008
#> GSM486777     1  0.5737      0.921 0.864 0.136
#> GSM486779     1  0.0376      0.923 0.996 0.004
#> GSM486781     1  0.5629      0.921 0.868 0.132
#> GSM486783     1  0.0376      0.923 0.996 0.004
#> GSM486785     1  0.5737      0.921 0.864 0.136
#> GSM486787     1  0.0672      0.922 0.992 0.008
#> GSM486789     1  0.5629      0.921 0.868 0.132
#> GSM486791     1  0.0672      0.922 0.992 0.008
#> GSM486793     1  0.5737      0.921 0.864 0.136
#> GSM486795     1  0.0938      0.923 0.988 0.012
#> GSM486797     1  0.5842      0.921 0.860 0.140
#> GSM486799     1  0.0672      0.922 0.992 0.008
#> GSM486801     1  0.0672      0.922 0.992 0.008
#> GSM486803     1  0.0672      0.922 0.992 0.008
#> GSM486805     1  0.5629      0.921 0.868 0.132
#> GSM486807     1  0.5737      0.921 0.864 0.136
#> GSM486809     1  0.5629      0.921 0.868 0.132
#> GSM486811     1  0.5737      0.921 0.864 0.136
#> GSM486813     1  0.0376      0.923 0.996 0.004
#> GSM486815     1  0.5737      0.921 0.864 0.136
#> GSM486817     1  0.0938      0.923 0.988 0.012
#> GSM486819     1  0.0938      0.923 0.988 0.012
#> GSM486822     1  0.5629      0.921 0.868 0.132
#> GSM486824     1  0.0672      0.922 0.992 0.008
#> GSM486828     1  0.5629      0.921 0.868 0.132
#> GSM486831     1  0.0672      0.922 0.992 0.008
#> GSM486833     1  0.5842      0.921 0.860 0.140
#> GSM486835     1  0.0672      0.922 0.992 0.008
#> GSM486837     1  0.5629      0.921 0.868 0.132
#> GSM486839     1  0.0672      0.922 0.992 0.008
#> GSM486841     1  0.5737      0.921 0.864 0.136
#> GSM486843     1  0.0672      0.922 0.992 0.008
#> GSM486845     1  0.5629      0.921 0.868 0.132
#> GSM486847     1  0.0672      0.922 0.992 0.008
#> GSM486849     1  0.5629      0.921 0.868 0.132
#> GSM486851     1  0.0938      0.923 0.988 0.012
#> GSM486853     1  0.5629      0.921 0.868 0.132
#> GSM486855     1  0.0376      0.923 0.996 0.004
#> GSM486857     1  0.5629      0.921 0.868 0.132
#> GSM486736     2  0.1633      0.914 0.024 0.976
#> GSM486738     2  0.5842      0.923 0.140 0.860
#> GSM486740     2  0.5946      0.921 0.144 0.856
#> GSM486742     2  0.5059      0.926 0.112 0.888
#> GSM486744     2  0.5842      0.923 0.140 0.860
#> GSM486746     2  0.5842      0.923 0.140 0.860
#> GSM486748     2  0.0376      0.920 0.004 0.996
#> GSM486750     2  0.0938      0.920 0.012 0.988
#> GSM486752     2  0.0376      0.920 0.004 0.996
#> GSM486754     2  0.5842      0.923 0.140 0.860
#> GSM486756     2  0.5842      0.923 0.140 0.860
#> GSM486758     2  0.0376      0.920 0.004 0.996
#> GSM486760     2  0.5629      0.922 0.132 0.868
#> GSM486762     2  0.0376      0.919 0.004 0.996
#> GSM486764     2  0.5842      0.919 0.140 0.860
#> GSM486766     2  0.0376      0.919 0.004 0.996
#> GSM486768     2  0.5842      0.923 0.140 0.860
#> GSM486770     2  0.0938      0.920 0.012 0.988
#> GSM486772     2  0.5842      0.923 0.140 0.860
#> GSM486774     2  0.0938      0.920 0.012 0.988
#> GSM486776     2  0.5629      0.922 0.132 0.868
#> GSM486778     2  0.0672      0.920 0.008 0.992
#> GSM486780     2  0.5842      0.923 0.140 0.860
#> GSM486782     2  0.0938      0.920 0.012 0.988
#> GSM486784     2  0.5842      0.923 0.140 0.860
#> GSM486786     2  0.0376      0.919 0.004 0.996
#> GSM486788     2  0.5629      0.922 0.132 0.868
#> GSM486790     2  0.0938      0.920 0.012 0.988
#> GSM486792     2  0.4562      0.926 0.096 0.904
#> GSM486794     2  0.0672      0.920 0.008 0.992
#> GSM486796     2  0.5629      0.922 0.132 0.868
#> GSM486798     2  0.0376      0.920 0.004 0.996
#> GSM486800     2  0.5629      0.922 0.132 0.868
#> GSM486802     2  0.5629      0.922 0.132 0.868
#> GSM486804     2  0.5629      0.922 0.132 0.868
#> GSM486806     2  0.0938      0.920 0.012 0.988
#> GSM486808     2  0.0376      0.919 0.004 0.996
#> GSM486810     2  0.0938      0.920 0.012 0.988
#> GSM486812     2  0.0376      0.919 0.004 0.996
#> GSM486814     2  0.5842      0.923 0.140 0.860
#> GSM486816     2  0.0376      0.919 0.004 0.996
#> GSM486818     2  0.5629      0.922 0.132 0.868
#> GSM486821     2  0.5629      0.922 0.132 0.868
#> GSM486823     2  0.0938      0.920 0.012 0.988
#> GSM486826     2  0.5737      0.922 0.136 0.864
#> GSM486830     2  0.0938      0.920 0.012 0.988
#> GSM486832     2  0.5629      0.922 0.132 0.868
#> GSM486834     2  0.0376      0.920 0.004 0.996
#> GSM486836     2  0.5629      0.922 0.132 0.868
#> GSM486838     2  0.1184      0.921 0.016 0.984
#> GSM486840     2  0.5629      0.922 0.132 0.868
#> GSM486842     2  0.0376      0.919 0.004 0.996
#> GSM486844     2  0.5629      0.922 0.132 0.868
#> GSM486846     2  0.0938      0.920 0.012 0.988
#> GSM486848     2  0.5629      0.922 0.132 0.868
#> GSM486850     2  0.0938      0.920 0.012 0.988
#> GSM486852     2  0.5737      0.921 0.136 0.864
#> GSM486854     2  0.0938      0.920 0.012 0.988
#> GSM486856     2  0.5842      0.923 0.140 0.860
#> GSM486858     2  0.0938      0.920 0.012 0.988

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM486735     1  0.8190     -0.900 0.496 0.432 0.072
#> GSM486737     1  0.1129      0.681 0.976 0.020 0.004
#> GSM486739     1  0.6104     -0.513 0.648 0.348 0.004
#> GSM486741     1  0.3134      0.684 0.916 0.032 0.052
#> GSM486743     1  0.1129      0.681 0.976 0.020 0.004
#> GSM486745     1  0.1878      0.666 0.952 0.044 0.004
#> GSM486747     1  0.4269      0.673 0.872 0.052 0.076
#> GSM486749     1  0.4379      0.661 0.868 0.060 0.072
#> GSM486751     1  0.4658      0.672 0.856 0.068 0.076
#> GSM486753     1  0.1129      0.681 0.976 0.020 0.004
#> GSM486755     1  0.2200      0.653 0.940 0.056 0.004
#> GSM486757     1  0.5331      0.653 0.824 0.100 0.076
#> GSM486759     1  0.3879      0.648 0.848 0.152 0.000
#> GSM486761     1  0.6543      0.631 0.748 0.176 0.076
#> GSM486763     1  0.6081     -0.463 0.652 0.344 0.004
#> GSM486765     1  0.6435      0.638 0.756 0.168 0.076
#> GSM486767     1  0.1765      0.670 0.956 0.040 0.004
#> GSM486769     2  0.8210      0.000 0.460 0.468 0.072
#> GSM486771     1  0.1129      0.681 0.976 0.020 0.004
#> GSM486773     1  0.4838      0.670 0.848 0.076 0.076
#> GSM486775     1  0.3715      0.664 0.868 0.128 0.004
#> GSM486777     1  0.6746      0.614 0.732 0.192 0.076
#> GSM486779     1  0.1129      0.681 0.976 0.020 0.004
#> GSM486781     1  0.4370      0.661 0.868 0.056 0.076
#> GSM486783     1  0.1129      0.681 0.976 0.020 0.004
#> GSM486785     1  0.6646      0.624 0.740 0.184 0.076
#> GSM486787     1  0.3619      0.660 0.864 0.136 0.000
#> GSM486789     1  0.6122      0.501 0.776 0.152 0.072
#> GSM486791     1  0.6180     -0.495 0.660 0.332 0.008
#> GSM486793     1  0.6595      0.627 0.744 0.180 0.076
#> GSM486795     1  0.0829      0.689 0.984 0.012 0.004
#> GSM486797     1  0.4838      0.671 0.848 0.076 0.076
#> GSM486799     1  0.3752      0.653 0.856 0.144 0.000
#> GSM486801     1  0.3752      0.653 0.856 0.144 0.000
#> GSM486803     1  0.3816      0.654 0.852 0.148 0.000
#> GSM486805     1  0.4925      0.670 0.844 0.080 0.076
#> GSM486807     1  0.6380      0.642 0.760 0.164 0.076
#> GSM486809     1  0.8117     -0.707 0.552 0.372 0.076
#> GSM486811     1  0.6148      0.657 0.776 0.148 0.076
#> GSM486813     1  0.1129      0.681 0.976 0.020 0.004
#> GSM486815     1  0.6324      0.645 0.764 0.160 0.076
#> GSM486817     1  0.1267      0.691 0.972 0.024 0.004
#> GSM486819     1  0.1129      0.690 0.976 0.020 0.004
#> GSM486822     1  0.5004      0.628 0.840 0.088 0.072
#> GSM486824     1  0.3425      0.670 0.884 0.112 0.004
#> GSM486828     1  0.4370      0.661 0.868 0.056 0.076
#> GSM486831     1  0.3784      0.660 0.864 0.132 0.004
#> GSM486833     1  0.4469      0.670 0.864 0.060 0.076
#> GSM486835     1  0.3412      0.663 0.876 0.124 0.000
#> GSM486837     1  0.4475      0.667 0.864 0.064 0.072
#> GSM486839     1  0.4062      0.639 0.836 0.164 0.000
#> GSM486841     1  0.6595      0.629 0.744 0.180 0.076
#> GSM486843     1  0.3816      0.655 0.852 0.148 0.000
#> GSM486845     1  0.4370      0.661 0.868 0.056 0.076
#> GSM486847     1  0.4002      0.642 0.840 0.160 0.000
#> GSM486849     1  0.4075      0.668 0.880 0.048 0.072
#> GSM486851     1  0.6081     -0.475 0.652 0.344 0.004
#> GSM486853     1  0.4475      0.658 0.864 0.064 0.072
#> GSM486855     1  0.1267      0.681 0.972 0.024 0.004
#> GSM486857     1  0.4379      0.664 0.868 0.060 0.072
#> GSM486736     3  0.7186      0.207 0.024 0.476 0.500
#> GSM486738     3  0.3933      0.846 0.028 0.092 0.880
#> GSM486740     3  0.7582      0.528 0.048 0.380 0.572
#> GSM486742     3  0.3031      0.852 0.012 0.076 0.912
#> GSM486744     3  0.3765      0.847 0.028 0.084 0.888
#> GSM486746     3  0.3637      0.848 0.024 0.084 0.892
#> GSM486748     3  0.1878      0.848 0.004 0.044 0.952
#> GSM486750     3  0.1315      0.846 0.008 0.020 0.972
#> GSM486752     3  0.1129      0.845 0.004 0.020 0.976
#> GSM486754     3  0.3933      0.845 0.028 0.092 0.880
#> GSM486756     3  0.3933      0.845 0.028 0.092 0.880
#> GSM486758     3  0.1399      0.847 0.004 0.028 0.968
#> GSM486760     3  0.5365      0.821 0.004 0.252 0.744
#> GSM486762     3  0.4293      0.822 0.004 0.164 0.832
#> GSM486764     3  0.8034      0.467 0.068 0.392 0.540
#> GSM486766     3  0.4409      0.819 0.004 0.172 0.824
#> GSM486768     3  0.3461      0.848 0.024 0.076 0.900
#> GSM486770     3  0.6577      0.375 0.008 0.420 0.572
#> GSM486772     3  0.3850      0.846 0.028 0.088 0.884
#> GSM486774     3  0.0983      0.846 0.004 0.016 0.980
#> GSM486776     3  0.5291      0.815 0.000 0.268 0.732
#> GSM486778     3  0.4351      0.821 0.004 0.168 0.828
#> GSM486780     3  0.3850      0.846 0.028 0.088 0.884
#> GSM486782     3  0.0983      0.846 0.004 0.016 0.980
#> GSM486784     3  0.3850      0.846 0.028 0.088 0.884
#> GSM486786     3  0.4351      0.821 0.004 0.168 0.828
#> GSM486788     3  0.5216      0.819 0.000 0.260 0.740
#> GSM486790     3  0.1015      0.850 0.008 0.012 0.980
#> GSM486792     3  0.6793      0.551 0.012 0.452 0.536
#> GSM486794     3  0.4293      0.823 0.004 0.164 0.832
#> GSM486796     3  0.3722      0.849 0.024 0.088 0.888
#> GSM486798     3  0.0983      0.846 0.004 0.016 0.980
#> GSM486800     3  0.5480      0.815 0.004 0.264 0.732
#> GSM486802     3  0.5178      0.820 0.000 0.256 0.744
#> GSM486804     3  0.5254      0.816 0.000 0.264 0.736
#> GSM486806     3  0.0983      0.846 0.004 0.016 0.980
#> GSM486808     3  0.4521      0.816 0.004 0.180 0.816
#> GSM486810     3  0.4575      0.735 0.004 0.184 0.812
#> GSM486812     3  0.4351      0.821 0.004 0.168 0.828
#> GSM486814     3  0.3765      0.847 0.028 0.084 0.888
#> GSM486816     3  0.4351      0.821 0.004 0.168 0.828
#> GSM486818     3  0.3461      0.848 0.024 0.076 0.900
#> GSM486821     3  0.3678      0.847 0.028 0.080 0.892
#> GSM486823     3  0.1950      0.841 0.008 0.040 0.952
#> GSM486826     3  0.5178      0.822 0.000 0.256 0.744
#> GSM486830     3  0.0983      0.846 0.004 0.016 0.980
#> GSM486832     3  0.5580      0.817 0.008 0.256 0.736
#> GSM486834     3  0.1129      0.845 0.004 0.020 0.976
#> GSM486836     3  0.5291      0.815 0.000 0.268 0.732
#> GSM486838     3  0.1129      0.849 0.004 0.020 0.976
#> GSM486840     3  0.5461      0.822 0.008 0.244 0.748
#> GSM486842     3  0.4293      0.822 0.004 0.164 0.832
#> GSM486844     3  0.5016      0.827 0.000 0.240 0.760
#> GSM486846     3  0.0983      0.846 0.004 0.016 0.980
#> GSM486848     3  0.5502      0.821 0.008 0.248 0.744
#> GSM486850     3  0.0661      0.850 0.008 0.004 0.988
#> GSM486852     3  0.7708      0.541 0.048 0.424 0.528
#> GSM486854     3  0.0848      0.850 0.008 0.008 0.984
#> GSM486856     3  0.3765      0.847 0.028 0.084 0.888
#> GSM486858     3  0.1129      0.847 0.004 0.020 0.976

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM486735     4  0.1411      0.843 0.020 0.020 0.000 0.960
#> GSM486737     4  0.4994      0.876 0.208 0.048 0.000 0.744
#> GSM486739     4  0.4171      0.820 0.116 0.060 0.000 0.824
#> GSM486741     4  0.3606      0.889 0.140 0.020 0.000 0.840
#> GSM486743     4  0.4994      0.876 0.208 0.048 0.000 0.744
#> GSM486745     4  0.4405      0.851 0.152 0.048 0.000 0.800
#> GSM486747     1  0.3306      0.874 0.840 0.000 0.004 0.156
#> GSM486749     4  0.2918      0.885 0.116 0.008 0.000 0.876
#> GSM486751     1  0.3539      0.859 0.820 0.000 0.004 0.176
#> GSM486753     4  0.5031      0.875 0.212 0.048 0.000 0.740
#> GSM486755     4  0.4994      0.876 0.208 0.048 0.000 0.744
#> GSM486757     1  0.3123      0.876 0.844 0.000 0.000 0.156
#> GSM486759     1  0.0000      0.895 1.000 0.000 0.000 0.000
#> GSM486761     1  0.3157      0.879 0.852 0.000 0.004 0.144
#> GSM486763     1  0.3962      0.813 0.844 0.052 0.004 0.100
#> GSM486765     1  0.3105      0.880 0.856 0.000 0.004 0.140
#> GSM486767     4  0.4957      0.875 0.204 0.048 0.000 0.748
#> GSM486769     4  0.1411      0.843 0.020 0.020 0.000 0.960
#> GSM486771     4  0.4994      0.876 0.208 0.048 0.000 0.744
#> GSM486773     4  0.2773      0.884 0.116 0.004 0.000 0.880
#> GSM486775     1  0.0000      0.895 1.000 0.000 0.000 0.000
#> GSM486777     1  0.3157      0.879 0.852 0.000 0.004 0.144
#> GSM486779     4  0.5031      0.875 0.212 0.048 0.000 0.740
#> GSM486781     4  0.2773      0.884 0.116 0.004 0.000 0.880
#> GSM486783     4  0.4994      0.876 0.208 0.048 0.000 0.744
#> GSM486785     1  0.2921      0.882 0.860 0.000 0.000 0.140
#> GSM486787     1  0.0000      0.895 1.000 0.000 0.000 0.000
#> GSM486789     4  0.1807      0.867 0.052 0.008 0.000 0.940
#> GSM486791     1  0.3344      0.829 0.868 0.020 0.004 0.108
#> GSM486793     1  0.2973      0.881 0.856 0.000 0.000 0.144
#> GSM486795     1  0.1543      0.880 0.956 0.032 0.004 0.008
#> GSM486797     1  0.4655      0.652 0.684 0.000 0.004 0.312
#> GSM486799     1  0.0000      0.895 1.000 0.000 0.000 0.000
#> GSM486801     1  0.0000      0.895 1.000 0.000 0.000 0.000
#> GSM486803     1  0.0188      0.895 0.996 0.000 0.000 0.004
#> GSM486805     4  0.3391      0.860 0.148 0.004 0.004 0.844
#> GSM486807     1  0.2921      0.881 0.860 0.000 0.000 0.140
#> GSM486809     4  0.1598      0.841 0.020 0.020 0.004 0.956
#> GSM486811     1  0.2868      0.883 0.864 0.000 0.000 0.136
#> GSM486813     4  0.4994      0.876 0.208 0.048 0.000 0.744
#> GSM486815     1  0.3105      0.880 0.856 0.000 0.004 0.140
#> GSM486817     4  0.5905      0.612 0.396 0.040 0.000 0.564
#> GSM486819     1  0.1796      0.878 0.948 0.032 0.004 0.016
#> GSM486822     4  0.2156      0.870 0.060 0.008 0.004 0.928
#> GSM486824     1  0.0336      0.893 0.992 0.008 0.000 0.000
#> GSM486828     4  0.2773      0.884 0.116 0.004 0.000 0.880
#> GSM486831     1  0.0000      0.895 1.000 0.000 0.000 0.000
#> GSM486833     1  0.3444      0.854 0.816 0.000 0.000 0.184
#> GSM486835     1  0.0000      0.895 1.000 0.000 0.000 0.000
#> GSM486837     4  0.2918      0.884 0.116 0.008 0.000 0.876
#> GSM486839     1  0.0188      0.895 0.996 0.000 0.000 0.004
#> GSM486841     1  0.2921      0.882 0.860 0.000 0.000 0.140
#> GSM486843     1  0.0188      0.895 0.996 0.000 0.000 0.004
#> GSM486845     4  0.2773      0.884 0.116 0.004 0.000 0.880
#> GSM486847     1  0.0188      0.895 0.996 0.000 0.000 0.004
#> GSM486849     4  0.2918      0.885 0.116 0.008 0.000 0.876
#> GSM486851     1  0.3619      0.824 0.860 0.036 0.004 0.100
#> GSM486853     4  0.2918      0.885 0.116 0.008 0.000 0.876
#> GSM486855     4  0.4994      0.876 0.208 0.048 0.000 0.744
#> GSM486857     4  0.2773      0.884 0.116 0.004 0.000 0.880
#> GSM486736     2  0.2048      0.818 0.000 0.928 0.008 0.064
#> GSM486738     2  0.4059      0.859 0.000 0.788 0.200 0.012
#> GSM486740     2  0.2530      0.817 0.000 0.896 0.100 0.004
#> GSM486742     2  0.3895      0.866 0.000 0.804 0.184 0.012
#> GSM486744     2  0.4059      0.859 0.000 0.788 0.200 0.012
#> GSM486746     2  0.3024      0.843 0.000 0.852 0.148 0.000
#> GSM486748     3  0.4174      0.861 0.000 0.140 0.816 0.044
#> GSM486750     2  0.3372      0.869 0.000 0.868 0.096 0.036
#> GSM486752     3  0.4405      0.850 0.000 0.152 0.800 0.048
#> GSM486754     2  0.4059      0.859 0.000 0.788 0.200 0.012
#> GSM486756     2  0.4059      0.859 0.000 0.788 0.200 0.012
#> GSM486758     3  0.4153      0.865 0.000 0.132 0.820 0.048
#> GSM486760     3  0.0524      0.884 0.008 0.004 0.988 0.000
#> GSM486762     3  0.4090      0.870 0.004 0.120 0.832 0.044
#> GSM486764     3  0.4648      0.800 0.032 0.164 0.792 0.012
#> GSM486766     3  0.4090      0.870 0.004 0.120 0.832 0.044
#> GSM486768     2  0.4059      0.859 0.000 0.788 0.200 0.012
#> GSM486770     2  0.1635      0.825 0.000 0.948 0.008 0.044
#> GSM486772     2  0.4059      0.859 0.000 0.788 0.200 0.012
#> GSM486774     2  0.3463      0.868 0.000 0.864 0.096 0.040
#> GSM486776     3  0.0524      0.884 0.008 0.004 0.988 0.000
#> GSM486778     3  0.4090      0.870 0.004 0.120 0.832 0.044
#> GSM486780     2  0.4059      0.859 0.000 0.788 0.200 0.012
#> GSM486782     2  0.3372      0.869 0.000 0.868 0.096 0.036
#> GSM486784     2  0.4059      0.859 0.000 0.788 0.200 0.012
#> GSM486786     3  0.4090      0.870 0.004 0.120 0.832 0.044
#> GSM486788     3  0.0524      0.884 0.008 0.004 0.988 0.000
#> GSM486790     2  0.2500      0.855 0.000 0.916 0.044 0.040
#> GSM486792     3  0.4331      0.832 0.004 0.152 0.808 0.036
#> GSM486794     3  0.4145      0.870 0.004 0.124 0.828 0.044
#> GSM486796     3  0.1824      0.861 0.004 0.060 0.936 0.000
#> GSM486798     2  0.4974      0.727 0.000 0.736 0.224 0.040
#> GSM486800     3  0.0524      0.884 0.008 0.004 0.988 0.000
#> GSM486802     3  0.0524      0.884 0.008 0.004 0.988 0.000
#> GSM486804     3  0.0524      0.884 0.008 0.004 0.988 0.000
#> GSM486806     2  0.3463      0.868 0.000 0.864 0.096 0.040
#> GSM486808     3  0.4090      0.870 0.004 0.120 0.832 0.044
#> GSM486810     2  0.1584      0.832 0.000 0.952 0.012 0.036
#> GSM486812     3  0.4090      0.870 0.004 0.120 0.832 0.044
#> GSM486814     2  0.4059      0.859 0.000 0.788 0.200 0.012
#> GSM486816     3  0.4090      0.870 0.004 0.120 0.832 0.044
#> GSM486818     2  0.5336      0.303 0.004 0.496 0.496 0.004
#> GSM486821     3  0.3052      0.803 0.004 0.136 0.860 0.000
#> GSM486823     2  0.2319      0.851 0.000 0.924 0.036 0.040
#> GSM486826     3  0.0524      0.884 0.008 0.004 0.988 0.000
#> GSM486830     2  0.3372      0.869 0.000 0.868 0.096 0.036
#> GSM486832     3  0.0992      0.882 0.008 0.012 0.976 0.004
#> GSM486834     3  0.4801      0.812 0.000 0.188 0.764 0.048
#> GSM486836     3  0.0524      0.884 0.008 0.004 0.988 0.000
#> GSM486838     2  0.3525      0.869 0.000 0.860 0.100 0.040
#> GSM486840     3  0.0524      0.884 0.008 0.004 0.988 0.000
#> GSM486842     3  0.4090      0.870 0.004 0.120 0.832 0.044
#> GSM486844     3  0.0672      0.883 0.008 0.008 0.984 0.000
#> GSM486846     2  0.3463      0.868 0.000 0.864 0.096 0.040
#> GSM486848     3  0.0524      0.884 0.008 0.004 0.988 0.000
#> GSM486850     2  0.3372      0.869 0.000 0.868 0.096 0.036
#> GSM486852     3  0.3873      0.820 0.008 0.144 0.832 0.016
#> GSM486854     2  0.3435      0.870 0.000 0.864 0.100 0.036
#> GSM486856     2  0.4059      0.859 0.000 0.788 0.200 0.012
#> GSM486858     2  0.3463      0.868 0.000 0.864 0.096 0.040

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM486735     4  0.4430    0.08551 0.000 0.004 0.000 0.540 0.456
#> GSM486737     4  0.3257    0.76688 0.124 0.004 0.000 0.844 0.028
#> GSM486739     5  0.6269   -0.13953 0.128 0.004 0.000 0.416 0.452
#> GSM486741     4  0.1992    0.77933 0.044 0.000 0.000 0.924 0.032
#> GSM486743     4  0.3218    0.76636 0.128 0.004 0.000 0.844 0.024
#> GSM486745     4  0.3264    0.76404 0.132 0.004 0.000 0.840 0.024
#> GSM486747     1  0.3752    0.74921 0.780 0.004 0.000 0.200 0.016
#> GSM486749     4  0.0162    0.77894 0.000 0.004 0.000 0.996 0.000
#> GSM486751     4  0.5019   -0.06946 0.436 0.004 0.000 0.536 0.024
#> GSM486753     4  0.3218    0.76652 0.128 0.004 0.000 0.844 0.024
#> GSM486755     4  0.3257    0.76711 0.124 0.004 0.000 0.844 0.028
#> GSM486757     1  0.4776    0.52860 0.612 0.004 0.000 0.364 0.020
#> GSM486759     1  0.0000    0.82750 1.000 0.000 0.000 0.000 0.000
#> GSM486761     1  0.3310    0.79783 0.836 0.004 0.000 0.136 0.024
#> GSM486763     5  0.5002    0.28241 0.424 0.004 0.000 0.024 0.548
#> GSM486765     1  0.3264    0.80041 0.840 0.004 0.000 0.132 0.024
#> GSM486767     4  0.3218    0.76583 0.128 0.004 0.000 0.844 0.024
#> GSM486769     4  0.4446    0.04747 0.000 0.004 0.000 0.520 0.476
#> GSM486771     4  0.3257    0.76688 0.124 0.004 0.000 0.844 0.028
#> GSM486773     4  0.0854    0.77382 0.012 0.004 0.000 0.976 0.008
#> GSM486775     1  0.0162    0.82649 0.996 0.000 0.000 0.004 0.000
#> GSM486777     1  0.3474    0.80360 0.836 0.004 0.000 0.116 0.044
#> GSM486779     4  0.3218    0.76636 0.128 0.004 0.000 0.844 0.024
#> GSM486781     4  0.0162    0.77894 0.000 0.004 0.000 0.996 0.000
#> GSM486783     4  0.3218    0.76636 0.128 0.004 0.000 0.844 0.024
#> GSM486785     1  0.3425    0.80608 0.840 0.004 0.000 0.112 0.044
#> GSM486787     1  0.0000    0.82750 1.000 0.000 0.000 0.000 0.000
#> GSM486789     4  0.0955    0.77662 0.000 0.004 0.000 0.968 0.028
#> GSM486791     5  0.4613    0.30772 0.408 0.004 0.000 0.008 0.580
#> GSM486793     1  0.3449    0.80311 0.836 0.004 0.000 0.120 0.040
#> GSM486795     1  0.4686    0.17804 0.596 0.000 0.000 0.384 0.020
#> GSM486797     4  0.4895    0.16043 0.376 0.004 0.000 0.596 0.024
#> GSM486799     1  0.0000    0.82750 1.000 0.000 0.000 0.000 0.000
#> GSM486801     1  0.0000    0.82750 1.000 0.000 0.000 0.000 0.000
#> GSM486803     1  0.0000    0.82750 1.000 0.000 0.000 0.000 0.000
#> GSM486805     4  0.2568    0.71652 0.092 0.004 0.000 0.888 0.016
#> GSM486807     1  0.3420    0.80211 0.836 0.004 0.000 0.124 0.036
#> GSM486809     4  0.4238    0.30101 0.000 0.004 0.000 0.628 0.368
#> GSM486811     1  0.3425    0.80608 0.840 0.004 0.000 0.112 0.044
#> GSM486813     4  0.3218    0.76636 0.128 0.004 0.000 0.844 0.024
#> GSM486815     1  0.3474    0.80360 0.836 0.004 0.000 0.116 0.044
#> GSM486817     4  0.4675    0.56640 0.336 0.004 0.000 0.640 0.020
#> GSM486819     1  0.4789    0.14623 0.584 0.000 0.000 0.392 0.024
#> GSM486822     4  0.0865    0.77748 0.000 0.004 0.000 0.972 0.024
#> GSM486824     1  0.0000    0.82750 1.000 0.000 0.000 0.000 0.000
#> GSM486828     4  0.0324    0.77837 0.000 0.004 0.000 0.992 0.004
#> GSM486831     1  0.0000    0.82750 1.000 0.000 0.000 0.000 0.000
#> GSM486833     4  0.4995   -0.00525 0.420 0.004 0.000 0.552 0.024
#> GSM486835     1  0.0000    0.82750 1.000 0.000 0.000 0.000 0.000
#> GSM486837     4  0.0290    0.77910 0.000 0.008 0.000 0.992 0.000
#> GSM486839     1  0.0000    0.82750 1.000 0.000 0.000 0.000 0.000
#> GSM486841     1  0.3425    0.80608 0.840 0.004 0.000 0.112 0.044
#> GSM486843     1  0.0162    0.82557 0.996 0.000 0.000 0.000 0.004
#> GSM486845     4  0.0324    0.77837 0.000 0.004 0.000 0.992 0.004
#> GSM486847     1  0.0000    0.82750 1.000 0.000 0.000 0.000 0.000
#> GSM486849     4  0.0324    0.77983 0.000 0.004 0.000 0.992 0.004
#> GSM486851     5  0.4632    0.25210 0.448 0.000 0.000 0.012 0.540
#> GSM486853     4  0.0566    0.77950 0.000 0.004 0.000 0.984 0.012
#> GSM486855     4  0.3218    0.76636 0.128 0.004 0.000 0.844 0.024
#> GSM486857     4  0.0162    0.77894 0.000 0.004 0.000 0.996 0.000
#> GSM486736     5  0.4384    0.43766 0.000 0.228 0.000 0.044 0.728
#> GSM486738     2  0.3373    0.78840 0.000 0.848 0.092 0.004 0.056
#> GSM486740     2  0.5855    0.28969 0.000 0.468 0.072 0.008 0.452
#> GSM486742     2  0.3065    0.79227 0.000 0.872 0.048 0.008 0.072
#> GSM486744     2  0.3359    0.78825 0.000 0.848 0.096 0.004 0.052
#> GSM486746     2  0.3547    0.78691 0.000 0.836 0.100 0.004 0.060
#> GSM486748     2  0.4969   -0.05208 0.000 0.508 0.468 0.004 0.020
#> GSM486750     2  0.0579    0.79794 0.000 0.984 0.000 0.008 0.008
#> GSM486752     2  0.4763    0.33237 0.000 0.616 0.360 0.004 0.020
#> GSM486754     2  0.3384    0.78836 0.000 0.848 0.088 0.004 0.060
#> GSM486756     2  0.3384    0.78836 0.000 0.848 0.088 0.004 0.060
#> GSM486758     2  0.4749    0.34341 0.000 0.620 0.356 0.004 0.020
#> GSM486760     3  0.0000    0.86814 0.000 0.000 1.000 0.000 0.000
#> GSM486762     3  0.3355    0.83018 0.000 0.132 0.832 0.000 0.036
#> GSM486764     5  0.5685    0.32263 0.032 0.016 0.364 0.012 0.576
#> GSM486766     3  0.3321    0.82774 0.000 0.136 0.832 0.000 0.032
#> GSM486768     2  0.3547    0.78631 0.000 0.836 0.100 0.004 0.060
#> GSM486770     5  0.4510    0.10068 0.000 0.432 0.000 0.008 0.560
#> GSM486772     2  0.3373    0.78840 0.000 0.848 0.092 0.004 0.056
#> GSM486774     2  0.0992    0.79543 0.000 0.968 0.000 0.008 0.024
#> GSM486776     3  0.0000    0.86814 0.000 0.000 1.000 0.000 0.000
#> GSM486778     3  0.3386    0.83147 0.000 0.128 0.832 0.000 0.040
#> GSM486780     2  0.3373    0.78840 0.000 0.848 0.092 0.004 0.056
#> GSM486782     2  0.0579    0.79794 0.000 0.984 0.000 0.008 0.008
#> GSM486784     2  0.3359    0.78825 0.000 0.848 0.096 0.004 0.052
#> GSM486786     3  0.3386    0.83147 0.000 0.128 0.832 0.000 0.040
#> GSM486788     3  0.0000    0.86814 0.000 0.000 1.000 0.000 0.000
#> GSM486790     2  0.0693    0.79878 0.000 0.980 0.000 0.008 0.012
#> GSM486792     5  0.5954    0.20447 0.012 0.076 0.400 0.000 0.512
#> GSM486794     3  0.3386    0.83147 0.000 0.128 0.832 0.000 0.040
#> GSM486796     3  0.4434    0.21046 0.000 0.348 0.640 0.004 0.008
#> GSM486798     2  0.2756    0.74085 0.000 0.880 0.092 0.004 0.024
#> GSM486800     3  0.0000    0.86814 0.000 0.000 1.000 0.000 0.000
#> GSM486802     3  0.0000    0.86814 0.000 0.000 1.000 0.000 0.000
#> GSM486804     3  0.0000    0.86814 0.000 0.000 1.000 0.000 0.000
#> GSM486806     2  0.1124    0.79264 0.000 0.960 0.000 0.004 0.036
#> GSM486808     3  0.3355    0.83018 0.000 0.132 0.832 0.000 0.036
#> GSM486810     2  0.4306    0.48389 0.000 0.660 0.000 0.012 0.328
#> GSM486812     3  0.3386    0.83147 0.000 0.128 0.832 0.000 0.040
#> GSM486814     2  0.3342    0.78778 0.000 0.848 0.100 0.004 0.048
#> GSM486816     3  0.3386    0.83147 0.000 0.128 0.832 0.000 0.040
#> GSM486818     2  0.4471    0.65440 0.000 0.684 0.292 0.004 0.020
#> GSM486821     2  0.5338    0.48211 0.000 0.560 0.392 0.008 0.040
#> GSM486823     2  0.0898    0.79703 0.000 0.972 0.000 0.008 0.020
#> GSM486826     3  0.0000    0.86814 0.000 0.000 1.000 0.000 0.000
#> GSM486830     2  0.1082    0.79432 0.000 0.964 0.000 0.008 0.028
#> GSM486832     3  0.0162    0.86634 0.004 0.000 0.996 0.000 0.000
#> GSM486834     2  0.4581    0.52728 0.000 0.696 0.268 0.004 0.032
#> GSM486836     3  0.0000    0.86814 0.000 0.000 1.000 0.000 0.000
#> GSM486838     2  0.0290    0.79966 0.000 0.992 0.000 0.008 0.000
#> GSM486840     3  0.0000    0.86814 0.000 0.000 1.000 0.000 0.000
#> GSM486842     3  0.3355    0.83018 0.000 0.132 0.832 0.000 0.036
#> GSM486844     3  0.0703    0.84926 0.000 0.024 0.976 0.000 0.000
#> GSM486846     2  0.0451    0.79896 0.000 0.988 0.000 0.008 0.004
#> GSM486848     3  0.0000    0.86814 0.000 0.000 1.000 0.000 0.000
#> GSM486850     2  0.0290    0.79966 0.000 0.992 0.000 0.008 0.000
#> GSM486852     5  0.6347    0.19133 0.008 0.096 0.416 0.008 0.472
#> GSM486854     2  0.0290    0.79966 0.000 0.992 0.000 0.008 0.000
#> GSM486856     2  0.3373    0.78840 0.000 0.848 0.092 0.004 0.056
#> GSM486858     2  0.0579    0.79794 0.000 0.984 0.000 0.008 0.008

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM486735     6  0.5114     0.6865 0.000 0.000 0.024 0.160 0.136 0.680
#> GSM486737     4  0.0767     0.7942 0.000 0.008 0.000 0.976 0.004 0.012
#> GSM486739     6  0.3851     0.6093 0.000 0.004 0.008 0.284 0.004 0.700
#> GSM486741     4  0.2417     0.8123 0.000 0.004 0.008 0.888 0.088 0.012
#> GSM486743     4  0.0951     0.7930 0.000 0.008 0.000 0.968 0.004 0.020
#> GSM486745     4  0.4131     0.1684 0.000 0.004 0.004 0.600 0.004 0.388
#> GSM486747     5  0.2350     0.7421 0.000 0.004 0.008 0.064 0.900 0.024
#> GSM486749     4  0.3066     0.7993 0.000 0.004 0.012 0.836 0.136 0.012
#> GSM486751     5  0.4739     0.5146 0.000 0.012 0.012 0.228 0.696 0.052
#> GSM486753     4  0.0935     0.7949 0.000 0.004 0.000 0.964 0.000 0.032
#> GSM486755     4  0.2062     0.7660 0.000 0.008 0.004 0.900 0.000 0.088
#> GSM486757     5  0.4280     0.6174 0.000 0.012 0.012 0.152 0.764 0.060
#> GSM486759     5  0.2784     0.8015 0.008 0.000 0.000 0.012 0.848 0.132
#> GSM486761     5  0.0767     0.7942 0.000 0.000 0.008 0.004 0.976 0.012
#> GSM486763     6  0.5113     0.6274 0.000 0.004 0.040 0.104 0.148 0.704
#> GSM486765     5  0.0622     0.7949 0.000 0.000 0.012 0.000 0.980 0.008
#> GSM486767     4  0.2306     0.7615 0.000 0.004 0.008 0.888 0.004 0.096
#> GSM486769     6  0.4836     0.6852 0.000 0.000 0.012 0.156 0.136 0.696
#> GSM486771     4  0.0582     0.7958 0.000 0.004 0.004 0.984 0.004 0.004
#> GSM486773     4  0.4102     0.7646 0.000 0.012 0.012 0.776 0.152 0.048
#> GSM486775     5  0.2784     0.8015 0.008 0.000 0.000 0.012 0.848 0.132
#> GSM486777     5  0.1168     0.7900 0.000 0.000 0.016 0.000 0.956 0.028
#> GSM486779     4  0.0551     0.7944 0.000 0.008 0.000 0.984 0.004 0.004
#> GSM486781     4  0.3401     0.8000 0.000 0.012 0.004 0.820 0.136 0.028
#> GSM486783     4  0.1261     0.7890 0.000 0.008 0.004 0.956 0.004 0.028
#> GSM486785     5  0.0820     0.7941 0.000 0.000 0.012 0.000 0.972 0.016
#> GSM486787     5  0.2784     0.8015 0.008 0.000 0.000 0.012 0.848 0.132
#> GSM486789     4  0.4964     0.6771 0.000 0.000 0.012 0.680 0.136 0.172
#> GSM486791     6  0.4797     0.5744 0.008 0.000 0.044 0.036 0.200 0.712
#> GSM486793     5  0.1088     0.7916 0.000 0.000 0.016 0.000 0.960 0.024
#> GSM486795     5  0.5174     0.5807 0.000 0.004 0.012 0.260 0.636 0.088
#> GSM486797     5  0.4969     0.4698 0.000 0.012 0.012 0.248 0.668 0.060
#> GSM486799     5  0.2784     0.8015 0.008 0.000 0.000 0.012 0.848 0.132
#> GSM486801     5  0.2784     0.8015 0.008 0.000 0.000 0.012 0.848 0.132
#> GSM486803     5  0.2784     0.8015 0.008 0.000 0.000 0.012 0.848 0.132
#> GSM486805     4  0.4844     0.6189 0.000 0.012 0.012 0.672 0.256 0.048
#> GSM486807     5  0.0767     0.7942 0.000 0.000 0.008 0.004 0.976 0.012
#> GSM486809     6  0.5040     0.6876 0.000 0.004 0.020 0.144 0.136 0.696
#> GSM486811     5  0.0909     0.7936 0.000 0.000 0.012 0.000 0.968 0.020
#> GSM486813     4  0.1299     0.7868 0.000 0.004 0.004 0.952 0.004 0.036
#> GSM486815     5  0.0909     0.7938 0.000 0.000 0.012 0.000 0.968 0.020
#> GSM486817     4  0.5286     0.2965 0.000 0.004 0.012 0.612 0.284 0.088
#> GSM486819     5  0.5831     0.4148 0.000 0.004 0.012 0.324 0.528 0.132
#> GSM486822     4  0.4964     0.6772 0.000 0.000 0.012 0.680 0.136 0.172
#> GSM486824     5  0.2834     0.8008 0.008 0.000 0.000 0.016 0.848 0.128
#> GSM486828     4  0.3683     0.7946 0.000 0.012 0.012 0.808 0.136 0.032
#> GSM486831     5  0.2784     0.8015 0.008 0.000 0.000 0.012 0.848 0.132
#> GSM486833     5  0.4933     0.3955 0.000 0.012 0.012 0.300 0.636 0.040
#> GSM486835     5  0.2784     0.8015 0.008 0.000 0.000 0.012 0.848 0.132
#> GSM486837     4  0.3526     0.7880 0.000 0.016 0.004 0.804 0.156 0.020
#> GSM486839     5  0.2784     0.8015 0.008 0.000 0.000 0.012 0.848 0.132
#> GSM486841     5  0.1074     0.7913 0.000 0.000 0.012 0.000 0.960 0.028
#> GSM486843     5  0.2877     0.7995 0.008 0.000 0.000 0.020 0.848 0.124
#> GSM486845     4  0.3157     0.7978 0.000 0.012 0.004 0.832 0.136 0.016
#> GSM486847     5  0.2834     0.8008 0.008 0.000 0.000 0.016 0.848 0.128
#> GSM486849     4  0.3475     0.7985 0.000 0.004 0.012 0.816 0.136 0.032
#> GSM486851     6  0.5115     0.6210 0.000 0.004 0.040 0.092 0.164 0.700
#> GSM486853     4  0.2868     0.8021 0.000 0.004 0.008 0.844 0.136 0.008
#> GSM486855     4  0.0551     0.7944 0.000 0.008 0.000 0.984 0.004 0.004
#> GSM486857     4  0.3176     0.7976 0.000 0.012 0.008 0.832 0.136 0.012
#> GSM486736     3  0.4062     0.6749 0.000 0.052 0.796 0.012 0.024 0.116
#> GSM486738     2  0.1647     0.7378 0.016 0.940 0.032 0.008 0.000 0.004
#> GSM486740     3  0.4662     0.6421 0.008 0.268 0.676 0.024 0.000 0.024
#> GSM486742     2  0.2009     0.7555 0.008 0.904 0.084 0.000 0.000 0.004
#> GSM486744     2  0.1223     0.7512 0.016 0.960 0.012 0.008 0.000 0.004
#> GSM486746     2  0.4122     0.5489 0.016 0.720 0.244 0.012 0.000 0.008
#> GSM486748     1  0.5713     0.5516 0.624 0.140 0.200 0.004 0.000 0.032
#> GSM486750     2  0.2520     0.7591 0.000 0.844 0.152 0.004 0.000 0.000
#> GSM486752     2  0.6852     0.2257 0.316 0.416 0.216 0.004 0.000 0.048
#> GSM486754     2  0.1325     0.7506 0.016 0.956 0.012 0.012 0.000 0.004
#> GSM486756     2  0.1312     0.7482 0.012 0.956 0.020 0.008 0.000 0.004
#> GSM486758     1  0.6306     0.3970 0.532 0.212 0.220 0.004 0.000 0.032
#> GSM486760     1  0.0000     0.8322 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486762     1  0.3161     0.8039 0.820 0.012 0.156 0.000 0.008 0.004
#> GSM486764     3  0.6779     0.6555 0.104 0.120 0.592 0.024 0.008 0.152
#> GSM486766     1  0.3176     0.8039 0.824 0.016 0.148 0.000 0.008 0.004
#> GSM486768     2  0.2721     0.7355 0.024 0.884 0.068 0.012 0.000 0.012
#> GSM486770     3  0.3434     0.7008 0.000 0.140 0.808 0.004 0.000 0.048
#> GSM486772     2  0.1262     0.7498 0.020 0.956 0.016 0.008 0.000 0.000
#> GSM486774     2  0.3219     0.7476 0.000 0.792 0.192 0.004 0.000 0.012
#> GSM486776     1  0.0146     0.8317 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM486778     1  0.3481     0.7914 0.792 0.012 0.180 0.000 0.008 0.008
#> GSM486780     2  0.1592     0.7379 0.020 0.940 0.032 0.008 0.000 0.000
#> GSM486782     2  0.2738     0.7576 0.000 0.820 0.176 0.004 0.000 0.000
#> GSM486784     2  0.1167     0.7473 0.020 0.960 0.012 0.008 0.000 0.000
#> GSM486786     1  0.3135     0.8033 0.816 0.008 0.164 0.000 0.008 0.004
#> GSM486788     1  0.0000     0.8322 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486790     2  0.3052     0.7228 0.000 0.780 0.216 0.004 0.000 0.000
#> GSM486792     3  0.4977     0.6173 0.212 0.012 0.668 0.000 0.000 0.108
#> GSM486794     1  0.3428     0.7920 0.796 0.016 0.176 0.000 0.008 0.004
#> GSM486796     1  0.6123     0.1239 0.508 0.352 0.080 0.004 0.000 0.056
#> GSM486798     2  0.5261     0.6450 0.072 0.672 0.208 0.004 0.000 0.044
#> GSM486800     1  0.0000     0.8322 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486802     1  0.0000     0.8322 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486804     1  0.0000     0.8322 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486806     2  0.3810     0.7248 0.000 0.752 0.208 0.004 0.000 0.036
#> GSM486808     1  0.2982     0.8054 0.828 0.012 0.152 0.000 0.008 0.000
#> GSM486810     3  0.2996     0.6920 0.000 0.144 0.832 0.008 0.000 0.016
#> GSM486812     1  0.3135     0.8033 0.816 0.008 0.164 0.000 0.008 0.004
#> GSM486814     2  0.0951     0.7494 0.020 0.968 0.004 0.008 0.000 0.000
#> GSM486816     1  0.3447     0.7937 0.796 0.012 0.176 0.000 0.008 0.008
#> GSM486818     2  0.6248     0.2645 0.380 0.472 0.088 0.004 0.000 0.056
#> GSM486821     2  0.7039     0.0304 0.284 0.448 0.200 0.008 0.004 0.056
#> GSM486823     2  0.3476     0.6802 0.000 0.732 0.260 0.004 0.000 0.004
#> GSM486826     1  0.0291     0.8313 0.992 0.004 0.000 0.000 0.000 0.004
#> GSM486830     2  0.3121     0.7493 0.000 0.796 0.192 0.004 0.000 0.008
#> GSM486832     1  0.0260     0.8327 0.992 0.000 0.008 0.000 0.000 0.000
#> GSM486834     2  0.6919     0.1699 0.328 0.388 0.232 0.004 0.000 0.048
#> GSM486836     1  0.0000     0.8322 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486838     2  0.3596     0.7399 0.040 0.784 0.172 0.004 0.000 0.000
#> GSM486840     1  0.0000     0.8322 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486842     1  0.3099     0.8047 0.820 0.008 0.160 0.000 0.008 0.004
#> GSM486844     1  0.0622     0.8236 0.980 0.008 0.012 0.000 0.000 0.000
#> GSM486846     2  0.2737     0.7592 0.000 0.832 0.160 0.004 0.000 0.004
#> GSM486848     1  0.0146     0.8317 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM486850     2  0.2442     0.7598 0.000 0.852 0.144 0.004 0.000 0.000
#> GSM486852     3  0.6687     0.6602 0.156 0.120 0.588 0.012 0.008 0.116
#> GSM486854     2  0.2442     0.7598 0.000 0.852 0.144 0.004 0.000 0.000
#> GSM486856     2  0.1065     0.7483 0.020 0.964 0.008 0.008 0.000 0.000
#> GSM486858     2  0.2402     0.7609 0.000 0.856 0.140 0.004 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 agent(p) individual(p) k
#> MAD:mclust 120 4.67e-27         1.000 2
#> MAD:mclust 110 7.26e-25         1.000 3
#> MAD:mclust 119 1.27e-25         1.000 4
#> MAD:mclust  96 1.13e-20         0.997 5
#> MAD:mclust 109 6.67e-22         0.989 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 120 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 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-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.897           0.923       0.968         0.4999 0.501   0.501
#> 3 3 0.562           0.684       0.847         0.3242 0.748   0.538
#> 4 4 0.482           0.512       0.738         0.1018 0.791   0.481
#> 5 5 0.494           0.485       0.706         0.0691 0.829   0.465
#> 6 6 0.510           0.329       0.608         0.0497 0.949   0.779

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
#> GSM486735     2  0.0000      0.956 0.000 1.000
#> GSM486737     2  0.0000      0.956 0.000 1.000
#> GSM486739     2  0.0000      0.956 0.000 1.000
#> GSM486741     2  0.0000      0.956 0.000 1.000
#> GSM486743     2  0.0000      0.956 0.000 1.000
#> GSM486745     2  0.0000      0.956 0.000 1.000
#> GSM486747     1  0.0000      0.978 1.000 0.000
#> GSM486749     2  0.0000      0.956 0.000 1.000
#> GSM486751     2  0.9795      0.331 0.416 0.584
#> GSM486753     2  0.0000      0.956 0.000 1.000
#> GSM486755     2  0.0000      0.956 0.000 1.000
#> GSM486757     1  0.9460      0.405 0.636 0.364
#> GSM486759     1  0.0000      0.978 1.000 0.000
#> GSM486761     1  0.0000      0.978 1.000 0.000
#> GSM486763     2  0.3733      0.895 0.072 0.928
#> GSM486765     1  0.0000      0.978 1.000 0.000
#> GSM486767     2  0.0000      0.956 0.000 1.000
#> GSM486769     2  0.0000      0.956 0.000 1.000
#> GSM486771     2  0.0000      0.956 0.000 1.000
#> GSM486773     2  0.0000      0.956 0.000 1.000
#> GSM486775     1  0.0000      0.978 1.000 0.000
#> GSM486777     1  0.0000      0.978 1.000 0.000
#> GSM486779     2  0.0000      0.956 0.000 1.000
#> GSM486781     2  0.0000      0.956 0.000 1.000
#> GSM486783     2  0.0000      0.956 0.000 1.000
#> GSM486785     1  0.0000      0.978 1.000 0.000
#> GSM486787     1  0.0000      0.978 1.000 0.000
#> GSM486789     2  0.0000      0.956 0.000 1.000
#> GSM486791     1  0.0000      0.978 1.000 0.000
#> GSM486793     1  0.0000      0.978 1.000 0.000
#> GSM486795     1  0.1414      0.961 0.980 0.020
#> GSM486797     2  0.8813      0.600 0.300 0.700
#> GSM486799     1  0.0000      0.978 1.000 0.000
#> GSM486801     1  0.0000      0.978 1.000 0.000
#> GSM486803     1  0.0000      0.978 1.000 0.000
#> GSM486805     2  0.0000      0.956 0.000 1.000
#> GSM486807     1  0.0000      0.978 1.000 0.000
#> GSM486809     2  0.0000      0.956 0.000 1.000
#> GSM486811     1  0.0000      0.978 1.000 0.000
#> GSM486813     2  0.0000      0.956 0.000 1.000
#> GSM486815     1  0.0000      0.978 1.000 0.000
#> GSM486817     2  0.8608      0.628 0.284 0.716
#> GSM486819     1  0.8861      0.543 0.696 0.304
#> GSM486822     2  0.0000      0.956 0.000 1.000
#> GSM486824     1  0.0000      0.978 1.000 0.000
#> GSM486828     2  0.0000      0.956 0.000 1.000
#> GSM486831     1  0.0000      0.978 1.000 0.000
#> GSM486833     2  0.7528      0.732 0.216 0.784
#> GSM486835     1  0.0000      0.978 1.000 0.000
#> GSM486837     2  0.0000      0.956 0.000 1.000
#> GSM486839     1  0.0000      0.978 1.000 0.000
#> GSM486841     1  0.0000      0.978 1.000 0.000
#> GSM486843     1  0.0000      0.978 1.000 0.000
#> GSM486845     2  0.0000      0.956 0.000 1.000
#> GSM486847     1  0.0000      0.978 1.000 0.000
#> GSM486849     2  0.0000      0.956 0.000 1.000
#> GSM486851     1  0.1184      0.965 0.984 0.016
#> GSM486853     2  0.0000      0.956 0.000 1.000
#> GSM486855     2  0.0000      0.956 0.000 1.000
#> GSM486857     2  0.0000      0.956 0.000 1.000
#> GSM486736     2  0.0000      0.956 0.000 1.000
#> GSM486738     2  0.0000      0.956 0.000 1.000
#> GSM486740     2  0.0000      0.956 0.000 1.000
#> GSM486742     2  0.0000      0.956 0.000 1.000
#> GSM486744     2  0.0000      0.956 0.000 1.000
#> GSM486746     2  0.0000      0.956 0.000 1.000
#> GSM486748     1  0.0000      0.978 1.000 0.000
#> GSM486750     2  0.0000      0.956 0.000 1.000
#> GSM486752     1  0.8661      0.576 0.712 0.288
#> GSM486754     2  0.0000      0.956 0.000 1.000
#> GSM486756     2  0.0000      0.956 0.000 1.000
#> GSM486758     1  0.4161      0.892 0.916 0.084
#> GSM486760     1  0.0000      0.978 1.000 0.000
#> GSM486762     1  0.0000      0.978 1.000 0.000
#> GSM486764     2  0.9909      0.240 0.444 0.556
#> GSM486766     1  0.0000      0.978 1.000 0.000
#> GSM486768     2  0.0000      0.956 0.000 1.000
#> GSM486770     2  0.0000      0.956 0.000 1.000
#> GSM486772     2  0.0000      0.956 0.000 1.000
#> GSM486774     2  0.0000      0.956 0.000 1.000
#> GSM486776     1  0.0000      0.978 1.000 0.000
#> GSM486778     1  0.0000      0.978 1.000 0.000
#> GSM486780     2  0.0000      0.956 0.000 1.000
#> GSM486782     2  0.0000      0.956 0.000 1.000
#> GSM486784     2  0.0000      0.956 0.000 1.000
#> GSM486786     1  0.0000      0.978 1.000 0.000
#> GSM486788     1  0.0000      0.978 1.000 0.000
#> GSM486790     2  0.0000      0.956 0.000 1.000
#> GSM486792     1  0.0000      0.978 1.000 0.000
#> GSM486794     1  0.0000      0.978 1.000 0.000
#> GSM486796     1  0.0938      0.968 0.988 0.012
#> GSM486798     2  0.9358      0.494 0.352 0.648
#> GSM486800     1  0.0000      0.978 1.000 0.000
#> GSM486802     1  0.0000      0.978 1.000 0.000
#> GSM486804     1  0.0000      0.978 1.000 0.000
#> GSM486806     2  0.0000      0.956 0.000 1.000
#> GSM486808     1  0.0000      0.978 1.000 0.000
#> GSM486810     2  0.0000      0.956 0.000 1.000
#> GSM486812     1  0.0000      0.978 1.000 0.000
#> GSM486814     2  0.0000      0.956 0.000 1.000
#> GSM486816     1  0.0000      0.978 1.000 0.000
#> GSM486818     2  0.8813      0.600 0.300 0.700
#> GSM486821     2  0.8555      0.635 0.280 0.720
#> GSM486823     2  0.0000      0.956 0.000 1.000
#> GSM486826     1  0.0000      0.978 1.000 0.000
#> GSM486830     2  0.0000      0.956 0.000 1.000
#> GSM486832     1  0.0000      0.978 1.000 0.000
#> GSM486834     2  0.5519      0.839 0.128 0.872
#> GSM486836     1  0.0000      0.978 1.000 0.000
#> GSM486838     2  0.0672      0.949 0.008 0.992
#> GSM486840     1  0.0000      0.978 1.000 0.000
#> GSM486842     1  0.0000      0.978 1.000 0.000
#> GSM486844     1  0.0000      0.978 1.000 0.000
#> GSM486846     2  0.0000      0.956 0.000 1.000
#> GSM486848     1  0.0000      0.978 1.000 0.000
#> GSM486850     2  0.0000      0.956 0.000 1.000
#> GSM486852     1  0.0672      0.971 0.992 0.008
#> GSM486854     2  0.0000      0.956 0.000 1.000
#> GSM486856     2  0.0000      0.956 0.000 1.000
#> GSM486858     2  0.0000      0.956 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
#> GSM486735     2  0.6299    0.07635 0.476 0.524 0.000
#> GSM486737     2  0.5835    0.56384 0.340 0.660 0.000
#> GSM486739     2  0.6180    0.34673 0.416 0.584 0.000
#> GSM486741     2  0.5988    0.45374 0.368 0.632 0.000
#> GSM486743     2  0.6154    0.38765 0.408 0.592 0.000
#> GSM486745     1  0.6442    0.12141 0.564 0.432 0.004
#> GSM486747     1  0.6262    0.53044 0.696 0.020 0.284
#> GSM486749     1  0.3879    0.71080 0.848 0.152 0.000
#> GSM486751     1  0.3028    0.74860 0.920 0.048 0.032
#> GSM486753     2  0.6192    0.38631 0.420 0.580 0.000
#> GSM486755     2  0.4452    0.72888 0.192 0.808 0.000
#> GSM486757     1  0.2636    0.74908 0.932 0.048 0.020
#> GSM486759     3  0.4974    0.72066 0.236 0.000 0.764
#> GSM486761     3  0.6309   -0.00343 0.500 0.000 0.500
#> GSM486763     1  0.1170    0.74489 0.976 0.016 0.008
#> GSM486765     3  0.1163    0.87485 0.028 0.000 0.972
#> GSM486767     1  0.6509   -0.03121 0.524 0.472 0.004
#> GSM486769     2  0.4399    0.70080 0.188 0.812 0.000
#> GSM486771     1  0.6126    0.24306 0.600 0.400 0.000
#> GSM486773     1  0.3816    0.71730 0.852 0.148 0.000
#> GSM486775     3  0.1163    0.87602 0.028 0.000 0.972
#> GSM486777     1  0.3619    0.69241 0.864 0.000 0.136
#> GSM486779     1  0.5244    0.56697 0.756 0.240 0.004
#> GSM486781     1  0.6026    0.37535 0.624 0.376 0.000
#> GSM486783     2  0.5178    0.66897 0.256 0.744 0.000
#> GSM486785     1  0.6235    0.14306 0.564 0.000 0.436
#> GSM486787     3  0.2066    0.86521 0.060 0.000 0.940
#> GSM486789     2  0.2356    0.79981 0.072 0.928 0.000
#> GSM486791     3  0.5982    0.57806 0.328 0.004 0.668
#> GSM486793     1  0.5621    0.50068 0.692 0.000 0.308
#> GSM486795     1  0.1163    0.74514 0.972 0.000 0.028
#> GSM486797     1  0.1832    0.74850 0.956 0.036 0.008
#> GSM486799     3  0.1964    0.86817 0.056 0.000 0.944
#> GSM486801     1  0.6260    0.06110 0.552 0.000 0.448
#> GSM486803     1  0.6244    0.08377 0.560 0.000 0.440
#> GSM486805     1  0.2448    0.74367 0.924 0.076 0.000
#> GSM486807     3  0.4291    0.76710 0.180 0.000 0.820
#> GSM486809     1  0.5254    0.60785 0.736 0.264 0.000
#> GSM486811     3  0.5254    0.67343 0.264 0.000 0.736
#> GSM486813     2  0.6483    0.27263 0.452 0.544 0.004
#> GSM486815     3  0.4974    0.70515 0.236 0.000 0.764
#> GSM486817     1  0.1453    0.74287 0.968 0.024 0.008
#> GSM486819     1  0.1337    0.74478 0.972 0.012 0.016
#> GSM486822     2  0.4555    0.69185 0.200 0.800 0.000
#> GSM486824     3  0.4291    0.79235 0.180 0.000 0.820
#> GSM486828     1  0.4887    0.64443 0.772 0.228 0.000
#> GSM486831     3  0.4504    0.76204 0.196 0.000 0.804
#> GSM486833     1  0.2846    0.74745 0.924 0.056 0.020
#> GSM486835     3  0.2625    0.85513 0.084 0.000 0.916
#> GSM486837     1  0.3551    0.72481 0.868 0.132 0.000
#> GSM486839     3  0.4796    0.72777 0.220 0.000 0.780
#> GSM486841     1  0.6235    0.13125 0.564 0.000 0.436
#> GSM486843     1  0.5650    0.42864 0.688 0.000 0.312
#> GSM486845     1  0.2537    0.74198 0.920 0.080 0.000
#> GSM486847     3  0.5905    0.52357 0.352 0.000 0.648
#> GSM486849     2  0.6180    0.28760 0.416 0.584 0.000
#> GSM486851     1  0.1877    0.74434 0.956 0.012 0.032
#> GSM486853     2  0.6095    0.37610 0.392 0.608 0.000
#> GSM486855     1  0.4575    0.64821 0.812 0.184 0.004
#> GSM486857     1  0.4291    0.69495 0.820 0.180 0.000
#> GSM486736     2  0.1163    0.81711 0.028 0.972 0.000
#> GSM486738     2  0.1163    0.81999 0.028 0.972 0.000
#> GSM486740     2  0.1163    0.81860 0.028 0.972 0.000
#> GSM486742     2  0.0747    0.82053 0.016 0.984 0.000
#> GSM486744     2  0.1163    0.81915 0.028 0.972 0.000
#> GSM486746     2  0.1453    0.81821 0.024 0.968 0.008
#> GSM486748     3  0.5156    0.66723 0.008 0.216 0.776
#> GSM486750     2  0.0892    0.81871 0.020 0.980 0.000
#> GSM486752     2  0.6075    0.52168 0.008 0.676 0.316
#> GSM486754     2  0.1031    0.81997 0.024 0.976 0.000
#> GSM486756     2  0.1031    0.81997 0.024 0.976 0.000
#> GSM486758     2  0.6683    0.04276 0.008 0.500 0.492
#> GSM486760     3  0.0424    0.88039 0.008 0.000 0.992
#> GSM486762     3  0.0237    0.88029 0.004 0.000 0.996
#> GSM486764     2  0.6535    0.62505 0.052 0.728 0.220
#> GSM486766     3  0.0237    0.88029 0.004 0.000 0.996
#> GSM486768     2  0.2050    0.81439 0.028 0.952 0.020
#> GSM486770     2  0.0892    0.81871 0.020 0.980 0.000
#> GSM486772     2  0.1411    0.81759 0.036 0.964 0.000
#> GSM486774     2  0.1919    0.81727 0.020 0.956 0.024
#> GSM486776     3  0.0237    0.88050 0.004 0.000 0.996
#> GSM486778     3  0.0237    0.88029 0.004 0.000 0.996
#> GSM486780     2  0.1878    0.81619 0.044 0.952 0.004
#> GSM486782     2  0.1482    0.81957 0.020 0.968 0.012
#> GSM486784     2  0.1289    0.81921 0.032 0.968 0.000
#> GSM486786     3  0.0237    0.88029 0.004 0.000 0.996
#> GSM486788     3  0.0424    0.88039 0.008 0.000 0.992
#> GSM486790     2  0.0237    0.82102 0.004 0.996 0.000
#> GSM486792     3  0.1999    0.86612 0.012 0.036 0.952
#> GSM486794     3  0.0237    0.88029 0.004 0.000 0.996
#> GSM486796     3  0.6264    0.59731 0.028 0.256 0.716
#> GSM486798     2  0.5115    0.64390 0.004 0.768 0.228
#> GSM486800     3  0.0424    0.88039 0.008 0.000 0.992
#> GSM486802     3  0.2056    0.86733 0.024 0.024 0.952
#> GSM486804     3  0.2903    0.84907 0.028 0.048 0.924
#> GSM486806     2  0.3370    0.78929 0.024 0.904 0.072
#> GSM486808     3  0.0475    0.87975 0.004 0.004 0.992
#> GSM486810     2  0.0892    0.81871 0.020 0.980 0.000
#> GSM486812     3  0.0237    0.88029 0.004 0.000 0.996
#> GSM486814     2  0.2200    0.80996 0.056 0.940 0.004
#> GSM486816     3  0.0237    0.88029 0.004 0.000 0.996
#> GSM486818     2  0.5180    0.71305 0.032 0.812 0.156
#> GSM486821     2  0.5847    0.68631 0.048 0.780 0.172
#> GSM486823     2  0.0892    0.81871 0.020 0.980 0.000
#> GSM486826     3  0.1585    0.87235 0.008 0.028 0.964
#> GSM486830     2  0.1781    0.81767 0.020 0.960 0.020
#> GSM486832     3  0.1129    0.87551 0.004 0.020 0.976
#> GSM486834     2  0.4413    0.74733 0.024 0.852 0.124
#> GSM486836     3  0.1711    0.86892 0.008 0.032 0.960
#> GSM486838     2  0.3461    0.78781 0.024 0.900 0.076
#> GSM486840     3  0.0237    0.88050 0.004 0.000 0.996
#> GSM486842     3  0.0237    0.88029 0.004 0.000 0.996
#> GSM486844     3  0.2793    0.85205 0.028 0.044 0.928
#> GSM486846     2  0.1781    0.81829 0.020 0.960 0.020
#> GSM486848     3  0.0592    0.88004 0.012 0.000 0.988
#> GSM486850     2  0.0892    0.81896 0.020 0.980 0.000
#> GSM486852     3  0.6079    0.65376 0.036 0.216 0.748
#> GSM486854     2  0.0892    0.81970 0.020 0.980 0.000
#> GSM486856     2  0.1878    0.81481 0.044 0.952 0.004
#> GSM486858     2  0.1919    0.81817 0.024 0.956 0.020

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM486735     4  0.2706     0.5859 0.020 0.080 0.000 0.900
#> GSM486737     2  0.4472     0.4896 0.220 0.760 0.000 0.020
#> GSM486739     4  0.4687     0.5123 0.020 0.224 0.004 0.752
#> GSM486741     2  0.7796     0.0416 0.360 0.392 0.000 0.248
#> GSM486743     2  0.5778     0.1337 0.356 0.604 0.000 0.040
#> GSM486745     4  0.6879     0.4400 0.112 0.268 0.012 0.608
#> GSM486747     1  0.6747     0.5312 0.596 0.000 0.264 0.140
#> GSM486749     1  0.5256     0.5764 0.692 0.036 0.000 0.272
#> GSM486751     1  0.4775     0.6100 0.740 0.000 0.028 0.232
#> GSM486753     1  0.6529     0.2572 0.532 0.388 0.000 0.080
#> GSM486755     2  0.6846     0.2970 0.184 0.600 0.000 0.216
#> GSM486757     1  0.3836     0.6208 0.816 0.000 0.016 0.168
#> GSM486759     3  0.3768     0.7779 0.120 0.024 0.848 0.008
#> GSM486761     3  0.5229     0.2248 0.428 0.000 0.564 0.008
#> GSM486763     4  0.7684     0.2306 0.304 0.152 0.020 0.524
#> GSM486765     3  0.0524     0.8310 0.004 0.000 0.988 0.008
#> GSM486767     1  0.7529     0.2698 0.464 0.392 0.012 0.132
#> GSM486769     4  0.2704     0.5732 0.000 0.124 0.000 0.876
#> GSM486771     1  0.6077     0.2281 0.496 0.460 0.000 0.044
#> GSM486773     1  0.5475     0.5478 0.656 0.036 0.000 0.308
#> GSM486775     3  0.0000     0.8334 0.000 0.000 1.000 0.000
#> GSM486777     1  0.3810     0.5031 0.804 0.000 0.188 0.008
#> GSM486779     2  0.4302     0.4469 0.236 0.756 0.004 0.004
#> GSM486781     1  0.7550     0.3354 0.480 0.220 0.000 0.300
#> GSM486783     2  0.2542     0.5719 0.084 0.904 0.000 0.012
#> GSM486785     1  0.4990     0.2944 0.640 0.000 0.352 0.008
#> GSM486787     3  0.1247     0.8339 0.004 0.016 0.968 0.012
#> GSM486789     4  0.4957     0.3519 0.016 0.300 0.000 0.684
#> GSM486791     3  0.7998     0.3533 0.048 0.128 0.524 0.300
#> GSM486793     3  0.4936     0.4770 0.340 0.000 0.652 0.008
#> GSM486795     1  0.1545     0.5785 0.952 0.040 0.008 0.000
#> GSM486797     1  0.2401     0.6100 0.904 0.000 0.004 0.092
#> GSM486799     3  0.0992     0.8338 0.004 0.012 0.976 0.008
#> GSM486801     3  0.7000     0.2806 0.420 0.060 0.496 0.024
#> GSM486803     1  0.7688     0.3313 0.504 0.204 0.284 0.008
#> GSM486805     1  0.4464     0.6107 0.760 0.012 0.004 0.224
#> GSM486807     3  0.2124     0.8103 0.068 0.000 0.924 0.008
#> GSM486809     4  0.2408     0.5752 0.044 0.036 0.000 0.920
#> GSM486811     3  0.2741     0.8059 0.096 0.000 0.892 0.012
#> GSM486813     2  0.5586     0.3961 0.216 0.720 0.012 0.052
#> GSM486815     3  0.2256     0.8209 0.056 0.000 0.924 0.020
#> GSM486817     1  0.4392     0.5382 0.768 0.216 0.012 0.004
#> GSM486819     1  0.5787     0.5120 0.720 0.192 0.012 0.076
#> GSM486822     4  0.5031     0.4637 0.048 0.212 0.000 0.740
#> GSM486824     3  0.6678     0.5890 0.164 0.168 0.656 0.012
#> GSM486828     1  0.6280     0.5009 0.604 0.080 0.000 0.316
#> GSM486831     3  0.3775     0.8012 0.080 0.016 0.864 0.040
#> GSM486833     1  0.5323     0.5273 0.628 0.000 0.020 0.352
#> GSM486835     3  0.2099     0.8304 0.012 0.044 0.936 0.008
#> GSM486837     1  0.7937     0.4108 0.512 0.224 0.020 0.244
#> GSM486839     3  0.4746     0.6011 0.276 0.008 0.712 0.004
#> GSM486841     3  0.5295     0.2317 0.488 0.000 0.504 0.008
#> GSM486843     1  0.4376     0.5433 0.796 0.028 0.172 0.004
#> GSM486845     1  0.3925     0.6210 0.808 0.016 0.000 0.176
#> GSM486847     1  0.5443    -0.1438 0.532 0.008 0.456 0.004
#> GSM486849     1  0.7896     0.0657 0.372 0.328 0.000 0.300
#> GSM486851     4  0.8781     0.2153 0.264 0.140 0.108 0.488
#> GSM486853     2  0.7717     0.1600 0.304 0.444 0.000 0.252
#> GSM486855     2  0.5004     0.1638 0.392 0.604 0.000 0.004
#> GSM486857     1  0.6165     0.5765 0.672 0.100 0.004 0.224
#> GSM486736     4  0.2149     0.5872 0.000 0.088 0.000 0.912
#> GSM486738     2  0.1118     0.5886 0.000 0.964 0.000 0.036
#> GSM486740     4  0.3942     0.5206 0.000 0.236 0.000 0.764
#> GSM486742     2  0.4164     0.5064 0.000 0.736 0.000 0.264
#> GSM486744     2  0.0592     0.5865 0.000 0.984 0.000 0.016
#> GSM486746     4  0.4936     0.4397 0.000 0.340 0.008 0.652
#> GSM486748     2  0.7634     0.2153 0.004 0.460 0.352 0.184
#> GSM486750     4  0.4746     0.2244 0.000 0.368 0.000 0.632
#> GSM486752     4  0.7985     0.0365 0.004 0.260 0.348 0.388
#> GSM486754     2  0.2469     0.5712 0.000 0.892 0.000 0.108
#> GSM486756     2  0.2530     0.5607 0.000 0.888 0.000 0.112
#> GSM486758     3  0.7401     0.0122 0.004 0.148 0.476 0.372
#> GSM486760     3  0.1284     0.8335 0.000 0.024 0.964 0.012
#> GSM486762     3  0.1443     0.8297 0.004 0.028 0.960 0.008
#> GSM486764     4  0.5203     0.4726 0.000 0.232 0.048 0.720
#> GSM486766     3  0.0992     0.8316 0.004 0.012 0.976 0.008
#> GSM486768     2  0.3450     0.4951 0.000 0.836 0.008 0.156
#> GSM486770     4  0.2647     0.5760 0.000 0.120 0.000 0.880
#> GSM486772     2  0.1389     0.5757 0.000 0.952 0.000 0.048
#> GSM486774     2  0.4804     0.3687 0.000 0.616 0.000 0.384
#> GSM486776     3  0.1209     0.8327 0.000 0.032 0.964 0.004
#> GSM486778     3  0.1489     0.8286 0.004 0.000 0.952 0.044
#> GSM486780     2  0.0657     0.5891 0.000 0.984 0.004 0.012
#> GSM486782     2  0.4679     0.4129 0.000 0.648 0.000 0.352
#> GSM486784     2  0.0336     0.5869 0.000 0.992 0.000 0.008
#> GSM486786     3  0.0992     0.8316 0.004 0.012 0.976 0.008
#> GSM486788     3  0.2443     0.8248 0.000 0.060 0.916 0.024
#> GSM486790     4  0.4746     0.2200 0.000 0.368 0.000 0.632
#> GSM486792     3  0.5649     0.3749 0.000 0.028 0.580 0.392
#> GSM486794     3  0.0779     0.8314 0.004 0.000 0.980 0.016
#> GSM486796     2  0.6215     0.1768 0.000 0.600 0.328 0.072
#> GSM486798     2  0.6744     0.4066 0.004 0.600 0.116 0.280
#> GSM486800     3  0.1807     0.8299 0.000 0.052 0.940 0.008
#> GSM486802     3  0.3542     0.7805 0.000 0.120 0.852 0.028
#> GSM486804     3  0.5007     0.5237 0.000 0.356 0.636 0.008
#> GSM486806     2  0.5588     0.3713 0.004 0.600 0.020 0.376
#> GSM486808     3  0.1114     0.8316 0.004 0.016 0.972 0.008
#> GSM486810     4  0.2216     0.5865 0.000 0.092 0.000 0.908
#> GSM486812     3  0.0779     0.8316 0.004 0.000 0.980 0.016
#> GSM486814     2  0.0927     0.5724 0.000 0.976 0.008 0.016
#> GSM486816     3  0.0657     0.8312 0.004 0.000 0.984 0.012
#> GSM486818     2  0.2197     0.5384 0.000 0.916 0.080 0.004
#> GSM486821     4  0.7235     0.2718 0.000 0.372 0.148 0.480
#> GSM486823     4  0.4222     0.4174 0.000 0.272 0.000 0.728
#> GSM486826     3  0.4343     0.6537 0.000 0.264 0.732 0.004
#> GSM486830     2  0.4985     0.2049 0.000 0.532 0.000 0.468
#> GSM486832     3  0.1936     0.8308 0.000 0.028 0.940 0.032
#> GSM486834     4  0.4921     0.5240 0.004 0.132 0.080 0.784
#> GSM486836     3  0.2342     0.8203 0.000 0.080 0.912 0.008
#> GSM486838     2  0.4964     0.5095 0.000 0.724 0.032 0.244
#> GSM486840     3  0.2654     0.8053 0.000 0.108 0.888 0.004
#> GSM486842     3  0.0524     0.8310 0.004 0.000 0.988 0.008
#> GSM486844     2  0.5137    -0.1035 0.000 0.544 0.452 0.004
#> GSM486846     2  0.4454     0.4627 0.000 0.692 0.000 0.308
#> GSM486848     3  0.1824     0.8282 0.000 0.060 0.936 0.004
#> GSM486850     2  0.4356     0.4828 0.000 0.708 0.000 0.292
#> GSM486852     4  0.7457     0.2976 0.000 0.220 0.276 0.504
#> GSM486854     2  0.4134     0.5059 0.000 0.740 0.000 0.260
#> GSM486856     2  0.0524     0.5791 0.000 0.988 0.008 0.004
#> GSM486858     2  0.4356     0.4791 0.000 0.708 0.000 0.292

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM486735     5  0.3937     0.6656 0.000 0.004 0.252 0.008 0.736
#> GSM486737     2  0.6454     0.3332 0.000 0.488 0.304 0.208 0.000
#> GSM486739     5  0.3067     0.7029 0.000 0.012 0.140 0.004 0.844
#> GSM486741     3  0.6478     0.4787 0.000 0.196 0.536 0.260 0.008
#> GSM486743     2  0.5996     0.3611 0.000 0.548 0.072 0.360 0.020
#> GSM486745     5  0.5853     0.5295 0.004 0.248 0.068 0.032 0.648
#> GSM486747     1  0.5807     0.1084 0.484 0.000 0.424 0.092 0.000
#> GSM486749     4  0.4286     0.3475 0.000 0.004 0.260 0.716 0.020
#> GSM486751     4  0.6225     0.1374 0.124 0.000 0.400 0.472 0.004
#> GSM486753     4  0.7006     0.1418 0.000 0.232 0.212 0.520 0.036
#> GSM486755     3  0.7128    -0.0720 0.000 0.392 0.436 0.104 0.068
#> GSM486757     4  0.4918     0.4630 0.076 0.000 0.184 0.728 0.012
#> GSM486759     1  0.5855     0.5473 0.676 0.080 0.000 0.188 0.056
#> GSM486761     1  0.4610     0.6002 0.740 0.000 0.168 0.092 0.000
#> GSM486763     5  0.3096     0.6661 0.036 0.044 0.004 0.032 0.884
#> GSM486765     1  0.1857     0.7386 0.928 0.000 0.060 0.008 0.004
#> GSM486767     2  0.7359     0.1845 0.000 0.480 0.080 0.308 0.132
#> GSM486769     5  0.4347     0.5261 0.000 0.004 0.356 0.004 0.636
#> GSM486771     2  0.5207     0.4142 0.000 0.652 0.024 0.292 0.032
#> GSM486773     3  0.4976     0.0996 0.000 0.000 0.504 0.468 0.028
#> GSM486775     1  0.0912     0.7476 0.972 0.016 0.012 0.000 0.000
#> GSM486777     4  0.4551     0.2906 0.348 0.000 0.008 0.636 0.008
#> GSM486779     2  0.3578     0.6316 0.000 0.820 0.048 0.132 0.000
#> GSM486781     3  0.4132     0.5500 0.004 0.032 0.760 0.204 0.000
#> GSM486783     2  0.3778     0.6627 0.000 0.820 0.108 0.068 0.004
#> GSM486785     4  0.5069    -0.0114 0.452 0.008 0.020 0.520 0.000
#> GSM486787     1  0.4233     0.6857 0.788 0.144 0.000 0.012 0.056
#> GSM486789     3  0.4524     0.2742 0.000 0.020 0.644 0.000 0.336
#> GSM486791     5  0.4673     0.4866 0.228 0.052 0.000 0.004 0.716
#> GSM486793     1  0.3446     0.6922 0.840 0.000 0.036 0.116 0.008
#> GSM486795     4  0.5289     0.4667 0.056 0.156 0.000 0.728 0.060
#> GSM486797     4  0.3650     0.4463 0.028 0.000 0.176 0.796 0.000
#> GSM486799     1  0.1243     0.7422 0.960 0.028 0.000 0.004 0.008
#> GSM486801     4  0.8237     0.2206 0.292 0.260 0.000 0.332 0.116
#> GSM486803     4  0.7877     0.2265 0.192 0.320 0.000 0.396 0.092
#> GSM486805     4  0.4767     0.0730 0.020 0.000 0.420 0.560 0.000
#> GSM486807     1  0.3105     0.7134 0.864 0.000 0.088 0.044 0.004
#> GSM486809     5  0.3642     0.6789 0.000 0.000 0.232 0.008 0.760
#> GSM486811     1  0.3114     0.7234 0.868 0.012 0.004 0.096 0.020
#> GSM486813     2  0.4584     0.5923 0.000 0.788 0.048 0.104 0.060
#> GSM486815     1  0.2444     0.7420 0.912 0.000 0.036 0.024 0.028
#> GSM486817     4  0.4373     0.3101 0.004 0.300 0.004 0.684 0.008
#> GSM486819     4  0.6848     0.2126 0.056 0.100 0.000 0.508 0.336
#> GSM486822     3  0.3838     0.3972 0.000 0.004 0.716 0.000 0.280
#> GSM486824     2  0.6804     0.1365 0.240 0.584 0.004 0.108 0.064
#> GSM486828     3  0.5549     0.2557 0.008 0.008 0.548 0.400 0.036
#> GSM486831     1  0.4825     0.6437 0.764 0.052 0.000 0.048 0.136
#> GSM486833     3  0.6096    -0.1203 0.064 0.000 0.472 0.440 0.024
#> GSM486835     1  0.4732     0.6464 0.744 0.176 0.000 0.012 0.068
#> GSM486837     3  0.6316     0.4132 0.008 0.152 0.544 0.296 0.000
#> GSM486839     1  0.5606     0.2822 0.556 0.084 0.000 0.360 0.000
#> GSM486841     1  0.4530     0.3682 0.612 0.004 0.000 0.376 0.008
#> GSM486843     4  0.5312     0.3884 0.096 0.256 0.000 0.648 0.000
#> GSM486845     4  0.3878     0.3507 0.000 0.016 0.236 0.748 0.000
#> GSM486847     4  0.5442     0.1287 0.408 0.052 0.000 0.536 0.004
#> GSM486849     3  0.7268     0.3964 0.000 0.188 0.492 0.268 0.052
#> GSM486851     5  0.4336     0.6028 0.108 0.060 0.000 0.032 0.800
#> GSM486853     3  0.6150     0.4788 0.000 0.236 0.560 0.204 0.000
#> GSM486855     2  0.4024     0.5698 0.000 0.752 0.028 0.220 0.000
#> GSM486857     3  0.5100     0.2420 0.000 0.036 0.516 0.448 0.000
#> GSM486736     5  0.3635     0.6704 0.000 0.004 0.248 0.000 0.748
#> GSM486738     2  0.4060     0.4155 0.000 0.640 0.360 0.000 0.000
#> GSM486740     5  0.3081     0.7037 0.000 0.012 0.156 0.000 0.832
#> GSM486742     3  0.4551     0.3926 0.000 0.368 0.616 0.000 0.016
#> GSM486744     2  0.3819     0.5954 0.000 0.756 0.228 0.000 0.016
#> GSM486746     5  0.4958     0.6021 0.000 0.224 0.084 0.000 0.692
#> GSM486748     3  0.5382     0.3116 0.336 0.072 0.592 0.000 0.000
#> GSM486750     3  0.3844     0.5590 0.000 0.044 0.792 0.000 0.164
#> GSM486752     3  0.4164     0.4334 0.252 0.008 0.728 0.000 0.012
#> GSM486754     2  0.4942     0.2244 0.000 0.540 0.432 0.000 0.028
#> GSM486756     2  0.5171     0.1600 0.000 0.504 0.456 0.000 0.040
#> GSM486758     3  0.4481     0.3216 0.312 0.004 0.668 0.000 0.016
#> GSM486760     1  0.2878     0.7268 0.880 0.068 0.004 0.000 0.048
#> GSM486762     1  0.3109     0.6566 0.800 0.000 0.200 0.000 0.000
#> GSM486764     5  0.2507     0.6806 0.028 0.044 0.020 0.000 0.908
#> GSM486766     1  0.1965     0.7291 0.904 0.000 0.096 0.000 0.000
#> GSM486768     2  0.5125     0.5826 0.000 0.696 0.156 0.000 0.148
#> GSM486770     5  0.3969     0.6183 0.000 0.004 0.304 0.000 0.692
#> GSM486772     2  0.2983     0.6590 0.000 0.864 0.096 0.000 0.040
#> GSM486774     3  0.2635     0.6116 0.016 0.088 0.888 0.000 0.008
#> GSM486776     1  0.2074     0.7510 0.920 0.036 0.044 0.000 0.000
#> GSM486778     1  0.2158     0.7468 0.920 0.008 0.020 0.000 0.052
#> GSM486780     2  0.2813     0.6447 0.000 0.832 0.168 0.000 0.000
#> GSM486782     3  0.3242     0.5828 0.000 0.172 0.816 0.000 0.012
#> GSM486784     2  0.2605     0.6506 0.000 0.852 0.148 0.000 0.000
#> GSM486786     1  0.2377     0.7149 0.872 0.000 0.128 0.000 0.000
#> GSM486788     1  0.5243     0.5845 0.668 0.244 0.004 0.000 0.084
#> GSM486790     3  0.5139     0.4226 0.000 0.072 0.648 0.000 0.280
#> GSM486792     5  0.3671     0.5393 0.236 0.000 0.008 0.000 0.756
#> GSM486794     1  0.1831     0.7346 0.920 0.000 0.076 0.000 0.004
#> GSM486796     2  0.4368     0.4370 0.080 0.772 0.004 0.000 0.144
#> GSM486798     3  0.4884     0.5493 0.128 0.152 0.720 0.000 0.000
#> GSM486800     1  0.3122     0.7210 0.852 0.120 0.004 0.000 0.024
#> GSM486802     1  0.6125     0.3046 0.480 0.404 0.004 0.000 0.112
#> GSM486804     2  0.4871     0.2561 0.316 0.648 0.008 0.000 0.028
#> GSM486806     3  0.3105     0.5881 0.088 0.044 0.864 0.000 0.004
#> GSM486808     1  0.2583     0.7090 0.864 0.000 0.132 0.000 0.004
#> GSM486810     5  0.3990     0.6117 0.000 0.004 0.308 0.000 0.688
#> GSM486812     1  0.1518     0.7478 0.952 0.012 0.016 0.000 0.020
#> GSM486814     2  0.2439     0.6624 0.000 0.876 0.120 0.000 0.004
#> GSM486816     1  0.1892     0.7334 0.916 0.000 0.080 0.000 0.004
#> GSM486818     2  0.4698     0.5396 0.028 0.664 0.304 0.000 0.004
#> GSM486821     5  0.5429     0.3096 0.068 0.368 0.000 0.000 0.564
#> GSM486823     3  0.3916     0.4418 0.000 0.012 0.732 0.000 0.256
#> GSM486826     1  0.5175     0.4151 0.548 0.408 0.044 0.000 0.000
#> GSM486830     3  0.2798     0.6105 0.008 0.060 0.888 0.000 0.044
#> GSM486832     1  0.3384     0.7132 0.848 0.060 0.004 0.000 0.088
#> GSM486834     3  0.2922     0.5488 0.056 0.000 0.872 0.000 0.072
#> GSM486836     1  0.5460     0.5318 0.636 0.280 0.008 0.000 0.076
#> GSM486838     3  0.4151     0.4172 0.004 0.344 0.652 0.000 0.000
#> GSM486840     1  0.4704     0.2602 0.508 0.480 0.004 0.000 0.008
#> GSM486842     1  0.1408     0.7467 0.948 0.008 0.044 0.000 0.000
#> GSM486844     2  0.4352     0.4209 0.244 0.720 0.036 0.000 0.000
#> GSM486846     3  0.3636     0.5222 0.000 0.272 0.728 0.000 0.000
#> GSM486848     1  0.4617     0.5452 0.660 0.316 0.008 0.000 0.016
#> GSM486850     3  0.4533     0.2782 0.000 0.448 0.544 0.000 0.008
#> GSM486852     5  0.3593     0.6282 0.088 0.084 0.000 0.000 0.828
#> GSM486854     3  0.4030     0.4266 0.000 0.352 0.648 0.000 0.000
#> GSM486856     2  0.2329     0.6602 0.000 0.876 0.124 0.000 0.000
#> GSM486858     3  0.3366     0.5407 0.000 0.232 0.768 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
#> GSM486735     6   0.291    0.61000 0.000 0.000 0.012 0.156 0.004 0.828
#> GSM486737     2   0.617    0.39837 0.000 0.560 0.028 0.176 0.228 0.008
#> GSM486739     6   0.377    0.63814 0.004 0.008 0.088 0.096 0.000 0.804
#> GSM486741     4   0.728    0.14444 0.000 0.296 0.064 0.400 0.224 0.016
#> GSM486743     2   0.646    0.27016 0.000 0.440 0.168 0.024 0.360 0.008
#> GSM486745     6   0.651    0.49129 0.000 0.108 0.260 0.060 0.020 0.552
#> GSM486747     1   0.599   -0.00837 0.452 0.000 0.056 0.420 0.072 0.000
#> GSM486749     5   0.702    0.23754 0.000 0.028 0.096 0.240 0.520 0.116
#> GSM486751     5   0.721    0.15091 0.104 0.000 0.052 0.380 0.404 0.060
#> GSM486753     5   0.680    0.27043 0.000 0.128 0.040 0.216 0.556 0.060
#> GSM486755     2   0.780    0.27008 0.000 0.440 0.104 0.264 0.104 0.088
#> GSM486757     5   0.594    0.42701 0.096 0.004 0.060 0.144 0.668 0.028
#> GSM486759     1   0.612    0.13657 0.540 0.032 0.252 0.000 0.176 0.000
#> GSM486761     1   0.529    0.44273 0.676 0.000 0.048 0.172 0.104 0.000
#> GSM486763     6   0.469    0.60789 0.012 0.020 0.196 0.008 0.036 0.728
#> GSM486765     1   0.101    0.57799 0.960 0.000 0.004 0.036 0.000 0.000
#> GSM486767     2   0.823    0.10478 0.000 0.288 0.280 0.036 0.208 0.188
#> GSM486769     6   0.419    0.47316 0.000 0.004 0.032 0.256 0.004 0.704
#> GSM486771     2   0.693    0.40329 0.000 0.500 0.192 0.044 0.236 0.028
#> GSM486773     5   0.525    0.06810 0.000 0.004 0.012 0.464 0.468 0.052
#> GSM486775     1   0.192    0.57104 0.904 0.008 0.088 0.000 0.000 0.000
#> GSM486777     5   0.550    0.11591 0.384 0.000 0.080 0.004 0.520 0.012
#> GSM486779     2   0.490    0.45335 0.000 0.696 0.172 0.020 0.112 0.000
#> GSM486781     4   0.498    0.42026 0.000 0.040 0.052 0.728 0.156 0.024
#> GSM486783     2   0.350    0.55985 0.000 0.832 0.036 0.048 0.084 0.000
#> GSM486785     5   0.556    0.00496 0.440 0.008 0.052 0.024 0.476 0.000
#> GSM486787     1   0.525    0.26035 0.596 0.084 0.308 0.000 0.004 0.008
#> GSM486789     4   0.585    0.06558 0.000 0.060 0.044 0.460 0.004 0.432
#> GSM486791     6   0.545    0.42442 0.120 0.000 0.304 0.000 0.008 0.568
#> GSM486793     1   0.382    0.53948 0.812 0.000 0.056 0.012 0.104 0.016
#> GSM486795     5   0.501    0.26332 0.032 0.072 0.220 0.000 0.676 0.000
#> GSM486797     5   0.376    0.43875 0.048 0.004 0.008 0.148 0.792 0.000
#> GSM486799     1   0.293    0.51688 0.796 0.000 0.200 0.000 0.004 0.000
#> GSM486801     3   0.732    0.28150 0.304 0.072 0.340 0.000 0.276 0.008
#> GSM486803     5   0.738   -0.31892 0.164 0.112 0.304 0.000 0.408 0.012
#> GSM486805     5   0.517    0.16760 0.032 0.000 0.024 0.420 0.520 0.004
#> GSM486807     1   0.261    0.57370 0.884 0.000 0.032 0.068 0.016 0.000
#> GSM486809     6   0.362    0.61293 0.000 0.008 0.048 0.148 0.000 0.796
#> GSM486811     1   0.370    0.53749 0.784 0.000 0.164 0.008 0.044 0.000
#> GSM486813     2   0.446    0.51579 0.000 0.772 0.116 0.016 0.068 0.028
#> GSM486815     1   0.392    0.55301 0.804 0.000 0.120 0.040 0.020 0.016
#> GSM486817     5   0.522    0.25582 0.000 0.176 0.176 0.000 0.640 0.008
#> GSM486819     5   0.696   -0.05871 0.020 0.020 0.332 0.000 0.348 0.280
#> GSM486822     4   0.585    0.34692 0.000 0.060 0.048 0.576 0.012 0.304
#> GSM486824     3   0.689    0.46177 0.148 0.360 0.412 0.000 0.076 0.004
#> GSM486828     4   0.639    0.10995 0.000 0.048 0.040 0.512 0.344 0.056
#> GSM486831     1   0.548    0.25864 0.572 0.000 0.328 0.000 0.060 0.040
#> GSM486833     5   0.758    0.16368 0.100 0.000 0.060 0.344 0.400 0.096
#> GSM486835     1   0.479    0.36395 0.652 0.016 0.292 0.000 0.028 0.012
#> GSM486837     4   0.643    0.28356 0.024 0.152 0.028 0.548 0.248 0.000
#> GSM486839     1   0.671   -0.17461 0.412 0.064 0.160 0.000 0.364 0.000
#> GSM486841     1   0.487    0.34338 0.624 0.000 0.076 0.004 0.296 0.000
#> GSM486843     5   0.557    0.17155 0.060 0.112 0.176 0.000 0.652 0.000
#> GSM486845     5   0.523    0.29424 0.000 0.068 0.036 0.256 0.640 0.000
#> GSM486847     5   0.650   -0.04154 0.308 0.092 0.104 0.000 0.496 0.000
#> GSM486849     2   0.869   -0.08240 0.004 0.292 0.160 0.276 0.172 0.096
#> GSM486851     6   0.496    0.51799 0.024 0.008 0.340 0.000 0.024 0.604
#> GSM486853     4   0.645    0.29895 0.000 0.248 0.044 0.500 0.208 0.000
#> GSM486855     2   0.593    0.44473 0.000 0.584 0.124 0.048 0.244 0.000
#> GSM486857     5   0.523    0.10261 0.004 0.032 0.028 0.416 0.520 0.000
#> GSM486736     6   0.271    0.61264 0.000 0.000 0.008 0.160 0.000 0.832
#> GSM486738     2   0.385    0.51483 0.000 0.768 0.056 0.172 0.000 0.004
#> GSM486740     6   0.381    0.63970 0.000 0.016 0.096 0.088 0.000 0.800
#> GSM486742     2   0.592    0.07544 0.000 0.500 0.100 0.372 0.008 0.020
#> GSM486744     2   0.451    0.55916 0.000 0.724 0.152 0.116 0.000 0.008
#> GSM486746     6   0.640    0.49195 0.000 0.116 0.280 0.080 0.000 0.524
#> GSM486748     4   0.571    0.19601 0.380 0.044 0.064 0.512 0.000 0.000
#> GSM486750     4   0.672    0.39925 0.000 0.136 0.100 0.540 0.008 0.216
#> GSM486752     4   0.597    0.27889 0.292 0.016 0.052 0.584 0.004 0.052
#> GSM486754     2   0.570    0.27248 0.000 0.552 0.072 0.332 0.000 0.044
#> GSM486756     2   0.657    0.31040 0.000 0.492 0.148 0.300 0.004 0.056
#> GSM486758     4   0.733    0.17664 0.304 0.036 0.140 0.452 0.004 0.064
#> GSM486760     1   0.343    0.48995 0.756 0.016 0.228 0.000 0.000 0.000
#> GSM486762     1   0.436    0.46807 0.716 0.004 0.076 0.204 0.000 0.000
#> GSM486764     6   0.486    0.59659 0.028 0.052 0.228 0.004 0.000 0.688
#> GSM486766     1   0.231    0.56415 0.888 0.000 0.028 0.084 0.000 0.000
#> GSM486768     2   0.666    0.42767 0.000 0.528 0.216 0.112 0.000 0.144
#> GSM486770     6   0.443    0.50642 0.000 0.012 0.052 0.232 0.000 0.704
#> GSM486772     2   0.468    0.50574 0.000 0.708 0.196 0.076 0.000 0.020
#> GSM486774     4   0.406    0.49471 0.060 0.044 0.048 0.816 0.000 0.032
#> GSM486776     1   0.291    0.56434 0.856 0.028 0.104 0.012 0.000 0.000
#> GSM486778     1   0.375    0.54653 0.784 0.004 0.172 0.016 0.000 0.024
#> GSM486780     2   0.393    0.50468 0.000 0.756 0.172 0.072 0.000 0.000
#> GSM486782     4   0.314    0.52215 0.004 0.096 0.028 0.852 0.000 0.020
#> GSM486784     2   0.181    0.55209 0.000 0.920 0.020 0.060 0.000 0.000
#> GSM486786     1   0.468    0.49826 0.728 0.024 0.120 0.128 0.000 0.000
#> GSM486788     1   0.544   -0.04227 0.492 0.124 0.384 0.000 0.000 0.000
#> GSM486790     4   0.635    0.09107 0.000 0.092 0.072 0.436 0.000 0.400
#> GSM486792     6   0.481    0.53744 0.120 0.000 0.220 0.000 0.000 0.660
#> GSM486794     1   0.285    0.56467 0.872 0.000 0.064 0.044 0.000 0.020
#> GSM486796     2   0.521   -0.01684 0.040 0.520 0.416 0.004 0.000 0.020
#> GSM486798     4   0.680    0.41000 0.168 0.152 0.092 0.568 0.008 0.012
#> GSM486800     1   0.392    0.41713 0.692 0.024 0.284 0.000 0.000 0.000
#> GSM486802     1   0.614   -0.33174 0.416 0.188 0.384 0.000 0.000 0.012
#> GSM486804     3   0.624    0.44940 0.308 0.336 0.352 0.000 0.000 0.004
#> GSM486806     4   0.416    0.46996 0.128 0.020 0.044 0.788 0.000 0.020
#> GSM486808     1   0.344    0.53761 0.812 0.004 0.056 0.128 0.000 0.000
#> GSM486810     6   0.423    0.57689 0.000 0.016 0.060 0.176 0.000 0.748
#> GSM486812     1   0.257    0.56441 0.856 0.004 0.132 0.008 0.000 0.000
#> GSM486814     2   0.303    0.54527 0.000 0.856 0.076 0.056 0.000 0.012
#> GSM486816     1   0.387    0.53703 0.796 0.004 0.120 0.068 0.000 0.012
#> GSM486818     2   0.683    0.32822 0.068 0.484 0.240 0.204 0.000 0.004
#> GSM486821     6   0.654    0.27501 0.012 0.152 0.400 0.028 0.000 0.408
#> GSM486823     4   0.569    0.34246 0.000 0.044 0.056 0.576 0.008 0.316
#> GSM486826     1   0.638   -0.33810 0.404 0.360 0.216 0.020 0.000 0.000
#> GSM486830     4   0.464    0.51284 0.028 0.092 0.040 0.772 0.000 0.068
#> GSM486832     1   0.396    0.41236 0.684 0.000 0.292 0.000 0.000 0.024
#> GSM486834     4   0.585    0.38321 0.176 0.008 0.072 0.652 0.004 0.088
#> GSM486836     1   0.582    0.08844 0.528 0.092 0.352 0.016 0.000 0.012
#> GSM486838     4   0.518    0.30829 0.028 0.324 0.052 0.596 0.000 0.000
#> GSM486840     1   0.611   -0.47155 0.360 0.292 0.348 0.000 0.000 0.000
#> GSM486842     1   0.178    0.57971 0.920 0.000 0.064 0.016 0.000 0.000
#> GSM486844     2   0.650   -0.47784 0.240 0.436 0.296 0.028 0.000 0.000
#> GSM486846     4   0.495    0.36125 0.012 0.312 0.044 0.624 0.000 0.008
#> GSM486848     1   0.568   -0.04052 0.528 0.244 0.228 0.000 0.000 0.000
#> GSM486850     2   0.627    0.07554 0.004 0.464 0.156 0.356 0.004 0.016
#> GSM486852     6   0.457    0.54680 0.028 0.016 0.320 0.000 0.000 0.636
#> GSM486854     4   0.493    0.12781 0.000 0.428 0.064 0.508 0.000 0.000
#> GSM486856     2   0.388    0.53600 0.000 0.772 0.120 0.108 0.000 0.000
#> GSM486858     4   0.417    0.46195 0.004 0.204 0.052 0.736 0.000 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-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 agent(p) individual(p) k
#> MAD:NMF 116 1.00e+00      2.31e-05 2
#> MAD:NMF 101 4.46e-10      2.67e-01 3
#> MAD:NMF  71 3.32e-06      4.73e-03 4
#> MAD:NMF  65 2.39e-01      1.79e-05 5
#> MAD:NMF  38 4.34e-01      1.19e-03 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 120 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 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-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           1.000       1.000         0.5047 0.496   0.496
#> 3 3 1.000           0.985       0.992         0.1226 0.936   0.870
#> 4 4 0.824           0.735       0.883         0.1751 0.898   0.763
#> 5 5 0.717           0.606       0.793         0.0689 0.964   0.897
#> 6 6 0.716           0.625       0.763         0.0575 0.873   0.633

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
#> GSM486735     1       0          1  1  0
#> GSM486737     1       0          1  1  0
#> GSM486739     1       0          1  1  0
#> GSM486741     1       0          1  1  0
#> GSM486743     1       0          1  1  0
#> GSM486745     1       0          1  1  0
#> GSM486747     1       0          1  1  0
#> GSM486749     1       0          1  1  0
#> GSM486751     1       0          1  1  0
#> GSM486753     1       0          1  1  0
#> GSM486755     1       0          1  1  0
#> GSM486757     1       0          1  1  0
#> GSM486759     1       0          1  1  0
#> GSM486761     1       0          1  1  0
#> GSM486763     1       0          1  1  0
#> GSM486765     1       0          1  1  0
#> GSM486767     1       0          1  1  0
#> GSM486769     1       0          1  1  0
#> GSM486771     1       0          1  1  0
#> GSM486773     1       0          1  1  0
#> GSM486775     1       0          1  1  0
#> GSM486777     1       0          1  1  0
#> GSM486779     1       0          1  1  0
#> GSM486781     1       0          1  1  0
#> GSM486783     1       0          1  1  0
#> GSM486785     1       0          1  1  0
#> GSM486787     1       0          1  1  0
#> GSM486789     1       0          1  1  0
#> GSM486791     1       0          1  1  0
#> GSM486793     1       0          1  1  0
#> GSM486795     1       0          1  1  0
#> GSM486797     1       0          1  1  0
#> GSM486799     1       0          1  1  0
#> GSM486801     1       0          1  1  0
#> GSM486803     1       0          1  1  0
#> GSM486805     1       0          1  1  0
#> GSM486807     1       0          1  1  0
#> GSM486809     1       0          1  1  0
#> GSM486811     1       0          1  1  0
#> GSM486813     1       0          1  1  0
#> GSM486815     1       0          1  1  0
#> GSM486817     1       0          1  1  0
#> GSM486819     1       0          1  1  0
#> GSM486822     1       0          1  1  0
#> GSM486824     1       0          1  1  0
#> GSM486828     1       0          1  1  0
#> GSM486831     1       0          1  1  0
#> GSM486833     1       0          1  1  0
#> GSM486835     1       0          1  1  0
#> GSM486837     1       0          1  1  0
#> GSM486839     1       0          1  1  0
#> GSM486841     1       0          1  1  0
#> GSM486843     1       0          1  1  0
#> GSM486845     1       0          1  1  0
#> GSM486847     1       0          1  1  0
#> GSM486849     1       0          1  1  0
#> GSM486851     1       0          1  1  0
#> GSM486853     1       0          1  1  0
#> GSM486855     1       0          1  1  0
#> GSM486857     1       0          1  1  0
#> GSM486736     2       0          1  0  1
#> GSM486738     2       0          1  0  1
#> GSM486740     2       0          1  0  1
#> GSM486742     2       0          1  0  1
#> GSM486744     2       0          1  0  1
#> GSM486746     2       0          1  0  1
#> GSM486748     2       0          1  0  1
#> GSM486750     2       0          1  0  1
#> GSM486752     2       0          1  0  1
#> GSM486754     2       0          1  0  1
#> GSM486756     2       0          1  0  1
#> GSM486758     2       0          1  0  1
#> GSM486760     2       0          1  0  1
#> GSM486762     2       0          1  0  1
#> GSM486764     2       0          1  0  1
#> GSM486766     2       0          1  0  1
#> GSM486768     2       0          1  0  1
#> GSM486770     2       0          1  0  1
#> GSM486772     2       0          1  0  1
#> GSM486774     2       0          1  0  1
#> GSM486776     2       0          1  0  1
#> GSM486778     2       0          1  0  1
#> GSM486780     2       0          1  0  1
#> GSM486782     2       0          1  0  1
#> GSM486784     2       0          1  0  1
#> GSM486786     2       0          1  0  1
#> GSM486788     2       0          1  0  1
#> GSM486790     2       0          1  0  1
#> GSM486792     2       0          1  0  1
#> GSM486794     2       0          1  0  1
#> GSM486796     2       0          1  0  1
#> GSM486798     2       0          1  0  1
#> GSM486800     2       0          1  0  1
#> GSM486802     2       0          1  0  1
#> GSM486804     2       0          1  0  1
#> GSM486806     2       0          1  0  1
#> GSM486808     2       0          1  0  1
#> GSM486810     2       0          1  0  1
#> GSM486812     2       0          1  0  1
#> GSM486814     2       0          1  0  1
#> GSM486816     2       0          1  0  1
#> GSM486818     2       0          1  0  1
#> GSM486821     2       0          1  0  1
#> GSM486823     2       0          1  0  1
#> GSM486826     2       0          1  0  1
#> GSM486830     2       0          1  0  1
#> GSM486832     2       0          1  0  1
#> GSM486834     2       0          1  0  1
#> GSM486836     2       0          1  0  1
#> GSM486838     2       0          1  0  1
#> GSM486840     2       0          1  0  1
#> GSM486842     2       0          1  0  1
#> GSM486844     2       0          1  0  1
#> GSM486846     2       0          1  0  1
#> GSM486848     2       0          1  0  1
#> GSM486850     2       0          1  0  1
#> GSM486852     2       0          1  0  1
#> GSM486854     2       0          1  0  1
#> GSM486856     2       0          1  0  1
#> GSM486858     2       0          1  0  1

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette p1    p2    p3
#> GSM486735     1   0.000      1.000  1 0.000 0.000
#> GSM486737     1   0.000      1.000  1 0.000 0.000
#> GSM486739     1   0.000      1.000  1 0.000 0.000
#> GSM486741     1   0.000      1.000  1 0.000 0.000
#> GSM486743     1   0.000      1.000  1 0.000 0.000
#> GSM486745     1   0.000      1.000  1 0.000 0.000
#> GSM486747     1   0.000      1.000  1 0.000 0.000
#> GSM486749     1   0.000      1.000  1 0.000 0.000
#> GSM486751     1   0.000      1.000  1 0.000 0.000
#> GSM486753     1   0.000      1.000  1 0.000 0.000
#> GSM486755     1   0.000      1.000  1 0.000 0.000
#> GSM486757     1   0.000      1.000  1 0.000 0.000
#> GSM486759     1   0.000      1.000  1 0.000 0.000
#> GSM486761     1   0.000      1.000  1 0.000 0.000
#> GSM486763     1   0.000      1.000  1 0.000 0.000
#> GSM486765     1   0.000      1.000  1 0.000 0.000
#> GSM486767     1   0.000      1.000  1 0.000 0.000
#> GSM486769     1   0.000      1.000  1 0.000 0.000
#> GSM486771     1   0.000      1.000  1 0.000 0.000
#> GSM486773     1   0.000      1.000  1 0.000 0.000
#> GSM486775     1   0.000      1.000  1 0.000 0.000
#> GSM486777     1   0.000      1.000  1 0.000 0.000
#> GSM486779     1   0.000      1.000  1 0.000 0.000
#> GSM486781     1   0.000      1.000  1 0.000 0.000
#> GSM486783     1   0.000      1.000  1 0.000 0.000
#> GSM486785     1   0.000      1.000  1 0.000 0.000
#> GSM486787     1   0.000      1.000  1 0.000 0.000
#> GSM486789     1   0.000      1.000  1 0.000 0.000
#> GSM486791     1   0.000      1.000  1 0.000 0.000
#> GSM486793     1   0.000      1.000  1 0.000 0.000
#> GSM486795     1   0.000      1.000  1 0.000 0.000
#> GSM486797     1   0.000      1.000  1 0.000 0.000
#> GSM486799     1   0.000      1.000  1 0.000 0.000
#> GSM486801     1   0.000      1.000  1 0.000 0.000
#> GSM486803     1   0.000      1.000  1 0.000 0.000
#> GSM486805     1   0.000      1.000  1 0.000 0.000
#> GSM486807     1   0.000      1.000  1 0.000 0.000
#> GSM486809     1   0.000      1.000  1 0.000 0.000
#> GSM486811     1   0.000      1.000  1 0.000 0.000
#> GSM486813     1   0.000      1.000  1 0.000 0.000
#> GSM486815     1   0.000      1.000  1 0.000 0.000
#> GSM486817     1   0.000      1.000  1 0.000 0.000
#> GSM486819     1   0.000      1.000  1 0.000 0.000
#> GSM486822     1   0.000      1.000  1 0.000 0.000
#> GSM486824     1   0.000      1.000  1 0.000 0.000
#> GSM486828     1   0.000      1.000  1 0.000 0.000
#> GSM486831     1   0.000      1.000  1 0.000 0.000
#> GSM486833     1   0.000      1.000  1 0.000 0.000
#> GSM486835     1   0.000      1.000  1 0.000 0.000
#> GSM486837     1   0.000      1.000  1 0.000 0.000
#> GSM486839     1   0.000      1.000  1 0.000 0.000
#> GSM486841     1   0.000      1.000  1 0.000 0.000
#> GSM486843     1   0.000      1.000  1 0.000 0.000
#> GSM486845     1   0.000      1.000  1 0.000 0.000
#> GSM486847     1   0.000      1.000  1 0.000 0.000
#> GSM486849     1   0.000      1.000  1 0.000 0.000
#> GSM486851     1   0.000      1.000  1 0.000 0.000
#> GSM486853     1   0.000      1.000  1 0.000 0.000
#> GSM486855     1   0.000      1.000  1 0.000 0.000
#> GSM486857     1   0.000      1.000  1 0.000 0.000
#> GSM486736     2   0.000      0.918  0 1.000 0.000
#> GSM486738     3   0.000      0.992  0 0.000 1.000
#> GSM486740     2   0.000      0.918  0 1.000 0.000
#> GSM486742     3   0.000      0.992  0 0.000 1.000
#> GSM486744     3   0.164      0.958  0 0.044 0.956
#> GSM486746     2   0.000      0.918  0 1.000 0.000
#> GSM486748     3   0.000      0.992  0 0.000 1.000
#> GSM486750     3   0.000      0.992  0 0.000 1.000
#> GSM486752     3   0.000      0.992  0 0.000 1.000
#> GSM486754     3   0.164      0.958  0 0.044 0.956
#> GSM486756     2   0.000      0.918  0 1.000 0.000
#> GSM486758     3   0.000      0.992  0 0.000 1.000
#> GSM486760     3   0.000      0.992  0 0.000 1.000
#> GSM486762     3   0.000      0.992  0 0.000 1.000
#> GSM486764     3   0.000      0.992  0 0.000 1.000
#> GSM486766     3   0.000      0.992  0 0.000 1.000
#> GSM486768     3   0.164      0.958  0 0.044 0.956
#> GSM486770     3   0.000      0.992  0 0.000 1.000
#> GSM486772     3   0.000      0.992  0 0.000 1.000
#> GSM486774     3   0.000      0.992  0 0.000 1.000
#> GSM486776     3   0.000      0.992  0 0.000 1.000
#> GSM486778     3   0.000      0.992  0 0.000 1.000
#> GSM486780     3   0.000      0.992  0 0.000 1.000
#> GSM486782     3   0.164      0.958  0 0.044 0.956
#> GSM486784     3   0.000      0.992  0 0.000 1.000
#> GSM486786     3   0.000      0.992  0 0.000 1.000
#> GSM486788     3   0.000      0.992  0 0.000 1.000
#> GSM486790     2   0.470      0.794  0 0.788 0.212
#> GSM486792     2   0.000      0.918  0 1.000 0.000
#> GSM486794     3   0.153      0.961  0 0.040 0.960
#> GSM486796     3   0.000      0.992  0 0.000 1.000
#> GSM486798     3   0.000      0.992  0 0.000 1.000
#> GSM486800     3   0.000      0.992  0 0.000 1.000
#> GSM486802     3   0.000      0.992  0 0.000 1.000
#> GSM486804     3   0.000      0.992  0 0.000 1.000
#> GSM486806     3   0.000      0.992  0 0.000 1.000
#> GSM486808     3   0.000      0.992  0 0.000 1.000
#> GSM486810     3   0.103      0.975  0 0.024 0.976
#> GSM486812     3   0.000      0.992  0 0.000 1.000
#> GSM486814     3   0.164      0.958  0 0.044 0.956
#> GSM486816     3   0.000      0.992  0 0.000 1.000
#> GSM486818     2   0.000      0.918  0 1.000 0.000
#> GSM486821     2   0.470      0.794  0 0.788 0.212
#> GSM486823     3   0.000      0.992  0 0.000 1.000
#> GSM486826     3   0.000      0.992  0 0.000 1.000
#> GSM486830     2   0.470      0.794  0 0.788 0.212
#> GSM486832     3   0.000      0.992  0 0.000 1.000
#> GSM486834     3   0.129      0.968  0 0.032 0.968
#> GSM486836     3   0.000      0.992  0 0.000 1.000
#> GSM486838     3   0.000      0.992  0 0.000 1.000
#> GSM486840     3   0.000      0.992  0 0.000 1.000
#> GSM486842     3   0.000      0.992  0 0.000 1.000
#> GSM486844     3   0.000      0.992  0 0.000 1.000
#> GSM486846     3   0.164      0.958  0 0.044 0.956
#> GSM486848     3   0.000      0.992  0 0.000 1.000
#> GSM486850     3   0.000      0.992  0 0.000 1.000
#> GSM486852     3   0.000      0.992  0 0.000 1.000
#> GSM486854     3   0.000      0.992  0 0.000 1.000
#> GSM486856     3   0.000      0.992  0 0.000 1.000
#> GSM486858     3   0.000      0.992  0 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
#> GSM486735     4  0.4500     0.4038 0.316 0.000 0.000 0.684
#> GSM486737     1  0.4661     0.4916 0.652 0.000 0.000 0.348
#> GSM486739     4  0.4500     0.4038 0.316 0.000 0.000 0.684
#> GSM486741     4  0.4998    -0.1199 0.488 0.000 0.000 0.512
#> GSM486743     4  0.4855     0.1631 0.400 0.000 0.000 0.600
#> GSM486745     4  0.4500     0.4038 0.316 0.000 0.000 0.684
#> GSM486747     1  0.4998     0.1468 0.512 0.000 0.000 0.488
#> GSM486749     1  0.0188     0.7196 0.996 0.000 0.000 0.004
#> GSM486751     1  0.0000     0.7225 1.000 0.000 0.000 0.000
#> GSM486753     1  0.4972     0.2532 0.544 0.000 0.000 0.456
#> GSM486755     4  0.0188     0.5417 0.004 0.000 0.000 0.996
#> GSM486757     1  0.4382     0.5679 0.704 0.000 0.000 0.296
#> GSM486759     1  0.0000     0.7225 1.000 0.000 0.000 0.000
#> GSM486761     1  0.4998     0.1468 0.512 0.000 0.000 0.488
#> GSM486763     1  0.0336     0.7187 0.992 0.000 0.000 0.008
#> GSM486765     4  0.4996    -0.1056 0.484 0.000 0.000 0.516
#> GSM486767     4  0.4989    -0.0642 0.472 0.000 0.000 0.528
#> GSM486769     1  0.0336     0.7187 0.992 0.000 0.000 0.008
#> GSM486771     1  0.0000     0.7225 1.000 0.000 0.000 0.000
#> GSM486773     1  0.4985     0.2121 0.532 0.000 0.000 0.468
#> GSM486775     4  0.4996    -0.1056 0.484 0.000 0.000 0.516
#> GSM486777     1  0.0000     0.7225 1.000 0.000 0.000 0.000
#> GSM486779     1  0.4382     0.5679 0.704 0.000 0.000 0.296
#> GSM486781     4  0.3837     0.4775 0.224 0.000 0.000 0.776
#> GSM486783     1  0.4382     0.5679 0.704 0.000 0.000 0.296
#> GSM486785     1  0.4382     0.5679 0.704 0.000 0.000 0.296
#> GSM486787     1  0.0000     0.7225 1.000 0.000 0.000 0.000
#> GSM486789     4  0.0188     0.5429 0.004 0.000 0.000 0.996
#> GSM486791     4  0.4500     0.4038 0.316 0.000 0.000 0.684
#> GSM486793     4  0.4382     0.3848 0.296 0.000 0.000 0.704
#> GSM486795     1  0.0000     0.7225 1.000 0.000 0.000 0.000
#> GSM486797     1  0.4985     0.2121 0.532 0.000 0.000 0.468
#> GSM486799     1  0.4999     0.1312 0.508 0.000 0.000 0.492
#> GSM486801     1  0.0000     0.7225 1.000 0.000 0.000 0.000
#> GSM486803     1  0.4382     0.5679 0.704 0.000 0.000 0.296
#> GSM486805     1  0.4898     0.3669 0.584 0.000 0.000 0.416
#> GSM486807     1  0.2469     0.6801 0.892 0.000 0.000 0.108
#> GSM486809     1  0.4998     0.1464 0.512 0.000 0.000 0.488
#> GSM486811     1  0.0000     0.7225 1.000 0.000 0.000 0.000
#> GSM486813     4  0.4134     0.4384 0.260 0.000 0.000 0.740
#> GSM486815     1  0.4382     0.5679 0.704 0.000 0.000 0.296
#> GSM486817     4  0.2647     0.5194 0.120 0.000 0.000 0.880
#> GSM486819     4  0.0188     0.5417 0.004 0.000 0.000 0.996
#> GSM486822     1  0.0336     0.7187 0.992 0.000 0.000 0.008
#> GSM486824     1  0.4382     0.5679 0.704 0.000 0.000 0.296
#> GSM486828     4  0.1118     0.5643 0.036 0.000 0.000 0.964
#> GSM486831     1  0.0469     0.7219 0.988 0.000 0.000 0.012
#> GSM486833     1  0.2011     0.6269 0.920 0.000 0.000 0.080
#> GSM486835     1  0.0000     0.7225 1.000 0.000 0.000 0.000
#> GSM486837     1  0.4454     0.5537 0.692 0.000 0.000 0.308
#> GSM486839     1  0.0336     0.7225 0.992 0.000 0.000 0.008
#> GSM486841     1  0.0000     0.7225 1.000 0.000 0.000 0.000
#> GSM486843     1  0.0000     0.7225 1.000 0.000 0.000 0.000
#> GSM486845     1  0.0707     0.7186 0.980 0.000 0.000 0.020
#> GSM486847     1  0.0469     0.7219 0.988 0.000 0.000 0.012
#> GSM486849     1  0.0336     0.7196 0.992 0.000 0.000 0.008
#> GSM486851     1  0.0000     0.7225 1.000 0.000 0.000 0.000
#> GSM486853     1  0.4522     0.5413 0.680 0.000 0.000 0.320
#> GSM486855     1  0.0469     0.7219 0.988 0.000 0.000 0.012
#> GSM486857     1  0.4382     0.5679 0.704 0.000 0.000 0.296
#> GSM486736     2  0.0000     0.8753 0.000 1.000 0.000 0.000
#> GSM486738     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486740     2  0.0000     0.8753 0.000 1.000 0.000 0.000
#> GSM486742     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486744     3  0.1302     0.9576 0.000 0.044 0.956 0.000
#> GSM486746     2  0.0000     0.8753 0.000 1.000 0.000 0.000
#> GSM486748     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486750     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486752     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486754     3  0.1302     0.9576 0.000 0.044 0.956 0.000
#> GSM486756     2  0.0000     0.8753 0.000 1.000 0.000 0.000
#> GSM486758     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486760     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486762     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486764     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486766     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486768     3  0.1302     0.9576 0.000 0.044 0.956 0.000
#> GSM486770     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486772     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486774     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486776     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486778     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486780     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486782     3  0.1302     0.9576 0.000 0.044 0.956 0.000
#> GSM486784     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486786     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486788     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486790     2  0.3726     0.7571 0.000 0.788 0.212 0.000
#> GSM486792     2  0.0000     0.8753 0.000 1.000 0.000 0.000
#> GSM486794     3  0.1211     0.9611 0.000 0.040 0.960 0.000
#> GSM486796     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486798     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486800     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486802     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486804     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486806     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486808     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486810     3  0.0817     0.9747 0.000 0.024 0.976 0.000
#> GSM486812     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486814     3  0.1302     0.9576 0.000 0.044 0.956 0.000
#> GSM486816     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486818     2  0.0000     0.8753 0.000 1.000 0.000 0.000
#> GSM486821     2  0.3726     0.7571 0.000 0.788 0.212 0.000
#> GSM486823     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486826     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486830     2  0.3726     0.7571 0.000 0.788 0.212 0.000
#> GSM486832     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486834     3  0.1022     0.9683 0.000 0.032 0.968 0.000
#> GSM486836     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486838     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486840     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486842     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486844     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486846     3  0.1302     0.9576 0.000 0.044 0.956 0.000
#> GSM486848     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486850     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486852     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486854     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486856     3  0.0000     0.9922 0.000 0.000 1.000 0.000
#> GSM486858     3  0.0000     0.9922 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
#> GSM486735     4  0.5049    0.59830 0.296 0.000 0.000 0.644 0.060
#> GSM486737     1  0.4252    0.36145 0.652 0.000 0.000 0.008 0.340
#> GSM486739     4  0.5049    0.59830 0.296 0.000 0.000 0.644 0.060
#> GSM486741     1  0.5504   -0.29756 0.488 0.000 0.000 0.064 0.448
#> GSM486743     5  0.6236    0.53323 0.400 0.000 0.000 0.144 0.456
#> GSM486745     4  0.5049    0.59830 0.296 0.000 0.000 0.644 0.060
#> GSM486747     1  0.4743   -0.12884 0.512 0.000 0.000 0.016 0.472
#> GSM486749     1  0.0162    0.65677 0.996 0.000 0.000 0.004 0.000
#> GSM486751     1  0.0000    0.65957 1.000 0.000 0.000 0.000 0.000
#> GSM486753     1  0.5236    0.00041 0.544 0.000 0.000 0.048 0.408
#> GSM486755     4  0.4182    0.40816 0.000 0.000 0.000 0.600 0.400
#> GSM486757     1  0.4161    0.47432 0.704 0.000 0.000 0.016 0.280
#> GSM486759     1  0.0000    0.65957 1.000 0.000 0.000 0.000 0.000
#> GSM486761     1  0.4743   -0.12884 0.512 0.000 0.000 0.016 0.472
#> GSM486763     1  0.0290    0.65502 0.992 0.000 0.000 0.008 0.000
#> GSM486765     1  0.5178   -0.26180 0.484 0.000 0.000 0.040 0.476
#> GSM486767     1  0.5459   -0.33911 0.472 0.000 0.000 0.060 0.468
#> GSM486769     1  0.0290    0.65502 0.992 0.000 0.000 0.008 0.000
#> GSM486771     1  0.0000    0.65957 1.000 0.000 0.000 0.000 0.000
#> GSM486773     1  0.4437   -0.04186 0.532 0.000 0.000 0.004 0.464
#> GSM486775     1  0.5178   -0.26180 0.484 0.000 0.000 0.040 0.476
#> GSM486777     1  0.0000    0.65957 1.000 0.000 0.000 0.000 0.000
#> GSM486779     1  0.4161    0.47432 0.704 0.000 0.000 0.016 0.280
#> GSM486781     5  0.6621    0.64634 0.224 0.000 0.000 0.348 0.428
#> GSM486783     1  0.4161    0.47432 0.704 0.000 0.000 0.016 0.280
#> GSM486785     1  0.4161    0.47432 0.704 0.000 0.000 0.016 0.280
#> GSM486787     1  0.0000    0.65957 1.000 0.000 0.000 0.000 0.000
#> GSM486789     4  0.4390    0.36186 0.004 0.000 0.000 0.568 0.428
#> GSM486791     4  0.5049    0.59830 0.296 0.000 0.000 0.644 0.060
#> GSM486793     5  0.6627    0.76456 0.296 0.000 0.000 0.252 0.452
#> GSM486795     1  0.0000    0.65957 1.000 0.000 0.000 0.000 0.000
#> GSM486797     1  0.4437   -0.04186 0.532 0.000 0.000 0.004 0.464
#> GSM486799     1  0.4826   -0.14807 0.508 0.000 0.000 0.020 0.472
#> GSM486801     1  0.0000    0.65957 1.000 0.000 0.000 0.000 0.000
#> GSM486803     1  0.4161    0.47432 0.704 0.000 0.000 0.016 0.280
#> GSM486805     1  0.5644    0.17199 0.584 0.000 0.000 0.100 0.316
#> GSM486807     1  0.2448    0.61632 0.892 0.000 0.000 0.020 0.088
#> GSM486809     1  0.5334   -0.16308 0.512 0.000 0.000 0.052 0.436
#> GSM486811     1  0.0000    0.65957 1.000 0.000 0.000 0.000 0.000
#> GSM486813     5  0.6691    0.71663 0.260 0.000 0.000 0.312 0.428
#> GSM486815     1  0.4161    0.47432 0.704 0.000 0.000 0.016 0.280
#> GSM486817     4  0.5263    0.53642 0.100 0.000 0.000 0.660 0.240
#> GSM486819     4  0.4201    0.39944 0.000 0.000 0.000 0.592 0.408
#> GSM486822     1  0.0290    0.65502 0.992 0.000 0.000 0.008 0.000
#> GSM486824     1  0.4161    0.47432 0.704 0.000 0.000 0.016 0.280
#> GSM486828     4  0.4989    0.28778 0.032 0.000 0.000 0.552 0.416
#> GSM486831     1  0.0404    0.65847 0.988 0.000 0.000 0.000 0.012
#> GSM486833     1  0.1908    0.55221 0.908 0.000 0.000 0.092 0.000
#> GSM486835     1  0.0000    0.65957 1.000 0.000 0.000 0.000 0.000
#> GSM486837     1  0.4297    0.45567 0.692 0.000 0.000 0.020 0.288
#> GSM486839     1  0.0290    0.65916 0.992 0.000 0.000 0.000 0.008
#> GSM486841     1  0.0000    0.65957 1.000 0.000 0.000 0.000 0.000
#> GSM486843     1  0.0000    0.65957 1.000 0.000 0.000 0.000 0.000
#> GSM486845     1  0.0693    0.65553 0.980 0.000 0.000 0.008 0.012
#> GSM486847     1  0.0404    0.65847 0.988 0.000 0.000 0.000 0.012
#> GSM486849     1  0.0671    0.64933 0.980 0.000 0.000 0.016 0.004
#> GSM486851     1  0.0000    0.65957 1.000 0.000 0.000 0.000 0.000
#> GSM486853     1  0.4485    0.43973 0.680 0.000 0.000 0.028 0.292
#> GSM486855     1  0.0404    0.65847 0.988 0.000 0.000 0.000 0.012
#> GSM486857     1  0.4161    0.47432 0.704 0.000 0.000 0.016 0.280
#> GSM486736     2  0.5518    0.82663 0.000 0.544 0.000 0.072 0.384
#> GSM486738     3  0.1822    0.83058 0.000 0.036 0.936 0.024 0.004
#> GSM486740     2  0.5518    0.82663 0.000 0.544 0.000 0.072 0.384
#> GSM486742     3  0.0404    0.84421 0.000 0.000 0.988 0.012 0.000
#> GSM486744     3  0.4044    0.65388 0.000 0.252 0.732 0.012 0.004
#> GSM486746     2  0.5518    0.82663 0.000 0.544 0.000 0.072 0.384
#> GSM486748     3  0.0510    0.84388 0.000 0.000 0.984 0.016 0.000
#> GSM486750     3  0.5365    0.69681 0.000 0.000 0.664 0.204 0.132
#> GSM486752     3  0.5365    0.69681 0.000 0.000 0.664 0.204 0.132
#> GSM486754     3  0.4044    0.65388 0.000 0.252 0.732 0.012 0.004
#> GSM486756     2  0.4204    0.82748 0.000 0.756 0.000 0.048 0.196
#> GSM486758     3  0.0566    0.84138 0.000 0.000 0.984 0.012 0.004
#> GSM486760     3  0.5365    0.69681 0.000 0.000 0.664 0.204 0.132
#> GSM486762     3  0.0566    0.84138 0.000 0.000 0.984 0.012 0.004
#> GSM486764     3  0.0798    0.84261 0.000 0.000 0.976 0.016 0.008
#> GSM486766     3  0.0290    0.84394 0.000 0.000 0.992 0.008 0.000
#> GSM486768     3  0.4044    0.65388 0.000 0.252 0.732 0.012 0.004
#> GSM486770     3  0.5365    0.69681 0.000 0.000 0.664 0.204 0.132
#> GSM486772     3  0.5365    0.69681 0.000 0.000 0.664 0.204 0.132
#> GSM486774     3  0.0693    0.84217 0.000 0.000 0.980 0.012 0.008
#> GSM486776     3  0.0566    0.84138 0.000 0.000 0.984 0.012 0.004
#> GSM486778     3  0.5365    0.69681 0.000 0.000 0.664 0.204 0.132
#> GSM486780     3  0.0566    0.84138 0.000 0.000 0.984 0.012 0.004
#> GSM486782     3  0.4044    0.65388 0.000 0.252 0.732 0.012 0.004
#> GSM486784     3  0.0162    0.84380 0.000 0.000 0.996 0.000 0.004
#> GSM486786     3  0.0798    0.84261 0.000 0.000 0.976 0.016 0.008
#> GSM486788     3  0.5365    0.69681 0.000 0.000 0.664 0.204 0.132
#> GSM486790     2  0.0000    0.76046 0.000 1.000 0.000 0.000 0.000
#> GSM486792     2  0.5500    0.82669 0.000 0.552 0.000 0.072 0.376
#> GSM486794     3  0.4017    0.65829 0.000 0.248 0.736 0.012 0.004
#> GSM486796     3  0.5365    0.69681 0.000 0.000 0.664 0.204 0.132
#> GSM486798     3  0.0162    0.84380 0.000 0.000 0.996 0.000 0.004
#> GSM486800     3  0.2504    0.81799 0.000 0.000 0.896 0.064 0.040
#> GSM486802     3  0.5365    0.69681 0.000 0.000 0.664 0.204 0.132
#> GSM486804     3  0.0798    0.84261 0.000 0.000 0.976 0.016 0.008
#> GSM486806     3  0.0854    0.83899 0.000 0.008 0.976 0.012 0.004
#> GSM486808     3  0.0566    0.84138 0.000 0.000 0.984 0.012 0.004
#> GSM486810     3  0.2976    0.76525 0.000 0.132 0.852 0.012 0.004
#> GSM486812     3  0.5365    0.69681 0.000 0.000 0.664 0.204 0.132
#> GSM486814     3  0.4044    0.65388 0.000 0.252 0.732 0.012 0.004
#> GSM486816     3  0.0566    0.84138 0.000 0.000 0.984 0.012 0.004
#> GSM486818     2  0.4204    0.82748 0.000 0.756 0.000 0.048 0.196
#> GSM486821     2  0.0000    0.76046 0.000 1.000 0.000 0.000 0.000
#> GSM486823     3  0.5365    0.69681 0.000 0.000 0.664 0.204 0.132
#> GSM486826     3  0.0798    0.84261 0.000 0.000 0.976 0.016 0.008
#> GSM486830     2  0.0000    0.76046 0.000 1.000 0.000 0.000 0.000
#> GSM486832     3  0.0566    0.84138 0.000 0.000 0.984 0.012 0.004
#> GSM486834     3  0.3597    0.72559 0.000 0.180 0.800 0.012 0.008
#> GSM486836     3  0.2653    0.81172 0.000 0.000 0.880 0.096 0.024
#> GSM486838     3  0.0693    0.84217 0.000 0.000 0.980 0.012 0.008
#> GSM486840     3  0.0324    0.84402 0.000 0.000 0.992 0.004 0.004
#> GSM486842     3  0.4994    0.72106 0.000 0.000 0.704 0.184 0.112
#> GSM486844     3  0.0798    0.84261 0.000 0.000 0.976 0.016 0.008
#> GSM486846     3  0.4044    0.65388 0.000 0.252 0.732 0.012 0.004
#> GSM486848     3  0.0566    0.84138 0.000 0.000 0.984 0.012 0.004
#> GSM486850     3  0.5365    0.69681 0.000 0.000 0.664 0.204 0.132
#> GSM486852     3  0.5197    0.70657 0.000 0.000 0.680 0.204 0.116
#> GSM486854     3  0.0000    0.84344 0.000 0.000 1.000 0.000 0.000
#> GSM486856     3  0.0162    0.84380 0.000 0.000 0.996 0.000 0.004
#> GSM486858     3  0.0451    0.84425 0.000 0.000 0.988 0.004 0.008

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM486735     5  0.3390     0.6092 0.000 0.296 0.000 0.000 0.704 0.000
#> GSM486737     2  0.4175    -0.3724 0.000 0.524 0.000 0.464 0.012 0.000
#> GSM486739     5  0.3390     0.6092 0.000 0.296 0.000 0.000 0.704 0.000
#> GSM486741     4  0.5449     0.7126 0.000 0.368 0.000 0.504 0.128 0.000
#> GSM486743     4  0.5662     0.6558 0.000 0.280 0.000 0.524 0.196 0.000
#> GSM486745     5  0.3390     0.6092 0.000 0.296 0.000 0.000 0.704 0.000
#> GSM486747     4  0.4066     0.7805 0.000 0.392 0.000 0.596 0.012 0.000
#> GSM486749     2  0.0146     0.7386 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM486751     2  0.0000     0.7414 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486753     4  0.4366     0.6909 0.000 0.428 0.000 0.548 0.024 0.000
#> GSM486755     5  0.2378     0.6141 0.000 0.000 0.000 0.152 0.848 0.000
#> GSM486757     2  0.3841     0.0290 0.000 0.616 0.000 0.380 0.004 0.000
#> GSM486759     2  0.0000     0.7414 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486761     4  0.4066     0.7805 0.000 0.392 0.000 0.596 0.012 0.000
#> GSM486763     2  0.0260     0.7367 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM486765     4  0.3992     0.7907 0.000 0.364 0.000 0.624 0.012 0.000
#> GSM486767     4  0.4193     0.7832 0.000 0.352 0.000 0.624 0.024 0.000
#> GSM486769     2  0.0260     0.7367 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM486771     2  0.0000     0.7414 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486773     4  0.4109     0.7520 0.000 0.412 0.000 0.576 0.012 0.000
#> GSM486775     4  0.3992     0.7907 0.000 0.364 0.000 0.624 0.012 0.000
#> GSM486777     2  0.0000     0.7414 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486779     2  0.3841     0.0290 0.000 0.616 0.000 0.380 0.004 0.000
#> GSM486781     5  0.5754    -0.0122 0.000 0.188 0.000 0.328 0.484 0.000
#> GSM486783     2  0.3930    -0.0949 0.000 0.576 0.000 0.420 0.004 0.000
#> GSM486785     2  0.3830     0.0439 0.000 0.620 0.000 0.376 0.004 0.000
#> GSM486787     2  0.0000     0.7414 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486789     5  0.3126     0.5795 0.000 0.000 0.000 0.248 0.752 0.000
#> GSM486791     5  0.3390     0.6092 0.000 0.296 0.000 0.000 0.704 0.000
#> GSM486793     4  0.6060     0.3341 0.000 0.260 0.000 0.376 0.364 0.000
#> GSM486795     2  0.0000     0.7414 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486797     4  0.4109     0.7520 0.000 0.412 0.000 0.576 0.012 0.000
#> GSM486799     4  0.4057     0.7837 0.000 0.388 0.000 0.600 0.012 0.000
#> GSM486801     2  0.0000     0.7414 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486803     2  0.3830     0.0439 0.000 0.620 0.000 0.376 0.004 0.000
#> GSM486805     2  0.5570    -0.1984 0.000 0.552 0.000 0.232 0.216 0.000
#> GSM486807     2  0.2362     0.6048 0.000 0.860 0.000 0.136 0.004 0.000
#> GSM486809     4  0.4379     0.7678 0.000 0.396 0.000 0.576 0.028 0.000
#> GSM486811     2  0.0000     0.7414 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486813     4  0.5578     0.0808 0.000 0.140 0.000 0.456 0.404 0.000
#> GSM486815     2  0.3975    -0.1556 0.000 0.544 0.000 0.452 0.004 0.000
#> GSM486817     5  0.2510     0.6193 0.000 0.100 0.000 0.028 0.872 0.000
#> GSM486819     5  0.2491     0.6137 0.000 0.000 0.000 0.164 0.836 0.000
#> GSM486822     2  0.0260     0.7367 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM486824     2  0.3975    -0.1556 0.000 0.544 0.000 0.452 0.004 0.000
#> GSM486828     5  0.3301     0.6092 0.000 0.024 0.000 0.188 0.788 0.000
#> GSM486831     2  0.0458     0.7347 0.000 0.984 0.000 0.016 0.000 0.000
#> GSM486833     2  0.1714     0.6311 0.000 0.908 0.000 0.000 0.092 0.000
#> GSM486835     2  0.0000     0.7414 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486837     2  0.3862    -0.0143 0.000 0.608 0.000 0.388 0.004 0.000
#> GSM486839     2  0.0363     0.7364 0.000 0.988 0.000 0.012 0.000 0.000
#> GSM486841     2  0.0000     0.7414 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486843     2  0.0000     0.7414 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486845     2  0.0622     0.7353 0.000 0.980 0.000 0.012 0.008 0.000
#> GSM486847     2  0.0458     0.7347 0.000 0.984 0.000 0.016 0.000 0.000
#> GSM486849     2  0.0603     0.7289 0.000 0.980 0.000 0.004 0.016 0.000
#> GSM486851     2  0.0000     0.7414 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486853     2  0.4093    -0.1004 0.000 0.584 0.000 0.404 0.012 0.000
#> GSM486855     2  0.0363     0.7367 0.000 0.988 0.000 0.012 0.000 0.000
#> GSM486857     2  0.3841     0.0290 0.000 0.616 0.000 0.380 0.004 0.000
#> GSM486736     3  0.6006     0.7420 0.000 0.000 0.420 0.200 0.004 0.376
#> GSM486738     1  0.2937     0.7115 0.864 0.000 0.036 0.020 0.000 0.080
#> GSM486740     3  0.6006     0.7420 0.000 0.000 0.420 0.200 0.004 0.376
#> GSM486742     1  0.0865     0.7783 0.964 0.000 0.000 0.000 0.000 0.036
#> GSM486744     1  0.5072     0.5262 0.648 0.000 0.252 0.020 0.000 0.080
#> GSM486746     3  0.6006     0.7420 0.000 0.000 0.420 0.200 0.004 0.376
#> GSM486748     1  0.0937     0.7759 0.960 0.000 0.000 0.000 0.000 0.040
#> GSM486750     6  0.3695     0.9993 0.376 0.000 0.000 0.000 0.000 0.624
#> GSM486752     6  0.3695     0.9993 0.376 0.000 0.000 0.000 0.000 0.624
#> GSM486754     1  0.5072     0.5262 0.648 0.000 0.252 0.020 0.000 0.080
#> GSM486756     3  0.4111     0.7412 0.000 0.000 0.748 0.108 0.000 0.144
#> GSM486758     1  0.0458     0.7846 0.984 0.000 0.000 0.016 0.000 0.000
#> GSM486760     6  0.3695     0.9993 0.376 0.000 0.000 0.000 0.000 0.624
#> GSM486762     1  0.0547     0.7832 0.980 0.000 0.000 0.020 0.000 0.000
#> GSM486764     1  0.1267     0.7550 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM486766     1  0.0713     0.7809 0.972 0.000 0.000 0.000 0.000 0.028
#> GSM486768     1  0.5072     0.5262 0.648 0.000 0.252 0.020 0.000 0.080
#> GSM486770     6  0.3695     0.9993 0.376 0.000 0.000 0.000 0.000 0.624
#> GSM486772     6  0.3695     0.9993 0.376 0.000 0.000 0.000 0.000 0.624
#> GSM486774     1  0.0363     0.7844 0.988 0.000 0.000 0.000 0.000 0.012
#> GSM486776     1  0.0547     0.7832 0.980 0.000 0.000 0.020 0.000 0.000
#> GSM486778     6  0.3695     0.9993 0.376 0.000 0.000 0.000 0.000 0.624
#> GSM486780     1  0.0458     0.7846 0.984 0.000 0.000 0.016 0.000 0.000
#> GSM486782     1  0.5072     0.5262 0.648 0.000 0.252 0.020 0.000 0.080
#> GSM486784     1  0.0790     0.7775 0.968 0.000 0.000 0.000 0.000 0.032
#> GSM486786     1  0.1267     0.7550 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM486788     6  0.3695     0.9993 0.376 0.000 0.000 0.000 0.000 0.624
#> GSM486790     3  0.0000     0.6994 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM486792     3  0.5986     0.7418 0.000 0.000 0.428 0.196 0.004 0.372
#> GSM486794     1  0.5051     0.5297 0.652 0.000 0.248 0.020 0.000 0.080
#> GSM486796     6  0.3695     0.9993 0.376 0.000 0.000 0.000 0.000 0.624
#> GSM486798     1  0.0790     0.7775 0.968 0.000 0.000 0.000 0.000 0.032
#> GSM486800     1  0.2416     0.5863 0.844 0.000 0.000 0.000 0.000 0.156
#> GSM486802     6  0.3695     0.9993 0.376 0.000 0.000 0.000 0.000 0.624
#> GSM486804     1  0.1267     0.7550 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM486806     1  0.0405     0.7863 0.988 0.000 0.008 0.000 0.000 0.004
#> GSM486808     1  0.0260     0.7855 0.992 0.000 0.000 0.008 0.000 0.000
#> GSM486810     1  0.4136     0.6308 0.772 0.000 0.132 0.020 0.000 0.076
#> GSM486812     6  0.3695     0.9993 0.376 0.000 0.000 0.000 0.000 0.624
#> GSM486814     1  0.5072     0.5262 0.648 0.000 0.252 0.020 0.000 0.080
#> GSM486816     1  0.0458     0.7846 0.984 0.000 0.000 0.016 0.000 0.000
#> GSM486818     3  0.4111     0.7412 0.000 0.000 0.748 0.108 0.000 0.144
#> GSM486821     3  0.0000     0.6994 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM486823     6  0.3695     0.9993 0.376 0.000 0.000 0.000 0.000 0.624
#> GSM486826     1  0.1267     0.7550 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM486830     3  0.0000     0.6994 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM486832     1  0.0458     0.7846 0.984 0.000 0.000 0.016 0.000 0.000
#> GSM486834     1  0.4485     0.5853 0.724 0.000 0.180 0.012 0.000 0.084
#> GSM486836     1  0.2697     0.4999 0.812 0.000 0.000 0.000 0.000 0.188
#> GSM486838     1  0.0508     0.7852 0.984 0.000 0.000 0.004 0.000 0.012
#> GSM486840     1  0.0937     0.7723 0.960 0.000 0.000 0.000 0.000 0.040
#> GSM486842     1  0.3804    -0.5387 0.576 0.000 0.000 0.000 0.000 0.424
#> GSM486844     1  0.1267     0.7550 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM486846     1  0.5072     0.5262 0.648 0.000 0.252 0.020 0.000 0.080
#> GSM486848     1  0.0547     0.7832 0.980 0.000 0.000 0.020 0.000 0.000
#> GSM486850     6  0.3706     0.9921 0.380 0.000 0.000 0.000 0.000 0.620
#> GSM486852     1  0.3847    -0.6372 0.544 0.000 0.000 0.000 0.000 0.456
#> GSM486854     1  0.0547     0.7832 0.980 0.000 0.000 0.000 0.000 0.020
#> GSM486856     1  0.0713     0.7793 0.972 0.000 0.000 0.000 0.000 0.028
#> GSM486858     1  0.0790     0.7780 0.968 0.000 0.000 0.000 0.000 0.032

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 agent(p) individual(p) k
#> ATC:hclust 120 4.67e-27         1.000 2
#> ATC:hclust 120 8.76e-27         1.000 3
#> ATC:hclust  99 2.55e-21         0.988 4
#> ATC:hclust  93 3.03e-19         0.997 5
#> ATC:hclust 102 2.00e-20         0.997 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 120 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 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-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.989       0.996         0.5046 0.496   0.496
#> 3 3 0.678           0.610       0.772         0.2286 0.961   0.922
#> 4 4 0.639           0.685       0.730         0.1207 0.804   0.578
#> 5 5 0.678           0.740       0.729         0.0813 0.907   0.678
#> 6 6 0.661           0.744       0.766         0.0610 0.959   0.803

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
#> GSM486735     1   0.000      1.000 1.000 0.000
#> GSM486737     1   0.000      1.000 1.000 0.000
#> GSM486739     1   0.000      1.000 1.000 0.000
#> GSM486741     1   0.000      1.000 1.000 0.000
#> GSM486743     1   0.000      1.000 1.000 0.000
#> GSM486745     1   0.000      1.000 1.000 0.000
#> GSM486747     1   0.000      1.000 1.000 0.000
#> GSM486749     1   0.000      1.000 1.000 0.000
#> GSM486751     1   0.000      1.000 1.000 0.000
#> GSM486753     1   0.000      1.000 1.000 0.000
#> GSM486755     1   0.000      1.000 1.000 0.000
#> GSM486757     1   0.000      1.000 1.000 0.000
#> GSM486759     1   0.000      1.000 1.000 0.000
#> GSM486761     1   0.000      1.000 1.000 0.000
#> GSM486763     1   0.000      1.000 1.000 0.000
#> GSM486765     1   0.000      1.000 1.000 0.000
#> GSM486767     1   0.000      1.000 1.000 0.000
#> GSM486769     1   0.000      1.000 1.000 0.000
#> GSM486771     1   0.000      1.000 1.000 0.000
#> GSM486773     1   0.000      1.000 1.000 0.000
#> GSM486775     1   0.000      1.000 1.000 0.000
#> GSM486777     1   0.000      1.000 1.000 0.000
#> GSM486779     1   0.000      1.000 1.000 0.000
#> GSM486781     1   0.000      1.000 1.000 0.000
#> GSM486783     1   0.000      1.000 1.000 0.000
#> GSM486785     1   0.000      1.000 1.000 0.000
#> GSM486787     1   0.000      1.000 1.000 0.000
#> GSM486789     1   0.000      1.000 1.000 0.000
#> GSM486791     1   0.000      1.000 1.000 0.000
#> GSM486793     1   0.000      1.000 1.000 0.000
#> GSM486795     1   0.000      1.000 1.000 0.000
#> GSM486797     1   0.000      1.000 1.000 0.000
#> GSM486799     1   0.000      1.000 1.000 0.000
#> GSM486801     1   0.000      1.000 1.000 0.000
#> GSM486803     1   0.000      1.000 1.000 0.000
#> GSM486805     1   0.000      1.000 1.000 0.000
#> GSM486807     1   0.000      1.000 1.000 0.000
#> GSM486809     1   0.000      1.000 1.000 0.000
#> GSM486811     1   0.000      1.000 1.000 0.000
#> GSM486813     1   0.000      1.000 1.000 0.000
#> GSM486815     1   0.000      1.000 1.000 0.000
#> GSM486817     1   0.000      1.000 1.000 0.000
#> GSM486819     1   0.000      1.000 1.000 0.000
#> GSM486822     1   0.000      1.000 1.000 0.000
#> GSM486824     1   0.000      1.000 1.000 0.000
#> GSM486828     1   0.000      1.000 1.000 0.000
#> GSM486831     1   0.000      1.000 1.000 0.000
#> GSM486833     1   0.000      1.000 1.000 0.000
#> GSM486835     1   0.000      1.000 1.000 0.000
#> GSM486837     1   0.000      1.000 1.000 0.000
#> GSM486839     1   0.000      1.000 1.000 0.000
#> GSM486841     1   0.000      1.000 1.000 0.000
#> GSM486843     1   0.000      1.000 1.000 0.000
#> GSM486845     1   0.000      1.000 1.000 0.000
#> GSM486847     1   0.000      1.000 1.000 0.000
#> GSM486849     1   0.000      1.000 1.000 0.000
#> GSM486851     1   0.000      1.000 1.000 0.000
#> GSM486853     1   0.000      1.000 1.000 0.000
#> GSM486855     1   0.000      1.000 1.000 0.000
#> GSM486857     1   0.000      1.000 1.000 0.000
#> GSM486736     2   0.994      0.162 0.456 0.544
#> GSM486738     2   0.000      0.992 0.000 1.000
#> GSM486740     2   0.000      0.992 0.000 1.000
#> GSM486742     2   0.000      0.992 0.000 1.000
#> GSM486744     2   0.000      0.992 0.000 1.000
#> GSM486746     2   0.000      0.992 0.000 1.000
#> GSM486748     2   0.000      0.992 0.000 1.000
#> GSM486750     2   0.000      0.992 0.000 1.000
#> GSM486752     2   0.000      0.992 0.000 1.000
#> GSM486754     2   0.000      0.992 0.000 1.000
#> GSM486756     2   0.000      0.992 0.000 1.000
#> GSM486758     2   0.000      0.992 0.000 1.000
#> GSM486760     2   0.000      0.992 0.000 1.000
#> GSM486762     2   0.000      0.992 0.000 1.000
#> GSM486764     2   0.000      0.992 0.000 1.000
#> GSM486766     2   0.000      0.992 0.000 1.000
#> GSM486768     2   0.000      0.992 0.000 1.000
#> GSM486770     2   0.000      0.992 0.000 1.000
#> GSM486772     2   0.000      0.992 0.000 1.000
#> GSM486774     2   0.000      0.992 0.000 1.000
#> GSM486776     2   0.000      0.992 0.000 1.000
#> GSM486778     2   0.000      0.992 0.000 1.000
#> GSM486780     2   0.000      0.992 0.000 1.000
#> GSM486782     2   0.000      0.992 0.000 1.000
#> GSM486784     2   0.000      0.992 0.000 1.000
#> GSM486786     2   0.000      0.992 0.000 1.000
#> GSM486788     2   0.000      0.992 0.000 1.000
#> GSM486790     2   0.000      0.992 0.000 1.000
#> GSM486792     2   0.000      0.992 0.000 1.000
#> GSM486794     2   0.000      0.992 0.000 1.000
#> GSM486796     2   0.000      0.992 0.000 1.000
#> GSM486798     2   0.000      0.992 0.000 1.000
#> GSM486800     2   0.000      0.992 0.000 1.000
#> GSM486802     2   0.000      0.992 0.000 1.000
#> GSM486804     2   0.000      0.992 0.000 1.000
#> GSM486806     2   0.000      0.992 0.000 1.000
#> GSM486808     2   0.000      0.992 0.000 1.000
#> GSM486810     2   0.000      0.992 0.000 1.000
#> GSM486812     2   0.000      0.992 0.000 1.000
#> GSM486814     2   0.000      0.992 0.000 1.000
#> GSM486816     2   0.000      0.992 0.000 1.000
#> GSM486818     2   0.000      0.992 0.000 1.000
#> GSM486821     2   0.000      0.992 0.000 1.000
#> GSM486823     2   0.000      0.992 0.000 1.000
#> GSM486826     2   0.000      0.992 0.000 1.000
#> GSM486830     2   0.000      0.992 0.000 1.000
#> GSM486832     2   0.000      0.992 0.000 1.000
#> GSM486834     2   0.000      0.992 0.000 1.000
#> GSM486836     2   0.000      0.992 0.000 1.000
#> GSM486838     2   0.000      0.992 0.000 1.000
#> GSM486840     2   0.000      0.992 0.000 1.000
#> GSM486842     2   0.000      0.992 0.000 1.000
#> GSM486844     2   0.000      0.992 0.000 1.000
#> GSM486846     2   0.000      0.992 0.000 1.000
#> GSM486848     2   0.000      0.992 0.000 1.000
#> GSM486850     2   0.000      0.992 0.000 1.000
#> GSM486852     2   0.000      0.992 0.000 1.000
#> GSM486854     2   0.000      0.992 0.000 1.000
#> GSM486856     2   0.000      0.992 0.000 1.000
#> GSM486858     2   0.000      0.992 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
#> GSM486735     1  0.3192      0.786 0.888 0.112 0.000
#> GSM486737     1  0.5706      0.820 0.680 0.320 0.000
#> GSM486739     1  0.3192      0.786 0.888 0.112 0.000
#> GSM486741     1  0.5835      0.819 0.660 0.340 0.000
#> GSM486743     1  0.6079      0.808 0.612 0.388 0.000
#> GSM486745     1  0.3192      0.786 0.888 0.112 0.000
#> GSM486747     1  0.5835      0.819 0.660 0.340 0.000
#> GSM486749     1  0.0592      0.811 0.988 0.012 0.000
#> GSM486751     1  0.0747      0.810 0.984 0.016 0.000
#> GSM486753     1  0.6045      0.810 0.620 0.380 0.000
#> GSM486755     1  0.6204      0.794 0.576 0.424 0.000
#> GSM486757     1  0.5706      0.822 0.680 0.320 0.000
#> GSM486759     1  0.0000      0.814 1.000 0.000 0.000
#> GSM486761     1  0.5835      0.819 0.660 0.340 0.000
#> GSM486763     1  0.0000      0.814 1.000 0.000 0.000
#> GSM486765     1  0.5835      0.819 0.660 0.340 0.000
#> GSM486767     1  0.5835      0.819 0.660 0.340 0.000
#> GSM486769     1  0.3038      0.785 0.896 0.104 0.000
#> GSM486771     1  0.0747      0.810 0.984 0.016 0.000
#> GSM486773     1  0.5835      0.819 0.660 0.340 0.000
#> GSM486775     1  0.5835      0.819 0.660 0.340 0.000
#> GSM486777     1  0.0000      0.814 1.000 0.000 0.000
#> GSM486779     1  0.5706      0.820 0.680 0.320 0.000
#> GSM486781     1  0.6095      0.806 0.608 0.392 0.000
#> GSM486783     1  0.5706      0.820 0.680 0.320 0.000
#> GSM486785     1  0.2537      0.823 0.920 0.080 0.000
#> GSM486787     1  0.0000      0.814 1.000 0.000 0.000
#> GSM486789     1  0.6215      0.793 0.572 0.428 0.000
#> GSM486791     1  0.3038      0.785 0.896 0.104 0.000
#> GSM486793     1  0.6079      0.808 0.612 0.388 0.000
#> GSM486795     1  0.0000      0.814 1.000 0.000 0.000
#> GSM486797     1  0.5835      0.819 0.660 0.340 0.000
#> GSM486799     1  0.5835      0.819 0.660 0.340 0.000
#> GSM486801     1  0.0000      0.814 1.000 0.000 0.000
#> GSM486803     1  0.0000      0.814 1.000 0.000 0.000
#> GSM486805     1  0.6079      0.808 0.612 0.388 0.000
#> GSM486807     1  0.5835      0.819 0.660 0.340 0.000
#> GSM486809     1  0.5835      0.819 0.660 0.340 0.000
#> GSM486811     1  0.0000      0.814 1.000 0.000 0.000
#> GSM486813     1  0.6095      0.806 0.608 0.392 0.000
#> GSM486815     1  0.0237      0.815 0.996 0.004 0.000
#> GSM486817     1  0.3192      0.786 0.888 0.112 0.000
#> GSM486819     1  0.6204      0.794 0.576 0.424 0.000
#> GSM486822     1  0.2261      0.801 0.932 0.068 0.000
#> GSM486824     1  0.5529      0.823 0.704 0.296 0.000
#> GSM486828     1  0.6204      0.794 0.576 0.424 0.000
#> GSM486831     1  0.0000      0.814 1.000 0.000 0.000
#> GSM486833     1  0.2796      0.791 0.908 0.092 0.000
#> GSM486835     1  0.0000      0.814 1.000 0.000 0.000
#> GSM486837     1  0.5835      0.819 0.660 0.340 0.000
#> GSM486839     1  0.0000      0.814 1.000 0.000 0.000
#> GSM486841     1  0.0000      0.814 1.000 0.000 0.000
#> GSM486843     1  0.0000      0.814 1.000 0.000 0.000
#> GSM486845     1  0.2448      0.799 0.924 0.076 0.000
#> GSM486847     1  0.5706      0.820 0.680 0.320 0.000
#> GSM486849     1  0.0424      0.812 0.992 0.008 0.000
#> GSM486851     1  0.0000      0.814 1.000 0.000 0.000
#> GSM486853     1  0.5905      0.817 0.648 0.352 0.000
#> GSM486855     1  0.0000      0.814 1.000 0.000 0.000
#> GSM486857     1  0.5706      0.820 0.680 0.320 0.000
#> GSM486736     2  0.8275      0.387 0.296 0.596 0.108
#> GSM486738     3  0.1411      0.696 0.000 0.036 0.964
#> GSM486740     2  0.6373      0.688 0.004 0.588 0.408
#> GSM486742     3  0.1411      0.696 0.000 0.036 0.964
#> GSM486744     3  0.6280     -0.454 0.000 0.460 0.540
#> GSM486746     2  0.6235      0.686 0.000 0.564 0.436
#> GSM486748     3  0.1411      0.696 0.000 0.036 0.964
#> GSM486750     3  0.3192      0.636 0.000 0.112 0.888
#> GSM486752     3  0.3192      0.636 0.000 0.112 0.888
#> GSM486754     3  0.6280     -0.454 0.000 0.460 0.540
#> GSM486756     3  0.6280     -0.454 0.000 0.460 0.540
#> GSM486758     3  0.1411      0.696 0.000 0.036 0.964
#> GSM486760     3  0.3192      0.636 0.000 0.112 0.888
#> GSM486762     3  0.1411      0.696 0.000 0.036 0.964
#> GSM486764     3  0.0000      0.697 0.000 0.000 1.000
#> GSM486766     3  0.1411      0.696 0.000 0.036 0.964
#> GSM486768     3  0.6274     -0.446 0.000 0.456 0.544
#> GSM486770     2  0.6291      0.650 0.000 0.532 0.468
#> GSM486772     3  0.3192      0.636 0.000 0.112 0.888
#> GSM486774     3  0.1411      0.696 0.000 0.036 0.964
#> GSM486776     3  0.1411      0.696 0.000 0.036 0.964
#> GSM486778     3  0.3192      0.636 0.000 0.112 0.888
#> GSM486780     3  0.1411      0.696 0.000 0.036 0.964
#> GSM486782     3  0.6280     -0.454 0.000 0.460 0.540
#> GSM486784     3  0.0237      0.697 0.000 0.004 0.996
#> GSM486786     3  0.0000      0.697 0.000 0.000 1.000
#> GSM486788     3  0.3192      0.636 0.000 0.112 0.888
#> GSM486790     3  0.6280     -0.454 0.000 0.460 0.540
#> GSM486792     2  0.6235      0.686 0.000 0.564 0.436
#> GSM486794     3  0.6274     -0.446 0.000 0.456 0.544
#> GSM486796     3  0.3116      0.638 0.000 0.108 0.892
#> GSM486798     3  0.0000      0.697 0.000 0.000 1.000
#> GSM486800     3  0.2878      0.647 0.000 0.096 0.904
#> GSM486802     3  0.3192      0.636 0.000 0.112 0.888
#> GSM486804     3  0.0000      0.697 0.000 0.000 1.000
#> GSM486806     3  0.1411      0.696 0.000 0.036 0.964
#> GSM486808     3  0.1411      0.696 0.000 0.036 0.964
#> GSM486810     3  0.6026     -0.264 0.000 0.376 0.624
#> GSM486812     3  0.3192      0.636 0.000 0.112 0.888
#> GSM486814     3  0.6274     -0.446 0.000 0.456 0.544
#> GSM486816     3  0.1411      0.696 0.000 0.036 0.964
#> GSM486818     3  0.6280     -0.454 0.000 0.460 0.540
#> GSM486821     3  0.6280     -0.454 0.000 0.460 0.540
#> GSM486823     3  0.3192      0.636 0.000 0.112 0.888
#> GSM486826     3  0.0000      0.697 0.000 0.000 1.000
#> GSM486830     3  0.6280     -0.454 0.000 0.460 0.540
#> GSM486832     3  0.1411      0.696 0.000 0.036 0.964
#> GSM486834     3  0.6286     -0.465 0.000 0.464 0.536
#> GSM486836     3  0.2959      0.645 0.000 0.100 0.900
#> GSM486838     3  0.1411      0.696 0.000 0.036 0.964
#> GSM486840     3  0.0000      0.697 0.000 0.000 1.000
#> GSM486842     3  0.2959      0.645 0.000 0.100 0.900
#> GSM486844     3  0.0000      0.697 0.000 0.000 1.000
#> GSM486846     3  0.6274     -0.446 0.000 0.456 0.544
#> GSM486848     3  0.1411      0.696 0.000 0.036 0.964
#> GSM486850     3  0.3192      0.636 0.000 0.112 0.888
#> GSM486852     3  0.2959      0.645 0.000 0.100 0.900
#> GSM486854     3  0.1411      0.696 0.000 0.036 0.964
#> GSM486856     3  0.0237      0.697 0.000 0.004 0.996
#> GSM486858     3  0.0000      0.697 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
#> GSM486735     1  0.7685      0.538 0.456 0.288 0.000 0.256
#> GSM486737     4  0.0672      0.866 0.008 0.008 0.000 0.984
#> GSM486739     1  0.7685      0.538 0.456 0.288 0.000 0.256
#> GSM486741     4  0.0524      0.875 0.004 0.008 0.000 0.988
#> GSM486743     4  0.2048      0.844 0.064 0.008 0.000 0.928
#> GSM486745     1  0.7685      0.538 0.456 0.288 0.000 0.256
#> GSM486747     4  0.0000      0.875 0.000 0.000 0.000 1.000
#> GSM486749     1  0.4697      0.843 0.644 0.000 0.000 0.356
#> GSM486751     1  0.4697      0.843 0.644 0.000 0.000 0.356
#> GSM486753     4  0.2048      0.844 0.064 0.008 0.000 0.928
#> GSM486755     4  0.6084      0.568 0.120 0.204 0.000 0.676
#> GSM486757     4  0.2542      0.779 0.084 0.012 0.000 0.904
#> GSM486759     1  0.4746      0.846 0.632 0.000 0.000 0.368
#> GSM486761     4  0.0000      0.875 0.000 0.000 0.000 1.000
#> GSM486763     1  0.4746      0.846 0.632 0.000 0.000 0.368
#> GSM486765     4  0.0000      0.875 0.000 0.000 0.000 1.000
#> GSM486767     4  0.0524      0.875 0.004 0.008 0.000 0.988
#> GSM486769     1  0.7362      0.603 0.524 0.220 0.000 0.256
#> GSM486771     1  0.4697      0.843 0.644 0.000 0.000 0.356
#> GSM486773     4  0.0000      0.875 0.000 0.000 0.000 1.000
#> GSM486775     4  0.0000      0.875 0.000 0.000 0.000 1.000
#> GSM486777     1  0.5055      0.843 0.624 0.008 0.000 0.368
#> GSM486779     4  0.2924      0.747 0.100 0.016 0.000 0.884
#> GSM486781     4  0.2048      0.844 0.064 0.008 0.000 0.928
#> GSM486783     4  0.0804      0.864 0.008 0.012 0.000 0.980
#> GSM486785     1  0.5417      0.787 0.572 0.016 0.000 0.412
#> GSM486787     1  0.4746      0.846 0.632 0.000 0.000 0.368
#> GSM486789     4  0.5982      0.579 0.112 0.204 0.000 0.684
#> GSM486791     1  0.7387      0.599 0.520 0.224 0.000 0.256
#> GSM486793     4  0.2048      0.844 0.064 0.008 0.000 0.928
#> GSM486795     1  0.4746      0.846 0.632 0.000 0.000 0.368
#> GSM486797     4  0.0000      0.875 0.000 0.000 0.000 1.000
#> GSM486799     4  0.0000      0.875 0.000 0.000 0.000 1.000
#> GSM486801     1  0.4746      0.846 0.632 0.000 0.000 0.368
#> GSM486803     1  0.5284      0.840 0.616 0.016 0.000 0.368
#> GSM486805     4  0.2048      0.844 0.064 0.008 0.000 0.928
#> GSM486807     4  0.0188      0.874 0.000 0.004 0.000 0.996
#> GSM486809     4  0.0672      0.874 0.008 0.008 0.000 0.984
#> GSM486811     1  0.4746      0.846 0.632 0.000 0.000 0.368
#> GSM486813     4  0.2048      0.844 0.064 0.008 0.000 0.928
#> GSM486815     1  0.5313      0.833 0.608 0.016 0.000 0.376
#> GSM486817     1  0.7614      0.525 0.468 0.232 0.000 0.300
#> GSM486819     4  0.6265      0.537 0.124 0.220 0.000 0.656
#> GSM486822     1  0.6016      0.749 0.632 0.068 0.000 0.300
#> GSM486824     4  0.4908      0.209 0.292 0.016 0.000 0.692
#> GSM486828     4  0.6084      0.568 0.120 0.204 0.000 0.676
#> GSM486831     1  0.5217      0.833 0.608 0.012 0.000 0.380
#> GSM486833     1  0.7256      0.617 0.540 0.204 0.000 0.256
#> GSM486835     1  0.4746      0.846 0.632 0.000 0.000 0.368
#> GSM486837     4  0.0188      0.874 0.000 0.004 0.000 0.996
#> GSM486839     1  0.5352      0.821 0.596 0.016 0.000 0.388
#> GSM486841     1  0.4746      0.846 0.632 0.000 0.000 0.368
#> GSM486843     1  0.5284      0.840 0.616 0.016 0.000 0.368
#> GSM486845     1  0.6706      0.701 0.588 0.124 0.000 0.288
#> GSM486847     4  0.2610      0.769 0.088 0.012 0.000 0.900
#> GSM486849     1  0.4920      0.845 0.628 0.004 0.000 0.368
#> GSM486851     1  0.4746      0.846 0.632 0.000 0.000 0.368
#> GSM486853     4  0.0657      0.874 0.012 0.004 0.000 0.984
#> GSM486855     1  0.5352      0.821 0.596 0.016 0.000 0.388
#> GSM486857     4  0.1174      0.855 0.020 0.012 0.000 0.968
#> GSM486736     2  0.4609      0.486 0.156 0.788 0.056 0.000
#> GSM486738     3  0.1637      0.664 0.000 0.060 0.940 0.000
#> GSM486740     2  0.4638      0.612 0.044 0.776 0.180 0.000
#> GSM486742     3  0.1474      0.674 0.000 0.052 0.948 0.000
#> GSM486744     2  0.4992      0.758 0.000 0.524 0.476 0.000
#> GSM486746     2  0.5343      0.658 0.052 0.708 0.240 0.000
#> GSM486748     3  0.1474      0.674 0.000 0.052 0.948 0.000
#> GSM486750     3  0.5809      0.616 0.216 0.092 0.692 0.000
#> GSM486752     3  0.5809      0.616 0.216 0.092 0.692 0.000
#> GSM486754     2  0.4992      0.758 0.000 0.524 0.476 0.000
#> GSM486756     2  0.5681      0.762 0.028 0.568 0.404 0.000
#> GSM486758     3  0.0817      0.696 0.000 0.024 0.976 0.000
#> GSM486760     3  0.5809      0.616 0.216 0.092 0.692 0.000
#> GSM486762     3  0.1022      0.690 0.000 0.032 0.968 0.000
#> GSM486764     3  0.1474      0.714 0.052 0.000 0.948 0.000
#> GSM486766     3  0.1474      0.674 0.000 0.052 0.948 0.000
#> GSM486768     3  0.4998     -0.714 0.000 0.488 0.512 0.000
#> GSM486770     2  0.7686      0.372 0.228 0.436 0.336 0.000
#> GSM486772     3  0.5809      0.616 0.216 0.092 0.692 0.000
#> GSM486774     3  0.0707      0.698 0.000 0.020 0.980 0.000
#> GSM486776     3  0.1716      0.659 0.000 0.064 0.936 0.000
#> GSM486778     3  0.5809      0.616 0.216 0.092 0.692 0.000
#> GSM486780     3  0.0817      0.696 0.000 0.024 0.976 0.000
#> GSM486782     2  0.4992      0.758 0.000 0.524 0.476 0.000
#> GSM486784     3  0.1211      0.714 0.040 0.000 0.960 0.000
#> GSM486786     3  0.2149      0.706 0.088 0.000 0.912 0.000
#> GSM486788     3  0.5809      0.616 0.216 0.092 0.692 0.000
#> GSM486790     2  0.5681      0.762 0.028 0.568 0.404 0.000
#> GSM486792     2  0.5764      0.681 0.052 0.644 0.304 0.000
#> GSM486794     2  0.4992      0.758 0.000 0.524 0.476 0.000
#> GSM486796     3  0.5775      0.618 0.212 0.092 0.696 0.000
#> GSM486798     3  0.1389      0.714 0.048 0.000 0.952 0.000
#> GSM486800     3  0.5716      0.621 0.212 0.088 0.700 0.000
#> GSM486802     3  0.5809      0.616 0.216 0.092 0.692 0.000
#> GSM486804     3  0.1474      0.714 0.052 0.000 0.948 0.000
#> GSM486806     3  0.1716      0.659 0.000 0.064 0.936 0.000
#> GSM486808     3  0.0707      0.698 0.000 0.020 0.980 0.000
#> GSM486810     3  0.4477     -0.212 0.000 0.312 0.688 0.000
#> GSM486812     3  0.5809      0.616 0.216 0.092 0.692 0.000
#> GSM486814     3  0.4998     -0.714 0.000 0.488 0.512 0.000
#> GSM486816     3  0.0817      0.696 0.000 0.024 0.976 0.000
#> GSM486818     2  0.5681      0.762 0.028 0.568 0.404 0.000
#> GSM486821     2  0.4992      0.758 0.000 0.524 0.476 0.000
#> GSM486823     3  0.5809      0.616 0.216 0.092 0.692 0.000
#> GSM486826     3  0.1389      0.714 0.048 0.000 0.952 0.000
#> GSM486830     2  0.4992      0.758 0.000 0.524 0.476 0.000
#> GSM486832     3  0.1022      0.690 0.000 0.032 0.968 0.000
#> GSM486834     2  0.4992      0.758 0.000 0.524 0.476 0.000
#> GSM486836     3  0.5716      0.621 0.212 0.088 0.700 0.000
#> GSM486838     3  0.0895      0.700 0.004 0.020 0.976 0.000
#> GSM486840     3  0.1474      0.714 0.052 0.000 0.948 0.000
#> GSM486842     3  0.5716      0.621 0.212 0.088 0.700 0.000
#> GSM486844     3  0.2149      0.706 0.088 0.000 0.912 0.000
#> GSM486846     3  0.4998     -0.714 0.000 0.488 0.512 0.000
#> GSM486848     3  0.0817      0.696 0.000 0.024 0.976 0.000
#> GSM486850     3  0.5809      0.616 0.216 0.092 0.692 0.000
#> GSM486852     3  0.5716      0.621 0.212 0.088 0.700 0.000
#> GSM486854     3  0.1389      0.677 0.000 0.048 0.952 0.000
#> GSM486856     3  0.1004      0.711 0.024 0.004 0.972 0.000
#> GSM486858     3  0.1302      0.714 0.044 0.000 0.956 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
#> GSM486735     4  0.6839     0.5007 0.276 0.056 0.000 0.548 0.120
#> GSM486737     5  0.4922     0.8377 0.028 0.008 0.000 0.328 0.636
#> GSM486739     4  0.6839     0.5007 0.276 0.056 0.000 0.548 0.120
#> GSM486741     5  0.4385     0.8609 0.012 0.004 0.000 0.312 0.672
#> GSM486743     5  0.4723     0.8418 0.032 0.008 0.000 0.272 0.688
#> GSM486745     4  0.6839     0.5007 0.276 0.056 0.000 0.548 0.120
#> GSM486747     5  0.4029     0.8608 0.000 0.004 0.000 0.316 0.680
#> GSM486749     4  0.0693     0.8104 0.008 0.000 0.000 0.980 0.012
#> GSM486751     4  0.0693     0.8104 0.008 0.000 0.000 0.980 0.012
#> GSM486753     5  0.4723     0.8418 0.032 0.008 0.000 0.272 0.688
#> GSM486755     5  0.6755     0.4926 0.288 0.012 0.000 0.208 0.492
#> GSM486757     5  0.5399     0.6833 0.028 0.016 0.000 0.440 0.516
#> GSM486759     4  0.0000     0.8143 0.000 0.000 0.000 1.000 0.000
#> GSM486761     5  0.4147     0.8604 0.000 0.008 0.000 0.316 0.676
#> GSM486763     4  0.0000     0.8143 0.000 0.000 0.000 1.000 0.000
#> GSM486765     5  0.4127     0.8615 0.000 0.008 0.000 0.312 0.680
#> GSM486767     5  0.4398     0.8613 0.008 0.008 0.000 0.312 0.672
#> GSM486769     4  0.6408     0.5316 0.276 0.036 0.000 0.580 0.108
#> GSM486771     4  0.0693     0.8104 0.008 0.000 0.000 0.980 0.012
#> GSM486773     5  0.3857     0.8615 0.000 0.000 0.000 0.312 0.688
#> GSM486775     5  0.4147     0.8604 0.000 0.008 0.000 0.316 0.676
#> GSM486777     4  0.0510     0.8089 0.016 0.000 0.000 0.984 0.000
#> GSM486779     5  0.5418     0.6113 0.028 0.016 0.000 0.476 0.480
#> GSM486781     5  0.4700     0.8386 0.032 0.008 0.000 0.268 0.692
#> GSM486783     5  0.5120     0.8338 0.028 0.016 0.000 0.328 0.628
#> GSM486785     4  0.2253     0.7618 0.028 0.016 0.000 0.920 0.036
#> GSM486787     4  0.0000     0.8143 0.000 0.000 0.000 1.000 0.000
#> GSM486789     5  0.6727     0.5016 0.280 0.012 0.000 0.208 0.500
#> GSM486791     4  0.6408     0.5316 0.276 0.036 0.000 0.580 0.108
#> GSM486793     5  0.4723     0.8418 0.032 0.008 0.000 0.272 0.688
#> GSM486795     4  0.0000     0.8143 0.000 0.000 0.000 1.000 0.000
#> GSM486797     5  0.3876     0.8607 0.000 0.000 0.000 0.316 0.684
#> GSM486799     5  0.4147     0.8604 0.000 0.008 0.000 0.316 0.676
#> GSM486801     4  0.0000     0.8143 0.000 0.000 0.000 1.000 0.000
#> GSM486803     4  0.0898     0.8036 0.020 0.008 0.000 0.972 0.000
#> GSM486805     5  0.4723     0.8418 0.032 0.008 0.000 0.272 0.688
#> GSM486807     5  0.5242     0.8558 0.028 0.024 0.000 0.316 0.632
#> GSM486809     5  0.4834     0.8569 0.028 0.008 0.000 0.308 0.656
#> GSM486811     4  0.0000     0.8143 0.000 0.000 0.000 1.000 0.000
#> GSM486813     5  0.4723     0.8418 0.032 0.008 0.000 0.272 0.688
#> GSM486815     4  0.1216     0.8003 0.020 0.020 0.000 0.960 0.000
#> GSM486817     4  0.6751     0.4790 0.296 0.040 0.000 0.536 0.128
#> GSM486819     5  0.6755     0.4926 0.288 0.012 0.000 0.208 0.492
#> GSM486822     4  0.3656     0.7222 0.104 0.008 0.000 0.832 0.056
#> GSM486824     4  0.5276    -0.1876 0.028 0.024 0.000 0.624 0.324
#> GSM486828     5  0.6755     0.4926 0.288 0.012 0.000 0.208 0.492
#> GSM486831     4  0.1806     0.7844 0.028 0.016 0.000 0.940 0.016
#> GSM486833     4  0.5818     0.5627 0.264 0.012 0.000 0.620 0.104
#> GSM486835     4  0.0000     0.8143 0.000 0.000 0.000 1.000 0.000
#> GSM486837     5  0.4721     0.8526 0.012 0.016 0.000 0.316 0.656
#> GSM486839     4  0.1806     0.7844 0.028 0.016 0.000 0.940 0.016
#> GSM486841     4  0.0000     0.8143 0.000 0.000 0.000 1.000 0.000
#> GSM486843     4  0.0898     0.8036 0.020 0.008 0.000 0.972 0.000
#> GSM486845     4  0.5021     0.6592 0.184 0.024 0.000 0.728 0.064
#> GSM486847     5  0.5452     0.7232 0.028 0.020 0.000 0.416 0.536
#> GSM486849     4  0.0451     0.8140 0.000 0.008 0.000 0.988 0.004
#> GSM486851     4  0.0000     0.8143 0.000 0.000 0.000 1.000 0.000
#> GSM486853     5  0.5072     0.8581 0.032 0.016 0.000 0.300 0.652
#> GSM486855     4  0.1806     0.7844 0.028 0.016 0.000 0.940 0.016
#> GSM486857     5  0.5222     0.8086 0.028 0.016 0.000 0.356 0.600
#> GSM486736     2  0.2654     0.6338 0.032 0.904 0.004 0.016 0.044
#> GSM486738     3  0.4962     0.6197 0.048 0.048 0.748 0.000 0.156
#> GSM486740     2  0.2931     0.6557 0.028 0.892 0.032 0.004 0.044
#> GSM486742     3  0.4322     0.6565 0.048 0.016 0.780 0.000 0.156
#> GSM486744     2  0.7011     0.7407 0.048 0.524 0.272 0.000 0.156
#> GSM486746     2  0.3245     0.6539 0.048 0.872 0.036 0.000 0.044
#> GSM486748     3  0.3991     0.6687 0.048 0.004 0.792 0.000 0.156
#> GSM486750     1  0.4101     0.9260 0.628 0.000 0.372 0.000 0.000
#> GSM486752     1  0.4101     0.9260 0.628 0.000 0.372 0.000 0.000
#> GSM486754     2  0.7011     0.7407 0.048 0.524 0.272 0.000 0.156
#> GSM486756     2  0.1851     0.7095 0.000 0.912 0.088 0.000 0.000
#> GSM486758     3  0.0290     0.7985 0.000 0.000 0.992 0.000 0.008
#> GSM486760     1  0.4101     0.9260 0.628 0.000 0.372 0.000 0.000
#> GSM486762     3  0.0451     0.7975 0.004 0.000 0.988 0.000 0.008
#> GSM486764     3  0.2074     0.7067 0.104 0.000 0.896 0.000 0.000
#> GSM486766     3  0.3851     0.6784 0.036 0.004 0.796 0.000 0.164
#> GSM486768     2  0.7186     0.6778 0.048 0.468 0.328 0.000 0.156
#> GSM486770     1  0.4967     0.2696 0.660 0.280 0.060 0.000 0.000
#> GSM486772     1  0.4101     0.9260 0.628 0.000 0.372 0.000 0.000
#> GSM486774     3  0.0000     0.7977 0.000 0.000 1.000 0.000 0.000
#> GSM486776     3  0.2965     0.7368 0.028 0.012 0.876 0.000 0.084
#> GSM486778     1  0.4114     0.9250 0.624 0.000 0.376 0.000 0.000
#> GSM486780     3  0.0290     0.7985 0.000 0.000 0.992 0.000 0.008
#> GSM486782     2  0.7011     0.7407 0.048 0.524 0.272 0.000 0.156
#> GSM486784     3  0.1544     0.7501 0.068 0.000 0.932 0.000 0.000
#> GSM486786     3  0.3143     0.4415 0.204 0.000 0.796 0.000 0.000
#> GSM486788     1  0.4126     0.9232 0.620 0.000 0.380 0.000 0.000
#> GSM486790     2  0.1851     0.7095 0.000 0.912 0.088 0.000 0.000
#> GSM486792     2  0.3610     0.6556 0.056 0.852 0.048 0.000 0.044
#> GSM486794     2  0.7011     0.7407 0.048 0.524 0.272 0.000 0.156
#> GSM486796     1  0.4126     0.9232 0.620 0.000 0.380 0.000 0.000
#> GSM486798     3  0.1965     0.7183 0.096 0.000 0.904 0.000 0.000
#> GSM486800     1  0.4126     0.9218 0.620 0.000 0.380 0.000 0.000
#> GSM486802     1  0.4101     0.9260 0.628 0.000 0.372 0.000 0.000
#> GSM486804     3  0.2127     0.7006 0.108 0.000 0.892 0.000 0.000
#> GSM486806     3  0.4365     0.6601 0.036 0.024 0.776 0.000 0.164
#> GSM486808     3  0.0290     0.7985 0.000 0.000 0.992 0.000 0.008
#> GSM486810     3  0.6792    -0.0795 0.036 0.252 0.548 0.000 0.164
#> GSM486812     1  0.4114     0.9250 0.624 0.000 0.376 0.000 0.000
#> GSM486814     2  0.7186     0.6778 0.048 0.468 0.328 0.000 0.156
#> GSM486816     3  0.0290     0.7985 0.000 0.000 0.992 0.000 0.008
#> GSM486818     2  0.1851     0.7095 0.000 0.912 0.088 0.000 0.000
#> GSM486821     2  0.6641     0.7465 0.032 0.564 0.248 0.000 0.156
#> GSM486823     1  0.4101     0.9260 0.628 0.000 0.372 0.000 0.000
#> GSM486826     3  0.2074     0.7067 0.104 0.000 0.896 0.000 0.000
#> GSM486830     2  0.6710     0.7464 0.036 0.560 0.248 0.000 0.156
#> GSM486832     3  0.0451     0.7975 0.004 0.000 0.988 0.000 0.008
#> GSM486834     2  0.7042     0.7340 0.048 0.516 0.280 0.000 0.156
#> GSM486836     1  0.4273     0.8368 0.552 0.000 0.448 0.000 0.000
#> GSM486838     3  0.0000     0.7977 0.000 0.000 1.000 0.000 0.000
#> GSM486840     3  0.2127     0.7006 0.108 0.000 0.892 0.000 0.000
#> GSM486842     1  0.4268     0.8436 0.556 0.000 0.444 0.000 0.000
#> GSM486844     3  0.3143     0.4415 0.204 0.000 0.796 0.000 0.000
#> GSM486846     2  0.7186     0.6778 0.048 0.468 0.328 0.000 0.156
#> GSM486848     3  0.0290     0.7985 0.000 0.000 0.992 0.000 0.008
#> GSM486850     1  0.4101     0.9260 0.628 0.000 0.372 0.000 0.000
#> GSM486852     1  0.4268     0.8436 0.556 0.000 0.444 0.000 0.000
#> GSM486854     3  0.3452     0.6927 0.032 0.000 0.820 0.000 0.148
#> GSM486856     3  0.0510     0.7905 0.016 0.000 0.984 0.000 0.000
#> GSM486858     3  0.1792     0.7333 0.084 0.000 0.916 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
#> GSM486735     6  0.4596      0.692 0.000 0.000 0.012 0.032 0.332 0.624
#> GSM486737     4  0.4316      0.814 0.000 0.072 0.000 0.760 0.140 0.028
#> GSM486739     6  0.4596      0.692 0.000 0.000 0.012 0.032 0.332 0.624
#> GSM486741     4  0.2556      0.871 0.000 0.008 0.000 0.864 0.120 0.008
#> GSM486743     4  0.3885      0.841 0.000 0.060 0.004 0.804 0.108 0.024
#> GSM486745     6  0.4596      0.692 0.000 0.000 0.012 0.032 0.332 0.624
#> GSM486747     4  0.2048      0.873 0.000 0.000 0.000 0.880 0.120 0.000
#> GSM486749     5  0.1334      0.829 0.000 0.020 0.000 0.000 0.948 0.032
#> GSM486751     5  0.1334      0.829 0.000 0.020 0.000 0.000 0.948 0.032
#> GSM486753     4  0.3962      0.839 0.000 0.060 0.004 0.800 0.108 0.028
#> GSM486755     6  0.6320      0.477 0.000 0.072 0.004 0.308 0.092 0.524
#> GSM486757     4  0.6027      0.654 0.000 0.120 0.012 0.600 0.228 0.040
#> GSM486759     5  0.0291      0.858 0.000 0.004 0.000 0.004 0.992 0.000
#> GSM486761     4  0.2048      0.873 0.000 0.000 0.000 0.880 0.120 0.000
#> GSM486763     5  0.0603      0.854 0.000 0.016 0.000 0.004 0.980 0.000
#> GSM486765     4  0.2048      0.873 0.000 0.000 0.000 0.880 0.120 0.000
#> GSM486767     4  0.2191      0.873 0.000 0.004 0.000 0.876 0.120 0.000
#> GSM486769     6  0.5017      0.590 0.000 0.020 0.004 0.028 0.408 0.540
#> GSM486771     5  0.1334      0.829 0.000 0.020 0.000 0.000 0.948 0.032
#> GSM486773     4  0.2048      0.873 0.000 0.000 0.000 0.880 0.120 0.000
#> GSM486775     4  0.2048      0.873 0.000 0.000 0.000 0.880 0.120 0.000
#> GSM486777     5  0.1138      0.851 0.000 0.012 0.000 0.004 0.960 0.024
#> GSM486779     4  0.6378      0.553 0.000 0.140 0.012 0.540 0.268 0.040
#> GSM486781     4  0.4019      0.836 0.000 0.064 0.004 0.796 0.108 0.028
#> GSM486783     4  0.5060      0.776 0.000 0.112 0.004 0.708 0.140 0.036
#> GSM486785     5  0.4490      0.713 0.000 0.136 0.012 0.048 0.764 0.040
#> GSM486787     5  0.0405      0.858 0.000 0.008 0.000 0.004 0.988 0.000
#> GSM486789     6  0.6392      0.420 0.000 0.072 0.004 0.336 0.092 0.496
#> GSM486791     6  0.4661      0.664 0.000 0.008 0.004 0.028 0.360 0.600
#> GSM486793     4  0.3885      0.841 0.000 0.060 0.004 0.804 0.108 0.024
#> GSM486795     5  0.0291      0.858 0.000 0.004 0.000 0.004 0.992 0.000
#> GSM486797     4  0.2048      0.873 0.000 0.000 0.000 0.880 0.120 0.000
#> GSM486799     4  0.2048      0.873 0.000 0.000 0.000 0.880 0.120 0.000
#> GSM486801     5  0.0291      0.858 0.000 0.004 0.000 0.004 0.992 0.000
#> GSM486803     5  0.3086      0.798 0.000 0.088 0.008 0.008 0.856 0.040
#> GSM486805     4  0.3962      0.839 0.000 0.060 0.004 0.800 0.108 0.028
#> GSM486807     4  0.4863      0.835 0.000 0.120 0.012 0.728 0.120 0.020
#> GSM486809     4  0.3248      0.863 0.000 0.024 0.004 0.836 0.120 0.016
#> GSM486811     5  0.0405      0.858 0.000 0.008 0.000 0.004 0.988 0.000
#> GSM486813     4  0.4019      0.836 0.000 0.064 0.004 0.796 0.108 0.028
#> GSM486815     5  0.3833      0.764 0.000 0.120 0.012 0.020 0.808 0.040
#> GSM486817     6  0.4761      0.691 0.000 0.024 0.000 0.032 0.312 0.632
#> GSM486819     6  0.6308      0.481 0.000 0.072 0.004 0.304 0.092 0.528
#> GSM486822     5  0.4037      0.499 0.000 0.024 0.000 0.028 0.752 0.196
#> GSM486824     5  0.6422      0.234 0.000 0.140 0.012 0.280 0.528 0.040
#> GSM486828     6  0.6320      0.477 0.000 0.072 0.004 0.308 0.092 0.524
#> GSM486831     5  0.3035      0.807 0.000 0.084 0.008 0.008 0.860 0.040
#> GSM486833     6  0.5354      0.568 0.000 0.040 0.004 0.028 0.420 0.508
#> GSM486835     5  0.0146      0.858 0.000 0.000 0.000 0.004 0.996 0.000
#> GSM486837     4  0.3964      0.846 0.000 0.068 0.004 0.792 0.120 0.016
#> GSM486839     5  0.3281      0.795 0.000 0.104 0.008 0.008 0.840 0.040
#> GSM486841     5  0.0146      0.858 0.000 0.000 0.000 0.004 0.996 0.000
#> GSM486843     5  0.1780      0.842 0.000 0.024 0.004 0.004 0.932 0.036
#> GSM486845     5  0.5714      0.248 0.000 0.108 0.008 0.028 0.612 0.244
#> GSM486847     4  0.6396      0.540 0.000 0.124 0.012 0.528 0.292 0.044
#> GSM486849     5  0.1524      0.845 0.000 0.060 0.008 0.000 0.932 0.000
#> GSM486851     5  0.0405      0.857 0.000 0.008 0.000 0.004 0.988 0.000
#> GSM486853     4  0.4892      0.840 0.000 0.104 0.008 0.732 0.120 0.036
#> GSM486855     5  0.3417      0.793 0.000 0.116 0.008 0.008 0.828 0.040
#> GSM486857     4  0.5690      0.724 0.000 0.136 0.012 0.656 0.156 0.040
#> GSM486736     3  0.3076      0.595 0.000 0.028 0.852 0.024 0.000 0.096
#> GSM486738     1  0.5549      0.511 0.652 0.032 0.084 0.016 0.000 0.216
#> GSM486740     3  0.3101      0.596 0.000 0.032 0.852 0.024 0.000 0.092
#> GSM486742     1  0.4799      0.603 0.708 0.032 0.032 0.016 0.000 0.212
#> GSM486744     3  0.6448      0.741 0.192 0.032 0.544 0.016 0.000 0.216
#> GSM486746     3  0.3265      0.600 0.004 0.036 0.848 0.024 0.000 0.088
#> GSM486748     1  0.4253      0.643 0.740 0.032 0.008 0.016 0.000 0.204
#> GSM486750     2  0.3528      0.934 0.296 0.700 0.000 0.004 0.000 0.000
#> GSM486752     2  0.3528      0.934 0.296 0.700 0.000 0.004 0.000 0.000
#> GSM486754     3  0.6448      0.741 0.192 0.032 0.544 0.016 0.000 0.216
#> GSM486756     3  0.0713      0.666 0.028 0.000 0.972 0.000 0.000 0.000
#> GSM486758     1  0.0858      0.790 0.968 0.004 0.000 0.028 0.000 0.000
#> GSM486760     2  0.3390      0.935 0.296 0.704 0.000 0.000 0.000 0.000
#> GSM486762     1  0.0508      0.788 0.984 0.000 0.000 0.012 0.000 0.004
#> GSM486764     1  0.2737      0.724 0.868 0.084 0.000 0.044 0.000 0.004
#> GSM486766     1  0.4100      0.670 0.772 0.032 0.008 0.024 0.000 0.164
#> GSM486768     3  0.6668      0.698 0.236 0.032 0.500 0.016 0.000 0.216
#> GSM486770     2  0.3651      0.385 0.004 0.736 0.248 0.008 0.000 0.004
#> GSM486772     2  0.3528      0.934 0.296 0.700 0.000 0.004 0.000 0.000
#> GSM486774     1  0.0260      0.790 0.992 0.008 0.000 0.000 0.000 0.000
#> GSM486776     1  0.3389      0.718 0.844 0.028 0.016 0.020 0.000 0.092
#> GSM486778     2  0.3390      0.935 0.296 0.704 0.000 0.000 0.000 0.000
#> GSM486780     1  0.0858      0.790 0.968 0.004 0.000 0.028 0.000 0.000
#> GSM486782     3  0.6448      0.741 0.192 0.032 0.544 0.016 0.000 0.216
#> GSM486784     1  0.1923      0.755 0.916 0.064 0.000 0.016 0.000 0.004
#> GSM486786     1  0.3728      0.522 0.772 0.180 0.000 0.044 0.000 0.004
#> GSM486788     2  0.3390      0.935 0.296 0.704 0.000 0.000 0.000 0.000
#> GSM486790     3  0.0713      0.666 0.028 0.000 0.972 0.000 0.000 0.000
#> GSM486792     3  0.3401      0.600 0.004 0.044 0.840 0.024 0.000 0.088
#> GSM486794     3  0.6554      0.740 0.192 0.032 0.544 0.024 0.000 0.208
#> GSM486796     2  0.3409      0.932 0.300 0.700 0.000 0.000 0.000 0.000
#> GSM486798     1  0.2149      0.740 0.900 0.080 0.000 0.016 0.000 0.004
#> GSM486800     2  0.3428      0.929 0.304 0.696 0.000 0.000 0.000 0.000
#> GSM486802     2  0.3390      0.935 0.296 0.704 0.000 0.000 0.000 0.000
#> GSM486804     1  0.2737      0.724 0.868 0.084 0.000 0.044 0.000 0.004
#> GSM486806     1  0.4788      0.618 0.724 0.032 0.032 0.024 0.000 0.188
#> GSM486808     1  0.0405      0.790 0.988 0.008 0.000 0.004 0.000 0.000
#> GSM486810     1  0.6956     -0.188 0.468 0.032 0.280 0.032 0.000 0.188
#> GSM486812     2  0.3390      0.935 0.296 0.704 0.000 0.000 0.000 0.000
#> GSM486814     3  0.6668      0.698 0.236 0.032 0.500 0.016 0.000 0.216
#> GSM486816     1  0.0935      0.790 0.964 0.004 0.000 0.032 0.000 0.000
#> GSM486818     3  0.0713      0.666 0.028 0.000 0.972 0.000 0.000 0.000
#> GSM486821     3  0.6364      0.743 0.184 0.032 0.576 0.024 0.000 0.184
#> GSM486823     2  0.3634      0.933 0.296 0.696 0.000 0.008 0.000 0.000
#> GSM486826     1  0.2685      0.727 0.872 0.080 0.000 0.044 0.000 0.004
#> GSM486830     3  0.6341      0.743 0.184 0.032 0.572 0.020 0.000 0.192
#> GSM486832     1  0.0508      0.788 0.984 0.000 0.000 0.012 0.000 0.004
#> GSM486834     3  0.6667      0.733 0.204 0.032 0.532 0.028 0.000 0.204
#> GSM486836     2  0.4435      0.834 0.364 0.604 0.000 0.028 0.000 0.004
#> GSM486838     1  0.0260      0.790 0.992 0.008 0.000 0.000 0.000 0.000
#> GSM486840     1  0.2373      0.731 0.888 0.084 0.000 0.024 0.000 0.004
#> GSM486842     2  0.4399      0.852 0.352 0.616 0.000 0.028 0.000 0.004
#> GSM486844     1  0.3728      0.522 0.772 0.180 0.000 0.044 0.000 0.004
#> GSM486846     3  0.6684      0.693 0.240 0.032 0.496 0.016 0.000 0.216
#> GSM486848     1  0.0603      0.790 0.980 0.004 0.000 0.016 0.000 0.000
#> GSM486850     2  0.3528      0.934 0.296 0.700 0.000 0.004 0.000 0.000
#> GSM486852     2  0.4399      0.852 0.352 0.616 0.000 0.028 0.000 0.004
#> GSM486854     1  0.4102      0.660 0.760 0.032 0.008 0.016 0.000 0.184
#> GSM486856     1  0.1442      0.774 0.944 0.040 0.000 0.012 0.000 0.004
#> GSM486858     1  0.2380      0.747 0.892 0.068 0.000 0.036 0.000 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-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 agent(p) individual(p) k
#> ATC:kmeans 119 7.74e-27         1.000 2
#> ATC:kmeans 105 1.58e-23         1.000 3
#> ATC:kmeans 113 2.48e-24         0.999 4
#> ATC:kmeans 111 4.45e-23         0.988 5
#> ATC:kmeans 111 2.52e-22         0.958 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 120 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 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-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.999       1.000         0.5047 0.496   0.496
#> 3 3 0.827           0.914       0.914         0.1472 0.948   0.895
#> 4 4 0.872           0.922       0.950         0.1966 0.874   0.716
#> 5 5 0.887           0.914       0.925         0.1009 0.914   0.730
#> 6 6 0.872           0.879       0.912         0.0471 0.954   0.810

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
#> GSM486735     1   0.000      1.000 1.000 0.000
#> GSM486737     1   0.000      1.000 1.000 0.000
#> GSM486739     1   0.000      1.000 1.000 0.000
#> GSM486741     1   0.000      1.000 1.000 0.000
#> GSM486743     1   0.000      1.000 1.000 0.000
#> GSM486745     1   0.000      1.000 1.000 0.000
#> GSM486747     1   0.000      1.000 1.000 0.000
#> GSM486749     1   0.000      1.000 1.000 0.000
#> GSM486751     1   0.000      1.000 1.000 0.000
#> GSM486753     1   0.000      1.000 1.000 0.000
#> GSM486755     1   0.000      1.000 1.000 0.000
#> GSM486757     1   0.000      1.000 1.000 0.000
#> GSM486759     1   0.000      1.000 1.000 0.000
#> GSM486761     1   0.000      1.000 1.000 0.000
#> GSM486763     1   0.000      1.000 1.000 0.000
#> GSM486765     1   0.000      1.000 1.000 0.000
#> GSM486767     1   0.000      1.000 1.000 0.000
#> GSM486769     1   0.000      1.000 1.000 0.000
#> GSM486771     1   0.000      1.000 1.000 0.000
#> GSM486773     1   0.000      1.000 1.000 0.000
#> GSM486775     1   0.000      1.000 1.000 0.000
#> GSM486777     1   0.000      1.000 1.000 0.000
#> GSM486779     1   0.000      1.000 1.000 0.000
#> GSM486781     1   0.000      1.000 1.000 0.000
#> GSM486783     1   0.000      1.000 1.000 0.000
#> GSM486785     1   0.000      1.000 1.000 0.000
#> GSM486787     1   0.000      1.000 1.000 0.000
#> GSM486789     1   0.000      1.000 1.000 0.000
#> GSM486791     1   0.000      1.000 1.000 0.000
#> GSM486793     1   0.000      1.000 1.000 0.000
#> GSM486795     1   0.000      1.000 1.000 0.000
#> GSM486797     1   0.000      1.000 1.000 0.000
#> GSM486799     1   0.000      1.000 1.000 0.000
#> GSM486801     1   0.000      1.000 1.000 0.000
#> GSM486803     1   0.000      1.000 1.000 0.000
#> GSM486805     1   0.000      1.000 1.000 0.000
#> GSM486807     1   0.000      1.000 1.000 0.000
#> GSM486809     1   0.000      1.000 1.000 0.000
#> GSM486811     1   0.000      1.000 1.000 0.000
#> GSM486813     1   0.000      1.000 1.000 0.000
#> GSM486815     1   0.000      1.000 1.000 0.000
#> GSM486817     1   0.000      1.000 1.000 0.000
#> GSM486819     1   0.000      1.000 1.000 0.000
#> GSM486822     1   0.000      1.000 1.000 0.000
#> GSM486824     1   0.000      1.000 1.000 0.000
#> GSM486828     1   0.000      1.000 1.000 0.000
#> GSM486831     1   0.000      1.000 1.000 0.000
#> GSM486833     1   0.000      1.000 1.000 0.000
#> GSM486835     1   0.000      1.000 1.000 0.000
#> GSM486837     1   0.000      1.000 1.000 0.000
#> GSM486839     1   0.000      1.000 1.000 0.000
#> GSM486841     1   0.000      1.000 1.000 0.000
#> GSM486843     1   0.000      1.000 1.000 0.000
#> GSM486845     1   0.000      1.000 1.000 0.000
#> GSM486847     1   0.000      1.000 1.000 0.000
#> GSM486849     1   0.000      1.000 1.000 0.000
#> GSM486851     1   0.000      1.000 1.000 0.000
#> GSM486853     1   0.000      1.000 1.000 0.000
#> GSM486855     1   0.000      1.000 1.000 0.000
#> GSM486857     1   0.000      1.000 1.000 0.000
#> GSM486736     2   0.278      0.950 0.048 0.952
#> GSM486738     2   0.000      0.999 0.000 1.000
#> GSM486740     2   0.000      0.999 0.000 1.000
#> GSM486742     2   0.000      0.999 0.000 1.000
#> GSM486744     2   0.000      0.999 0.000 1.000
#> GSM486746     2   0.000      0.999 0.000 1.000
#> GSM486748     2   0.000      0.999 0.000 1.000
#> GSM486750     2   0.000      0.999 0.000 1.000
#> GSM486752     2   0.000      0.999 0.000 1.000
#> GSM486754     2   0.000      0.999 0.000 1.000
#> GSM486756     2   0.000      0.999 0.000 1.000
#> GSM486758     2   0.000      0.999 0.000 1.000
#> GSM486760     2   0.000      0.999 0.000 1.000
#> GSM486762     2   0.000      0.999 0.000 1.000
#> GSM486764     2   0.000      0.999 0.000 1.000
#> GSM486766     2   0.000      0.999 0.000 1.000
#> GSM486768     2   0.000      0.999 0.000 1.000
#> GSM486770     2   0.000      0.999 0.000 1.000
#> GSM486772     2   0.000      0.999 0.000 1.000
#> GSM486774     2   0.000      0.999 0.000 1.000
#> GSM486776     2   0.000      0.999 0.000 1.000
#> GSM486778     2   0.000      0.999 0.000 1.000
#> GSM486780     2   0.000      0.999 0.000 1.000
#> GSM486782     2   0.000      0.999 0.000 1.000
#> GSM486784     2   0.000      0.999 0.000 1.000
#> GSM486786     2   0.000      0.999 0.000 1.000
#> GSM486788     2   0.000      0.999 0.000 1.000
#> GSM486790     2   0.000      0.999 0.000 1.000
#> GSM486792     2   0.000      0.999 0.000 1.000
#> GSM486794     2   0.000      0.999 0.000 1.000
#> GSM486796     2   0.000      0.999 0.000 1.000
#> GSM486798     2   0.000      0.999 0.000 1.000
#> GSM486800     2   0.000      0.999 0.000 1.000
#> GSM486802     2   0.000      0.999 0.000 1.000
#> GSM486804     2   0.000      0.999 0.000 1.000
#> GSM486806     2   0.000      0.999 0.000 1.000
#> GSM486808     2   0.000      0.999 0.000 1.000
#> GSM486810     2   0.000      0.999 0.000 1.000
#> GSM486812     2   0.000      0.999 0.000 1.000
#> GSM486814     2   0.000      0.999 0.000 1.000
#> GSM486816     2   0.000      0.999 0.000 1.000
#> GSM486818     2   0.000      0.999 0.000 1.000
#> GSM486821     2   0.000      0.999 0.000 1.000
#> GSM486823     2   0.000      0.999 0.000 1.000
#> GSM486826     2   0.000      0.999 0.000 1.000
#> GSM486830     2   0.000      0.999 0.000 1.000
#> GSM486832     2   0.000      0.999 0.000 1.000
#> GSM486834     2   0.000      0.999 0.000 1.000
#> GSM486836     2   0.000      0.999 0.000 1.000
#> GSM486838     2   0.000      0.999 0.000 1.000
#> GSM486840     2   0.000      0.999 0.000 1.000
#> GSM486842     2   0.000      0.999 0.000 1.000
#> GSM486844     2   0.000      0.999 0.000 1.000
#> GSM486846     2   0.000      0.999 0.000 1.000
#> GSM486848     2   0.000      0.999 0.000 1.000
#> GSM486850     2   0.000      0.999 0.000 1.000
#> GSM486852     2   0.000      0.999 0.000 1.000
#> GSM486854     2   0.000      0.999 0.000 1.000
#> GSM486856     2   0.000      0.999 0.000 1.000
#> GSM486858     2   0.000      0.999 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
#> GSM486735     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486737     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486739     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486741     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486743     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486745     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486747     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486749     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486751     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486753     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486755     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486757     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486759     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486761     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486763     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486765     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486767     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486769     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486771     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486773     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486775     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486777     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486779     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486781     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486783     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486785     1  0.0237      0.844 0.996 0.004 0.000
#> GSM486787     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486789     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486791     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486793     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486795     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486797     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486799     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486801     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486803     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486805     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486807     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486809     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486811     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486813     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486815     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486817     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486819     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486822     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486824     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486828     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486831     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486833     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486835     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486837     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486839     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486841     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486843     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486845     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486847     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486849     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486851     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486853     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486855     1  0.0000      0.844 1.000 0.000 0.000
#> GSM486857     1  0.5431      0.846 0.716 0.284 0.000
#> GSM486736     2  0.5623      0.564 0.280 0.716 0.004
#> GSM486738     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486740     2  0.5431      0.920 0.000 0.716 0.284
#> GSM486742     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486744     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486746     2  0.5431      0.920 0.000 0.716 0.284
#> GSM486748     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486750     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486752     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486754     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486756     2  0.5431      0.920 0.000 0.716 0.284
#> GSM486758     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486760     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486762     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486764     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486766     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486768     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486770     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486772     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486774     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486776     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486778     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486780     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486782     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486784     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486786     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486788     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486790     2  0.5431      0.920 0.000 0.716 0.284
#> GSM486792     2  0.5431      0.920 0.000 0.716 0.284
#> GSM486794     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486796     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486798     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486800     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486802     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486804     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486806     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486808     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486810     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486812     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486814     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486816     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486818     2  0.5431      0.920 0.000 0.716 0.284
#> GSM486821     3  0.0892      0.973 0.000 0.020 0.980
#> GSM486823     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486826     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486830     3  0.0892      0.973 0.000 0.020 0.980
#> GSM486832     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486834     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486836     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486838     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486840     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486842     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486844     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486846     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486848     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486850     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486852     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486854     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486856     3  0.0000      0.999 0.000 0.000 1.000
#> GSM486858     3  0.0000      0.999 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
#> GSM486735     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486737     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486739     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486741     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486743     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486745     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486747     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486749     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486751     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486753     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486755     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486757     2  0.3610      0.776 0.200 0.800 0.000 0.000
#> GSM486759     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486761     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486763     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486765     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486767     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486769     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486771     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486773     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486775     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486777     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486779     2  0.3172      0.833 0.160 0.840 0.000 0.000
#> GSM486781     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486783     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486785     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486787     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486789     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486791     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486793     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486795     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486797     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486799     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486801     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486803     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486805     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486807     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486809     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486811     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486813     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486815     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486817     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486819     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486822     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486824     1  0.4961      0.103 0.552 0.448 0.000 0.000
#> GSM486828     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486831     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486833     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486835     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486837     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486839     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486841     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486843     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486845     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486847     2  0.1792      0.950 0.068 0.932 0.000 0.000
#> GSM486849     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486851     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486853     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486855     1  0.0000      0.981 1.000 0.000 0.000 0.000
#> GSM486857     2  0.1118      0.985 0.036 0.964 0.000 0.000
#> GSM486736     4  0.0000      0.883 0.000 0.000 0.000 1.000
#> GSM486738     3  0.0000      0.922 0.000 0.000 1.000 0.000
#> GSM486740     4  0.0000      0.883 0.000 0.000 0.000 1.000
#> GSM486742     3  0.0000      0.922 0.000 0.000 1.000 0.000
#> GSM486744     3  0.0188      0.920 0.000 0.004 0.996 0.000
#> GSM486746     4  0.0000      0.883 0.000 0.000 0.000 1.000
#> GSM486748     3  0.0000      0.922 0.000 0.000 1.000 0.000
#> GSM486750     3  0.4375      0.810 0.000 0.032 0.788 0.180
#> GSM486752     3  0.4375      0.810 0.000 0.032 0.788 0.180
#> GSM486754     3  0.0188      0.920 0.000 0.004 0.996 0.000
#> GSM486756     4  0.3583      0.845 0.000 0.004 0.180 0.816
#> GSM486758     3  0.0000      0.922 0.000 0.000 1.000 0.000
#> GSM486760     3  0.4375      0.810 0.000 0.032 0.788 0.180
#> GSM486762     3  0.0000      0.922 0.000 0.000 1.000 0.000
#> GSM486764     3  0.0188      0.921 0.000 0.004 0.996 0.000
#> GSM486766     3  0.0000      0.922 0.000 0.000 1.000 0.000
#> GSM486768     3  0.0188      0.920 0.000 0.004 0.996 0.000
#> GSM486770     3  0.4932      0.749 0.000 0.032 0.728 0.240
#> GSM486772     3  0.4375      0.810 0.000 0.032 0.788 0.180
#> GSM486774     3  0.0000      0.922 0.000 0.000 1.000 0.000
#> GSM486776     3  0.0000      0.922 0.000 0.000 1.000 0.000
#> GSM486778     3  0.4375      0.810 0.000 0.032 0.788 0.180
#> GSM486780     3  0.0000      0.922 0.000 0.000 1.000 0.000
#> GSM486782     3  0.0188      0.920 0.000 0.004 0.996 0.000
#> GSM486784     3  0.0000      0.922 0.000 0.000 1.000 0.000
#> GSM486786     3  0.1022      0.910 0.000 0.032 0.968 0.000
#> GSM486788     3  0.4375      0.810 0.000 0.032 0.788 0.180
#> GSM486790     4  0.3583      0.845 0.000 0.004 0.180 0.816
#> GSM486792     4  0.0000      0.883 0.000 0.000 0.000 1.000
#> GSM486794     3  0.0188      0.920 0.000 0.004 0.996 0.000
#> GSM486796     3  0.4375      0.810 0.000 0.032 0.788 0.180
#> GSM486798     3  0.0000      0.922 0.000 0.000 1.000 0.000
#> GSM486800     3  0.4008      0.832 0.000 0.032 0.820 0.148
#> GSM486802     3  0.4375      0.810 0.000 0.032 0.788 0.180
#> GSM486804     3  0.0188      0.921 0.000 0.004 0.996 0.000
#> GSM486806     3  0.0000      0.922 0.000 0.000 1.000 0.000
#> GSM486808     3  0.0000      0.922 0.000 0.000 1.000 0.000
#> GSM486810     3  0.0000      0.922 0.000 0.000 1.000 0.000
#> GSM486812     3  0.4375      0.810 0.000 0.032 0.788 0.180
#> GSM486814     3  0.0188      0.920 0.000 0.004 0.996 0.000
#> GSM486816     3  0.0188      0.921 0.000 0.004 0.996 0.000
#> GSM486818     4  0.3583      0.845 0.000 0.004 0.180 0.816
#> GSM486821     3  0.2593      0.828 0.000 0.004 0.892 0.104
#> GSM486823     3  0.4375      0.810 0.000 0.032 0.788 0.180
#> GSM486826     3  0.0188      0.921 0.000 0.004 0.996 0.000
#> GSM486830     3  0.2593      0.828 0.000 0.004 0.892 0.104
#> GSM486832     3  0.0000      0.922 0.000 0.000 1.000 0.000
#> GSM486834     3  0.0188      0.921 0.000 0.004 0.996 0.000
#> GSM486836     3  0.4057      0.830 0.000 0.032 0.816 0.152
#> GSM486838     3  0.0000      0.922 0.000 0.000 1.000 0.000
#> GSM486840     3  0.0188      0.921 0.000 0.004 0.996 0.000
#> GSM486842     3  0.4057      0.830 0.000 0.032 0.816 0.152
#> GSM486844     3  0.0336      0.920 0.000 0.008 0.992 0.000
#> GSM486846     3  0.0188      0.920 0.000 0.004 0.996 0.000
#> GSM486848     3  0.0000      0.922 0.000 0.000 1.000 0.000
#> GSM486850     3  0.4375      0.810 0.000 0.032 0.788 0.180
#> GSM486852     3  0.4057      0.830 0.000 0.032 0.816 0.152
#> GSM486854     3  0.0000      0.922 0.000 0.000 1.000 0.000
#> GSM486856     3  0.0000      0.922 0.000 0.000 1.000 0.000
#> GSM486858     3  0.0188      0.921 0.000 0.004 0.996 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
#> GSM486735     4  0.1557      0.943 0.052 0.008 0.000 0.940 0.000
#> GSM486737     5  0.0162      0.978 0.000 0.000 0.000 0.004 0.996
#> GSM486739     4  0.1557      0.943 0.052 0.008 0.000 0.940 0.000
#> GSM486741     5  0.0162      0.978 0.000 0.000 0.000 0.004 0.996
#> GSM486743     5  0.0162      0.978 0.000 0.000 0.000 0.004 0.996
#> GSM486745     4  0.1557      0.943 0.052 0.008 0.000 0.940 0.000
#> GSM486747     5  0.0162      0.978 0.000 0.000 0.000 0.004 0.996
#> GSM486749     4  0.0162      0.960 0.004 0.000 0.000 0.996 0.000
#> GSM486751     4  0.0162      0.960 0.004 0.000 0.000 0.996 0.000
#> GSM486753     5  0.0162      0.978 0.000 0.000 0.000 0.004 0.996
#> GSM486755     5  0.1357      0.947 0.048 0.000 0.000 0.004 0.948
#> GSM486757     5  0.3129      0.788 0.008 0.004 0.000 0.156 0.832
#> GSM486759     4  0.0000      0.960 0.000 0.000 0.000 1.000 0.000
#> GSM486761     5  0.0162      0.978 0.000 0.000 0.000 0.004 0.996
#> GSM486763     4  0.0000      0.960 0.000 0.000 0.000 1.000 0.000
#> GSM486765     5  0.0162      0.978 0.000 0.000 0.000 0.004 0.996
#> GSM486767     5  0.0162      0.978 0.000 0.000 0.000 0.004 0.996
#> GSM486769     4  0.1430      0.945 0.052 0.004 0.000 0.944 0.000
#> GSM486771     4  0.0290      0.960 0.008 0.000 0.000 0.992 0.000
#> GSM486773     5  0.0162      0.978 0.000 0.000 0.000 0.004 0.996
#> GSM486775     5  0.0162      0.978 0.000 0.000 0.000 0.004 0.996
#> GSM486777     4  0.0000      0.960 0.000 0.000 0.000 1.000 0.000
#> GSM486779     5  0.2520      0.869 0.012 0.004 0.000 0.096 0.888
#> GSM486781     5  0.0162      0.978 0.000 0.000 0.000 0.004 0.996
#> GSM486783     5  0.0162      0.978 0.000 0.000 0.000 0.004 0.996
#> GSM486785     4  0.0566      0.955 0.012 0.004 0.000 0.984 0.000
#> GSM486787     4  0.0000      0.960 0.000 0.000 0.000 1.000 0.000
#> GSM486789     5  0.1357      0.947 0.048 0.000 0.000 0.004 0.948
#> GSM486791     4  0.1430      0.945 0.052 0.004 0.000 0.944 0.000
#> GSM486793     5  0.0162      0.978 0.000 0.000 0.000 0.004 0.996
#> GSM486795     4  0.0000      0.960 0.000 0.000 0.000 1.000 0.000
#> GSM486797     5  0.0162      0.978 0.000 0.000 0.000 0.004 0.996
#> GSM486799     5  0.0162      0.978 0.000 0.000 0.000 0.004 0.996
#> GSM486801     4  0.0000      0.960 0.000 0.000 0.000 1.000 0.000
#> GSM486803     4  0.0451      0.957 0.008 0.004 0.000 0.988 0.000
#> GSM486805     5  0.0162      0.978 0.000 0.000 0.000 0.004 0.996
#> GSM486807     5  0.0162      0.978 0.000 0.000 0.000 0.004 0.996
#> GSM486809     5  0.0162      0.978 0.000 0.000 0.000 0.004 0.996
#> GSM486811     4  0.0000      0.960 0.000 0.000 0.000 1.000 0.000
#> GSM486813     5  0.0162      0.978 0.000 0.000 0.000 0.004 0.996
#> GSM486815     4  0.0451      0.957 0.008 0.004 0.000 0.988 0.000
#> GSM486817     4  0.1430      0.945 0.052 0.004 0.000 0.944 0.000
#> GSM486819     5  0.1430      0.944 0.052 0.000 0.000 0.004 0.944
#> GSM486822     4  0.1430      0.945 0.052 0.004 0.000 0.944 0.000
#> GSM486824     4  0.4764      0.164 0.012 0.004 0.000 0.548 0.436
#> GSM486828     5  0.1357      0.947 0.048 0.000 0.000 0.004 0.948
#> GSM486831     4  0.0290      0.958 0.008 0.000 0.000 0.992 0.000
#> GSM486833     4  0.1430      0.945 0.052 0.004 0.000 0.944 0.000
#> GSM486835     4  0.0000      0.960 0.000 0.000 0.000 1.000 0.000
#> GSM486837     5  0.0324      0.976 0.004 0.000 0.000 0.004 0.992
#> GSM486839     4  0.0290      0.958 0.008 0.000 0.000 0.992 0.000
#> GSM486841     4  0.0000      0.960 0.000 0.000 0.000 1.000 0.000
#> GSM486843     4  0.0162      0.959 0.004 0.000 0.000 0.996 0.000
#> GSM486845     4  0.1270      0.946 0.052 0.000 0.000 0.948 0.000
#> GSM486847     5  0.1717      0.929 0.008 0.004 0.000 0.052 0.936
#> GSM486849     4  0.1197      0.948 0.048 0.000 0.000 0.952 0.000
#> GSM486851     4  0.0000      0.960 0.000 0.000 0.000 1.000 0.000
#> GSM486853     5  0.0162      0.978 0.000 0.000 0.000 0.004 0.996
#> GSM486855     4  0.0609      0.959 0.020 0.000 0.000 0.980 0.000
#> GSM486857     5  0.0162      0.978 0.000 0.000 0.000 0.004 0.996
#> GSM486736     2  0.0794      0.936 0.028 0.972 0.000 0.000 0.000
#> GSM486738     3  0.0324      0.890 0.004 0.000 0.992 0.000 0.004
#> GSM486740     2  0.0794      0.936 0.028 0.972 0.000 0.000 0.000
#> GSM486742     3  0.0324      0.890 0.004 0.000 0.992 0.000 0.004
#> GSM486744     3  0.3484      0.797 0.144 0.028 0.824 0.000 0.004
#> GSM486746     2  0.0880      0.935 0.032 0.968 0.000 0.000 0.000
#> GSM486748     3  0.0324      0.890 0.004 0.000 0.992 0.000 0.004
#> GSM486750     1  0.3177      0.981 0.792 0.000 0.208 0.000 0.000
#> GSM486752     1  0.3177      0.981 0.792 0.000 0.208 0.000 0.000
#> GSM486754     3  0.3484      0.797 0.144 0.028 0.824 0.000 0.004
#> GSM486756     2  0.2416      0.917 0.100 0.888 0.012 0.000 0.000
#> GSM486758     3  0.0703      0.884 0.024 0.000 0.976 0.000 0.000
#> GSM486760     1  0.3177      0.981 0.792 0.000 0.208 0.000 0.000
#> GSM486762     3  0.0162      0.891 0.004 0.000 0.996 0.000 0.000
#> GSM486764     3  0.2377      0.796 0.128 0.000 0.872 0.000 0.000
#> GSM486766     3  0.0000      0.891 0.000 0.000 1.000 0.000 0.000
#> GSM486768     3  0.3398      0.800 0.144 0.024 0.828 0.000 0.004
#> GSM486770     1  0.3930      0.906 0.792 0.056 0.152 0.000 0.000
#> GSM486772     1  0.3177      0.981 0.792 0.000 0.208 0.000 0.000
#> GSM486774     3  0.0162      0.891 0.004 0.000 0.996 0.000 0.000
#> GSM486776     3  0.0000      0.891 0.000 0.000 1.000 0.000 0.000
#> GSM486778     1  0.3177      0.981 0.792 0.000 0.208 0.000 0.000
#> GSM486780     3  0.0703      0.884 0.024 0.000 0.976 0.000 0.000
#> GSM486782     3  0.3398      0.800 0.144 0.024 0.828 0.000 0.004
#> GSM486784     3  0.0703      0.884 0.024 0.000 0.976 0.000 0.000
#> GSM486786     1  0.3480      0.949 0.752 0.000 0.248 0.000 0.000
#> GSM486788     1  0.3177      0.981 0.792 0.000 0.208 0.000 0.000
#> GSM486790     2  0.2909      0.894 0.140 0.848 0.012 0.000 0.000
#> GSM486792     2  0.1121      0.929 0.044 0.956 0.000 0.000 0.000
#> GSM486794     3  0.3398      0.800 0.144 0.024 0.828 0.000 0.004
#> GSM486796     1  0.3177      0.981 0.792 0.000 0.208 0.000 0.000
#> GSM486798     3  0.0703      0.884 0.024 0.000 0.976 0.000 0.000
#> GSM486800     1  0.3612      0.928 0.732 0.000 0.268 0.000 0.000
#> GSM486802     1  0.3177      0.981 0.792 0.000 0.208 0.000 0.000
#> GSM486804     3  0.2377      0.796 0.128 0.000 0.872 0.000 0.000
#> GSM486806     3  0.0000      0.891 0.000 0.000 1.000 0.000 0.000
#> GSM486808     3  0.0162      0.891 0.004 0.000 0.996 0.000 0.000
#> GSM486810     3  0.0290      0.889 0.008 0.000 0.992 0.000 0.000
#> GSM486812     1  0.3177      0.981 0.792 0.000 0.208 0.000 0.000
#> GSM486814     3  0.3398      0.800 0.144 0.024 0.828 0.000 0.004
#> GSM486816     3  0.1851      0.837 0.088 0.000 0.912 0.000 0.000
#> GSM486818     2  0.2305      0.920 0.092 0.896 0.012 0.000 0.000
#> GSM486821     3  0.3567      0.793 0.144 0.032 0.820 0.000 0.004
#> GSM486823     1  0.3177      0.981 0.792 0.000 0.208 0.000 0.000
#> GSM486826     3  0.2424      0.791 0.132 0.000 0.868 0.000 0.000
#> GSM486830     3  0.3567      0.793 0.144 0.032 0.820 0.000 0.004
#> GSM486832     3  0.0162      0.891 0.004 0.000 0.996 0.000 0.000
#> GSM486834     3  0.2690      0.757 0.156 0.000 0.844 0.000 0.000
#> GSM486836     1  0.3366      0.966 0.768 0.000 0.232 0.000 0.000
#> GSM486838     3  0.0162      0.891 0.004 0.000 0.996 0.000 0.000
#> GSM486840     3  0.2020      0.826 0.100 0.000 0.900 0.000 0.000
#> GSM486842     1  0.3366      0.966 0.768 0.000 0.232 0.000 0.000
#> GSM486844     3  0.3932      0.346 0.328 0.000 0.672 0.000 0.000
#> GSM486846     3  0.3398      0.800 0.144 0.024 0.828 0.000 0.004
#> GSM486848     3  0.0703      0.884 0.024 0.000 0.976 0.000 0.000
#> GSM486850     1  0.3177      0.981 0.792 0.000 0.208 0.000 0.000
#> GSM486852     1  0.3366      0.966 0.768 0.000 0.232 0.000 0.000
#> GSM486854     3  0.0162      0.890 0.004 0.000 0.996 0.000 0.000
#> GSM486856     3  0.0510      0.887 0.016 0.000 0.984 0.000 0.000
#> GSM486858     3  0.2424      0.791 0.132 0.000 0.868 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
#> GSM486735     5  0.3280     0.8554 0.000 0.160 0.004 0.000 0.808 0.028
#> GSM486737     4  0.0000     0.9528 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486739     5  0.3280     0.8554 0.000 0.160 0.004 0.000 0.808 0.028
#> GSM486741     4  0.0000     0.9528 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486743     4  0.0000     0.9528 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486745     5  0.3280     0.8554 0.000 0.160 0.004 0.000 0.808 0.028
#> GSM486747     4  0.0260     0.9526 0.000 0.008 0.000 0.992 0.000 0.000
#> GSM486749     5  0.0508     0.9095 0.000 0.012 0.000 0.000 0.984 0.004
#> GSM486751     5  0.0508     0.9095 0.000 0.012 0.000 0.000 0.984 0.004
#> GSM486753     4  0.0260     0.9506 0.000 0.008 0.000 0.992 0.000 0.000
#> GSM486755     4  0.2462     0.8644 0.000 0.096 0.000 0.876 0.000 0.028
#> GSM486757     4  0.3458     0.7620 0.000 0.032 0.004 0.804 0.156 0.004
#> GSM486759     5  0.0146     0.9094 0.000 0.000 0.000 0.000 0.996 0.004
#> GSM486761     4  0.0260     0.9526 0.000 0.008 0.000 0.992 0.000 0.000
#> GSM486763     5  0.0260     0.9099 0.000 0.008 0.000 0.000 0.992 0.000
#> GSM486765     4  0.0260     0.9526 0.000 0.008 0.000 0.992 0.000 0.000
#> GSM486767     4  0.0000     0.9528 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486769     5  0.3139     0.8574 0.000 0.160 0.000 0.000 0.812 0.028
#> GSM486771     5  0.1643     0.8979 0.000 0.068 0.000 0.000 0.924 0.008
#> GSM486773     4  0.0260     0.9526 0.000 0.008 0.000 0.992 0.000 0.000
#> GSM486775     4  0.0260     0.9526 0.000 0.008 0.000 0.992 0.000 0.000
#> GSM486777     5  0.0146     0.9094 0.000 0.000 0.000 0.000 0.996 0.004
#> GSM486779     4  0.3196     0.8137 0.000 0.040 0.004 0.836 0.116 0.004
#> GSM486781     4  0.0146     0.9520 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM486783     4  0.0632     0.9468 0.000 0.024 0.000 0.976 0.000 0.000
#> GSM486785     5  0.1299     0.8889 0.000 0.036 0.004 0.004 0.952 0.004
#> GSM486787     5  0.0146     0.9094 0.000 0.000 0.000 0.000 0.996 0.004
#> GSM486789     4  0.2361     0.8717 0.000 0.088 0.000 0.884 0.000 0.028
#> GSM486791     5  0.3062     0.8594 0.000 0.160 0.000 0.000 0.816 0.024
#> GSM486793     4  0.0000     0.9528 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486795     5  0.0146     0.9094 0.000 0.000 0.000 0.000 0.996 0.004
#> GSM486797     4  0.0260     0.9526 0.000 0.008 0.000 0.992 0.000 0.000
#> GSM486799     4  0.0260     0.9526 0.000 0.008 0.000 0.992 0.000 0.000
#> GSM486801     5  0.0146     0.9094 0.000 0.000 0.000 0.000 0.996 0.004
#> GSM486803     5  0.0748     0.9015 0.000 0.016 0.004 0.000 0.976 0.004
#> GSM486805     4  0.0000     0.9528 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486807     4  0.0508     0.9513 0.000 0.012 0.000 0.984 0.000 0.004
#> GSM486809     4  0.0000     0.9528 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486811     5  0.0146     0.9094 0.000 0.000 0.000 0.000 0.996 0.004
#> GSM486813     4  0.0146     0.9520 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM486815     5  0.0922     0.9040 0.000 0.024 0.004 0.000 0.968 0.004
#> GSM486817     5  0.3390     0.8530 0.000 0.160 0.000 0.008 0.804 0.028
#> GSM486819     4  0.3027     0.8099 0.000 0.148 0.000 0.824 0.000 0.028
#> GSM486822     5  0.3062     0.8594 0.000 0.160 0.000 0.000 0.816 0.024
#> GSM486824     5  0.4702     0.3514 0.000 0.040 0.004 0.344 0.608 0.004
#> GSM486828     4  0.2696     0.8449 0.000 0.116 0.000 0.856 0.000 0.028
#> GSM486831     5  0.0458     0.9051 0.000 0.016 0.000 0.000 0.984 0.000
#> GSM486833     5  0.3139     0.8574 0.000 0.160 0.000 0.000 0.812 0.028
#> GSM486835     5  0.0000     0.9092 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486837     4  0.0547     0.9486 0.000 0.020 0.000 0.980 0.000 0.000
#> GSM486839     5  0.0692     0.9020 0.000 0.020 0.004 0.000 0.976 0.000
#> GSM486841     5  0.0000     0.9092 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486843     5  0.0508     0.9047 0.000 0.012 0.004 0.000 0.984 0.000
#> GSM486845     5  0.3210     0.8548 0.000 0.168 0.000 0.000 0.804 0.028
#> GSM486847     4  0.2776     0.8471 0.000 0.032 0.004 0.860 0.104 0.000
#> GSM486849     5  0.2790     0.8709 0.000 0.132 0.000 0.000 0.844 0.024
#> GSM486851     5  0.0000     0.9092 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486853     4  0.0260     0.9519 0.000 0.008 0.000 0.992 0.000 0.000
#> GSM486855     5  0.2592     0.8840 0.000 0.116 0.004 0.000 0.864 0.016
#> GSM486857     4  0.0865     0.9401 0.000 0.036 0.000 0.964 0.000 0.000
#> GSM486736     3  0.0146     0.9931 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM486738     1  0.2300     0.7690 0.856 0.144 0.000 0.000 0.000 0.000
#> GSM486740     3  0.0146     0.9931 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM486742     1  0.2178     0.7870 0.868 0.132 0.000 0.000 0.000 0.000
#> GSM486744     2  0.3390     0.8118 0.296 0.704 0.000 0.000 0.000 0.000
#> GSM486746     3  0.0146     0.9931 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM486748     1  0.2048     0.8038 0.880 0.120 0.000 0.000 0.000 0.000
#> GSM486750     6  0.0865     0.9946 0.036 0.000 0.000 0.000 0.000 0.964
#> GSM486752     6  0.0865     0.9946 0.036 0.000 0.000 0.000 0.000 0.964
#> GSM486754     2  0.3390     0.8118 0.296 0.704 0.000 0.000 0.000 0.000
#> GSM486756     2  0.3838    -0.0119 0.000 0.552 0.448 0.000 0.000 0.000
#> GSM486758     1  0.0260     0.9274 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM486760     6  0.0865     0.9946 0.036 0.000 0.000 0.000 0.000 0.964
#> GSM486762     1  0.0000     0.9262 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486764     1  0.0865     0.9112 0.964 0.000 0.000 0.000 0.000 0.036
#> GSM486766     1  0.0260     0.9227 0.992 0.008 0.000 0.000 0.000 0.000
#> GSM486768     2  0.3390     0.8118 0.296 0.704 0.000 0.000 0.000 0.000
#> GSM486770     6  0.0935     0.9897 0.032 0.000 0.004 0.000 0.000 0.964
#> GSM486772     6  0.0865     0.9946 0.036 0.000 0.000 0.000 0.000 0.964
#> GSM486774     1  0.0000     0.9262 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486776     1  0.0000     0.9262 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486778     6  0.0865     0.9946 0.036 0.000 0.000 0.000 0.000 0.964
#> GSM486780     1  0.0260     0.9274 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM486782     2  0.3390     0.8118 0.296 0.704 0.000 0.000 0.000 0.000
#> GSM486784     1  0.0260     0.9274 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM486786     1  0.3330     0.5650 0.716 0.000 0.000 0.000 0.000 0.284
#> GSM486788     6  0.0865     0.9946 0.036 0.000 0.000 0.000 0.000 0.964
#> GSM486790     2  0.3547     0.2300 0.000 0.668 0.332 0.000 0.000 0.000
#> GSM486792     3  0.0547     0.9791 0.000 0.000 0.980 0.000 0.000 0.020
#> GSM486794     2  0.3390     0.8118 0.296 0.704 0.000 0.000 0.000 0.000
#> GSM486796     6  0.0865     0.9946 0.036 0.000 0.000 0.000 0.000 0.964
#> GSM486798     1  0.0260     0.9274 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM486800     6  0.1285     0.9776 0.052 0.004 0.000 0.000 0.000 0.944
#> GSM486802     6  0.0865     0.9946 0.036 0.000 0.000 0.000 0.000 0.964
#> GSM486804     1  0.0790     0.9140 0.968 0.000 0.000 0.000 0.000 0.032
#> GSM486806     1  0.0260     0.9227 0.992 0.008 0.000 0.000 0.000 0.000
#> GSM486808     1  0.0000     0.9262 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486810     1  0.0146     0.9248 0.996 0.004 0.000 0.000 0.000 0.000
#> GSM486812     6  0.0865     0.9946 0.036 0.000 0.000 0.000 0.000 0.964
#> GSM486814     2  0.3390     0.8118 0.296 0.704 0.000 0.000 0.000 0.000
#> GSM486816     1  0.0363     0.9258 0.988 0.000 0.000 0.000 0.000 0.012
#> GSM486818     2  0.3854    -0.0564 0.000 0.536 0.464 0.000 0.000 0.000
#> GSM486821     2  0.3050     0.7735 0.236 0.764 0.000 0.000 0.000 0.000
#> GSM486823     6  0.0865     0.9946 0.036 0.000 0.000 0.000 0.000 0.964
#> GSM486826     1  0.0865     0.9110 0.964 0.000 0.000 0.000 0.000 0.036
#> GSM486830     2  0.3023     0.7749 0.232 0.768 0.000 0.000 0.000 0.000
#> GSM486832     1  0.0000     0.9262 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486834     1  0.4034     0.4595 0.652 0.020 0.000 0.000 0.000 0.328
#> GSM486836     6  0.1075     0.9850 0.048 0.000 0.000 0.000 0.000 0.952
#> GSM486838     1  0.0000     0.9262 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486840     1  0.0632     0.9194 0.976 0.000 0.000 0.000 0.000 0.024
#> GSM486842     6  0.1075     0.9850 0.048 0.000 0.000 0.000 0.000 0.952
#> GSM486844     1  0.2048     0.8102 0.880 0.000 0.000 0.000 0.000 0.120
#> GSM486846     2  0.3390     0.8118 0.296 0.704 0.000 0.000 0.000 0.000
#> GSM486848     1  0.0260     0.9274 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM486850     6  0.0865     0.9946 0.036 0.000 0.000 0.000 0.000 0.964
#> GSM486852     6  0.1075     0.9850 0.048 0.000 0.000 0.000 0.000 0.952
#> GSM486854     1  0.0632     0.9110 0.976 0.024 0.000 0.000 0.000 0.000
#> GSM486856     1  0.0260     0.9274 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM486858     1  0.0937     0.9073 0.960 0.000 0.000 0.000 0.000 0.040

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 agent(p) individual(p) k
#> ATC:skmeans 120 4.67e-27         1.000 2
#> ATC:skmeans 120 8.76e-27         1.000 3
#> ATC:skmeans 119 1.27e-25         1.000 4
#> ATC:skmeans 118 1.43e-24         0.997 5
#> ATC:skmeans 115 3.59e-23         0.992 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 120 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 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-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.998       0.999         0.5047 0.496   0.496
#> 3 3 0.722           0.883       0.827         0.2435 0.866   0.731
#> 4 4 0.894           0.879       0.945         0.1872 0.871   0.659
#> 5 5 0.857           0.845       0.927         0.0349 0.977   0.911
#> 6 6 0.886           0.851       0.916         0.0355 0.945   0.777

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
#> GSM486735     1   0.000      1.000 1.000 0.000
#> GSM486737     1   0.000      1.000 1.000 0.000
#> GSM486739     1   0.000      1.000 1.000 0.000
#> GSM486741     1   0.000      1.000 1.000 0.000
#> GSM486743     1   0.000      1.000 1.000 0.000
#> GSM486745     1   0.000      1.000 1.000 0.000
#> GSM486747     1   0.000      1.000 1.000 0.000
#> GSM486749     1   0.000      1.000 1.000 0.000
#> GSM486751     1   0.000      1.000 1.000 0.000
#> GSM486753     1   0.000      1.000 1.000 0.000
#> GSM486755     1   0.000      1.000 1.000 0.000
#> GSM486757     1   0.000      1.000 1.000 0.000
#> GSM486759     1   0.000      1.000 1.000 0.000
#> GSM486761     1   0.000      1.000 1.000 0.000
#> GSM486763     1   0.000      1.000 1.000 0.000
#> GSM486765     1   0.000      1.000 1.000 0.000
#> GSM486767     1   0.000      1.000 1.000 0.000
#> GSM486769     1   0.000      1.000 1.000 0.000
#> GSM486771     1   0.000      1.000 1.000 0.000
#> GSM486773     1   0.000      1.000 1.000 0.000
#> GSM486775     1   0.000      1.000 1.000 0.000
#> GSM486777     1   0.000      1.000 1.000 0.000
#> GSM486779     1   0.000      1.000 1.000 0.000
#> GSM486781     1   0.000      1.000 1.000 0.000
#> GSM486783     1   0.000      1.000 1.000 0.000
#> GSM486785     1   0.000      1.000 1.000 0.000
#> GSM486787     1   0.000      1.000 1.000 0.000
#> GSM486789     1   0.000      1.000 1.000 0.000
#> GSM486791     1   0.000      1.000 1.000 0.000
#> GSM486793     1   0.000      1.000 1.000 0.000
#> GSM486795     1   0.000      1.000 1.000 0.000
#> GSM486797     1   0.000      1.000 1.000 0.000
#> GSM486799     1   0.000      1.000 1.000 0.000
#> GSM486801     1   0.000      1.000 1.000 0.000
#> GSM486803     1   0.000      1.000 1.000 0.000
#> GSM486805     1   0.000      1.000 1.000 0.000
#> GSM486807     1   0.000      1.000 1.000 0.000
#> GSM486809     1   0.000      1.000 1.000 0.000
#> GSM486811     1   0.000      1.000 1.000 0.000
#> GSM486813     1   0.000      1.000 1.000 0.000
#> GSM486815     1   0.000      1.000 1.000 0.000
#> GSM486817     1   0.000      1.000 1.000 0.000
#> GSM486819     1   0.000      1.000 1.000 0.000
#> GSM486822     1   0.000      1.000 1.000 0.000
#> GSM486824     1   0.000      1.000 1.000 0.000
#> GSM486828     1   0.000      1.000 1.000 0.000
#> GSM486831     1   0.000      1.000 1.000 0.000
#> GSM486833     1   0.000      1.000 1.000 0.000
#> GSM486835     1   0.000      1.000 1.000 0.000
#> GSM486837     1   0.000      1.000 1.000 0.000
#> GSM486839     1   0.000      1.000 1.000 0.000
#> GSM486841     1   0.000      1.000 1.000 0.000
#> GSM486843     1   0.000      1.000 1.000 0.000
#> GSM486845     1   0.000      1.000 1.000 0.000
#> GSM486847     1   0.000      1.000 1.000 0.000
#> GSM486849     1   0.000      1.000 1.000 0.000
#> GSM486851     1   0.000      1.000 1.000 0.000
#> GSM486853     1   0.000      1.000 1.000 0.000
#> GSM486855     1   0.000      1.000 1.000 0.000
#> GSM486857     1   0.000      1.000 1.000 0.000
#> GSM486736     2   0.506      0.874 0.112 0.888
#> GSM486738     2   0.000      0.998 0.000 1.000
#> GSM486740     2   0.000      0.998 0.000 1.000
#> GSM486742     2   0.000      0.998 0.000 1.000
#> GSM486744     2   0.000      0.998 0.000 1.000
#> GSM486746     2   0.000      0.998 0.000 1.000
#> GSM486748     2   0.000      0.998 0.000 1.000
#> GSM486750     2   0.000      0.998 0.000 1.000
#> GSM486752     2   0.000      0.998 0.000 1.000
#> GSM486754     2   0.000      0.998 0.000 1.000
#> GSM486756     2   0.000      0.998 0.000 1.000
#> GSM486758     2   0.000      0.998 0.000 1.000
#> GSM486760     2   0.000      0.998 0.000 1.000
#> GSM486762     2   0.000      0.998 0.000 1.000
#> GSM486764     2   0.000      0.998 0.000 1.000
#> GSM486766     2   0.000      0.998 0.000 1.000
#> GSM486768     2   0.000      0.998 0.000 1.000
#> GSM486770     2   0.000      0.998 0.000 1.000
#> GSM486772     2   0.000      0.998 0.000 1.000
#> GSM486774     2   0.000      0.998 0.000 1.000
#> GSM486776     2   0.000      0.998 0.000 1.000
#> GSM486778     2   0.000      0.998 0.000 1.000
#> GSM486780     2   0.000      0.998 0.000 1.000
#> GSM486782     2   0.000      0.998 0.000 1.000
#> GSM486784     2   0.000      0.998 0.000 1.000
#> GSM486786     2   0.000      0.998 0.000 1.000
#> GSM486788     2   0.000      0.998 0.000 1.000
#> GSM486790     2   0.000      0.998 0.000 1.000
#> GSM486792     2   0.000      0.998 0.000 1.000
#> GSM486794     2   0.000      0.998 0.000 1.000
#> GSM486796     2   0.000      0.998 0.000 1.000
#> GSM486798     2   0.000      0.998 0.000 1.000
#> GSM486800     2   0.000      0.998 0.000 1.000
#> GSM486802     2   0.000      0.998 0.000 1.000
#> GSM486804     2   0.000      0.998 0.000 1.000
#> GSM486806     2   0.000      0.998 0.000 1.000
#> GSM486808     2   0.000      0.998 0.000 1.000
#> GSM486810     2   0.000      0.998 0.000 1.000
#> GSM486812     2   0.000      0.998 0.000 1.000
#> GSM486814     2   0.000      0.998 0.000 1.000
#> GSM486816     2   0.000      0.998 0.000 1.000
#> GSM486818     2   0.000      0.998 0.000 1.000
#> GSM486821     2   0.000      0.998 0.000 1.000
#> GSM486823     2   0.000      0.998 0.000 1.000
#> GSM486826     2   0.000      0.998 0.000 1.000
#> GSM486830     2   0.000      0.998 0.000 1.000
#> GSM486832     2   0.000      0.998 0.000 1.000
#> GSM486834     2   0.000      0.998 0.000 1.000
#> GSM486836     2   0.000      0.998 0.000 1.000
#> GSM486838     2   0.000      0.998 0.000 1.000
#> GSM486840     2   0.000      0.998 0.000 1.000
#> GSM486842     2   0.000      0.998 0.000 1.000
#> GSM486844     2   0.000      0.998 0.000 1.000
#> GSM486846     2   0.000      0.998 0.000 1.000
#> GSM486848     2   0.000      0.998 0.000 1.000
#> GSM486850     2   0.000      0.998 0.000 1.000
#> GSM486852     2   0.000      0.998 0.000 1.000
#> GSM486854     2   0.000      0.998 0.000 1.000
#> GSM486856     2   0.000      0.998 0.000 1.000
#> GSM486858     2   0.000      0.998 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
#> GSM486735     1  0.6244    0.89794 0.560 0.440 0.000
#> GSM486737     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486739     1  0.6244    0.89794 0.560 0.440 0.000
#> GSM486741     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486743     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486745     1  0.6244    0.89794 0.560 0.440 0.000
#> GSM486747     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486749     1  0.6126    0.93875 0.600 0.400 0.000
#> GSM486751     1  0.6126    0.93875 0.600 0.400 0.000
#> GSM486753     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486755     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486757     2  0.2625    0.85149 0.084 0.916 0.000
#> GSM486759     1  0.6126    0.93875 0.600 0.400 0.000
#> GSM486761     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486763     1  0.6126    0.93875 0.600 0.400 0.000
#> GSM486765     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486767     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486769     1  0.6140    0.93502 0.596 0.404 0.000
#> GSM486771     1  0.6126    0.93875 0.600 0.400 0.000
#> GSM486773     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486775     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486777     1  0.6126    0.93875 0.600 0.400 0.000
#> GSM486779     2  0.1860    0.90728 0.052 0.948 0.000
#> GSM486781     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486783     2  0.0237    0.97324 0.004 0.996 0.000
#> GSM486785     2  0.4796    0.48271 0.220 0.780 0.000
#> GSM486787     1  0.6126    0.93875 0.600 0.400 0.000
#> GSM486789     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486791     1  0.6126    0.93875 0.600 0.400 0.000
#> GSM486793     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486795     1  0.6126    0.93875 0.600 0.400 0.000
#> GSM486797     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486799     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486801     1  0.6126    0.93875 0.600 0.400 0.000
#> GSM486803     1  0.6126    0.93875 0.600 0.400 0.000
#> GSM486805     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486807     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486809     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486811     1  0.6126    0.93875 0.600 0.400 0.000
#> GSM486813     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486815     1  0.6126    0.93875 0.600 0.400 0.000
#> GSM486817     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486819     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486822     1  0.6244    0.89794 0.560 0.440 0.000
#> GSM486824     2  0.2796    0.83892 0.092 0.908 0.000
#> GSM486828     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486831     2  0.0237    0.97324 0.004 0.996 0.000
#> GSM486833     1  0.6309    0.79144 0.504 0.496 0.000
#> GSM486835     1  0.6126    0.93875 0.600 0.400 0.000
#> GSM486837     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486839     2  0.0237    0.97324 0.004 0.996 0.000
#> GSM486841     1  0.6126    0.93875 0.600 0.400 0.000
#> GSM486843     1  0.6126    0.93875 0.600 0.400 0.000
#> GSM486845     1  0.6244    0.89794 0.560 0.440 0.000
#> GSM486847     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486849     1  0.6126    0.93875 0.600 0.400 0.000
#> GSM486851     1  0.6126    0.93875 0.600 0.400 0.000
#> GSM486853     2  0.0000    0.97710 0.000 1.000 0.000
#> GSM486855     2  0.0747    0.95916 0.016 0.984 0.000
#> GSM486857     2  0.0424    0.96870 0.008 0.992 0.000
#> GSM486736     1  0.6280    0.00391 0.540 0.000 0.460
#> GSM486738     3  0.0747    0.87135 0.016 0.000 0.984
#> GSM486740     3  0.2711    0.84985 0.088 0.000 0.912
#> GSM486742     3  0.0000    0.87110 0.000 0.000 1.000
#> GSM486744     3  0.0000    0.87110 0.000 0.000 1.000
#> GSM486746     3  0.1860    0.86649 0.052 0.000 0.948
#> GSM486748     3  0.0000    0.87110 0.000 0.000 1.000
#> GSM486750     3  0.6111    0.78362 0.396 0.000 0.604
#> GSM486752     3  0.6111    0.78362 0.396 0.000 0.604
#> GSM486754     3  0.0000    0.87110 0.000 0.000 1.000
#> GSM486756     3  0.0237    0.86985 0.004 0.000 0.996
#> GSM486758     3  0.1529    0.87058 0.040 0.000 0.960
#> GSM486760     3  0.6111    0.78362 0.396 0.000 0.604
#> GSM486762     3  0.0592    0.87206 0.012 0.000 0.988
#> GSM486764     3  0.6079    0.78627 0.388 0.000 0.612
#> GSM486766     3  0.0000    0.87110 0.000 0.000 1.000
#> GSM486768     3  0.0000    0.87110 0.000 0.000 1.000
#> GSM486770     3  0.5058    0.82154 0.244 0.000 0.756
#> GSM486772     3  0.6111    0.78362 0.396 0.000 0.604
#> GSM486774     3  0.1031    0.87197 0.024 0.000 0.976
#> GSM486776     3  0.0000    0.87110 0.000 0.000 1.000
#> GSM486778     3  0.6111    0.78362 0.396 0.000 0.604
#> GSM486780     3  0.0592    0.87206 0.012 0.000 0.988
#> GSM486782     3  0.0000    0.87110 0.000 0.000 1.000
#> GSM486784     3  0.4002    0.84831 0.160 0.000 0.840
#> GSM486786     3  0.6111    0.78362 0.396 0.000 0.604
#> GSM486788     3  0.6111    0.78362 0.396 0.000 0.604
#> GSM486790     3  0.0237    0.86985 0.004 0.000 0.996
#> GSM486792     3  0.4931    0.82504 0.232 0.000 0.768
#> GSM486794     3  0.0000    0.87110 0.000 0.000 1.000
#> GSM486796     3  0.6111    0.78362 0.396 0.000 0.604
#> GSM486798     3  0.4235    0.84747 0.176 0.000 0.824
#> GSM486800     3  0.5363    0.81740 0.276 0.000 0.724
#> GSM486802     3  0.6111    0.78362 0.396 0.000 0.604
#> GSM486804     3  0.6095    0.78502 0.392 0.000 0.608
#> GSM486806     3  0.0000    0.87110 0.000 0.000 1.000
#> GSM486808     3  0.0592    0.87206 0.012 0.000 0.988
#> GSM486810     3  0.0000    0.87110 0.000 0.000 1.000
#> GSM486812     3  0.6111    0.78362 0.396 0.000 0.604
#> GSM486814     3  0.0000    0.87110 0.000 0.000 1.000
#> GSM486816     3  0.0592    0.87206 0.012 0.000 0.988
#> GSM486818     3  0.0237    0.86985 0.004 0.000 0.996
#> GSM486821     3  0.0000    0.87110 0.000 0.000 1.000
#> GSM486823     3  0.4346    0.84361 0.184 0.000 0.816
#> GSM486826     3  0.4796    0.83825 0.220 0.000 0.780
#> GSM486830     3  0.0000    0.87110 0.000 0.000 1.000
#> GSM486832     3  0.0592    0.87206 0.012 0.000 0.988
#> GSM486834     3  0.0000    0.87110 0.000 0.000 1.000
#> GSM486836     3  0.6111    0.78362 0.396 0.000 0.604
#> GSM486838     3  0.0592    0.87206 0.012 0.000 0.988
#> GSM486840     3  0.4842    0.83665 0.224 0.000 0.776
#> GSM486842     3  0.6111    0.78362 0.396 0.000 0.604
#> GSM486844     3  0.6111    0.78362 0.396 0.000 0.604
#> GSM486846     3  0.0000    0.87110 0.000 0.000 1.000
#> GSM486848     3  0.0592    0.87206 0.012 0.000 0.988
#> GSM486850     3  0.6111    0.78362 0.396 0.000 0.604
#> GSM486852     3  0.6111    0.78362 0.396 0.000 0.604
#> GSM486854     3  0.0000    0.87110 0.000 0.000 1.000
#> GSM486856     3  0.3941    0.84924 0.156 0.000 0.844
#> GSM486858     3  0.4062    0.84828 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
#> GSM486735     4  0.1474     0.9238 0.052 0.000 0.000 0.948
#> GSM486737     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486739     4  0.1389     0.9267 0.048 0.000 0.000 0.952
#> GSM486741     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486743     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486745     4  0.1389     0.9267 0.048 0.000 0.000 0.952
#> GSM486747     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486749     4  0.0000     0.9549 0.000 0.000 0.000 1.000
#> GSM486751     4  0.0000     0.9549 0.000 0.000 0.000 1.000
#> GSM486753     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486755     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486757     1  0.3907     0.7102 0.768 0.000 0.000 0.232
#> GSM486759     4  0.0000     0.9549 0.000 0.000 0.000 1.000
#> GSM486761     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486763     4  0.0000     0.9549 0.000 0.000 0.000 1.000
#> GSM486765     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486767     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486769     4  0.0188     0.9526 0.004 0.000 0.000 0.996
#> GSM486771     4  0.0000     0.9549 0.000 0.000 0.000 1.000
#> GSM486773     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486775     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486777     4  0.0000     0.9549 0.000 0.000 0.000 1.000
#> GSM486779     1  0.3172     0.8159 0.840 0.000 0.000 0.160
#> GSM486781     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486783     1  0.0188     0.9757 0.996 0.000 0.000 0.004
#> GSM486785     4  0.4998    -0.0144 0.488 0.000 0.000 0.512
#> GSM486787     4  0.0000     0.9549 0.000 0.000 0.000 1.000
#> GSM486789     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486791     4  0.0000     0.9549 0.000 0.000 0.000 1.000
#> GSM486793     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486795     4  0.0000     0.9549 0.000 0.000 0.000 1.000
#> GSM486797     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486799     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486801     4  0.0000     0.9549 0.000 0.000 0.000 1.000
#> GSM486803     4  0.0000     0.9549 0.000 0.000 0.000 1.000
#> GSM486805     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486807     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486809     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486811     4  0.0000     0.9549 0.000 0.000 0.000 1.000
#> GSM486813     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486815     4  0.0000     0.9549 0.000 0.000 0.000 1.000
#> GSM486817     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486819     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486822     4  0.1474     0.9238 0.052 0.000 0.000 0.948
#> GSM486824     1  0.3942     0.7096 0.764 0.000 0.000 0.236
#> GSM486828     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486831     1  0.0469     0.9703 0.988 0.000 0.000 0.012
#> GSM486833     4  0.3649     0.7537 0.204 0.000 0.000 0.796
#> GSM486835     4  0.0000     0.9549 0.000 0.000 0.000 1.000
#> GSM486837     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486839     1  0.0188     0.9757 0.996 0.000 0.000 0.004
#> GSM486841     4  0.0000     0.9549 0.000 0.000 0.000 1.000
#> GSM486843     4  0.0000     0.9549 0.000 0.000 0.000 1.000
#> GSM486845     4  0.2149     0.8907 0.088 0.000 0.000 0.912
#> GSM486847     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486849     4  0.0000     0.9549 0.000 0.000 0.000 1.000
#> GSM486851     4  0.0000     0.9549 0.000 0.000 0.000 1.000
#> GSM486853     1  0.0000     0.9783 1.000 0.000 0.000 0.000
#> GSM486855     1  0.1302     0.9427 0.956 0.000 0.000 0.044
#> GSM486857     1  0.0336     0.9729 0.992 0.000 0.000 0.008
#> GSM486736     2  0.7055     0.0327 0.000 0.480 0.396 0.124
#> GSM486738     2  0.1474     0.8692 0.000 0.948 0.052 0.000
#> GSM486740     2  0.4866     0.2823 0.000 0.596 0.404 0.000
#> GSM486742     2  0.0000     0.9020 0.000 1.000 0.000 0.000
#> GSM486744     2  0.0000     0.9020 0.000 1.000 0.000 0.000
#> GSM486746     2  0.4866     0.2823 0.000 0.596 0.404 0.000
#> GSM486748     2  0.0000     0.9020 0.000 1.000 0.000 0.000
#> GSM486750     3  0.0592     0.9276 0.000 0.016 0.984 0.000
#> GSM486752     3  0.0592     0.9276 0.000 0.016 0.984 0.000
#> GSM486754     2  0.0000     0.9020 0.000 1.000 0.000 0.000
#> GSM486756     2  0.0592     0.8924 0.000 0.984 0.016 0.000
#> GSM486758     2  0.1474     0.8799 0.000 0.948 0.052 0.000
#> GSM486760     3  0.0592     0.9276 0.000 0.016 0.984 0.000
#> GSM486762     2  0.0817     0.8963 0.000 0.976 0.024 0.000
#> GSM486764     3  0.3400     0.7529 0.000 0.180 0.820 0.000
#> GSM486766     2  0.0000     0.9020 0.000 1.000 0.000 0.000
#> GSM486768     2  0.0000     0.9020 0.000 1.000 0.000 0.000
#> GSM486770     3  0.3942     0.7138 0.000 0.236 0.764 0.000
#> GSM486772     3  0.0592     0.9276 0.000 0.016 0.984 0.000
#> GSM486774     2  0.1389     0.8828 0.000 0.952 0.048 0.000
#> GSM486776     2  0.0000     0.9020 0.000 1.000 0.000 0.000
#> GSM486778     3  0.0592     0.9276 0.000 0.016 0.984 0.000
#> GSM486780     2  0.0817     0.8963 0.000 0.976 0.024 0.000
#> GSM486782     2  0.0000     0.9020 0.000 1.000 0.000 0.000
#> GSM486784     2  0.3873     0.7050 0.000 0.772 0.228 0.000
#> GSM486786     3  0.0592     0.9276 0.000 0.016 0.984 0.000
#> GSM486788     3  0.0592     0.9276 0.000 0.016 0.984 0.000
#> GSM486790     2  0.0592     0.8924 0.000 0.984 0.016 0.000
#> GSM486792     3  0.4008     0.6854 0.000 0.244 0.756 0.000
#> GSM486794     2  0.0000     0.9020 0.000 1.000 0.000 0.000
#> GSM486796     3  0.0592     0.9276 0.000 0.016 0.984 0.000
#> GSM486798     2  0.4222     0.6542 0.000 0.728 0.272 0.000
#> GSM486800     3  0.3486     0.7720 0.000 0.188 0.812 0.000
#> GSM486802     3  0.0592     0.9276 0.000 0.016 0.984 0.000
#> GSM486804     3  0.2345     0.8555 0.000 0.100 0.900 0.000
#> GSM486806     2  0.0000     0.9020 0.000 1.000 0.000 0.000
#> GSM486808     2  0.0817     0.8963 0.000 0.976 0.024 0.000
#> GSM486810     2  0.0000     0.9020 0.000 1.000 0.000 0.000
#> GSM486812     3  0.0592     0.9276 0.000 0.016 0.984 0.000
#> GSM486814     2  0.0000     0.9020 0.000 1.000 0.000 0.000
#> GSM486816     2  0.0817     0.8963 0.000 0.976 0.024 0.000
#> GSM486818     2  0.0592     0.8924 0.000 0.984 0.016 0.000
#> GSM486821     2  0.0000     0.9020 0.000 1.000 0.000 0.000
#> GSM486823     3  0.4697     0.4861 0.000 0.356 0.644 0.000
#> GSM486826     2  0.4564     0.5529 0.000 0.672 0.328 0.000
#> GSM486830     2  0.0000     0.9020 0.000 1.000 0.000 0.000
#> GSM486832     2  0.0817     0.8963 0.000 0.976 0.024 0.000
#> GSM486834     2  0.0000     0.9020 0.000 1.000 0.000 0.000
#> GSM486836     3  0.0592     0.9276 0.000 0.016 0.984 0.000
#> GSM486838     2  0.0817     0.8963 0.000 0.976 0.024 0.000
#> GSM486840     2  0.4624     0.5279 0.000 0.660 0.340 0.000
#> GSM486842     3  0.0592     0.9276 0.000 0.016 0.984 0.000
#> GSM486844     3  0.0592     0.9276 0.000 0.016 0.984 0.000
#> GSM486846     2  0.0000     0.9020 0.000 1.000 0.000 0.000
#> GSM486848     2  0.0817     0.8963 0.000 0.976 0.024 0.000
#> GSM486850     3  0.0592     0.9276 0.000 0.016 0.984 0.000
#> GSM486852     3  0.0592     0.9276 0.000 0.016 0.984 0.000
#> GSM486854     2  0.0000     0.9020 0.000 1.000 0.000 0.000
#> GSM486856     2  0.3801     0.7148 0.000 0.780 0.220 0.000
#> GSM486858     2  0.3907     0.7013 0.000 0.768 0.232 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
#> GSM486735     4  0.1270     0.9093 0.000 0.000 0.000 0.948 0.052
#> GSM486737     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486739     4  0.1197     0.9127 0.000 0.000 0.000 0.952 0.048
#> GSM486741     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486743     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486745     4  0.1197     0.9127 0.000 0.000 0.000 0.952 0.048
#> GSM486747     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486749     4  0.0000     0.9466 0.000 0.000 0.000 1.000 0.000
#> GSM486751     4  0.0000     0.9466 0.000 0.000 0.000 1.000 0.000
#> GSM486753     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486755     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486757     5  0.3366     0.7011 0.000 0.000 0.000 0.232 0.768
#> GSM486759     4  0.0000     0.9466 0.000 0.000 0.000 1.000 0.000
#> GSM486761     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486763     4  0.0000     0.9466 0.000 0.000 0.000 1.000 0.000
#> GSM486765     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486767     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486769     4  0.0162     0.9439 0.000 0.000 0.000 0.996 0.004
#> GSM486771     4  0.0000     0.9466 0.000 0.000 0.000 1.000 0.000
#> GSM486773     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486775     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486777     4  0.0000     0.9466 0.000 0.000 0.000 1.000 0.000
#> GSM486779     5  0.2732     0.8015 0.000 0.000 0.000 0.160 0.840
#> GSM486781     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486783     5  0.0162     0.9723 0.000 0.000 0.000 0.004 0.996
#> GSM486785     4  0.4305    -0.0141 0.000 0.000 0.000 0.512 0.488
#> GSM486787     4  0.0000     0.9466 0.000 0.000 0.000 1.000 0.000
#> GSM486789     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486791     4  0.0000     0.9466 0.000 0.000 0.000 1.000 0.000
#> GSM486793     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486795     4  0.0000     0.9466 0.000 0.000 0.000 1.000 0.000
#> GSM486797     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486799     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486801     4  0.0000     0.9466 0.000 0.000 0.000 1.000 0.000
#> GSM486803     4  0.0000     0.9466 0.000 0.000 0.000 1.000 0.000
#> GSM486805     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486807     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486809     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486811     4  0.0000     0.9466 0.000 0.000 0.000 1.000 0.000
#> GSM486813     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486815     4  0.0000     0.9466 0.000 0.000 0.000 1.000 0.000
#> GSM486817     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486819     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486822     4  0.1270     0.9093 0.000 0.000 0.000 0.948 0.052
#> GSM486824     5  0.3395     0.6994 0.000 0.000 0.000 0.236 0.764
#> GSM486828     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486831     5  0.0404     0.9662 0.000 0.000 0.000 0.012 0.988
#> GSM486833     4  0.3143     0.7083 0.000 0.000 0.000 0.796 0.204
#> GSM486835     4  0.0000     0.9466 0.000 0.000 0.000 1.000 0.000
#> GSM486837     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486839     5  0.0162     0.9723 0.000 0.000 0.000 0.004 0.996
#> GSM486841     4  0.0000     0.9466 0.000 0.000 0.000 1.000 0.000
#> GSM486843     4  0.0000     0.9466 0.000 0.000 0.000 1.000 0.000
#> GSM486845     4  0.1851     0.8688 0.000 0.000 0.000 0.912 0.088
#> GSM486847     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486849     4  0.0000     0.9466 0.000 0.000 0.000 1.000 0.000
#> GSM486851     4  0.0000     0.9466 0.000 0.000 0.000 1.000 0.000
#> GSM486853     5  0.0000     0.9753 0.000 0.000 0.000 0.000 1.000
#> GSM486855     5  0.1121     0.9354 0.000 0.000 0.000 0.044 0.956
#> GSM486857     5  0.0290     0.9691 0.000 0.000 0.000 0.008 0.992
#> GSM486736     2  0.1544     0.8100 0.068 0.932 0.000 0.000 0.000
#> GSM486738     3  0.3003     0.7206 0.188 0.000 0.812 0.000 0.000
#> GSM486740     2  0.1544     0.8100 0.068 0.932 0.000 0.000 0.000
#> GSM486742     3  0.2648     0.7557 0.152 0.000 0.848 0.000 0.000
#> GSM486744     3  0.4049     0.7516 0.056 0.164 0.780 0.000 0.000
#> GSM486746     2  0.1544     0.8100 0.068 0.932 0.000 0.000 0.000
#> GSM486748     3  0.1544     0.8167 0.068 0.000 0.932 0.000 0.000
#> GSM486750     1  0.0000     0.8848 1.000 0.000 0.000 0.000 0.000
#> GSM486752     1  0.0000     0.8848 1.000 0.000 0.000 0.000 0.000
#> GSM486754     3  0.3771     0.7659 0.040 0.164 0.796 0.000 0.000
#> GSM486756     3  0.4287     0.2616 0.000 0.460 0.540 0.000 0.000
#> GSM486758     3  0.2046     0.7893 0.016 0.068 0.916 0.000 0.000
#> GSM486760     1  0.0000     0.8848 1.000 0.000 0.000 0.000 0.000
#> GSM486762     3  0.0000     0.8266 0.000 0.000 1.000 0.000 0.000
#> GSM486764     1  0.4708     0.6729 0.712 0.068 0.220 0.000 0.000
#> GSM486766     3  0.1430     0.8268 0.004 0.052 0.944 0.000 0.000
#> GSM486768     3  0.2773     0.7917 0.000 0.164 0.836 0.000 0.000
#> GSM486770     1  0.2462     0.7726 0.880 0.008 0.112 0.000 0.000
#> GSM486772     1  0.0000     0.8848 1.000 0.000 0.000 0.000 0.000
#> GSM486774     3  0.0404     0.8246 0.012 0.000 0.988 0.000 0.000
#> GSM486776     3  0.0000     0.8266 0.000 0.000 1.000 0.000 0.000
#> GSM486778     1  0.0000     0.8848 1.000 0.000 0.000 0.000 0.000
#> GSM486780     3  0.1544     0.7978 0.000 0.068 0.932 0.000 0.000
#> GSM486782     3  0.2773     0.7917 0.000 0.164 0.836 0.000 0.000
#> GSM486784     3  0.3814     0.6925 0.124 0.068 0.808 0.000 0.000
#> GSM486786     1  0.2645     0.8404 0.888 0.068 0.044 0.000 0.000
#> GSM486788     1  0.0000     0.8848 1.000 0.000 0.000 0.000 0.000
#> GSM486790     3  0.3366     0.7280 0.000 0.232 0.768 0.000 0.000
#> GSM486792     2  0.2074     0.7735 0.104 0.896 0.000 0.000 0.000
#> GSM486794     3  0.2732     0.7938 0.000 0.160 0.840 0.000 0.000
#> GSM486796     1  0.0000     0.8848 1.000 0.000 0.000 0.000 0.000
#> GSM486798     3  0.3814     0.6925 0.124 0.068 0.808 0.000 0.000
#> GSM486800     1  0.2280     0.7867 0.880 0.000 0.120 0.000 0.000
#> GSM486802     1  0.0000     0.8848 1.000 0.000 0.000 0.000 0.000
#> GSM486804     1  0.4708     0.6729 0.712 0.068 0.220 0.000 0.000
#> GSM486806     3  0.1732     0.8220 0.000 0.080 0.920 0.000 0.000
#> GSM486808     3  0.0000     0.8266 0.000 0.000 1.000 0.000 0.000
#> GSM486810     3  0.2230     0.8122 0.000 0.116 0.884 0.000 0.000
#> GSM486812     1  0.0000     0.8848 1.000 0.000 0.000 0.000 0.000
#> GSM486814     3  0.2773     0.7917 0.000 0.164 0.836 0.000 0.000
#> GSM486816     3  0.1544     0.7978 0.000 0.068 0.932 0.000 0.000
#> GSM486818     2  0.4307    -0.2935 0.000 0.504 0.496 0.000 0.000
#> GSM486821     3  0.2773     0.7917 0.000 0.164 0.836 0.000 0.000
#> GSM486823     1  0.3561     0.5587 0.740 0.000 0.260 0.000 0.000
#> GSM486826     3  0.4618     0.5785 0.208 0.068 0.724 0.000 0.000
#> GSM486830     3  0.2773     0.7917 0.000 0.164 0.836 0.000 0.000
#> GSM486832     3  0.0000     0.8266 0.000 0.000 1.000 0.000 0.000
#> GSM486834     3  0.3983     0.7556 0.052 0.164 0.784 0.000 0.000
#> GSM486836     1  0.1544     0.8609 0.932 0.068 0.000 0.000 0.000
#> GSM486838     3  0.0000     0.8266 0.000 0.000 1.000 0.000 0.000
#> GSM486840     3  0.4679     0.5660 0.216 0.068 0.716 0.000 0.000
#> GSM486842     1  0.2992     0.8246 0.868 0.068 0.064 0.000 0.000
#> GSM486844     1  0.4455     0.7073 0.744 0.068 0.188 0.000 0.000
#> GSM486846     3  0.2773     0.7917 0.000 0.164 0.836 0.000 0.000
#> GSM486848     3  0.0000     0.8266 0.000 0.000 1.000 0.000 0.000
#> GSM486850     1  0.0000     0.8848 1.000 0.000 0.000 0.000 0.000
#> GSM486852     1  0.1282     0.8712 0.952 0.044 0.004 0.000 0.000
#> GSM486854     3  0.0000     0.8266 0.000 0.000 1.000 0.000 0.000
#> GSM486856     3  0.2179     0.7601 0.112 0.000 0.888 0.000 0.000
#> GSM486858     3  0.3814     0.6925 0.124 0.068 0.808 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
#> GSM486735     5  0.1749     0.9005 0.016 0.000 0.004 0.044 0.932 0.004
#> GSM486737     4  0.0000     0.9729 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486739     5  0.1680     0.9040 0.016 0.000 0.004 0.040 0.936 0.004
#> GSM486741     4  0.0000     0.9729 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486743     4  0.0000     0.9729 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486745     5  0.1680     0.9040 0.016 0.000 0.004 0.040 0.936 0.004
#> GSM486747     4  0.0000     0.9729 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486749     5  0.0000     0.9417 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486751     5  0.0000     0.9417 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486753     4  0.0000     0.9729 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486755     4  0.0291     0.9704 0.004 0.000 0.000 0.992 0.000 0.004
#> GSM486757     4  0.2883     0.7205 0.000 0.000 0.000 0.788 0.212 0.000
#> GSM486759     5  0.0000     0.9417 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486761     4  0.0000     0.9729 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486763     5  0.0000     0.9417 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486765     4  0.0000     0.9729 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486767     4  0.0000     0.9729 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486769     5  0.0508     0.9336 0.012 0.000 0.004 0.000 0.984 0.000
#> GSM486771     5  0.0000     0.9417 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486773     4  0.0000     0.9729 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486775     4  0.0000     0.9729 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486777     5  0.0000     0.9417 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486779     4  0.2340     0.8155 0.000 0.000 0.000 0.852 0.148 0.000
#> GSM486781     4  0.0146     0.9722 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM486783     4  0.0363     0.9662 0.000 0.000 0.000 0.988 0.012 0.000
#> GSM486785     5  0.3867    -0.0215 0.000 0.000 0.000 0.488 0.512 0.000
#> GSM486787     5  0.0000     0.9417 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486789     4  0.0146     0.9722 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM486791     5  0.0603     0.9317 0.016 0.000 0.004 0.000 0.980 0.000
#> GSM486793     4  0.0146     0.9722 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM486795     5  0.0000     0.9417 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486797     4  0.0000     0.9729 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486799     4  0.0000     0.9729 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486801     5  0.0000     0.9417 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486803     5  0.0000     0.9417 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486805     4  0.0146     0.9722 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM486807     4  0.0146     0.9717 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM486809     4  0.0000     0.9729 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486811     5  0.0000     0.9417 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486813     4  0.0146     0.9722 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM486815     5  0.0000     0.9417 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486817     4  0.0748     0.9602 0.016 0.000 0.004 0.976 0.000 0.004
#> GSM486819     4  0.0146     0.9722 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM486822     5  0.1327     0.8930 0.000 0.000 0.000 0.064 0.936 0.000
#> GSM486824     4  0.3023     0.6986 0.000 0.000 0.000 0.768 0.232 0.000
#> GSM486828     4  0.0146     0.9722 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM486831     4  0.0632     0.9585 0.000 0.000 0.000 0.976 0.024 0.000
#> GSM486833     5  0.2912     0.6798 0.000 0.000 0.000 0.216 0.784 0.000
#> GSM486835     5  0.0000     0.9417 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486837     4  0.0000     0.9729 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486839     4  0.0458     0.9646 0.000 0.000 0.000 0.984 0.016 0.000
#> GSM486841     5  0.0000     0.9417 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486843     5  0.0000     0.9417 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486845     5  0.1714     0.8608 0.000 0.000 0.000 0.092 0.908 0.000
#> GSM486847     4  0.0146     0.9717 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM486849     5  0.0000     0.9417 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486851     5  0.0000     0.9417 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486853     4  0.0000     0.9729 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486855     4  0.1007     0.9391 0.000 0.000 0.000 0.956 0.044 0.000
#> GSM486857     4  0.0458     0.9634 0.000 0.000 0.000 0.984 0.016 0.000
#> GSM486736     3  0.0146     1.0000 0.000 0.004 0.996 0.000 0.000 0.000
#> GSM486738     2  0.3490     0.7072 0.040 0.784 0.000 0.000 0.000 0.176
#> GSM486740     3  0.0146     1.0000 0.000 0.004 0.996 0.000 0.000 0.000
#> GSM486742     2  0.3790     0.7800 0.104 0.780 0.000 0.000 0.000 0.116
#> GSM486744     2  0.0000     0.8020 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486746     3  0.0146     1.0000 0.000 0.004 0.996 0.000 0.000 0.000
#> GSM486748     2  0.3454     0.7969 0.208 0.768 0.000 0.000 0.000 0.024
#> GSM486750     6  0.0146     0.9805 0.004 0.000 0.000 0.000 0.000 0.996
#> GSM486752     6  0.0146     0.9805 0.004 0.000 0.000 0.000 0.000 0.996
#> GSM486754     2  0.0000     0.8020 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486756     2  0.3499     0.4816 0.000 0.680 0.320 0.000 0.000 0.000
#> GSM486758     1  0.1863     0.7088 0.896 0.104 0.000 0.000 0.000 0.000
#> GSM486760     6  0.0146     0.9805 0.004 0.000 0.000 0.000 0.000 0.996
#> GSM486762     2  0.3684     0.6406 0.372 0.628 0.000 0.000 0.000 0.000
#> GSM486764     1  0.0458     0.7852 0.984 0.000 0.000 0.000 0.000 0.016
#> GSM486766     2  0.2912     0.7997 0.216 0.784 0.000 0.000 0.000 0.000
#> GSM486768     2  0.0000     0.8020 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486770     6  0.0547     0.9581 0.000 0.020 0.000 0.000 0.000 0.980
#> GSM486772     6  0.0146     0.9805 0.004 0.000 0.000 0.000 0.000 0.996
#> GSM486774     2  0.3747     0.6194 0.396 0.604 0.000 0.000 0.000 0.000
#> GSM486776     2  0.3023     0.7922 0.232 0.768 0.000 0.000 0.000 0.000
#> GSM486778     6  0.0146     0.9805 0.004 0.000 0.000 0.000 0.000 0.996
#> GSM486780     1  0.3499     0.2998 0.680 0.320 0.000 0.000 0.000 0.000
#> GSM486782     2  0.0000     0.8020 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486784     1  0.0458     0.7852 0.984 0.000 0.000 0.000 0.000 0.016
#> GSM486786     1  0.2883     0.6516 0.788 0.000 0.000 0.000 0.000 0.212
#> GSM486788     6  0.0146     0.9805 0.004 0.000 0.000 0.000 0.000 0.996
#> GSM486790     2  0.0363     0.7965 0.000 0.988 0.012 0.000 0.000 0.000
#> GSM486792     3  0.0146     1.0000 0.000 0.004 0.996 0.000 0.000 0.000
#> GSM486794     2  0.0146     0.8037 0.004 0.996 0.000 0.000 0.000 0.000
#> GSM486796     6  0.0146     0.9805 0.004 0.000 0.000 0.000 0.000 0.996
#> GSM486798     1  0.0458     0.7852 0.984 0.000 0.000 0.000 0.000 0.016
#> GSM486800     6  0.1682     0.8972 0.052 0.020 0.000 0.000 0.000 0.928
#> GSM486802     6  0.0146     0.9805 0.004 0.000 0.000 0.000 0.000 0.996
#> GSM486804     1  0.0458     0.7852 0.984 0.000 0.000 0.000 0.000 0.016
#> GSM486806     2  0.2912     0.7997 0.216 0.784 0.000 0.000 0.000 0.000
#> GSM486808     2  0.3023     0.7922 0.232 0.768 0.000 0.000 0.000 0.000
#> GSM486810     2  0.2378     0.8154 0.152 0.848 0.000 0.000 0.000 0.000
#> GSM486812     6  0.0146     0.9805 0.004 0.000 0.000 0.000 0.000 0.996
#> GSM486814     2  0.0000     0.8020 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486816     1  0.3499     0.2998 0.680 0.320 0.000 0.000 0.000 0.000
#> GSM486818     2  0.3659     0.3987 0.000 0.636 0.364 0.000 0.000 0.000
#> GSM486821     2  0.1714     0.8179 0.092 0.908 0.000 0.000 0.000 0.000
#> GSM486823     6  0.1327     0.9061 0.000 0.064 0.000 0.000 0.000 0.936
#> GSM486826     1  0.0458     0.7852 0.984 0.000 0.000 0.000 0.000 0.016
#> GSM486830     2  0.1714     0.8179 0.092 0.908 0.000 0.000 0.000 0.000
#> GSM486832     2  0.3023     0.7922 0.232 0.768 0.000 0.000 0.000 0.000
#> GSM486834     2  0.2389     0.8055 0.052 0.888 0.000 0.000 0.000 0.060
#> GSM486836     1  0.3695     0.4203 0.624 0.000 0.000 0.000 0.000 0.376
#> GSM486838     2  0.3464     0.7346 0.312 0.688 0.000 0.000 0.000 0.000
#> GSM486840     1  0.0458     0.7852 0.984 0.000 0.000 0.000 0.000 0.016
#> GSM486842     1  0.3428     0.5616 0.696 0.000 0.000 0.000 0.000 0.304
#> GSM486844     1  0.1814     0.7395 0.900 0.000 0.000 0.000 0.000 0.100
#> GSM486846     2  0.0000     0.8020 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486848     2  0.3695     0.6349 0.376 0.624 0.000 0.000 0.000 0.000
#> GSM486850     6  0.0146     0.9805 0.004 0.000 0.000 0.000 0.000 0.996
#> GSM486852     1  0.3854     0.2134 0.536 0.000 0.000 0.000 0.000 0.464
#> GSM486854     2  0.3023     0.7922 0.232 0.768 0.000 0.000 0.000 0.000
#> GSM486856     2  0.4168     0.5860 0.400 0.584 0.000 0.000 0.000 0.016
#> GSM486858     1  0.0713     0.7813 0.972 0.000 0.000 0.000 0.000 0.028

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)

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 agent(p) individual(p) k
#> ATC:pam 120 4.67e-27         1.000 2
#> ATC:pam 118 2.38e-26         1.000 3
#> ATC:pam 115 9.21e-25         0.998 4
#> ATC:pam 117 2.34e-24         0.996 5
#> ATC:pam 113 9.51e-23         0.988 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 120 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 5.
#> 
#> 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.5047 0.496   0.496
#> 3 3 0.787           0.931       0.931         0.1303 0.955   0.908
#> 4 4 0.679           0.801       0.779         0.2206 0.768   0.507
#> 5 5 1.000           0.966       0.984         0.0825 0.983   0.934
#> 6 6 0.769           0.707       0.843         0.0559 0.924   0.710

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

suggest_best_k(res)
#> [1] 5
#> 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
#> GSM486735     1       0          1  1  0
#> GSM486737     1       0          1  1  0
#> GSM486739     1       0          1  1  0
#> GSM486741     1       0          1  1  0
#> GSM486743     1       0          1  1  0
#> GSM486745     1       0          1  1  0
#> GSM486747     1       0          1  1  0
#> GSM486749     1       0          1  1  0
#> GSM486751     1       0          1  1  0
#> GSM486753     1       0          1  1  0
#> GSM486755     1       0          1  1  0
#> GSM486757     1       0          1  1  0
#> GSM486759     1       0          1  1  0
#> GSM486761     1       0          1  1  0
#> GSM486763     1       0          1  1  0
#> GSM486765     1       0          1  1  0
#> GSM486767     1       0          1  1  0
#> GSM486769     1       0          1  1  0
#> GSM486771     1       0          1  1  0
#> GSM486773     1       0          1  1  0
#> GSM486775     1       0          1  1  0
#> GSM486777     1       0          1  1  0
#> GSM486779     1       0          1  1  0
#> GSM486781     1       0          1  1  0
#> GSM486783     1       0          1  1  0
#> GSM486785     1       0          1  1  0
#> GSM486787     1       0          1  1  0
#> GSM486789     1       0          1  1  0
#> GSM486791     1       0          1  1  0
#> GSM486793     1       0          1  1  0
#> GSM486795     1       0          1  1  0
#> GSM486797     1       0          1  1  0
#> GSM486799     1       0          1  1  0
#> GSM486801     1       0          1  1  0
#> GSM486803     1       0          1  1  0
#> GSM486805     1       0          1  1  0
#> GSM486807     1       0          1  1  0
#> GSM486809     1       0          1  1  0
#> GSM486811     1       0          1  1  0
#> GSM486813     1       0          1  1  0
#> GSM486815     1       0          1  1  0
#> GSM486817     1       0          1  1  0
#> GSM486819     1       0          1  1  0
#> GSM486822     1       0          1  1  0
#> GSM486824     1       0          1  1  0
#> GSM486828     1       0          1  1  0
#> GSM486831     1       0          1  1  0
#> GSM486833     1       0          1  1  0
#> GSM486835     1       0          1  1  0
#> GSM486837     1       0          1  1  0
#> GSM486839     1       0          1  1  0
#> GSM486841     1       0          1  1  0
#> GSM486843     1       0          1  1  0
#> GSM486845     1       0          1  1  0
#> GSM486847     1       0          1  1  0
#> GSM486849     1       0          1  1  0
#> GSM486851     1       0          1  1  0
#> GSM486853     1       0          1  1  0
#> GSM486855     1       0          1  1  0
#> GSM486857     1       0          1  1  0
#> GSM486736     2       0          1  0  1
#> GSM486738     2       0          1  0  1
#> GSM486740     2       0          1  0  1
#> GSM486742     2       0          1  0  1
#> GSM486744     2       0          1  0  1
#> GSM486746     2       0          1  0  1
#> GSM486748     2       0          1  0  1
#> GSM486750     2       0          1  0  1
#> GSM486752     2       0          1  0  1
#> GSM486754     2       0          1  0  1
#> GSM486756     2       0          1  0  1
#> GSM486758     2       0          1  0  1
#> GSM486760     2       0          1  0  1
#> GSM486762     2       0          1  0  1
#> GSM486764     2       0          1  0  1
#> GSM486766     2       0          1  0  1
#> GSM486768     2       0          1  0  1
#> GSM486770     2       0          1  0  1
#> GSM486772     2       0          1  0  1
#> GSM486774     2       0          1  0  1
#> GSM486776     2       0          1  0  1
#> GSM486778     2       0          1  0  1
#> GSM486780     2       0          1  0  1
#> GSM486782     2       0          1  0  1
#> GSM486784     2       0          1  0  1
#> GSM486786     2       0          1  0  1
#> GSM486788     2       0          1  0  1
#> GSM486790     2       0          1  0  1
#> GSM486792     2       0          1  0  1
#> GSM486794     2       0          1  0  1
#> GSM486796     2       0          1  0  1
#> GSM486798     2       0          1  0  1
#> GSM486800     2       0          1  0  1
#> GSM486802     2       0          1  0  1
#> GSM486804     2       0          1  0  1
#> GSM486806     2       0          1  0  1
#> GSM486808     2       0          1  0  1
#> GSM486810     2       0          1  0  1
#> GSM486812     2       0          1  0  1
#> GSM486814     2       0          1  0  1
#> GSM486816     2       0          1  0  1
#> GSM486818     2       0          1  0  1
#> GSM486821     2       0          1  0  1
#> GSM486823     2       0          1  0  1
#> GSM486826     2       0          1  0  1
#> GSM486830     2       0          1  0  1
#> GSM486832     2       0          1  0  1
#> GSM486834     2       0          1  0  1
#> GSM486836     2       0          1  0  1
#> GSM486838     2       0          1  0  1
#> GSM486840     2       0          1  0  1
#> GSM486842     2       0          1  0  1
#> GSM486844     2       0          1  0  1
#> GSM486846     2       0          1  0  1
#> GSM486848     2       0          1  0  1
#> GSM486850     2       0          1  0  1
#> GSM486852     2       0          1  0  1
#> GSM486854     2       0          1  0  1
#> GSM486856     2       0          1  0  1
#> GSM486858     2       0          1  0  1

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM486735     1  0.0424      0.897 0.992 0.008 0.000
#> GSM486737     1  0.0000      0.898 1.000 0.000 0.000
#> GSM486739     1  0.0237      0.897 0.996 0.004 0.000
#> GSM486741     1  0.3686      0.880 0.860 0.140 0.000
#> GSM486743     1  0.3686      0.880 0.860 0.140 0.000
#> GSM486745     1  0.0237      0.897 0.996 0.004 0.000
#> GSM486747     1  0.3686      0.880 0.860 0.140 0.000
#> GSM486749     1  0.3879      0.850 0.848 0.152 0.000
#> GSM486751     1  0.3879      0.850 0.848 0.152 0.000
#> GSM486753     1  0.3686      0.880 0.860 0.140 0.000
#> GSM486755     1  0.3752      0.879 0.856 0.144 0.000
#> GSM486757     1  0.3879      0.881 0.848 0.152 0.000
#> GSM486759     1  0.3879      0.850 0.848 0.152 0.000
#> GSM486761     1  0.3686      0.880 0.860 0.140 0.000
#> GSM486763     1  0.3879      0.850 0.848 0.152 0.000
#> GSM486765     1  0.3686      0.880 0.860 0.140 0.000
#> GSM486767     1  0.3752      0.879 0.856 0.144 0.000
#> GSM486769     1  0.0424      0.897 0.992 0.008 0.000
#> GSM486771     1  0.2878      0.872 0.904 0.096 0.000
#> GSM486773     1  0.3686      0.880 0.860 0.140 0.000
#> GSM486775     1  0.3752      0.879 0.856 0.144 0.000
#> GSM486777     1  0.3879      0.850 0.848 0.152 0.000
#> GSM486779     1  0.0424      0.897 0.992 0.008 0.000
#> GSM486781     1  0.3686      0.880 0.860 0.140 0.000
#> GSM486783     1  0.0000      0.898 1.000 0.000 0.000
#> GSM486785     1  0.3752      0.854 0.856 0.144 0.000
#> GSM486787     1  0.3879      0.850 0.848 0.152 0.000
#> GSM486789     1  0.3752      0.879 0.856 0.144 0.000
#> GSM486791     1  0.0592      0.896 0.988 0.012 0.000
#> GSM486793     1  0.3686      0.880 0.860 0.140 0.000
#> GSM486795     1  0.3879      0.850 0.848 0.152 0.000
#> GSM486797     1  0.3816      0.881 0.852 0.148 0.000
#> GSM486799     1  0.3686      0.880 0.860 0.140 0.000
#> GSM486801     1  0.3879      0.850 0.848 0.152 0.000
#> GSM486803     1  0.3879      0.850 0.848 0.152 0.000
#> GSM486805     1  0.3686      0.880 0.860 0.140 0.000
#> GSM486807     1  0.0000      0.898 1.000 0.000 0.000
#> GSM486809     1  0.3686      0.880 0.860 0.140 0.000
#> GSM486811     1  0.3879      0.850 0.848 0.152 0.000
#> GSM486813     1  0.3752      0.879 0.856 0.144 0.000
#> GSM486815     1  0.0237      0.897 0.996 0.004 0.000
#> GSM486817     1  0.3752      0.879 0.856 0.144 0.000
#> GSM486819     1  0.0237      0.897 0.996 0.004 0.000
#> GSM486822     1  0.1031      0.894 0.976 0.024 0.000
#> GSM486824     1  0.0592      0.896 0.988 0.012 0.000
#> GSM486828     1  0.3752      0.879 0.856 0.144 0.000
#> GSM486831     1  0.3879      0.850 0.848 0.152 0.000
#> GSM486833     1  0.0237      0.897 0.996 0.004 0.000
#> GSM486835     1  0.3879      0.850 0.848 0.152 0.000
#> GSM486837     1  0.3686      0.880 0.860 0.140 0.000
#> GSM486839     1  0.3879      0.850 0.848 0.152 0.000
#> GSM486841     1  0.3879      0.850 0.848 0.152 0.000
#> GSM486843     1  0.3879      0.850 0.848 0.152 0.000
#> GSM486845     1  0.0237      0.897 0.996 0.004 0.000
#> GSM486847     1  0.4062      0.880 0.836 0.164 0.000
#> GSM486849     1  0.0237      0.897 0.996 0.004 0.000
#> GSM486851     1  0.3879      0.850 0.848 0.152 0.000
#> GSM486853     1  0.3879      0.881 0.848 0.152 0.000
#> GSM486855     1  0.0000      0.898 1.000 0.000 0.000
#> GSM486857     1  0.0000      0.898 1.000 0.000 0.000
#> GSM486736     2  0.5529      0.968 0.000 0.704 0.296
#> GSM486738     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486740     2  0.5529      0.968 0.000 0.704 0.296
#> GSM486742     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486744     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486746     2  0.5591      0.971 0.000 0.696 0.304
#> GSM486748     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486750     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486752     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486754     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486756     2  0.5785      0.964 0.000 0.668 0.332
#> GSM486758     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486760     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486762     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486764     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486766     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486768     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486770     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486772     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486774     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486776     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486778     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486780     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486782     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486784     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486786     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486788     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486790     3  0.4452      0.610 0.000 0.192 0.808
#> GSM486792     2  0.5760      0.964 0.000 0.672 0.328
#> GSM486794     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486796     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486798     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486800     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486802     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486804     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486806     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486808     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486810     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486812     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486814     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486816     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486818     2  0.5785      0.964 0.000 0.668 0.332
#> GSM486821     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486823     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486826     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486830     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486832     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486834     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486836     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486838     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486840     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486842     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486844     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486846     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486848     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486850     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486852     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486854     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486856     3  0.0000      0.995 0.000 0.000 1.000
#> GSM486858     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
#> GSM486735     1  0.4872      0.712 0.728 0.000 0.028 0.244
#> GSM486737     4  0.4406      0.938 0.192 0.000 0.028 0.780
#> GSM486739     1  0.5050      0.686 0.704 0.000 0.028 0.268
#> GSM486741     4  0.3852      0.947 0.192 0.000 0.008 0.800
#> GSM486743     4  0.3528      0.947 0.192 0.000 0.000 0.808
#> GSM486745     1  0.5050      0.686 0.704 0.000 0.028 0.268
#> GSM486747     4  0.3569      0.948 0.196 0.000 0.000 0.804
#> GSM486749     1  0.0000      0.830 1.000 0.000 0.000 0.000
#> GSM486751     1  0.0000      0.830 1.000 0.000 0.000 0.000
#> GSM486753     4  0.3726      0.938 0.212 0.000 0.000 0.788
#> GSM486755     4  0.4057      0.915 0.160 0.000 0.028 0.812
#> GSM486757     4  0.4697      0.720 0.356 0.000 0.000 0.644
#> GSM486759     1  0.0000      0.830 1.000 0.000 0.000 0.000
#> GSM486761     4  0.3610      0.948 0.200 0.000 0.000 0.800
#> GSM486763     1  0.0000      0.830 1.000 0.000 0.000 0.000
#> GSM486765     4  0.3528      0.947 0.192 0.000 0.000 0.808
#> GSM486767     4  0.4406      0.938 0.192 0.000 0.028 0.780
#> GSM486769     1  0.5050      0.686 0.704 0.000 0.028 0.268
#> GSM486771     1  0.3224      0.779 0.864 0.000 0.016 0.120
#> GSM486773     4  0.3528      0.947 0.192 0.000 0.000 0.808
#> GSM486775     4  0.4204      0.942 0.192 0.000 0.020 0.788
#> GSM486777     1  0.0000      0.830 1.000 0.000 0.000 0.000
#> GSM486779     4  0.3649      0.945 0.204 0.000 0.000 0.796
#> GSM486781     4  0.3528      0.947 0.192 0.000 0.000 0.808
#> GSM486783     4  0.3569      0.948 0.196 0.000 0.000 0.804
#> GSM486785     1  0.4477      0.359 0.688 0.000 0.000 0.312
#> GSM486787     1  0.0000      0.830 1.000 0.000 0.000 0.000
#> GSM486789     4  0.4152      0.913 0.160 0.000 0.032 0.808
#> GSM486791     1  0.4524      0.732 0.768 0.000 0.028 0.204
#> GSM486793     4  0.3610      0.948 0.200 0.000 0.000 0.800
#> GSM486795     1  0.0000      0.830 1.000 0.000 0.000 0.000
#> GSM486797     4  0.3610      0.948 0.200 0.000 0.000 0.800
#> GSM486799     4  0.3610      0.948 0.200 0.000 0.000 0.800
#> GSM486801     1  0.0000      0.830 1.000 0.000 0.000 0.000
#> GSM486803     1  0.0000      0.830 1.000 0.000 0.000 0.000
#> GSM486805     4  0.3942      0.916 0.236 0.000 0.000 0.764
#> GSM486807     4  0.3610      0.948 0.200 0.000 0.000 0.800
#> GSM486809     4  0.3610      0.948 0.200 0.000 0.000 0.800
#> GSM486811     1  0.0000      0.830 1.000 0.000 0.000 0.000
#> GSM486813     4  0.4152      0.913 0.160 0.000 0.032 0.808
#> GSM486815     1  0.5543      0.428 0.612 0.000 0.028 0.360
#> GSM486817     1  0.5207      0.648 0.680 0.000 0.028 0.292
#> GSM486819     4  0.4057      0.915 0.160 0.000 0.028 0.812
#> GSM486822     1  0.4323      0.733 0.788 0.000 0.028 0.184
#> GSM486824     4  0.4406      0.934 0.192 0.000 0.028 0.780
#> GSM486828     4  0.4149      0.913 0.168 0.000 0.028 0.804
#> GSM486831     1  0.0000      0.830 1.000 0.000 0.000 0.000
#> GSM486833     1  0.4964      0.671 0.716 0.000 0.028 0.256
#> GSM486835     1  0.0000      0.830 1.000 0.000 0.000 0.000
#> GSM486837     4  0.3610      0.948 0.200 0.000 0.000 0.800
#> GSM486839     1  0.0000      0.830 1.000 0.000 0.000 0.000
#> GSM486841     1  0.0000      0.830 1.000 0.000 0.000 0.000
#> GSM486843     1  0.0000      0.830 1.000 0.000 0.000 0.000
#> GSM486845     1  0.4524      0.721 0.768 0.000 0.028 0.204
#> GSM486847     4  0.4830      0.661 0.392 0.000 0.000 0.608
#> GSM486849     1  0.4840      0.686 0.732 0.000 0.028 0.240
#> GSM486851     1  0.0000      0.830 1.000 0.000 0.000 0.000
#> GSM486853     4  0.4643      0.743 0.344 0.000 0.000 0.656
#> GSM486855     1  0.5423      0.488 0.640 0.000 0.028 0.332
#> GSM486857     4  0.3688      0.944 0.208 0.000 0.000 0.792
#> GSM486736     3  0.4332      0.466 0.000 0.040 0.800 0.160
#> GSM486738     2  0.0000      0.866 0.000 1.000 0.000 0.000
#> GSM486740     3  0.4332      0.466 0.000 0.040 0.800 0.160
#> GSM486742     2  0.0817      0.856 0.000 0.976 0.024 0.000
#> GSM486744     2  0.0336      0.861 0.000 0.992 0.008 0.000
#> GSM486746     3  0.4332      0.466 0.000 0.040 0.800 0.160
#> GSM486748     2  0.0000      0.866 0.000 1.000 0.000 0.000
#> GSM486750     3  0.4855      0.807 0.000 0.400 0.600 0.000
#> GSM486752     3  0.4855      0.807 0.000 0.400 0.600 0.000
#> GSM486754     2  0.1302      0.828 0.000 0.956 0.044 0.000
#> GSM486756     2  0.7272      0.191 0.000 0.496 0.344 0.160
#> GSM486758     2  0.0000      0.866 0.000 1.000 0.000 0.000
#> GSM486760     3  0.4855      0.807 0.000 0.400 0.600 0.000
#> GSM486762     2  0.0000      0.866 0.000 1.000 0.000 0.000
#> GSM486764     2  0.3123      0.757 0.000 0.844 0.156 0.000
#> GSM486766     2  0.0000      0.866 0.000 1.000 0.000 0.000
#> GSM486768     2  0.0188      0.864 0.000 0.996 0.004 0.000
#> GSM486770     3  0.4888      0.786 0.000 0.412 0.588 0.000
#> GSM486772     3  0.4855      0.807 0.000 0.400 0.600 0.000
#> GSM486774     2  0.2973      0.770 0.000 0.856 0.144 0.000
#> GSM486776     2  0.0000      0.866 0.000 1.000 0.000 0.000
#> GSM486778     3  0.4855      0.807 0.000 0.400 0.600 0.000
#> GSM486780     2  0.0000      0.866 0.000 1.000 0.000 0.000
#> GSM486782     2  0.0469      0.858 0.000 0.988 0.012 0.000
#> GSM486784     2  0.3123      0.757 0.000 0.844 0.156 0.000
#> GSM486786     2  0.3172      0.751 0.000 0.840 0.160 0.000
#> GSM486788     3  0.4855      0.807 0.000 0.400 0.600 0.000
#> GSM486790     2  0.3718      0.637 0.000 0.820 0.168 0.012
#> GSM486792     3  0.4417      0.467 0.000 0.044 0.796 0.160
#> GSM486794     2  0.0336      0.861 0.000 0.992 0.008 0.000
#> GSM486796     3  0.4855      0.807 0.000 0.400 0.600 0.000
#> GSM486798     2  0.3123      0.757 0.000 0.844 0.156 0.000
#> GSM486800     3  0.4855      0.807 0.000 0.400 0.600 0.000
#> GSM486802     3  0.4855      0.807 0.000 0.400 0.600 0.000
#> GSM486804     2  0.3123      0.757 0.000 0.844 0.156 0.000
#> GSM486806     2  0.0000      0.866 0.000 1.000 0.000 0.000
#> GSM486808     2  0.3024      0.766 0.000 0.852 0.148 0.000
#> GSM486810     2  0.0000      0.866 0.000 1.000 0.000 0.000
#> GSM486812     3  0.4855      0.807 0.000 0.400 0.600 0.000
#> GSM486814     2  0.0188      0.864 0.000 0.996 0.004 0.000
#> GSM486816     2  0.0000      0.866 0.000 1.000 0.000 0.000
#> GSM486818     2  0.7272      0.191 0.000 0.496 0.344 0.160
#> GSM486821     2  0.1389      0.823 0.000 0.952 0.048 0.000
#> GSM486823     3  0.4866      0.800 0.000 0.404 0.596 0.000
#> GSM486826     2  0.2149      0.816 0.000 0.912 0.088 0.000
#> GSM486830     2  0.1211      0.832 0.000 0.960 0.040 0.000
#> GSM486832     2  0.0000      0.866 0.000 1.000 0.000 0.000
#> GSM486834     2  0.0000      0.866 0.000 1.000 0.000 0.000
#> GSM486836     3  0.4855      0.807 0.000 0.400 0.600 0.000
#> GSM486838     2  0.3024      0.766 0.000 0.852 0.148 0.000
#> GSM486840     2  0.3123      0.757 0.000 0.844 0.156 0.000
#> GSM486842     3  0.4855      0.807 0.000 0.400 0.600 0.000
#> GSM486844     2  0.3123      0.757 0.000 0.844 0.156 0.000
#> GSM486846     2  0.0000      0.866 0.000 1.000 0.000 0.000
#> GSM486848     2  0.0000      0.866 0.000 1.000 0.000 0.000
#> GSM486850     3  0.4855      0.807 0.000 0.400 0.600 0.000
#> GSM486852     3  0.4855      0.807 0.000 0.400 0.600 0.000
#> GSM486854     2  0.0707      0.859 0.000 0.980 0.020 0.000
#> GSM486856     2  0.3024      0.766 0.000 0.852 0.148 0.000
#> GSM486858     2  0.3123      0.757 0.000 0.844 0.156 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
#> GSM486735     4  0.1121      0.955 0.000 0.044 0.000 0.956 0.000
#> GSM486737     2  0.0000      0.972 0.000 1.000 0.000 0.000 0.000
#> GSM486739     4  0.1121      0.955 0.000 0.044 0.000 0.956 0.000
#> GSM486741     2  0.0000      0.972 0.000 1.000 0.000 0.000 0.000
#> GSM486743     2  0.0000      0.972 0.000 1.000 0.000 0.000 0.000
#> GSM486745     4  0.1121      0.955 0.000 0.044 0.000 0.956 0.000
#> GSM486747     2  0.0000      0.972 0.000 1.000 0.000 0.000 0.000
#> GSM486749     4  0.0000      0.985 0.000 0.000 0.000 1.000 0.000
#> GSM486751     4  0.0000      0.985 0.000 0.000 0.000 1.000 0.000
#> GSM486753     2  0.0000      0.972 0.000 1.000 0.000 0.000 0.000
#> GSM486755     2  0.0000      0.972 0.000 1.000 0.000 0.000 0.000
#> GSM486757     2  0.0000      0.972 0.000 1.000 0.000 0.000 0.000
#> GSM486759     4  0.0000      0.985 0.000 0.000 0.000 1.000 0.000
#> GSM486761     2  0.0000      0.972 0.000 1.000 0.000 0.000 0.000
#> GSM486763     4  0.0000      0.985 0.000 0.000 0.000 1.000 0.000
#> GSM486765     2  0.0000      0.972 0.000 1.000 0.000 0.000 0.000
#> GSM486767     2  0.0000      0.972 0.000 1.000 0.000 0.000 0.000
#> GSM486769     4  0.0290      0.983 0.000 0.008 0.000 0.992 0.000
#> GSM486771     4  0.0000      0.985 0.000 0.000 0.000 1.000 0.000
#> GSM486773     2  0.0000      0.972 0.000 1.000 0.000 0.000 0.000
#> GSM486775     2  0.0000      0.972 0.000 1.000 0.000 0.000 0.000
#> GSM486777     4  0.0000      0.985 0.000 0.000 0.000 1.000 0.000
#> GSM486779     2  0.0609      0.954 0.000 0.980 0.000 0.020 0.000
#> GSM486781     2  0.0000      0.972 0.000 1.000 0.000 0.000 0.000
#> GSM486783     2  0.0794      0.946 0.000 0.972 0.000 0.028 0.000
#> GSM486785     2  0.4210      0.321 0.000 0.588 0.000 0.412 0.000
#> GSM486787     4  0.0000      0.985 0.000 0.000 0.000 1.000 0.000
#> GSM486789     2  0.0000      0.972 0.000 1.000 0.000 0.000 0.000
#> GSM486791     4  0.0290      0.983 0.000 0.008 0.000 0.992 0.000
#> GSM486793     2  0.0000      0.972 0.000 1.000 0.000 0.000 0.000
#> GSM486795     4  0.0000      0.985 0.000 0.000 0.000 1.000 0.000
#> GSM486797     2  0.0000      0.972 0.000 1.000 0.000 0.000 0.000
#> GSM486799     2  0.0000      0.972 0.000 1.000 0.000 0.000 0.000
#> GSM486801     4  0.0000      0.985 0.000 0.000 0.000 1.000 0.000
#> GSM486803     4  0.0000      0.985 0.000 0.000 0.000 1.000 0.000
#> GSM486805     2  0.0000      0.972 0.000 1.000 0.000 0.000 0.000
#> GSM486807     2  0.0000      0.972 0.000 1.000 0.000 0.000 0.000
#> GSM486809     2  0.0000      0.972 0.000 1.000 0.000 0.000 0.000
#> GSM486811     4  0.0000      0.985 0.000 0.000 0.000 1.000 0.000
#> GSM486813     2  0.0000      0.972 0.000 1.000 0.000 0.000 0.000
#> GSM486815     4  0.0703      0.971 0.000 0.024 0.000 0.976 0.000
#> GSM486817     4  0.1270      0.946 0.000 0.052 0.000 0.948 0.000
#> GSM486819     2  0.0000      0.972 0.000 1.000 0.000 0.000 0.000
#> GSM486822     4  0.0290      0.983 0.000 0.008 0.000 0.992 0.000
#> GSM486824     2  0.1270      0.921 0.000 0.948 0.000 0.052 0.000
#> GSM486828     2  0.0000      0.972 0.000 1.000 0.000 0.000 0.000
#> GSM486831     4  0.0162      0.984 0.000 0.004 0.000 0.996 0.000
#> GSM486833     4  0.0794      0.969 0.000 0.028 0.000 0.972 0.000
#> GSM486835     4  0.0000      0.985 0.000 0.000 0.000 1.000 0.000
#> GSM486837     2  0.0000      0.972 0.000 1.000 0.000 0.000 0.000
#> GSM486839     4  0.0000      0.985 0.000 0.000 0.000 1.000 0.000
#> GSM486841     4  0.0000      0.985 0.000 0.000 0.000 1.000 0.000
#> GSM486843     4  0.0000      0.985 0.000 0.000 0.000 1.000 0.000
#> GSM486845     4  0.1121      0.955 0.000 0.044 0.000 0.956 0.000
#> GSM486847     2  0.2127      0.839 0.000 0.892 0.000 0.108 0.000
#> GSM486849     4  0.0290      0.983 0.000 0.008 0.000 0.992 0.000
#> GSM486851     4  0.0000      0.985 0.000 0.000 0.000 1.000 0.000
#> GSM486853     2  0.0000      0.972 0.000 1.000 0.000 0.000 0.000
#> GSM486855     4  0.0510      0.978 0.000 0.016 0.000 0.984 0.000
#> GSM486857     2  0.0963      0.937 0.000 0.964 0.000 0.036 0.000
#> GSM486736     5  0.0000      0.991 0.000 0.000 0.000 0.000 1.000
#> GSM486738     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486740     5  0.0000      0.991 0.000 0.000 0.000 0.000 1.000
#> GSM486742     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486744     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486746     5  0.0000      0.991 0.000 0.000 0.000 0.000 1.000
#> GSM486748     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486750     1  0.0000      0.999 1.000 0.000 0.000 0.000 0.000
#> GSM486752     1  0.0000      0.999 1.000 0.000 0.000 0.000 0.000
#> GSM486754     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486756     3  0.2929      0.803 0.000 0.000 0.820 0.000 0.180
#> GSM486758     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486760     1  0.0000      0.999 1.000 0.000 0.000 0.000 0.000
#> GSM486762     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486764     3  0.0963      0.958 0.036 0.000 0.964 0.000 0.000
#> GSM486766     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486768     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486770     1  0.0162      0.994 0.996 0.000 0.004 0.000 0.000
#> GSM486772     1  0.0000      0.999 1.000 0.000 0.000 0.000 0.000
#> GSM486774     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486776     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486778     1  0.0000      0.999 1.000 0.000 0.000 0.000 0.000
#> GSM486780     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486782     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486784     3  0.0963      0.958 0.036 0.000 0.964 0.000 0.000
#> GSM486786     3  0.2329      0.864 0.124 0.000 0.876 0.000 0.000
#> GSM486788     1  0.0000      0.999 1.000 0.000 0.000 0.000 0.000
#> GSM486790     3  0.0794      0.963 0.000 0.000 0.972 0.000 0.028
#> GSM486792     5  0.0609      0.974 0.000 0.000 0.020 0.000 0.980
#> GSM486794     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486796     1  0.0000      0.999 1.000 0.000 0.000 0.000 0.000
#> GSM486798     3  0.1121      0.952 0.044 0.000 0.956 0.000 0.000
#> GSM486800     1  0.0162      0.994 0.996 0.000 0.004 0.000 0.000
#> GSM486802     1  0.0000      0.999 1.000 0.000 0.000 0.000 0.000
#> GSM486804     3  0.1121      0.952 0.044 0.000 0.956 0.000 0.000
#> GSM486806     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486808     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486810     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486812     1  0.0000      0.999 1.000 0.000 0.000 0.000 0.000
#> GSM486814     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486816     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486818     3  0.2929      0.803 0.000 0.000 0.820 0.000 0.180
#> GSM486821     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486823     1  0.0000      0.999 1.000 0.000 0.000 0.000 0.000
#> GSM486826     3  0.0609      0.967 0.020 0.000 0.980 0.000 0.000
#> GSM486830     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486832     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486834     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486836     1  0.0000      0.999 1.000 0.000 0.000 0.000 0.000
#> GSM486838     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486840     3  0.1121      0.952 0.044 0.000 0.956 0.000 0.000
#> GSM486842     1  0.0000      0.999 1.000 0.000 0.000 0.000 0.000
#> GSM486844     3  0.1121      0.952 0.044 0.000 0.956 0.000 0.000
#> GSM486846     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486848     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486850     1  0.0000      0.999 1.000 0.000 0.000 0.000 0.000
#> GSM486852     1  0.0000      0.999 1.000 0.000 0.000 0.000 0.000
#> GSM486854     3  0.0000      0.977 0.000 0.000 1.000 0.000 0.000
#> GSM486856     3  0.0963      0.958 0.036 0.000 0.964 0.000 0.000
#> GSM486858     3  0.0963      0.958 0.036 0.000 0.964 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
#> GSM486735     3  0.5838    -0.3891 0.000 0.000 0.412 0.188 0.400 0.000
#> GSM486737     4  0.0790     0.9078 0.000 0.000 0.032 0.968 0.000 0.000
#> GSM486739     3  0.5838    -0.3891 0.000 0.000 0.412 0.188 0.400 0.000
#> GSM486741     4  0.0000     0.9206 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486743     4  0.0000     0.9206 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486745     3  0.5838    -0.3891 0.000 0.000 0.412 0.188 0.400 0.000
#> GSM486747     4  0.0000     0.9206 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486749     5  0.0000     0.7850 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486751     5  0.0000     0.7850 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486753     4  0.0000     0.9206 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486755     4  0.3390     0.7289 0.000 0.000 0.296 0.704 0.000 0.000
#> GSM486757     4  0.0000     0.9206 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486759     5  0.0000     0.7850 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486761     4  0.0000     0.9206 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486763     5  0.0000     0.7850 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486765     4  0.0000     0.9206 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486767     4  0.1714     0.8700 0.000 0.000 0.092 0.908 0.000 0.000
#> GSM486769     5  0.4954     0.6434 0.000 0.000 0.112 0.260 0.628 0.000
#> GSM486771     5  0.1967     0.7581 0.000 0.000 0.012 0.084 0.904 0.000
#> GSM486773     4  0.0000     0.9206 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486775     4  0.0458     0.9151 0.000 0.000 0.016 0.984 0.000 0.000
#> GSM486777     5  0.0000     0.7850 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486779     4  0.1267     0.8813 0.000 0.000 0.000 0.940 0.060 0.000
#> GSM486781     4  0.0000     0.9206 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486783     4  0.0777     0.9079 0.000 0.000 0.004 0.972 0.024 0.000
#> GSM486785     5  0.3862     0.4559 0.000 0.000 0.004 0.388 0.608 0.000
#> GSM486787     5  0.0000     0.7850 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486789     4  0.3428     0.7217 0.000 0.000 0.304 0.696 0.000 0.000
#> GSM486791     5  0.4750     0.6555 0.000 0.000 0.096 0.252 0.652 0.000
#> GSM486793     4  0.0000     0.9206 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486795     5  0.0000     0.7850 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486797     4  0.0000     0.9206 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486799     4  0.0000     0.9206 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486801     5  0.0000     0.7850 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486803     5  0.0000     0.7850 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486805     4  0.0000     0.9206 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486807     4  0.0000     0.9206 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486809     4  0.0000     0.9206 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486811     5  0.0000     0.7850 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486813     4  0.3371     0.7330 0.000 0.000 0.292 0.708 0.000 0.000
#> GSM486815     5  0.4939     0.6253 0.000 0.000 0.096 0.292 0.612 0.000
#> GSM486817     4  0.4987     0.5739 0.000 0.000 0.328 0.584 0.088 0.000
#> GSM486819     4  0.3390     0.7289 0.000 0.000 0.296 0.704 0.000 0.000
#> GSM486822     5  0.4769     0.6515 0.000 0.000 0.092 0.264 0.644 0.000
#> GSM486824     5  0.5223     0.3074 0.000 0.000 0.092 0.436 0.472 0.000
#> GSM486828     4  0.3390     0.7289 0.000 0.000 0.296 0.704 0.000 0.000
#> GSM486831     5  0.3052     0.7059 0.000 0.000 0.004 0.216 0.780 0.000
#> GSM486833     5  0.4911     0.6388 0.000 0.000 0.100 0.276 0.624 0.000
#> GSM486835     5  0.0000     0.7850 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486837     4  0.0000     0.9206 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486839     5  0.0363     0.7824 0.000 0.000 0.000 0.012 0.988 0.000
#> GSM486841     5  0.0000     0.7850 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486843     5  0.0000     0.7850 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486845     5  0.5127     0.5228 0.000 0.000 0.092 0.364 0.544 0.000
#> GSM486847     4  0.1124     0.8971 0.000 0.000 0.008 0.956 0.036 0.000
#> GSM486849     5  0.4789     0.6489 0.000 0.000 0.092 0.268 0.640 0.000
#> GSM486851     5  0.0000     0.7850 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM486853     4  0.0000     0.9206 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM486855     5  0.4845     0.6393 0.000 0.000 0.092 0.280 0.628 0.000
#> GSM486857     4  0.2278     0.8045 0.000 0.000 0.004 0.868 0.128 0.000
#> GSM486736     6  0.0000     1.0000 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM486738     1  0.0547     0.7384 0.980 0.000 0.020 0.000 0.000 0.000
#> GSM486740     6  0.0000     1.0000 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM486742     1  0.0146     0.7418 0.996 0.000 0.004 0.000 0.000 0.000
#> GSM486744     1  0.4787     0.3499 0.656 0.000 0.236 0.000 0.000 0.108
#> GSM486746     6  0.0000     1.0000 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM486748     1  0.0000     0.7421 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486750     2  0.0000     0.9790 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486752     2  0.0000     0.9790 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486754     3  0.5391     0.3776 0.308 0.000 0.552 0.000 0.000 0.140
#> GSM486756     3  0.4531     0.0308 0.036 0.000 0.556 0.000 0.000 0.408
#> GSM486758     1  0.1501     0.7200 0.924 0.000 0.076 0.000 0.000 0.000
#> GSM486760     2  0.0000     0.9790 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486762     1  0.3499     0.4848 0.680 0.000 0.320 0.000 0.000 0.000
#> GSM486764     1  0.3003     0.6879 0.812 0.172 0.016 0.000 0.000 0.000
#> GSM486766     1  0.0632     0.7376 0.976 0.000 0.024 0.000 0.000 0.000
#> GSM486768     1  0.4459     0.4311 0.700 0.000 0.204 0.000 0.000 0.096
#> GSM486770     2  0.2558     0.7927 0.004 0.840 0.000 0.000 0.000 0.156
#> GSM486772     2  0.0000     0.9790 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486774     1  0.0000     0.7421 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486776     1  0.3515     0.4787 0.676 0.000 0.324 0.000 0.000 0.000
#> GSM486778     2  0.0000     0.9790 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486780     1  0.3499     0.4848 0.680 0.000 0.320 0.000 0.000 0.000
#> GSM486782     3  0.5507     0.1798 0.424 0.000 0.448 0.000 0.000 0.128
#> GSM486784     1  0.3037     0.6851 0.808 0.176 0.016 0.000 0.000 0.000
#> GSM486786     1  0.3126     0.6249 0.752 0.248 0.000 0.000 0.000 0.000
#> GSM486788     2  0.0000     0.9790 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486790     3  0.5232     0.1763 0.104 0.000 0.536 0.000 0.000 0.360
#> GSM486792     6  0.0000     1.0000 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM486794     3  0.5011     0.2788 0.368 0.000 0.552 0.000 0.000 0.080
#> GSM486796     2  0.0000     0.9790 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486798     1  0.3290     0.6591 0.776 0.208 0.016 0.000 0.000 0.000
#> GSM486800     2  0.1267     0.9075 0.060 0.940 0.000 0.000 0.000 0.000
#> GSM486802     2  0.0000     0.9790 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486804     1  0.3320     0.6551 0.772 0.212 0.016 0.000 0.000 0.000
#> GSM486806     1  0.3244     0.5534 0.732 0.000 0.268 0.000 0.000 0.000
#> GSM486808     1  0.0146     0.7418 0.996 0.000 0.004 0.000 0.000 0.000
#> GSM486810     1  0.3727     0.3547 0.612 0.000 0.388 0.000 0.000 0.000
#> GSM486812     2  0.0000     0.9790 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486814     3  0.5270     0.2068 0.404 0.000 0.496 0.000 0.000 0.100
#> GSM486816     1  0.3198     0.5649 0.740 0.000 0.260 0.000 0.000 0.000
#> GSM486818     3  0.4531     0.0308 0.036 0.000 0.556 0.000 0.000 0.408
#> GSM486821     3  0.5514     0.4094 0.272 0.000 0.552 0.000 0.000 0.176
#> GSM486823     2  0.0865     0.9419 0.036 0.964 0.000 0.000 0.000 0.000
#> GSM486826     1  0.2219     0.7121 0.864 0.136 0.000 0.000 0.000 0.000
#> GSM486830     3  0.5650     0.3554 0.332 0.000 0.500 0.000 0.000 0.168
#> GSM486832     1  0.2340     0.6751 0.852 0.000 0.148 0.000 0.000 0.000
#> GSM486834     1  0.2020     0.7082 0.896 0.000 0.096 0.000 0.000 0.008
#> GSM486836     2  0.0000     0.9790 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486838     1  0.0000     0.7421 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486840     1  0.3200     0.6696 0.788 0.196 0.016 0.000 0.000 0.000
#> GSM486842     2  0.0000     0.9790 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486844     1  0.3348     0.6522 0.768 0.216 0.016 0.000 0.000 0.000
#> GSM486846     1  0.3453     0.5941 0.804 0.000 0.132 0.000 0.000 0.064
#> GSM486848     1  0.3499     0.4848 0.680 0.000 0.320 0.000 0.000 0.000
#> GSM486850     2  0.0000     0.9790 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486852     2  0.0000     0.9790 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM486854     1  0.0000     0.7421 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM486856     1  0.2494     0.7119 0.864 0.120 0.016 0.000 0.000 0.000
#> GSM486858     1  0.2783     0.7010 0.836 0.148 0.016 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-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 agent(p) individual(p) k
#> ATC:mclust 120 4.67e-27         1.000 2
#> ATC:mclust 120 8.76e-27         1.000 3
#> ATC:mclust 111 6.69e-24         0.998 4
#> ATC:mclust 119 8.73e-25         0.997 5
#> ATC:mclust  99 1.61e-20         0.819 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 120 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           1.000       1.000         0.5047 0.496   0.496
#> 3 3 0.760           0.733       0.883         0.1878 0.943   0.885
#> 4 4 0.626           0.720       0.849         0.0611 0.914   0.817
#> 5 5 0.632           0.713       0.841         0.0360 0.947   0.879
#> 6 6 0.595           0.589       0.800         0.0423 0.977   0.946

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
#> GSM486735     1       0          1  1  0
#> GSM486737     1       0          1  1  0
#> GSM486739     1       0          1  1  0
#> GSM486741     1       0          1  1  0
#> GSM486743     1       0          1  1  0
#> GSM486745     1       0          1  1  0
#> GSM486747     1       0          1  1  0
#> GSM486749     1       0          1  1  0
#> GSM486751     1       0          1  1  0
#> GSM486753     1       0          1  1  0
#> GSM486755     1       0          1  1  0
#> GSM486757     1       0          1  1  0
#> GSM486759     1       0          1  1  0
#> GSM486761     1       0          1  1  0
#> GSM486763     1       0          1  1  0
#> GSM486765     1       0          1  1  0
#> GSM486767     1       0          1  1  0
#> GSM486769     1       0          1  1  0
#> GSM486771     1       0          1  1  0
#> GSM486773     1       0          1  1  0
#> GSM486775     1       0          1  1  0
#> GSM486777     1       0          1  1  0
#> GSM486779     1       0          1  1  0
#> GSM486781     1       0          1  1  0
#> GSM486783     1       0          1  1  0
#> GSM486785     1       0          1  1  0
#> GSM486787     1       0          1  1  0
#> GSM486789     1       0          1  1  0
#> GSM486791     1       0          1  1  0
#> GSM486793     1       0          1  1  0
#> GSM486795     1       0          1  1  0
#> GSM486797     1       0          1  1  0
#> GSM486799     1       0          1  1  0
#> GSM486801     1       0          1  1  0
#> GSM486803     1       0          1  1  0
#> GSM486805     1       0          1  1  0
#> GSM486807     1       0          1  1  0
#> GSM486809     1       0          1  1  0
#> GSM486811     1       0          1  1  0
#> GSM486813     1       0          1  1  0
#> GSM486815     1       0          1  1  0
#> GSM486817     1       0          1  1  0
#> GSM486819     1       0          1  1  0
#> GSM486822     1       0          1  1  0
#> GSM486824     1       0          1  1  0
#> GSM486828     1       0          1  1  0
#> GSM486831     1       0          1  1  0
#> GSM486833     1       0          1  1  0
#> GSM486835     1       0          1  1  0
#> GSM486837     1       0          1  1  0
#> GSM486839     1       0          1  1  0
#> GSM486841     1       0          1  1  0
#> GSM486843     1       0          1  1  0
#> GSM486845     1       0          1  1  0
#> GSM486847     1       0          1  1  0
#> GSM486849     1       0          1  1  0
#> GSM486851     1       0          1  1  0
#> GSM486853     1       0          1  1  0
#> GSM486855     1       0          1  1  0
#> GSM486857     1       0          1  1  0
#> GSM486736     2       0          1  0  1
#> GSM486738     2       0          1  0  1
#> GSM486740     2       0          1  0  1
#> GSM486742     2       0          1  0  1
#> GSM486744     2       0          1  0  1
#> GSM486746     2       0          1  0  1
#> GSM486748     2       0          1  0  1
#> GSM486750     2       0          1  0  1
#> GSM486752     2       0          1  0  1
#> GSM486754     2       0          1  0  1
#> GSM486756     2       0          1  0  1
#> GSM486758     2       0          1  0  1
#> GSM486760     2       0          1  0  1
#> GSM486762     2       0          1  0  1
#> GSM486764     2       0          1  0  1
#> GSM486766     2       0          1  0  1
#> GSM486768     2       0          1  0  1
#> GSM486770     2       0          1  0  1
#> GSM486772     2       0          1  0  1
#> GSM486774     2       0          1  0  1
#> GSM486776     2       0          1  0  1
#> GSM486778     2       0          1  0  1
#> GSM486780     2       0          1  0  1
#> GSM486782     2       0          1  0  1
#> GSM486784     2       0          1  0  1
#> GSM486786     2       0          1  0  1
#> GSM486788     2       0          1  0  1
#> GSM486790     2       0          1  0  1
#> GSM486792     2       0          1  0  1
#> GSM486794     2       0          1  0  1
#> GSM486796     2       0          1  0  1
#> GSM486798     2       0          1  0  1
#> GSM486800     2       0          1  0  1
#> GSM486802     2       0          1  0  1
#> GSM486804     2       0          1  0  1
#> GSM486806     2       0          1  0  1
#> GSM486808     2       0          1  0  1
#> GSM486810     2       0          1  0  1
#> GSM486812     2       0          1  0  1
#> GSM486814     2       0          1  0  1
#> GSM486816     2       0          1  0  1
#> GSM486818     2       0          1  0  1
#> GSM486821     2       0          1  0  1
#> GSM486823     2       0          1  0  1
#> GSM486826     2       0          1  0  1
#> GSM486830     2       0          1  0  1
#> GSM486832     2       0          1  0  1
#> GSM486834     2       0          1  0  1
#> GSM486836     2       0          1  0  1
#> GSM486838     2       0          1  0  1
#> GSM486840     2       0          1  0  1
#> GSM486842     2       0          1  0  1
#> GSM486844     2       0          1  0  1
#> GSM486846     2       0          1  0  1
#> GSM486848     2       0          1  0  1
#> GSM486850     2       0          1  0  1
#> GSM486852     2       0          1  0  1
#> GSM486854     2       0          1  0  1
#> GSM486856     2       0          1  0  1
#> GSM486858     2       0          1  0  1

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM486735     1  0.0424    0.90902 0.992 0.008 0.000
#> GSM486737     1  0.0000    0.91141 1.000 0.000 0.000
#> GSM486739     1  0.0424    0.90902 0.992 0.008 0.000
#> GSM486741     1  0.6126    0.21967 0.600 0.400 0.000
#> GSM486743     1  0.0424    0.90785 0.992 0.008 0.000
#> GSM486745     1  0.0424    0.90902 0.992 0.008 0.000
#> GSM486747     2  0.6274    0.17031 0.456 0.544 0.000
#> GSM486749     1  0.1753    0.88357 0.952 0.048 0.000
#> GSM486751     1  0.1753    0.88358 0.952 0.048 0.000
#> GSM486753     1  0.0000    0.91141 1.000 0.000 0.000
#> GSM486755     1  0.0000    0.91141 1.000 0.000 0.000
#> GSM486757     1  0.0000    0.91141 1.000 0.000 0.000
#> GSM486759     1  0.0892    0.90294 0.980 0.020 0.000
#> GSM486761     1  0.6280   -0.00461 0.540 0.460 0.000
#> GSM486763     1  0.0424    0.90902 0.992 0.008 0.000
#> GSM486765     1  0.6215    0.12431 0.572 0.428 0.000
#> GSM486767     2  0.6244    0.20941 0.440 0.560 0.000
#> GSM486769     1  0.1289    0.89540 0.968 0.032 0.000
#> GSM486771     1  0.0592    0.90723 0.988 0.012 0.000
#> GSM486773     1  0.6180    0.16021 0.584 0.416 0.000
#> GSM486775     2  0.6260    0.19250 0.448 0.552 0.000
#> GSM486777     1  0.1163    0.89909 0.972 0.028 0.000
#> GSM486779     1  0.0000    0.91141 1.000 0.000 0.000
#> GSM486781     1  0.0237    0.90987 0.996 0.004 0.000
#> GSM486783     1  0.0424    0.90785 0.992 0.008 0.000
#> GSM486785     1  0.0000    0.91141 1.000 0.000 0.000
#> GSM486787     1  0.4702    0.70508 0.788 0.212 0.000
#> GSM486789     1  0.0424    0.90785 0.992 0.008 0.000
#> GSM486791     1  0.1163    0.89813 0.972 0.028 0.000
#> GSM486793     1  0.0237    0.90987 0.996 0.004 0.000
#> GSM486795     1  0.3267    0.81966 0.884 0.116 0.000
#> GSM486797     1  0.5905    0.35426 0.648 0.352 0.000
#> GSM486799     1  0.4002    0.73706 0.840 0.160 0.000
#> GSM486801     1  0.5397    0.60666 0.720 0.280 0.000
#> GSM486803     1  0.0000    0.91141 1.000 0.000 0.000
#> GSM486805     1  0.0000    0.91141 1.000 0.000 0.000
#> GSM486807     1  0.0000    0.91141 1.000 0.000 0.000
#> GSM486809     1  0.0000    0.91141 1.000 0.000 0.000
#> GSM486811     1  0.6095    0.42210 0.608 0.392 0.000
#> GSM486813     1  0.5591    0.47420 0.696 0.304 0.000
#> GSM486815     1  0.0000    0.91141 1.000 0.000 0.000
#> GSM486817     1  0.0000    0.91141 1.000 0.000 0.000
#> GSM486819     1  0.0000    0.91141 1.000 0.000 0.000
#> GSM486822     1  0.0000    0.91141 1.000 0.000 0.000
#> GSM486824     1  0.0000    0.91141 1.000 0.000 0.000
#> GSM486828     1  0.0000    0.91141 1.000 0.000 0.000
#> GSM486831     1  0.0000    0.91141 1.000 0.000 0.000
#> GSM486833     1  0.0000    0.91141 1.000 0.000 0.000
#> GSM486835     1  0.2356    0.86327 0.928 0.072 0.000
#> GSM486837     1  0.0424    0.90785 0.992 0.008 0.000
#> GSM486839     1  0.0000    0.91141 1.000 0.000 0.000
#> GSM486841     1  0.3752    0.78849 0.856 0.144 0.000
#> GSM486843     1  0.0237    0.91044 0.996 0.004 0.000
#> GSM486845     1  0.0000    0.91141 1.000 0.000 0.000
#> GSM486847     1  0.0000    0.91141 1.000 0.000 0.000
#> GSM486849     1  0.0237    0.91039 0.996 0.004 0.000
#> GSM486851     1  0.0892    0.90294 0.980 0.020 0.000
#> GSM486853     1  0.0000    0.91141 1.000 0.000 0.000
#> GSM486855     1  0.0000    0.91141 1.000 0.000 0.000
#> GSM486857     1  0.0000    0.91141 1.000 0.000 0.000
#> GSM486736     3  0.6111    0.48639 0.000 0.396 0.604
#> GSM486738     3  0.0000    0.84175 0.000 0.000 1.000
#> GSM486740     3  0.6045    0.50684 0.000 0.380 0.620
#> GSM486742     3  0.0424    0.84100 0.000 0.008 0.992
#> GSM486744     3  0.0237    0.84153 0.000 0.004 0.996
#> GSM486746     3  0.6111    0.48639 0.000 0.396 0.604
#> GSM486748     3  0.0424    0.84100 0.000 0.008 0.992
#> GSM486750     3  0.1964    0.81985 0.000 0.056 0.944
#> GSM486752     3  0.1860    0.82230 0.000 0.052 0.948
#> GSM486754     3  0.2796    0.78483 0.000 0.092 0.908
#> GSM486756     2  0.6215    0.38355 0.000 0.572 0.428
#> GSM486758     3  0.3752    0.72552 0.000 0.144 0.856
#> GSM486760     3  0.5678    0.58257 0.000 0.316 0.684
#> GSM486762     2  0.6244    0.36547 0.000 0.560 0.440
#> GSM486764     3  0.0000    0.84175 0.000 0.000 1.000
#> GSM486766     3  0.0424    0.84100 0.000 0.008 0.992
#> GSM486768     3  0.1289    0.83196 0.000 0.032 0.968
#> GSM486770     3  0.5968    0.52705 0.000 0.364 0.636
#> GSM486772     3  0.5327    0.62973 0.000 0.272 0.728
#> GSM486774     3  0.4062    0.69882 0.000 0.164 0.836
#> GSM486776     2  0.6225    0.37884 0.000 0.568 0.432
#> GSM486778     3  0.5138    0.65228 0.000 0.252 0.748
#> GSM486780     3  0.2448    0.80045 0.000 0.076 0.924
#> GSM486782     3  0.0747    0.83931 0.000 0.016 0.984
#> GSM486784     3  0.0424    0.84100 0.000 0.008 0.992
#> GSM486786     3  0.0237    0.84132 0.000 0.004 0.996
#> GSM486788     3  0.1860    0.82220 0.000 0.052 0.948
#> GSM486790     3  0.0892    0.83808 0.000 0.020 0.980
#> GSM486792     3  0.6079    0.49687 0.000 0.388 0.612
#> GSM486794     3  0.1860    0.81904 0.000 0.052 0.948
#> GSM486796     3  0.1411    0.83043 0.000 0.036 0.964
#> GSM486798     3  0.0237    0.84153 0.000 0.004 0.996
#> GSM486800     3  0.0592    0.83967 0.000 0.012 0.988
#> GSM486802     3  0.5988    0.52296 0.000 0.368 0.632
#> GSM486804     3  0.0000    0.84175 0.000 0.000 1.000
#> GSM486806     3  0.2261    0.80675 0.000 0.068 0.932
#> GSM486808     3  0.1031    0.83594 0.000 0.024 0.976
#> GSM486810     2  0.6309    0.21310 0.000 0.504 0.496
#> GSM486812     3  0.5138    0.65169 0.000 0.252 0.748
#> GSM486814     3  0.6235   -0.09518 0.000 0.436 0.564
#> GSM486816     3  0.0892    0.83762 0.000 0.020 0.980
#> GSM486818     3  0.6309   -0.31137 0.000 0.496 0.504
#> GSM486821     3  0.6309   -0.32477 0.000 0.500 0.500
#> GSM486823     3  0.1411    0.83043 0.000 0.036 0.964
#> GSM486826     3  0.0000    0.84175 0.000 0.000 1.000
#> GSM486830     3  0.3267    0.76007 0.000 0.116 0.884
#> GSM486832     3  0.5291    0.49396 0.000 0.268 0.732
#> GSM486834     3  0.0000    0.84175 0.000 0.000 1.000
#> GSM486836     3  0.0592    0.83967 0.000 0.012 0.988
#> GSM486838     3  0.3619    0.73722 0.000 0.136 0.864
#> GSM486840     3  0.0000    0.84175 0.000 0.000 1.000
#> GSM486842     3  0.0592    0.83967 0.000 0.012 0.988
#> GSM486844     3  0.0237    0.84132 0.000 0.004 0.996
#> GSM486846     3  0.0592    0.84004 0.000 0.012 0.988
#> GSM486848     3  0.3686    0.73283 0.000 0.140 0.860
#> GSM486850     3  0.1529    0.82853 0.000 0.040 0.960
#> GSM486852     3  0.0592    0.83967 0.000 0.012 0.988
#> GSM486854     3  0.1031    0.83594 0.000 0.024 0.976
#> GSM486856     3  0.0747    0.83901 0.000 0.016 0.984
#> GSM486858     3  0.0000    0.84175 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
#> GSM486735     1  0.5355     0.4788 0.620 0.000 0.020 0.360
#> GSM486737     1  0.1452     0.8898 0.956 0.000 0.036 0.008
#> GSM486739     4  0.5399    -0.0921 0.468 0.000 0.012 0.520
#> GSM486741     1  0.3942     0.7642 0.764 0.000 0.236 0.000
#> GSM486743     1  0.2101     0.8859 0.928 0.000 0.060 0.012
#> GSM486745     4  0.5337     0.0682 0.424 0.000 0.012 0.564
#> GSM486747     1  0.5013     0.6602 0.688 0.000 0.292 0.020
#> GSM486749     1  0.2660     0.8843 0.908 0.000 0.036 0.056
#> GSM486751     1  0.2586     0.8844 0.912 0.000 0.040 0.048
#> GSM486753     1  0.2021     0.8855 0.936 0.000 0.024 0.040
#> GSM486755     1  0.4114     0.8304 0.828 0.000 0.060 0.112
#> GSM486757     1  0.0927     0.8905 0.976 0.000 0.008 0.016
#> GSM486759     1  0.2032     0.8885 0.936 0.000 0.028 0.036
#> GSM486761     1  0.4004     0.8155 0.812 0.000 0.164 0.024
#> GSM486763     1  0.1724     0.8883 0.948 0.000 0.020 0.032
#> GSM486765     1  0.3908     0.7839 0.784 0.000 0.212 0.004
#> GSM486767     3  0.4866    -0.1680 0.404 0.000 0.596 0.000
#> GSM486769     1  0.3760     0.8358 0.836 0.000 0.028 0.136
#> GSM486771     1  0.2399     0.8843 0.920 0.000 0.032 0.048
#> GSM486773     1  0.3355     0.8343 0.836 0.000 0.160 0.004
#> GSM486775     1  0.5138     0.5025 0.600 0.000 0.392 0.008
#> GSM486777     1  0.3015     0.8693 0.884 0.000 0.024 0.092
#> GSM486779     1  0.1151     0.8902 0.968 0.000 0.008 0.024
#> GSM486781     1  0.2411     0.8839 0.920 0.000 0.040 0.040
#> GSM486783     1  0.2466     0.8803 0.916 0.000 0.056 0.028
#> GSM486785     1  0.2706     0.8754 0.900 0.000 0.020 0.080
#> GSM486787     1  0.4104     0.8410 0.832 0.000 0.088 0.080
#> GSM486789     1  0.5742     0.6962 0.712 0.000 0.120 0.168
#> GSM486791     1  0.3160     0.8612 0.872 0.000 0.020 0.108
#> GSM486793     1  0.1256     0.8893 0.964 0.000 0.028 0.008
#> GSM486795     1  0.3009     0.8757 0.892 0.000 0.052 0.056
#> GSM486797     1  0.3105     0.8564 0.868 0.000 0.120 0.012
#> GSM486799     1  0.2882     0.8712 0.892 0.000 0.084 0.024
#> GSM486801     1  0.4163     0.8412 0.828 0.000 0.096 0.076
#> GSM486803     1  0.2699     0.8795 0.904 0.000 0.028 0.068
#> GSM486805     1  0.1174     0.8894 0.968 0.000 0.020 0.012
#> GSM486807     1  0.0657     0.8899 0.984 0.000 0.012 0.004
#> GSM486809     1  0.1109     0.8894 0.968 0.000 0.028 0.004
#> GSM486811     1  0.6231     0.6601 0.668 0.000 0.148 0.184
#> GSM486813     1  0.5815     0.5937 0.652 0.000 0.288 0.060
#> GSM486815     1  0.1174     0.8902 0.968 0.000 0.012 0.020
#> GSM486817     1  0.2775     0.8708 0.896 0.000 0.020 0.084
#> GSM486819     1  0.3899     0.8388 0.840 0.000 0.052 0.108
#> GSM486822     1  0.1807     0.8854 0.940 0.000 0.008 0.052
#> GSM486824     1  0.3694     0.8418 0.844 0.000 0.032 0.124
#> GSM486828     1  0.3716     0.8476 0.852 0.000 0.052 0.096
#> GSM486831     1  0.1059     0.8905 0.972 0.000 0.012 0.016
#> GSM486833     1  0.2179     0.8815 0.924 0.000 0.012 0.064
#> GSM486835     1  0.2844     0.8792 0.900 0.000 0.052 0.048
#> GSM486837     1  0.1938     0.8867 0.936 0.000 0.052 0.012
#> GSM486839     1  0.2813     0.8764 0.896 0.000 0.024 0.080
#> GSM486841     1  0.4055     0.8436 0.832 0.000 0.060 0.108
#> GSM486843     1  0.3598     0.8508 0.848 0.000 0.028 0.124
#> GSM486845     1  0.1722     0.8861 0.944 0.000 0.008 0.048
#> GSM486847     1  0.1724     0.8877 0.948 0.000 0.020 0.032
#> GSM486849     1  0.1767     0.8886 0.944 0.000 0.012 0.044
#> GSM486851     1  0.1837     0.8880 0.944 0.000 0.028 0.028
#> GSM486853     1  0.1059     0.8897 0.972 0.000 0.012 0.016
#> GSM486855     1  0.1174     0.8901 0.968 0.000 0.012 0.020
#> GSM486857     1  0.0927     0.8905 0.976 0.000 0.008 0.016
#> GSM486736     4  0.4137     0.5183 0.012 0.208 0.000 0.780
#> GSM486738     2  0.0188     0.8210 0.000 0.996 0.004 0.000
#> GSM486740     4  0.4088     0.5193 0.000 0.232 0.004 0.764
#> GSM486742     2  0.0657     0.8199 0.000 0.984 0.004 0.012
#> GSM486744     2  0.1807     0.8095 0.000 0.940 0.008 0.052
#> GSM486746     4  0.5200     0.4854 0.000 0.264 0.036 0.700
#> GSM486748     2  0.0336     0.8200 0.000 0.992 0.008 0.000
#> GSM486750     2  0.2412     0.7940 0.000 0.908 0.084 0.008
#> GSM486752     2  0.2408     0.7836 0.000 0.896 0.104 0.000
#> GSM486754     2  0.5573     0.0402 0.000 0.604 0.368 0.028
#> GSM486756     4  0.7426     0.3890 0.000 0.224 0.264 0.512
#> GSM486758     2  0.3024     0.7233 0.000 0.852 0.148 0.000
#> GSM486760     2  0.3757     0.7263 0.000 0.828 0.152 0.020
#> GSM486762     3  0.5137     0.3675 0.000 0.452 0.544 0.004
#> GSM486764     2  0.0188     0.8210 0.000 0.996 0.004 0.000
#> GSM486766     2  0.0707     0.8196 0.000 0.980 0.020 0.000
#> GSM486768     2  0.3205     0.7416 0.000 0.872 0.104 0.024
#> GSM486770     2  0.5102     0.6558 0.000 0.764 0.136 0.100
#> GSM486772     2  0.3529     0.7288 0.000 0.836 0.152 0.012
#> GSM486774     2  0.4164     0.5132 0.000 0.736 0.264 0.000
#> GSM486776     3  0.4804     0.4321 0.000 0.384 0.616 0.000
#> GSM486778     2  0.3907     0.7326 0.000 0.828 0.140 0.032
#> GSM486780     2  0.1902     0.8026 0.000 0.932 0.064 0.004
#> GSM486782     2  0.4046     0.6980 0.000 0.828 0.124 0.048
#> GSM486784     2  0.0188     0.8205 0.000 0.996 0.004 0.000
#> GSM486786     2  0.2300     0.8098 0.000 0.924 0.028 0.048
#> GSM486788     2  0.3335     0.7614 0.000 0.860 0.120 0.020
#> GSM486790     4  0.6316     0.4363 0.000 0.300 0.088 0.612
#> GSM486792     2  0.6658    -0.1163 0.000 0.472 0.084 0.444
#> GSM486794     2  0.3852     0.6359 0.000 0.800 0.192 0.008
#> GSM486796     2  0.2480     0.7928 0.000 0.904 0.088 0.008
#> GSM486798     2  0.0000     0.8206 0.000 1.000 0.000 0.000
#> GSM486800     2  0.1022     0.8187 0.000 0.968 0.032 0.000
#> GSM486802     2  0.4197     0.7078 0.000 0.808 0.156 0.036
#> GSM486804     2  0.0469     0.8215 0.000 0.988 0.000 0.012
#> GSM486806     2  0.3257     0.7005 0.000 0.844 0.152 0.004
#> GSM486808     2  0.0817     0.8165 0.000 0.976 0.024 0.000
#> GSM486810     2  0.4994    -0.3260 0.000 0.520 0.480 0.000
#> GSM486812     2  0.3907     0.7326 0.000 0.828 0.140 0.032
#> GSM486814     2  0.5345    -0.1734 0.000 0.560 0.428 0.012
#> GSM486816     2  0.1004     0.8191 0.000 0.972 0.024 0.004
#> GSM486818     4  0.7828     0.1711 0.000 0.296 0.292 0.412
#> GSM486821     3  0.5937     0.2501 0.000 0.472 0.492 0.036
#> GSM486823     2  0.2197     0.8125 0.000 0.928 0.048 0.024
#> GSM486826     2  0.1211     0.8170 0.000 0.960 0.000 0.040
#> GSM486830     2  0.5537     0.4022 0.000 0.688 0.256 0.056
#> GSM486832     2  0.4164     0.5161 0.000 0.736 0.264 0.000
#> GSM486834     2  0.1305     0.8157 0.000 0.960 0.004 0.036
#> GSM486836     2  0.2021     0.8140 0.000 0.936 0.040 0.024
#> GSM486838     2  0.3873     0.5883 0.000 0.772 0.228 0.000
#> GSM486840     2  0.1109     0.8197 0.000 0.968 0.004 0.028
#> GSM486842     2  0.2300     0.8097 0.000 0.924 0.048 0.028
#> GSM486844     2  0.1388     0.8195 0.000 0.960 0.012 0.028
#> GSM486846     2  0.2546     0.7826 0.000 0.912 0.060 0.028
#> GSM486848     2  0.2125     0.7951 0.000 0.920 0.076 0.004
#> GSM486850     2  0.2281     0.7895 0.000 0.904 0.096 0.000
#> GSM486852     2  0.1489     0.8153 0.000 0.952 0.044 0.004
#> GSM486854     2  0.1576     0.8053 0.000 0.948 0.048 0.004
#> GSM486856     2  0.0469     0.8193 0.000 0.988 0.012 0.000
#> GSM486858     2  0.0188     0.8205 0.000 0.996 0.004 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
#> GSM486735     4  0.6127     0.0818 0.000 0.316 0.000 0.532 0.152
#> GSM486737     4  0.2017     0.7735 0.008 0.000 0.000 0.912 0.080
#> GSM486739     2  0.6166    -0.2003 0.000 0.512 0.000 0.340 0.148
#> GSM486741     4  0.2554     0.7531 0.036 0.000 0.000 0.892 0.072
#> GSM486743     4  0.1281     0.7911 0.012 0.000 0.000 0.956 0.032
#> GSM486745     2  0.6054    -0.1394 0.000 0.548 0.000 0.304 0.148
#> GSM486747     4  0.3949     0.3565 0.004 0.000 0.000 0.696 0.300
#> GSM486749     4  0.2864     0.7893 0.012 0.000 0.000 0.852 0.136
#> GSM486751     4  0.2997     0.7873 0.012 0.000 0.000 0.840 0.148
#> GSM486753     4  0.1197     0.7992 0.000 0.000 0.000 0.952 0.048
#> GSM486755     4  0.3331     0.7694 0.024 0.044 0.000 0.864 0.068
#> GSM486757     4  0.2424     0.7955 0.000 0.000 0.000 0.868 0.132
#> GSM486759     4  0.3146     0.7944 0.028 0.000 0.000 0.844 0.128
#> GSM486761     4  0.3086     0.6735 0.004 0.000 0.000 0.816 0.180
#> GSM486763     4  0.3055     0.7855 0.016 0.000 0.000 0.840 0.144
#> GSM486765     4  0.3720     0.5731 0.012 0.000 0.000 0.760 0.228
#> GSM486767     4  0.4284     0.5425 0.040 0.004 0.000 0.752 0.204
#> GSM486769     4  0.3326     0.7711 0.000 0.024 0.000 0.824 0.152
#> GSM486771     4  0.2719     0.7858 0.000 0.004 0.000 0.852 0.144
#> GSM486773     4  0.1894     0.7735 0.008 0.000 0.000 0.920 0.072
#> GSM486775     4  0.4313     0.1943 0.008 0.000 0.000 0.636 0.356
#> GSM486777     4  0.3828     0.7701 0.072 0.000 0.000 0.808 0.120
#> GSM486779     4  0.2488     0.7955 0.004 0.000 0.000 0.872 0.124
#> GSM486781     4  0.1484     0.7899 0.008 0.000 0.000 0.944 0.048
#> GSM486783     4  0.2920     0.7284 0.016 0.000 0.000 0.852 0.132
#> GSM486785     4  0.3375     0.7881 0.056 0.000 0.000 0.840 0.104
#> GSM486787     4  0.4931     0.7092 0.124 0.012 0.000 0.740 0.124
#> GSM486789     4  0.5724     0.4318 0.072 0.152 0.000 0.700 0.076
#> GSM486791     4  0.3733     0.7641 0.008 0.028 0.000 0.808 0.156
#> GSM486793     4  0.1282     0.7904 0.004 0.000 0.000 0.952 0.044
#> GSM486795     4  0.3106     0.7928 0.020 0.000 0.000 0.840 0.140
#> GSM486797     4  0.2020     0.7579 0.000 0.000 0.000 0.900 0.100
#> GSM486799     4  0.2719     0.7182 0.004 0.000 0.000 0.852 0.144
#> GSM486801     4  0.5195     0.7080 0.108 0.028 0.000 0.732 0.132
#> GSM486803     4  0.3622     0.7778 0.056 0.000 0.000 0.820 0.124
#> GSM486805     4  0.0880     0.7919 0.000 0.000 0.000 0.968 0.032
#> GSM486807     4  0.1197     0.7853 0.000 0.000 0.000 0.952 0.048
#> GSM486809     4  0.1357     0.7958 0.004 0.000 0.000 0.948 0.048
#> GSM486811     1  0.6774     0.0000 0.600 0.084 0.000 0.192 0.124
#> GSM486813     5  0.6779     0.0000 0.156 0.020 0.000 0.356 0.468
#> GSM486815     4  0.4946     0.6785 0.120 0.000 0.000 0.712 0.168
#> GSM486817     4  0.3441     0.7743 0.004 0.028 0.000 0.828 0.140
#> GSM486819     4  0.3254     0.7683 0.020 0.052 0.000 0.868 0.060
#> GSM486822     4  0.2648     0.7821 0.000 0.000 0.000 0.848 0.152
#> GSM486824     4  0.4679     0.6626 0.124 0.000 0.000 0.740 0.136
#> GSM486828     4  0.2610     0.7848 0.020 0.020 0.000 0.900 0.060
#> GSM486831     4  0.1571     0.7929 0.004 0.000 0.000 0.936 0.060
#> GSM486833     4  0.2886     0.7815 0.000 0.008 0.000 0.844 0.148
#> GSM486835     4  0.2416     0.8011 0.012 0.000 0.000 0.888 0.100
#> GSM486837     4  0.2020     0.7602 0.000 0.000 0.000 0.900 0.100
#> GSM486839     4  0.4216     0.6661 0.120 0.000 0.000 0.780 0.100
#> GSM486841     4  0.5274     0.5912 0.192 0.000 0.000 0.676 0.132
#> GSM486843     4  0.4057     0.7419 0.088 0.000 0.000 0.792 0.120
#> GSM486845     4  0.2536     0.7973 0.000 0.004 0.000 0.868 0.128
#> GSM486847     4  0.1956     0.7800 0.008 0.000 0.000 0.916 0.076
#> GSM486849     4  0.2424     0.7952 0.000 0.000 0.000 0.868 0.132
#> GSM486851     4  0.2488     0.7966 0.004 0.000 0.000 0.872 0.124
#> GSM486853     4  0.0794     0.7919 0.000 0.000 0.000 0.972 0.028
#> GSM486855     4  0.2046     0.7954 0.016 0.000 0.000 0.916 0.068
#> GSM486857     4  0.0703     0.7985 0.000 0.000 0.000 0.976 0.024
#> GSM486736     2  0.0510     0.5020 0.000 0.984 0.016 0.000 0.000
#> GSM486738     3  0.1757     0.8686 0.048 0.012 0.936 0.000 0.004
#> GSM486740     2  0.0771     0.5063 0.004 0.976 0.020 0.000 0.000
#> GSM486742     3  0.1012     0.8706 0.020 0.012 0.968 0.000 0.000
#> GSM486744     3  0.4403     0.7888 0.064 0.056 0.804 0.000 0.076
#> GSM486746     2  0.1981     0.4955 0.048 0.924 0.028 0.000 0.000
#> GSM486748     3  0.1195     0.8715 0.028 0.000 0.960 0.000 0.012
#> GSM486750     3  0.3555     0.8127 0.124 0.052 0.824 0.000 0.000
#> GSM486752     3  0.3165     0.8276 0.116 0.036 0.848 0.000 0.000
#> GSM486754     3  0.6753     0.2443 0.104 0.044 0.500 0.000 0.352
#> GSM486756     2  0.5459     0.4691 0.156 0.716 0.052 0.000 0.076
#> GSM486758     3  0.2304     0.8504 0.044 0.000 0.908 0.000 0.048
#> GSM486760     3  0.5117     0.6383 0.276 0.072 0.652 0.000 0.000
#> GSM486762     3  0.3567     0.7943 0.032 0.004 0.820 0.000 0.144
#> GSM486764     3  0.1205     0.8696 0.040 0.000 0.956 0.000 0.004
#> GSM486766     3  0.1444     0.8669 0.012 0.000 0.948 0.000 0.040
#> GSM486768     3  0.1405     0.8687 0.016 0.008 0.956 0.000 0.020
#> GSM486770     3  0.5312     0.6547 0.124 0.208 0.668 0.000 0.000
#> GSM486772     3  0.4317     0.7685 0.160 0.076 0.764 0.000 0.000
#> GSM486774     3  0.1106     0.8672 0.024 0.000 0.964 0.000 0.012
#> GSM486776     3  0.4941     0.5324 0.044 0.000 0.628 0.000 0.328
#> GSM486778     3  0.4284     0.7382 0.224 0.040 0.736 0.000 0.000
#> GSM486780     3  0.1661     0.8630 0.036 0.000 0.940 0.000 0.024
#> GSM486782     3  0.5522     0.6679 0.080 0.048 0.708 0.000 0.164
#> GSM486784     3  0.0324     0.8692 0.004 0.000 0.992 0.000 0.004
#> GSM486786     3  0.2116     0.8692 0.076 0.004 0.912 0.000 0.008
#> GSM486788     3  0.2915     0.8329 0.116 0.024 0.860 0.000 0.000
#> GSM486790     2  0.4788     0.4978 0.144 0.760 0.068 0.000 0.028
#> GSM486792     2  0.5417     0.3284 0.116 0.648 0.236 0.000 0.000
#> GSM486794     3  0.3387     0.8087 0.020 0.008 0.832 0.000 0.140
#> GSM486796     3  0.2519     0.8441 0.100 0.016 0.884 0.000 0.000
#> GSM486798     3  0.0404     0.8696 0.012 0.000 0.988 0.000 0.000
#> GSM486800     3  0.2583     0.8415 0.132 0.004 0.864 0.000 0.000
#> GSM486802     3  0.5483     0.3743 0.424 0.064 0.512 0.000 0.000
#> GSM486804     3  0.1124     0.8699 0.036 0.000 0.960 0.000 0.004
#> GSM486806     3  0.0671     0.8699 0.004 0.000 0.980 0.000 0.016
#> GSM486808     3  0.0671     0.8677 0.016 0.000 0.980 0.000 0.004
#> GSM486810     3  0.2344     0.8517 0.032 0.000 0.904 0.000 0.064
#> GSM486812     3  0.4547     0.7037 0.252 0.044 0.704 0.000 0.000
#> GSM486814     3  0.5197     0.6364 0.068 0.012 0.684 0.000 0.236
#> GSM486816     3  0.3416     0.8171 0.072 0.000 0.840 0.000 0.088
#> GSM486818     2  0.7147     0.2620 0.076 0.464 0.360 0.000 0.100
#> GSM486821     3  0.5364     0.6997 0.108 0.044 0.728 0.000 0.120
#> GSM486823     3  0.2905     0.8413 0.096 0.036 0.868 0.000 0.000
#> GSM486826     3  0.1522     0.8682 0.044 0.000 0.944 0.000 0.012
#> GSM486830     3  0.3483     0.8244 0.088 0.032 0.852 0.000 0.028
#> GSM486832     3  0.1493     0.8645 0.028 0.000 0.948 0.000 0.024
#> GSM486834     3  0.1243     0.8716 0.028 0.008 0.960 0.000 0.004
#> GSM486836     3  0.1704     0.8624 0.068 0.004 0.928 0.000 0.000
#> GSM486838     3  0.0912     0.8688 0.012 0.000 0.972 0.000 0.016
#> GSM486840     3  0.0609     0.8695 0.020 0.000 0.980 0.000 0.000
#> GSM486842     3  0.1831     0.8592 0.076 0.004 0.920 0.000 0.000
#> GSM486844     3  0.0963     0.8704 0.036 0.000 0.964 0.000 0.000
#> GSM486846     3  0.3912     0.7851 0.028 0.020 0.808 0.000 0.144
#> GSM486848     3  0.2588     0.8486 0.048 0.000 0.892 0.000 0.060
#> GSM486850     3  0.2408     0.8479 0.092 0.016 0.892 0.000 0.000
#> GSM486852     3  0.1638     0.8614 0.064 0.004 0.932 0.000 0.000
#> GSM486854     3  0.0740     0.8702 0.008 0.004 0.980 0.000 0.008
#> GSM486856     3  0.0451     0.8691 0.008 0.000 0.988 0.000 0.004
#> GSM486858     3  0.0703     0.8702 0.024 0.000 0.976 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
#> GSM486735     4  0.5343     0.1279 0.000 0.000 0.000 0.580 0.156 0.264
#> GSM486737     4  0.1477     0.7525 0.000 0.008 0.004 0.940 0.048 0.000
#> GSM486739     6  0.5797    -0.3467 0.000 0.000 0.004 0.392 0.156 0.448
#> GSM486741     4  0.1478     0.7279 0.000 0.020 0.004 0.944 0.032 0.000
#> GSM486743     4  0.1296     0.7360 0.000 0.012 0.004 0.952 0.032 0.000
#> GSM486745     6  0.5592    -0.2488 0.000 0.000 0.000 0.340 0.156 0.504
#> GSM486747     4  0.4222     0.4699 0.000 0.160 0.012 0.752 0.076 0.000
#> GSM486749     4  0.2527     0.7111 0.000 0.000 0.000 0.832 0.168 0.000
#> GSM486751     4  0.2527     0.7091 0.000 0.000 0.000 0.832 0.168 0.000
#> GSM486753     4  0.1615     0.7479 0.000 0.004 0.004 0.928 0.064 0.000
#> GSM486755     4  0.3219     0.6796 0.000 0.012 0.004 0.848 0.052 0.084
#> GSM486757     4  0.2260     0.7335 0.000 0.000 0.000 0.860 0.140 0.000
#> GSM486759     4  0.3037     0.7004 0.000 0.000 0.016 0.808 0.176 0.000
#> GSM486761     4  0.3011     0.6564 0.000 0.036 0.012 0.852 0.100 0.000
#> GSM486763     4  0.2697     0.7066 0.000 0.000 0.000 0.812 0.188 0.000
#> GSM486765     4  0.4234     0.4257 0.000 0.100 0.004 0.744 0.152 0.000
#> GSM486767     4  0.3830     0.5453 0.000 0.072 0.008 0.796 0.120 0.004
#> GSM486769     4  0.3175     0.7034 0.000 0.000 0.000 0.808 0.164 0.028
#> GSM486771     4  0.2454     0.7123 0.000 0.000 0.000 0.840 0.160 0.000
#> GSM486773     4  0.1401     0.7292 0.000 0.020 0.004 0.948 0.028 0.000
#> GSM486775     4  0.6114    -0.3872 0.000 0.252 0.008 0.468 0.272 0.000
#> GSM486777     4  0.4024     0.6358 0.000 0.000 0.072 0.744 0.184 0.000
#> GSM486779     4  0.3023     0.6797 0.000 0.000 0.004 0.784 0.212 0.000
#> GSM486781     4  0.1313     0.7310 0.000 0.016 0.004 0.952 0.028 0.000
#> GSM486783     4  0.2689     0.7082 0.000 0.080 0.004 0.876 0.036 0.004
#> GSM486785     4  0.3953     0.3474 0.000 0.000 0.016 0.656 0.328 0.000
#> GSM486787     4  0.4100     0.6559 0.000 0.000 0.064 0.752 0.176 0.008
#> GSM486789     4  0.5871     0.1110 0.000 0.092 0.004 0.624 0.072 0.208
#> GSM486791     4  0.4067     0.6554 0.000 0.000 0.008 0.756 0.172 0.064
#> GSM486793     4  0.1390     0.7290 0.000 0.016 0.004 0.948 0.032 0.000
#> GSM486795     4  0.3014     0.6971 0.000 0.000 0.012 0.804 0.184 0.000
#> GSM486797     4  0.1605     0.7246 0.000 0.016 0.004 0.936 0.044 0.000
#> GSM486799     4  0.2663     0.6863 0.000 0.028 0.012 0.876 0.084 0.000
#> GSM486801     4  0.4094     0.6388 0.000 0.000 0.080 0.740 0.180 0.000
#> GSM486803     4  0.3865     0.5952 0.000 0.000 0.032 0.720 0.248 0.000
#> GSM486805     4  0.1346     0.7307 0.000 0.016 0.008 0.952 0.024 0.000
#> GSM486807     4  0.1737     0.7357 0.000 0.020 0.008 0.932 0.040 0.000
#> GSM486809     4  0.1464     0.7326 0.000 0.016 0.004 0.944 0.036 0.000
#> GSM486811     3  0.5313     0.0000 0.000 0.004 0.660 0.128 0.188 0.020
#> GSM486813     2  0.5360    -0.5200 0.000 0.508 0.004 0.420 0.036 0.032
#> GSM486815     5  0.4918     0.3905 0.000 0.000 0.052 0.432 0.512 0.004
#> GSM486817     4  0.4728     0.4442 0.000 0.000 0.000 0.680 0.144 0.176
#> GSM486819     4  0.2100     0.7379 0.000 0.008 0.004 0.916 0.048 0.024
#> GSM486822     4  0.2454     0.7169 0.000 0.000 0.000 0.840 0.160 0.000
#> GSM486824     5  0.5767    -0.0267 0.004 0.012 0.132 0.268 0.580 0.004
#> GSM486828     4  0.2113     0.7391 0.000 0.008 0.004 0.916 0.044 0.028
#> GSM486831     4  0.1524     0.7400 0.000 0.000 0.008 0.932 0.060 0.000
#> GSM486833     4  0.2473     0.7246 0.000 0.000 0.000 0.856 0.136 0.008
#> GSM486835     4  0.2896     0.7124 0.000 0.000 0.016 0.824 0.160 0.000
#> GSM486837     4  0.2595     0.7110 0.000 0.056 0.008 0.888 0.044 0.004
#> GSM486839     4  0.4040     0.5827 0.000 0.008 0.116 0.780 0.092 0.004
#> GSM486841     4  0.5480     0.0392 0.000 0.000 0.252 0.564 0.184 0.000
#> GSM486843     4  0.4082     0.6003 0.000 0.000 0.084 0.756 0.156 0.004
#> GSM486845     4  0.2804     0.7386 0.000 0.024 0.004 0.852 0.120 0.000
#> GSM486847     4  0.2062     0.7306 0.000 0.000 0.008 0.900 0.088 0.004
#> GSM486849     4  0.2300     0.7245 0.000 0.000 0.000 0.856 0.144 0.000
#> GSM486851     4  0.2491     0.7125 0.000 0.000 0.000 0.836 0.164 0.000
#> GSM486853     4  0.0951     0.7401 0.000 0.004 0.008 0.968 0.020 0.000
#> GSM486855     4  0.3277     0.7230 0.000 0.024 0.020 0.828 0.128 0.000
#> GSM486857     4  0.1080     0.7407 0.000 0.004 0.004 0.960 0.032 0.000
#> GSM486736     6  0.0964     0.4881 0.004 0.012 0.016 0.000 0.000 0.968
#> GSM486738     1  0.2680     0.7479 0.856 0.124 0.016 0.000 0.000 0.004
#> GSM486740     6  0.1167     0.4920 0.008 0.012 0.020 0.000 0.000 0.960
#> GSM486742     1  0.1897     0.7721 0.908 0.084 0.004 0.000 0.000 0.004
#> GSM486744     1  0.4904     0.4168 0.620 0.316 0.024 0.000 0.000 0.040
#> GSM486746     6  0.2250     0.4748 0.020 0.000 0.092 0.000 0.000 0.888
#> GSM486748     1  0.2695     0.7402 0.844 0.144 0.008 0.000 0.004 0.000
#> GSM486750     1  0.2933     0.7637 0.844 0.016 0.128 0.000 0.000 0.012
#> GSM486752     1  0.2982     0.7619 0.844 0.016 0.124 0.000 0.000 0.016
#> GSM486754     2  0.4591    -0.3975 0.464 0.500 0.000 0.000 0.000 0.036
#> GSM486756     6  0.5170     0.4429 0.064 0.140 0.012 0.000 0.068 0.716
#> GSM486758     1  0.4746     0.4660 0.620 0.020 0.032 0.000 0.328 0.000
#> GSM486760     1  0.3991     0.6767 0.724 0.008 0.240 0.000 0.000 0.028
#> GSM486762     1  0.4113     0.6520 0.744 0.056 0.008 0.000 0.192 0.000
#> GSM486764     1  0.2704     0.7718 0.876 0.012 0.036 0.000 0.076 0.000
#> GSM486766     1  0.2825     0.7613 0.868 0.064 0.008 0.000 0.060 0.000
#> GSM486768     1  0.2377     0.7537 0.868 0.124 0.004 0.000 0.000 0.004
#> GSM486770     1  0.4168     0.7124 0.764 0.016 0.144 0.000 0.000 0.076
#> GSM486772     1  0.3272     0.7522 0.820 0.016 0.144 0.000 0.000 0.020
#> GSM486774     1  0.1218     0.7837 0.956 0.028 0.004 0.000 0.012 0.000
#> GSM486776     1  0.6363    -0.0424 0.404 0.236 0.016 0.000 0.344 0.000
#> GSM486778     1  0.3582     0.7242 0.776 0.008 0.192 0.000 0.000 0.024
#> GSM486780     1  0.3834     0.6696 0.760 0.020 0.020 0.000 0.200 0.000
#> GSM486782     1  0.4631     0.1511 0.536 0.428 0.004 0.000 0.000 0.032
#> GSM486784     1  0.0603     0.7848 0.980 0.016 0.004 0.000 0.000 0.000
#> GSM486786     1  0.3994     0.6841 0.752 0.008 0.048 0.000 0.192 0.000
#> GSM486788     1  0.2892     0.7615 0.840 0.004 0.136 0.000 0.000 0.020
#> GSM486790     6  0.3628     0.4907 0.084 0.060 0.008 0.000 0.020 0.828
#> GSM486792     6  0.5321     0.2611 0.232 0.000 0.156 0.000 0.004 0.608
#> GSM486794     1  0.5208     0.4432 0.624 0.248 0.008 0.000 0.120 0.000
#> GSM486796     1  0.2376     0.7750 0.884 0.008 0.096 0.000 0.000 0.012
#> GSM486798     1  0.0909     0.7854 0.968 0.020 0.012 0.000 0.000 0.000
#> GSM486800     1  0.3016     0.7793 0.852 0.048 0.092 0.000 0.000 0.008
#> GSM486802     1  0.4310     0.6665 0.712 0.024 0.236 0.000 0.000 0.028
#> GSM486804     1  0.2556     0.7724 0.884 0.012 0.028 0.000 0.076 0.000
#> GSM486806     1  0.0713     0.7857 0.972 0.028 0.000 0.000 0.000 0.000
#> GSM486808     1  0.0767     0.7840 0.976 0.008 0.004 0.000 0.012 0.000
#> GSM486810     1  0.2202     0.7799 0.908 0.028 0.012 0.000 0.052 0.000
#> GSM486812     1  0.3761     0.6999 0.744 0.008 0.228 0.000 0.000 0.020
#> GSM486814     1  0.3950     0.5694 0.708 0.268 0.004 0.000 0.004 0.016
#> GSM486816     1  0.5161     0.2272 0.496 0.020 0.044 0.000 0.440 0.000
#> GSM486818     6  0.6653     0.3045 0.092 0.060 0.036 0.000 0.268 0.544
#> GSM486821     1  0.6268     0.4037 0.616 0.136 0.012 0.000 0.096 0.140
#> GSM486823     1  0.2617     0.7741 0.872 0.016 0.100 0.000 0.000 0.012
#> GSM486826     1  0.4217     0.6022 0.700 0.016 0.024 0.000 0.260 0.000
#> GSM486830     1  0.2781     0.7525 0.868 0.040 0.008 0.000 0.000 0.084
#> GSM486832     1  0.1882     0.7761 0.920 0.012 0.008 0.000 0.060 0.000
#> GSM486834     1  0.3099     0.7803 0.864 0.012 0.056 0.000 0.056 0.012
#> GSM486836     1  0.2056     0.7842 0.904 0.004 0.080 0.000 0.012 0.000
#> GSM486838     1  0.0748     0.7836 0.976 0.016 0.004 0.000 0.004 0.000
#> GSM486840     1  0.0692     0.7892 0.976 0.000 0.020 0.000 0.004 0.000
#> GSM486842     1  0.2020     0.7823 0.896 0.000 0.096 0.000 0.008 0.000
#> GSM486844     1  0.1708     0.7885 0.932 0.004 0.040 0.000 0.024 0.000
#> GSM486846     1  0.4516     0.2151 0.552 0.420 0.008 0.000 0.000 0.020
#> GSM486848     1  0.4265     0.5773 0.680 0.016 0.020 0.000 0.284 0.000
#> GSM486850     1  0.2275     0.7771 0.888 0.008 0.096 0.000 0.000 0.008
#> GSM486852     1  0.2153     0.7824 0.900 0.004 0.084 0.000 0.008 0.004
#> GSM486854     1  0.1493     0.7810 0.936 0.056 0.004 0.000 0.000 0.004
#> GSM486856     1  0.0692     0.7847 0.976 0.020 0.004 0.000 0.000 0.000
#> GSM486858     1  0.1049     0.7878 0.960 0.000 0.032 0.000 0.008 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 agent(p) individual(p) k
#> ATC:NMF 120 4.67e-27         1.000 2
#> ATC:NMF  99 1.87e-22         1.000 3
#> ATC:NMF 104 2.61e-23         0.500 4
#> ATC:NMF 105 1.58e-23         0.478 5
#> ATC:NMF  90 1.76e-20         1.000 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