cola Report for GDS5363

Date: 2019-12-25 22:11:55 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 46361 rows and 139 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] 46361   139

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
SD:kmeans 2 1.000 1.000 1.000 **
SD:skmeans 3 1.000 0.962 0.984 ** 2
SD:pam 3 1.000 0.987 0.994 ** 2
SD:mclust 2 1.000 1.000 1.000 **
SD:NMF 2 1.000 1.000 1.000 **
CV:kmeans 2 1.000 1.000 1.000 **
CV:pam 3 1.000 0.983 0.993 ** 2
CV:mclust 2 1.000 1.000 1.000 **
CV:NMF 2 1.000 1.000 1.000 **
MAD:hclust 3 1.000 0.972 0.988 ** 2
MAD:kmeans 2 1.000 1.000 1.000 **
MAD:skmeans 4 1.000 0.960 0.974 ** 2,3
MAD:pam 2 1.000 0.997 0.999 **
MAD:mclust 2 1.000 1.000 1.000 **
MAD:NMF 2 1.000 1.000 1.000 **
ATC:kmeans 2 1.000 1.000 1.000 **
ATC:skmeans 3 1.000 0.986 0.977 ** 2
ATC:pam 4 1.000 0.989 0.996 ** 2,3
ATC:mclust 2 1.000 1.000 1.000 **
ATC:hclust 3 0.967 0.974 0.987 ** 2
CV:hclust 4 0.963 0.918 0.922 ** 2,3
SD:hclust 4 0.958 0.917 0.929 ** 2,3
CV:skmeans 3 0.941 0.948 0.972 * 2
ATC:NMF 3 0.931 0.947 0.928 * 2

**: 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     1           1.000       1.000          0.479 0.521   0.521
#> CV:NMF      2     1           1.000       1.000          0.479 0.521   0.521
#> MAD:NMF     2     1           1.000       1.000          0.479 0.521   0.521
#> ATC:NMF     2     1           1.000       1.000          0.479 0.521   0.521
#> SD:skmeans  2     1           1.000       1.000          0.479 0.521   0.521
#> CV:skmeans  2     1           1.000       1.000          0.479 0.521   0.521
#> MAD:skmeans 2     1           0.994       0.997          0.480 0.521   0.521
#> ATC:skmeans 2     1           1.000       1.000          0.479 0.521   0.521
#> SD:mclust   2     1           1.000       1.000          0.479 0.521   0.521
#> CV:mclust   2     1           1.000       1.000          0.479 0.521   0.521
#> MAD:mclust  2     1           1.000       1.000          0.479 0.521   0.521
#> ATC:mclust  2     1           1.000       1.000          0.479 0.521   0.521
#> SD:kmeans   2     1           1.000       1.000          0.479 0.521   0.521
#> CV:kmeans   2     1           1.000       1.000          0.479 0.521   0.521
#> MAD:kmeans  2     1           1.000       1.000          0.479 0.521   0.521
#> ATC:kmeans  2     1           1.000       1.000          0.479 0.521   0.521
#> SD:pam      2     1           1.000       1.000          0.479 0.521   0.521
#> CV:pam      2     1           1.000       1.000          0.479 0.521   0.521
#> MAD:pam     2     1           0.997       0.999          0.480 0.521   0.521
#> ATC:pam     2     1           1.000       1.000          0.479 0.521   0.521
#> SD:hclust   2     1           1.000       1.000          0.479 0.521   0.521
#> CV:hclust   2     1           1.000       1.000          0.479 0.521   0.521
#> MAD:hclust  2     1           1.000       1.000          0.479 0.521   0.521
#> ATC:hclust  2     1           1.000       1.000          0.479 0.521   0.521
get_stats(res_list, k = 3)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      3 0.784           0.842       0.867         0.1113 0.991   0.983
#> CV:NMF      3 0.852           0.937       0.923         0.1006 1.000   1.000
#> MAD:NMF     3 1.000           0.960       0.980         0.0487 0.984   0.969
#> ATC:NMF     3 0.931           0.947       0.928         0.1159 0.926   0.857
#> SD:skmeans  3 1.000           0.962       0.984         0.3834 0.815   0.645
#> CV:skmeans  3 0.941           0.948       0.972         0.3849 0.815   0.645
#> MAD:skmeans 3 1.000           0.991       0.997         0.3819 0.815   0.645
#> ATC:skmeans 3 1.000           0.986       0.977         0.1637 0.926   0.857
#> SD:mclust   3 0.707           0.832       0.874         0.3258 0.823   0.661
#> CV:mclust   3 0.727           0.849       0.890         0.3296 0.823   0.661
#> MAD:mclust  3 0.751           0.917       0.906         0.3354 0.818   0.650
#> ATC:mclust  3 0.591           0.840       0.786         0.2677 1.000   1.000
#> SD:kmeans   3 0.746           0.863       0.812         0.2844 0.821   0.657
#> CV:kmeans   3 0.714           0.702       0.690         0.2813 0.815   0.645
#> MAD:kmeans  3 0.731           0.941       0.826         0.2945 0.815   0.645
#> ATC:kmeans  3 0.619           0.826       0.785         0.2814 1.000   1.000
#> SD:pam      3 1.000           0.987       0.994         0.1528 0.927   0.859
#> CV:pam      3 1.000           0.983       0.993         0.1527 0.928   0.861
#> MAD:pam     3 0.713           0.806       0.846         0.2924 0.834   0.681
#> ATC:pam     3 1.000           0.990       0.997         0.1519 0.927   0.859
#> SD:hclust   3 1.000           0.975       0.990         0.1477 0.931   0.867
#> CV:hclust   3 1.000           0.977       0.991         0.1480 0.931   0.867
#> MAD:hclust  3 1.000           0.972       0.988         0.1533 0.927   0.859
#> ATC:hclust  3 0.967           0.974       0.987         0.1485 0.928   0.861
get_stats(res_list, k = 4)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      4 0.582           0.464       0.806         0.1638 0.994   0.989
#> CV:NMF      4 0.583           0.639       0.811         0.1650 0.966   0.935
#> MAD:NMF     4 0.617           0.693       0.821         0.2400 0.918   0.840
#> ATC:NMF     4 0.929           0.930       0.944         0.0321 0.994   0.988
#> SD:skmeans  4 0.824           0.911       0.916         0.1093 0.924   0.774
#> CV:skmeans  4 0.800           0.912       0.894         0.1083 0.924   0.774
#> MAD:skmeans 4 1.000           0.960       0.974         0.1117 0.925   0.777
#> ATC:skmeans 4 0.665           0.889       0.850         0.1691 1.000   1.000
#> SD:mclust   4 0.551           0.514       0.718         0.0905 0.944   0.843
#> CV:mclust   4 0.553           0.680       0.721         0.0878 0.902   0.724
#> MAD:mclust  4 0.627           0.598       0.788         0.1263 0.906   0.737
#> ATC:mclust  4 0.611           0.469       0.739         0.1278 0.830   0.674
#> SD:kmeans   4 0.620           0.871       0.808         0.1412 0.892   0.697
#> CV:kmeans   4 0.608           0.870       0.798         0.1437 0.834   0.567
#> MAD:kmeans  4 0.605           0.850       0.761         0.1272 0.924   0.774
#> ATC:kmeans  4 0.558           0.487       0.533         0.1322 0.740   0.503
#> SD:pam      4 0.813           0.904       0.946         0.3273 0.816   0.589
#> CV:pam      4 0.787           0.889       0.910         0.3263 0.816   0.591
#> MAD:pam     4 0.858           0.885       0.949         0.1699 0.882   0.686
#> ATC:pam     4 1.000           0.989       0.996         0.0390 0.976   0.947
#> SD:hclust   4 0.958           0.917       0.929         0.0409 0.972   0.939
#> CV:hclust   4 0.963           0.918       0.922         0.0414 0.972   0.939
#> MAD:hclust  4 0.777           0.787       0.897         0.2236 0.840   0.643
#> ATC:hclust  4 1.000           0.978       0.991         0.0421 0.979   0.954
get_stats(res_list, k = 5)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      5 0.531           0.603       0.768         0.1029 0.812   0.631
#> CV:NMF      5 0.533           0.609       0.763         0.1162 0.789   0.585
#> MAD:NMF     5 0.622           0.655       0.825         0.1571 0.786   0.530
#> ATC:NMF     5 0.890           0.917       0.936         0.0241 0.994   0.988
#> SD:skmeans  5 0.805           0.835       0.871         0.0605 0.953   0.824
#> CV:skmeans  5 0.792           0.811       0.828         0.0592 0.958   0.843
#> MAD:skmeans 5 0.842           0.790       0.860         0.0658 0.924   0.725
#> ATC:skmeans 5 0.629           0.599       0.768         0.0780 0.834   0.629
#> SD:mclust   5 0.541           0.645       0.747         0.0609 0.915   0.744
#> CV:mclust   5 0.553           0.566       0.769         0.0815 0.922   0.748
#> MAD:mclust  5 0.648           0.496       0.738         0.0707 0.831   0.500
#> ATC:mclust  5 0.616           0.518       0.720         0.0910 0.784   0.482
#> SD:kmeans   5 0.659           0.612       0.766         0.0726 0.995   0.981
#> CV:kmeans   5 0.546           0.780       0.751         0.0675 0.991   0.967
#> MAD:kmeans  5 0.714           0.768       0.765         0.0837 0.984   0.941
#> ATC:kmeans  5 0.544           0.569       0.652         0.0732 0.797   0.397
#> SD:pam      5 0.763           0.824       0.903         0.0363 0.961   0.856
#> CV:pam      5 0.742           0.813       0.894         0.0390 0.959   0.848
#> MAD:pam     5 0.839           0.880       0.929         0.0501 0.961   0.860
#> ATC:pam     5 0.829           0.926       0.949         0.0548 0.992   0.981
#> SD:hclust   5 0.796           0.796       0.876         0.0804 0.984   0.962
#> CV:hclust   5 0.760           0.794       0.865         0.0859 0.993   0.983
#> MAD:hclust  5 0.716           0.674       0.803         0.0590 0.963   0.873
#> ATC:hclust  5 0.997           0.967       0.985         0.0121 0.991   0.978
get_stats(res_list, k = 6)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      6 0.511           0.560       0.723        0.06682 0.878   0.651
#> CV:NMF      6 0.499           0.531       0.693        0.06018 0.898   0.701
#> MAD:NMF     6 0.543           0.483       0.664        0.03258 0.876   0.597
#> ATC:NMF     6 0.876           0.911       0.928        0.02629 0.994   0.988
#> SD:skmeans  6 0.762           0.758       0.830        0.04171 0.957   0.815
#> CV:skmeans  6 0.777           0.775       0.825        0.04278 0.955   0.806
#> MAD:skmeans 6 0.809           0.714       0.845        0.04405 0.941   0.735
#> ATC:skmeans 6 0.616           0.581       0.748        0.04875 0.840   0.544
#> SD:mclust   6 0.538           0.610       0.648        0.03872 0.932   0.766
#> CV:mclust   6 0.531           0.602       0.670        0.02429 0.960   0.856
#> MAD:mclust  6 0.688           0.667       0.776        0.04479 0.906   0.635
#> ATC:mclust  6 0.659           0.580       0.730        0.06435 0.845   0.491
#> SD:kmeans   6 0.656           0.622       0.701        0.05320 0.905   0.644
#> CV:kmeans   6 0.658           0.688       0.742        0.05951 0.915   0.684
#> MAD:kmeans  6 0.690           0.659       0.733        0.05053 0.906   0.652
#> ATC:kmeans  6 0.608           0.538       0.692        0.06102 0.919   0.660
#> SD:pam      6 0.752           0.757       0.828        0.03505 0.968   0.874
#> CV:pam      6 0.737           0.741       0.822        0.03751 0.968   0.874
#> MAD:pam     6 0.784           0.676       0.828        0.05850 0.907   0.643
#> ATC:pam     6 0.651           0.538       0.806        0.14872 0.913   0.794
#> SD:hclust   6 0.733           0.766       0.869        0.08949 0.927   0.825
#> CV:hclust   6 0.785           0.746       0.853        0.06920 0.931   0.835
#> MAD:hclust  6 0.663           0.678       0.771        0.03759 0.909   0.683
#> ATC:hclust  6 0.986           0.948       0.977        0.00601 0.999   0.998

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

collect_stats(res_list, k = 2)

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

collect_stats(res_list, k = 3)

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

collect_stats(res_list, k = 4)

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

collect_stats(res_list, k = 5)

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

collect_stats(res_list, k = 6)

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

Partition from all methods

Collect partitions from all methods:

collect_classes(res_list, k = 2)

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

collect_classes(res_list, k = 3)

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

collect_classes(res_list, k = 4)

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

collect_classes(res_list, k = 5)

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

collect_classes(res_list, k = 6)

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

Top rows overlap

Overlap of top rows from different top-row methods:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Heatmaps of the top rows:

top_rows_heatmap(res_list, top_n = 1000)

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

top_rows_heatmap(res_list, top_n = 2000)

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

top_rows_heatmap(res_list, top_n = 3000)

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

top_rows_heatmap(res_list, top_n = 4000)

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

top_rows_heatmap(res_list, top_n = 5000)

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

Test to known annotations

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

test_to_known_factors(res_list, k = 2)
#>               n disease.state(p) gender(p) k
#> SD:NMF      139           0.0773         1 2
#> CV:NMF      139           0.0773         1 2
#> MAD:NMF     139           0.0773         1 2
#> ATC:NMF     139           0.0773         1 2
#> SD:skmeans  139           0.0773         1 2
#> CV:skmeans  139           0.0773         1 2
#> MAD:skmeans 139           0.0773         1 2
#> ATC:skmeans 139           0.0773         1 2
#> SD:mclust   139           0.0773         1 2
#> CV:mclust   139           0.0773         1 2
#> MAD:mclust  139           0.0773         1 2
#> ATC:mclust  139           0.0773         1 2
#> SD:kmeans   139           0.0773         1 2
#> CV:kmeans   139           0.0773         1 2
#> MAD:kmeans  139           0.0773         1 2
#> ATC:kmeans  139           0.0773         1 2
#> SD:pam      139           0.0773         1 2
#> CV:pam      139           0.0773         1 2
#> MAD:pam     139           0.0773         1 2
#> ATC:pam     139           0.0773         1 2
#> SD:hclust   139           0.0773         1 2
#> CV:hclust   139           0.0773         1 2
#> MAD:hclust  139           0.0773         1 2
#> ATC:hclust  139           0.0773         1 2
test_to_known_factors(res_list, k = 3)
#>               n disease.state(p) gender(p) k
#> SD:NMF      134         1.29e-01    1.0000 3
#> CV:NMF      139         7.73e-02    1.0000 3
#> MAD:NMF     137         7.12e-02    0.8683 3
#> ATC:NMF     136         1.29e-01    0.9639 3
#> SD:skmeans  136         7.03e-07    0.4420 3
#> CV:skmeans  137         5.59e-07    0.4251 3
#> MAD:skmeans 138         4.45e-07    0.4087 3
#> ATC:skmeans 139         8.43e-02    0.9486 3
#> SD:mclust   131         1.42e-04    0.2978 3
#> CV:mclust   134         1.92e-04    0.1616 3
#> MAD:mclust  137         5.66e-07    0.0787 3
#> ATC:mclust  139         7.73e-02    1.0000 3
#> SD:kmeans   135         8.84e-07    0.4594 3
#> CV:kmeans   126         1.08e-06    0.4220 3
#> MAD:kmeans  139         3.55e-07    0.3929 3
#> ATC:kmeans  139         7.73e-02    1.0000 3
#> SD:pam      139         1.28e-01    0.9215 3
#> CV:pam      138         1.37e-01    0.8986 3
#> MAD:pam     129         8.83e-04    0.5377 3
#> ATC:pam     138         6.46e-02    0.8986 3
#> SD:hclust   137         1.35e-01    0.8292 3
#> CV:hclust   137         1.35e-01    0.8292 3
#> MAD:hclust  137         1.27e-01    0.7921 3
#> ATC:hclust  139         1.21e-01    0.8885 3
test_to_known_factors(res_list, k = 4)
#>               n disease.state(p) gender(p) k
#> SD:NMF       96         4.74e-01     0.752 4
#> CV:NMF      112         3.10e-02     0.784 4
#> MAD:NMF     123         2.44e-01     1.000 4
#> ATC:NMF     137         7.43e-02     0.908 4
#> SD:skmeans  135         3.08e-06     0.450 4
#> CV:skmeans  138         1.63e-06     0.409 4
#> MAD:skmeans 138         1.23e-06     0.482 4
#> ATC:skmeans 139         8.43e-02     0.949 4
#> SD:mclust    84         2.13e-04     0.175 4
#> CV:mclust   114         1.24e-04     0.367 4
#> MAD:mclust  101         6.79e-06     0.123 4
#> ATC:mclust   65         2.05e-01     0.477 4
#> SD:kmeans   137         1.49e-06     0.613 4
#> CV:kmeans   136         2.82e-06     0.597 4
#> MAD:kmeans  137         1.90e-06     0.419 4
#> ATC:kmeans   90         2.65e-01     0.547 4
#> SD:pam      136         3.74e-04     0.649 4
#> CV:pam      135         2.50e-04     0.610 4
#> MAD:pam     137         7.05e-03     0.650 4
#> ATC:pam     138         1.72e-01     0.793 4
#> SD:hclust   134         1.45e-01     0.769 4
#> CV:hclust   134         1.45e-01     0.769 4
#> MAD:hclust  122         2.10e-05     0.441 4
#> ATC:hclust  136         1.82e-01     0.793 4
test_to_known_factors(res_list, k = 5)
#>               n disease.state(p) gender(p) k
#> SD:NMF      117         3.48e-07    0.0899 5
#> CV:NMF      111         5.13e-08    0.1484 5
#> MAD:NMF     116         4.88e-05    0.0337 5
#> ATC:NMF     137         7.43e-02    0.9077 5
#> SD:skmeans  134         9.58e-07    0.5560 5
#> CV:skmeans  133         3.42e-06    0.5431 5
#> MAD:skmeans 125         4.48e-11    0.2003 5
#> ATC:skmeans  88         2.20e-01    0.8380 5
#> SD:mclust   107         3.22e-04    0.3107 5
#> CV:mclust    93         2.72e-04    0.1649 5
#> MAD:mclust   84         1.90e-07    0.1267 5
#> ATC:mclust   53         5.58e-01    0.5230 5
#> SD:kmeans   114         5.22e-04    0.8065 5
#> CV:kmeans   134         1.16e-06    0.5644 5
#> MAD:kmeans  135         5.20e-07    0.4207 5
#> ATC:kmeans   92         2.47e-04    0.2219 5
#> SD:pam      126         1.43e-03    0.6853 5
#> CV:pam      126         8.94e-04    0.6587 5
#> MAD:pam     137         1.41e-02    0.7749 5
#> ATC:pam     137         1.86e-01    0.7766 5
#> SD:hclust   126         1.37e-01    0.8168 5
#> CV:hclust   131         2.32e-01    0.7344 5
#> MAD:hclust  103         1.57e-05    0.2272 5
#> ATC:hclust  137         1.37e-01    0.7766 5
test_to_known_factors(res_list, k = 6)
#>               n disease.state(p) gender(p) k
#> SD:NMF      109         7.31e-07     0.121 6
#> CV:NMF      101         1.54e-06     0.274 6
#> MAD:NMF      80         7.16e-05     0.164 6
#> ATC:NMF     137         7.43e-02     0.908 6
#> SD:skmeans  128         3.76e-09     0.804 6
#> CV:skmeans  131         2.63e-09     0.589 6
#> MAD:skmeans 107         5.23e-08     0.561 6
#> ATC:skmeans  89         5.86e-01     0.594 6
#> SD:mclust   118         4.82e-05     0.423 6
#> CV:mclust   110         8.31e-05     0.308 6
#> MAD:mclust  125         7.87e-08     0.261 6
#> ATC:mclust   79         4.36e-02     0.610 6
#> SD:kmeans   107         6.46e-06     0.775 6
#> CV:kmeans   122         4.08e-09     0.768 6
#> MAD:kmeans  117         3.51e-11     0.315 6
#> ATC:kmeans   93         6.97e-11     0.133 6
#> SD:pam      127         6.29e-04     0.607 6
#> CV:pam      124         8.70e-04     0.523 6
#> MAD:pam     108         1.55e-01     0.968 6
#> ATC:pam     104         9.67e-02     0.818 6
#> SD:hclust   127         1.71e-01     0.873 6
#> CV:hclust   118         4.81e-02     0.840 6
#> MAD:hclust  127         1.73e-05     0.544 6
#> ATC:hclust  134         2.03e-01     0.826 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 46361 rows and 139 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 4.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk 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 1.000           1.000       1.000         0.4791 0.521   0.521
#> 3 3 1.000           0.975       0.990         0.1477 0.931   0.867
#> 4 4 0.958           0.917       0.929         0.0409 0.972   0.939
#> 5 5 0.796           0.796       0.876         0.0804 0.984   0.962
#> 6 6 0.733           0.766       0.869         0.0895 0.927   0.825

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

suggest_best_k(res)
#> [1] 4
#> attr(,"optional")
#> [1] 2 3

There is also optional best \(k\) = 2 3 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
#> GSM1182186     1       0          1  1  0
#> GSM1182187     1       0          1  1  0
#> GSM1182188     1       0          1  1  0
#> GSM1182189     1       0          1  1  0
#> GSM1182190     1       0          1  1  0
#> GSM1182191     1       0          1  1  0
#> GSM1182192     1       0          1  1  0
#> GSM1182193     1       0          1  1  0
#> GSM1182194     2       0          1  0  1
#> GSM1182195     2       0          1  0  1
#> GSM1182196     2       0          1  0  1
#> GSM1182197     2       0          1  0  1
#> GSM1182198     2       0          1  0  1
#> GSM1182199     2       0          1  0  1
#> GSM1182200     2       0          1  0  1
#> GSM1182201     2       0          1  0  1
#> GSM1182202     1       0          1  1  0
#> GSM1182203     1       0          1  1  0
#> GSM1182204     1       0          1  1  0
#> GSM1182205     2       0          1  0  1
#> GSM1182206     2       0          1  0  1
#> GSM1182207     1       0          1  1  0
#> GSM1182208     1       0          1  1  0
#> GSM1182209     2       0          1  0  1
#> GSM1182210     2       0          1  0  1
#> GSM1182211     2       0          1  0  1
#> GSM1182212     2       0          1  0  1
#> GSM1182213     2       0          1  0  1
#> GSM1182214     2       0          1  0  1
#> GSM1182215     2       0          1  0  1
#> GSM1182216     2       0          1  0  1
#> GSM1182217     1       0          1  1  0
#> GSM1182218     1       0          1  1  0
#> GSM1182219     2       0          1  0  1
#> GSM1182220     2       0          1  0  1
#> GSM1182221     2       0          1  0  1
#> GSM1182222     2       0          1  0  1
#> GSM1182223     2       0          1  0  1
#> GSM1182224     2       0          1  0  1
#> GSM1182225     2       0          1  0  1
#> GSM1182226     2       0          1  0  1
#> GSM1182227     1       0          1  1  0
#> GSM1182228     2       0          1  0  1
#> GSM1182229     2       0          1  0  1
#> GSM1182230     2       0          1  0  1
#> GSM1182231     2       0          1  0  1
#> GSM1182232     1       0          1  1  0
#> GSM1182233     1       0          1  1  0
#> GSM1182234     1       0          1  1  0
#> GSM1182235     2       0          1  0  1
#> GSM1182236     1       0          1  1  0
#> GSM1182237     2       0          1  0  1
#> GSM1182238     2       0          1  0  1
#> GSM1182239     2       0          1  0  1
#> GSM1182240     2       0          1  0  1
#> GSM1182241     2       0          1  0  1
#> GSM1182242     2       0          1  0  1
#> GSM1182243     2       0          1  0  1
#> GSM1182244     2       0          1  0  1
#> GSM1182245     1       0          1  1  0
#> GSM1182246     1       0          1  1  0
#> GSM1182247     2       0          1  0  1
#> GSM1182248     2       0          1  0  1
#> GSM1182249     2       0          1  0  1
#> GSM1182250     2       0          1  0  1
#> GSM1182251     1       0          1  1  0
#> GSM1182252     2       0          1  0  1
#> GSM1182253     2       0          1  0  1
#> GSM1182254     2       0          1  0  1
#> GSM1182255     1       0          1  1  0
#> GSM1182256     1       0          1  1  0
#> GSM1182257     1       0          1  1  0
#> GSM1182258     1       0          1  1  0
#> GSM1182259     1       0          1  1  0
#> GSM1182260     2       0          1  0  1
#> GSM1182261     2       0          1  0  1
#> GSM1182262     2       0          1  0  1
#> GSM1182263     1       0          1  1  0
#> GSM1182264     2       0          1  0  1
#> GSM1182265     2       0          1  0  1
#> GSM1182266     2       0          1  0  1
#> GSM1182267     1       0          1  1  0
#> GSM1182268     1       0          1  1  0
#> GSM1182269     1       0          1  1  0
#> GSM1182270     1       0          1  1  0
#> GSM1182271     1       0          1  1  0
#> GSM1182272     1       0          1  1  0
#> GSM1182273     2       0          1  0  1
#> GSM1182275     2       0          1  0  1
#> GSM1182276     2       0          1  0  1
#> GSM1182277     1       0          1  1  0
#> GSM1182278     1       0          1  1  0
#> GSM1182279     1       0          1  1  0
#> GSM1182280     1       0          1  1  0
#> GSM1182281     1       0          1  1  0
#> GSM1182282     1       0          1  1  0
#> GSM1182283     1       0          1  1  0
#> GSM1182284     1       0          1  1  0
#> GSM1182285     2       0          1  0  1
#> GSM1182286     2       0          1  0  1
#> GSM1182287     2       0          1  0  1
#> GSM1182288     2       0          1  0  1
#> GSM1182289     1       0          1  1  0
#> GSM1182290     1       0          1  1  0
#> GSM1182291     1       0          1  1  0
#> GSM1182274     2       0          1  0  1
#> GSM1182292     2       0          1  0  1
#> GSM1182293     2       0          1  0  1
#> GSM1182294     2       0          1  0  1
#> GSM1182295     2       0          1  0  1
#> GSM1182296     2       0          1  0  1
#> GSM1182298     2       0          1  0  1
#> GSM1182299     2       0          1  0  1
#> GSM1182300     2       0          1  0  1
#> GSM1182301     2       0          1  0  1
#> GSM1182303     2       0          1  0  1
#> GSM1182304     1       0          1  1  0
#> GSM1182305     1       0          1  1  0
#> GSM1182306     1       0          1  1  0
#> GSM1182307     2       0          1  0  1
#> GSM1182309     2       0          1  0  1
#> GSM1182312     2       0          1  0  1
#> GSM1182314     1       0          1  1  0
#> GSM1182316     2       0          1  0  1
#> GSM1182318     2       0          1  0  1
#> GSM1182319     2       0          1  0  1
#> GSM1182320     2       0          1  0  1
#> GSM1182321     2       0          1  0  1
#> GSM1182322     2       0          1  0  1
#> GSM1182324     2       0          1  0  1
#> GSM1182297     2       0          1  0  1
#> GSM1182302     1       0          1  1  0
#> GSM1182308     2       0          1  0  1
#> GSM1182310     2       0          1  0  1
#> GSM1182311     1       0          1  1  0
#> GSM1182313     1       0          1  1  0
#> GSM1182315     2       0          1  0  1
#> GSM1182317     2       0          1  0  1
#> GSM1182323     1       0          1  1  0

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1 p2    p3
#> GSM1182186     1  0.6295      0.158 0.528  0 0.472
#> GSM1182187     3  0.0592      0.991 0.012  0 0.988
#> GSM1182188     3  0.0000      0.994 0.000  0 1.000
#> GSM1182189     1  0.0000      0.961 1.000  0 0.000
#> GSM1182190     1  0.0000      0.961 1.000  0 0.000
#> GSM1182191     1  0.6295      0.158 0.528  0 0.472
#> GSM1182192     1  0.0000      0.961 1.000  0 0.000
#> GSM1182193     1  0.0000      0.961 1.000  0 0.000
#> GSM1182194     2  0.0000      1.000 0.000  1 0.000
#> GSM1182195     2  0.0000      1.000 0.000  1 0.000
#> GSM1182196     2  0.0000      1.000 0.000  1 0.000
#> GSM1182197     2  0.0000      1.000 0.000  1 0.000
#> GSM1182198     2  0.0000      1.000 0.000  1 0.000
#> GSM1182199     2  0.0000      1.000 0.000  1 0.000
#> GSM1182200     2  0.0000      1.000 0.000  1 0.000
#> GSM1182201     2  0.0000      1.000 0.000  1 0.000
#> GSM1182202     3  0.0592      0.991 0.012  0 0.988
#> GSM1182203     3  0.0592      0.991 0.012  0 0.988
#> GSM1182204     3  0.0592      0.991 0.012  0 0.988
#> GSM1182205     2  0.0000      1.000 0.000  1 0.000
#> GSM1182206     2  0.0000      1.000 0.000  1 0.000
#> GSM1182207     1  0.0000      0.961 1.000  0 0.000
#> GSM1182208     1  0.0000      0.961 1.000  0 0.000
#> GSM1182209     2  0.0000      1.000 0.000  1 0.000
#> GSM1182210     2  0.0000      1.000 0.000  1 0.000
#> GSM1182211     2  0.0000      1.000 0.000  1 0.000
#> GSM1182212     2  0.0000      1.000 0.000  1 0.000
#> GSM1182213     2  0.0000      1.000 0.000  1 0.000
#> GSM1182214     2  0.0000      1.000 0.000  1 0.000
#> GSM1182215     2  0.0000      1.000 0.000  1 0.000
#> GSM1182216     2  0.0000      1.000 0.000  1 0.000
#> GSM1182217     3  0.0892      0.984 0.020  0 0.980
#> GSM1182218     1  0.0000      0.961 1.000  0 0.000
#> GSM1182219     2  0.0000      1.000 0.000  1 0.000
#> GSM1182220     2  0.0000      1.000 0.000  1 0.000
#> GSM1182221     2  0.0000      1.000 0.000  1 0.000
#> GSM1182222     2  0.0000      1.000 0.000  1 0.000
#> GSM1182223     2  0.0000      1.000 0.000  1 0.000
#> GSM1182224     2  0.0000      1.000 0.000  1 0.000
#> GSM1182225     2  0.0000      1.000 0.000  1 0.000
#> GSM1182226     2  0.0000      1.000 0.000  1 0.000
#> GSM1182227     1  0.0000      0.961 1.000  0 0.000
#> GSM1182228     2  0.0000      1.000 0.000  1 0.000
#> GSM1182229     2  0.0000      1.000 0.000  1 0.000
#> GSM1182230     2  0.0000      1.000 0.000  1 0.000
#> GSM1182231     2  0.0000      1.000 0.000  1 0.000
#> GSM1182232     1  0.0000      0.961 1.000  0 0.000
#> GSM1182233     1  0.0000      0.961 1.000  0 0.000
#> GSM1182234     1  0.0000      0.961 1.000  0 0.000
#> GSM1182235     2  0.0000      1.000 0.000  1 0.000
#> GSM1182236     1  0.0000      0.961 1.000  0 0.000
#> GSM1182237     2  0.0000      1.000 0.000  1 0.000
#> GSM1182238     2  0.0000      1.000 0.000  1 0.000
#> GSM1182239     2  0.0000      1.000 0.000  1 0.000
#> GSM1182240     2  0.0000      1.000 0.000  1 0.000
#> GSM1182241     2  0.0000      1.000 0.000  1 0.000
#> GSM1182242     2  0.0000      1.000 0.000  1 0.000
#> GSM1182243     2  0.0000      1.000 0.000  1 0.000
#> GSM1182244     2  0.0000      1.000 0.000  1 0.000
#> GSM1182245     1  0.0000      0.961 1.000  0 0.000
#> GSM1182246     3  0.0000      0.994 0.000  0 1.000
#> GSM1182247     2  0.0000      1.000 0.000  1 0.000
#> GSM1182248     2  0.0000      1.000 0.000  1 0.000
#> GSM1182249     2  0.0000      1.000 0.000  1 0.000
#> GSM1182250     2  0.0000      1.000 0.000  1 0.000
#> GSM1182251     1  0.0592      0.954 0.988  0 0.012
#> GSM1182252     2  0.0000      1.000 0.000  1 0.000
#> GSM1182253     2  0.0000      1.000 0.000  1 0.000
#> GSM1182254     2  0.0000      1.000 0.000  1 0.000
#> GSM1182255     3  0.0000      0.994 0.000  0 1.000
#> GSM1182256     3  0.0000      0.994 0.000  0 1.000
#> GSM1182257     3  0.0237      0.994 0.004  0 0.996
#> GSM1182258     3  0.0000      0.994 0.000  0 1.000
#> GSM1182259     3  0.0000      0.994 0.000  0 1.000
#> GSM1182260     2  0.0000      1.000 0.000  1 0.000
#> GSM1182261     2  0.0000      1.000 0.000  1 0.000
#> GSM1182262     2  0.0000      1.000 0.000  1 0.000
#> GSM1182263     1  0.0424      0.957 0.992  0 0.008
#> GSM1182264     2  0.0000      1.000 0.000  1 0.000
#> GSM1182265     2  0.0000      1.000 0.000  1 0.000
#> GSM1182266     2  0.0000      1.000 0.000  1 0.000
#> GSM1182267     1  0.0000      0.961 1.000  0 0.000
#> GSM1182268     1  0.0000      0.961 1.000  0 0.000
#> GSM1182269     1  0.0000      0.961 1.000  0 0.000
#> GSM1182270     1  0.0000      0.961 1.000  0 0.000
#> GSM1182271     3  0.0000      0.994 0.000  0 1.000
#> GSM1182272     3  0.0000      0.994 0.000  0 1.000
#> GSM1182273     2  0.0000      1.000 0.000  1 0.000
#> GSM1182275     2  0.0000      1.000 0.000  1 0.000
#> GSM1182276     2  0.0000      1.000 0.000  1 0.000
#> GSM1182277     1  0.0000      0.961 1.000  0 0.000
#> GSM1182278     1  0.0000      0.961 1.000  0 0.000
#> GSM1182279     1  0.0747      0.952 0.984  0 0.016
#> GSM1182280     1  0.0747      0.952 0.984  0 0.016
#> GSM1182281     1  0.3116      0.863 0.892  0 0.108
#> GSM1182282     1  0.0000      0.961 1.000  0 0.000
#> GSM1182283     1  0.0000      0.961 1.000  0 0.000
#> GSM1182284     1  0.0000      0.961 1.000  0 0.000
#> GSM1182285     2  0.0000      1.000 0.000  1 0.000
#> GSM1182286     2  0.0000      1.000 0.000  1 0.000
#> GSM1182287     2  0.0000      1.000 0.000  1 0.000
#> GSM1182288     2  0.0000      1.000 0.000  1 0.000
#> GSM1182289     1  0.0592      0.954 0.988  0 0.012
#> GSM1182290     1  0.0000      0.961 1.000  0 0.000
#> GSM1182291     3  0.0000      0.994 0.000  0 1.000
#> GSM1182274     2  0.0000      1.000 0.000  1 0.000
#> GSM1182292     2  0.0000      1.000 0.000  1 0.000
#> GSM1182293     2  0.0000      1.000 0.000  1 0.000
#> GSM1182294     2  0.0000      1.000 0.000  1 0.000
#> GSM1182295     2  0.0000      1.000 0.000  1 0.000
#> GSM1182296     2  0.0000      1.000 0.000  1 0.000
#> GSM1182298     2  0.0000      1.000 0.000  1 0.000
#> GSM1182299     2  0.0000      1.000 0.000  1 0.000
#> GSM1182300     2  0.0000      1.000 0.000  1 0.000
#> GSM1182301     2  0.0000      1.000 0.000  1 0.000
#> GSM1182303     2  0.0000      1.000 0.000  1 0.000
#> GSM1182304     1  0.0747      0.952 0.984  0 0.016
#> GSM1182305     1  0.4235      0.783 0.824  0 0.176
#> GSM1182306     3  0.0592      0.991 0.012  0 0.988
#> GSM1182307     2  0.0000      1.000 0.000  1 0.000
#> GSM1182309     2  0.0000      1.000 0.000  1 0.000
#> GSM1182312     2  0.0000      1.000 0.000  1 0.000
#> GSM1182314     3  0.0000      0.994 0.000  0 1.000
#> GSM1182316     2  0.0000      1.000 0.000  1 0.000
#> GSM1182318     2  0.0000      1.000 0.000  1 0.000
#> GSM1182319     2  0.0000      1.000 0.000  1 0.000
#> GSM1182320     2  0.0000      1.000 0.000  1 0.000
#> GSM1182321     2  0.0000      1.000 0.000  1 0.000
#> GSM1182322     2  0.0000      1.000 0.000  1 0.000
#> GSM1182324     2  0.0000      1.000 0.000  1 0.000
#> GSM1182297     2  0.0000      1.000 0.000  1 0.000
#> GSM1182302     3  0.0592      0.991 0.012  0 0.988
#> GSM1182308     2  0.0000      1.000 0.000  1 0.000
#> GSM1182310     2  0.0000      1.000 0.000  1 0.000
#> GSM1182311     1  0.0000      0.961 1.000  0 0.000
#> GSM1182313     3  0.0000      0.994 0.000  0 1.000
#> GSM1182315     2  0.0000      1.000 0.000  1 0.000
#> GSM1182317     2  0.0000      1.000 0.000  1 0.000
#> GSM1182323     1  0.0000      0.961 1.000  0 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1 p2    p3    p4
#> GSM1182186     1  0.4713      0.236 0.640  0 0.000 0.360
#> GSM1182187     4  0.2704      0.931 0.124  0 0.000 0.876
#> GSM1182188     4  0.0000      0.953 0.000  0 0.000 1.000
#> GSM1182189     1  0.4605      0.767 0.664  0 0.336 0.000
#> GSM1182190     1  0.4605      0.767 0.664  0 0.336 0.000
#> GSM1182191     1  0.4713      0.236 0.640  0 0.000 0.360
#> GSM1182192     3  0.2408      0.856 0.104  0 0.896 0.000
#> GSM1182193     3  0.2408      0.856 0.104  0 0.896 0.000
#> GSM1182194     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182195     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182196     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182197     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182198     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182199     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182200     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182201     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182202     4  0.2704      0.931 0.124  0 0.000 0.876
#> GSM1182203     4  0.2704      0.931 0.124  0 0.000 0.876
#> GSM1182204     4  0.2704      0.931 0.124  0 0.000 0.876
#> GSM1182205     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182206     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182207     1  0.4605      0.767 0.664  0 0.336 0.000
#> GSM1182208     1  0.4605      0.767 0.664  0 0.336 0.000
#> GSM1182209     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182210     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182211     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182212     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182213     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182214     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182215     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182216     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182217     4  0.2814      0.926 0.132  0 0.000 0.868
#> GSM1182218     1  0.4605      0.767 0.664  0 0.336 0.000
#> GSM1182219     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182220     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182221     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182222     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182223     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182224     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182225     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182226     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182227     3  0.2408      0.856 0.104  0 0.896 0.000
#> GSM1182228     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182229     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182230     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182231     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182232     1  0.4830      0.708 0.608  0 0.392 0.000
#> GSM1182233     1  0.4830      0.708 0.608  0 0.392 0.000
#> GSM1182234     3  0.4477      0.316 0.312  0 0.688 0.000
#> GSM1182235     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182236     1  0.4624      0.764 0.660  0 0.340 0.000
#> GSM1182237     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182238     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182239     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182240     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182241     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182242     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182243     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182244     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182245     3  0.0336      0.779 0.008  0 0.992 0.000
#> GSM1182246     4  0.0000      0.953 0.000  0 0.000 1.000
#> GSM1182247     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182248     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182249     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182250     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182251     1  0.2714      0.668 0.884  0 0.112 0.004
#> GSM1182252     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182253     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182254     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182255     4  0.0000      0.953 0.000  0 0.000 1.000
#> GSM1182256     4  0.0000      0.953 0.000  0 0.000 1.000
#> GSM1182257     4  0.2216      0.939 0.092  0 0.000 0.908
#> GSM1182258     4  0.0000      0.953 0.000  0 0.000 1.000
#> GSM1182259     4  0.0000      0.953 0.000  0 0.000 1.000
#> GSM1182260     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182261     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182262     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182263     1  0.2944      0.675 0.868  0 0.128 0.004
#> GSM1182264     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182265     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182266     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182267     1  0.4898      0.667 0.584  0 0.416 0.000
#> GSM1182268     1  0.4830      0.708 0.608  0 0.392 0.000
#> GSM1182269     1  0.4605      0.767 0.664  0 0.336 0.000
#> GSM1182270     1  0.4605      0.767 0.664  0 0.336 0.000
#> GSM1182271     4  0.0000      0.953 0.000  0 0.000 1.000
#> GSM1182272     4  0.0000      0.953 0.000  0 0.000 1.000
#> GSM1182273     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182275     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182276     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182277     3  0.2408      0.856 0.104  0 0.896 0.000
#> GSM1182278     3  0.2408      0.856 0.104  0 0.896 0.000
#> GSM1182279     1  0.2345      0.662 0.900  0 0.100 0.000
#> GSM1182280     1  0.2345      0.662 0.900  0 0.100 0.000
#> GSM1182281     3  0.5998      0.469 0.212  0 0.680 0.108
#> GSM1182282     3  0.0336      0.779 0.008  0 0.992 0.000
#> GSM1182283     3  0.2408      0.856 0.104  0 0.896 0.000
#> GSM1182284     3  0.2408      0.856 0.104  0 0.896 0.000
#> GSM1182285     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182286     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182287     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182288     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182289     1  0.2714      0.668 0.884  0 0.112 0.004
#> GSM1182290     1  0.4605      0.767 0.664  0 0.336 0.000
#> GSM1182291     4  0.0000      0.953 0.000  0 0.000 1.000
#> GSM1182274     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182292     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182293     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182294     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182295     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182296     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182298     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182299     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182300     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182301     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182303     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182304     1  0.2345      0.662 0.900  0 0.100 0.000
#> GSM1182305     1  0.4050      0.466 0.808  0 0.024 0.168
#> GSM1182306     4  0.2704      0.931 0.124  0 0.000 0.876
#> GSM1182307     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182309     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182312     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182314     4  0.0000      0.953 0.000  0 0.000 1.000
#> GSM1182316     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182318     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182319     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182320     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182321     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182322     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182324     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182297     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182302     4  0.2704      0.931 0.124  0 0.000 0.876
#> GSM1182308     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182310     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182311     1  0.4605      0.767 0.664  0 0.336 0.000
#> GSM1182313     4  0.0000      0.953 0.000  0 0.000 1.000
#> GSM1182315     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182317     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182323     1  0.4605      0.767 0.664  0 0.336 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
#> GSM1182186     5  0.4774    -0.0247 0.444 0.000 0.012 0.004 0.540
#> GSM1182187     4  0.4307    -0.3609 0.000 0.000 0.000 0.504 0.496
#> GSM1182188     4  0.0000     0.8431 0.000 0.000 0.000 1.000 0.000
#> GSM1182189     1  0.0000     0.7789 1.000 0.000 0.000 0.000 0.000
#> GSM1182190     1  0.0000     0.7789 1.000 0.000 0.000 0.000 0.000
#> GSM1182191     5  0.4774    -0.0247 0.444 0.000 0.012 0.004 0.540
#> GSM1182192     3  0.4235     0.8887 0.424 0.000 0.576 0.000 0.000
#> GSM1182193     3  0.4235     0.8887 0.424 0.000 0.576 0.000 0.000
#> GSM1182194     2  0.5639     0.5492 0.000 0.568 0.092 0.000 0.340
#> GSM1182195     2  0.5639     0.5492 0.000 0.568 0.092 0.000 0.340
#> GSM1182196     2  0.0290     0.9348 0.000 0.992 0.000 0.000 0.008
#> GSM1182197     2  0.0963     0.9284 0.000 0.964 0.000 0.000 0.036
#> GSM1182198     2  0.5639     0.5492 0.000 0.568 0.092 0.000 0.340
#> GSM1182199     2  0.5639     0.5492 0.000 0.568 0.092 0.000 0.340
#> GSM1182200     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182201     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182202     5  0.4227     0.4794 0.000 0.000 0.000 0.420 0.580
#> GSM1182203     5  0.4249     0.4634 0.000 0.000 0.000 0.432 0.568
#> GSM1182204     5  0.4249     0.4634 0.000 0.000 0.000 0.432 0.568
#> GSM1182205     2  0.2983     0.8861 0.000 0.864 0.040 0.000 0.096
#> GSM1182206     2  0.2561     0.8979 0.000 0.884 0.020 0.000 0.096
#> GSM1182207     1  0.1638     0.7712 0.932 0.000 0.004 0.000 0.064
#> GSM1182208     1  0.1638     0.7712 0.932 0.000 0.004 0.000 0.064
#> GSM1182209     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182210     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182211     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182212     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182213     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182214     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182215     2  0.2561     0.8979 0.000 0.884 0.020 0.000 0.096
#> GSM1182216     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182217     5  0.4359     0.4793 0.004 0.000 0.000 0.412 0.584
#> GSM1182218     1  0.0000     0.7789 1.000 0.000 0.000 0.000 0.000
#> GSM1182219     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182220     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182221     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182222     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182223     2  0.1965     0.9070 0.000 0.904 0.000 0.000 0.096
#> GSM1182224     2  0.5309     0.6598 0.000 0.644 0.092 0.000 0.264
#> GSM1182225     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182226     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182227     3  0.4235     0.8887 0.424 0.000 0.576 0.000 0.000
#> GSM1182228     2  0.2740     0.8939 0.000 0.876 0.028 0.000 0.096
#> GSM1182229     2  0.2653     0.8963 0.000 0.880 0.024 0.000 0.096
#> GSM1182230     2  0.2561     0.8979 0.000 0.884 0.020 0.000 0.096
#> GSM1182231     2  0.2561     0.8979 0.000 0.884 0.020 0.000 0.096
#> GSM1182232     1  0.1341     0.7295 0.944 0.000 0.056 0.000 0.000
#> GSM1182233     1  0.1341     0.7295 0.944 0.000 0.056 0.000 0.000
#> GSM1182234     1  0.4074    -0.3333 0.636 0.000 0.364 0.000 0.000
#> GSM1182235     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182236     1  0.0162     0.7763 0.996 0.000 0.004 0.000 0.000
#> GSM1182237     2  0.2464     0.8997 0.000 0.888 0.016 0.000 0.096
#> GSM1182238     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182239     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182240     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182241     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182242     2  0.2740     0.8939 0.000 0.876 0.028 0.000 0.096
#> GSM1182243     2  0.1774     0.9191 0.000 0.932 0.016 0.000 0.052
#> GSM1182244     2  0.5309     0.6598 0.000 0.644 0.092 0.000 0.264
#> GSM1182245     3  0.3857     0.8188 0.312 0.000 0.688 0.000 0.000
#> GSM1182246     4  0.0162     0.8405 0.000 0.000 0.000 0.996 0.004
#> GSM1182247     2  0.2824     0.8911 0.000 0.872 0.032 0.000 0.096
#> GSM1182248     2  0.2824     0.8911 0.000 0.872 0.032 0.000 0.096
#> GSM1182249     2  0.1364     0.9257 0.000 0.952 0.012 0.000 0.036
#> GSM1182250     2  0.1364     0.9257 0.000 0.952 0.012 0.000 0.036
#> GSM1182251     1  0.4964     0.6620 0.700 0.000 0.204 0.000 0.096
#> GSM1182252     2  0.2740     0.8939 0.000 0.876 0.028 0.000 0.096
#> GSM1182253     2  0.2769     0.8940 0.000 0.876 0.032 0.000 0.092
#> GSM1182254     2  0.1914     0.9161 0.000 0.924 0.016 0.000 0.060
#> GSM1182255     4  0.0000     0.8431 0.000 0.000 0.000 1.000 0.000
#> GSM1182256     4  0.0000     0.8431 0.000 0.000 0.000 1.000 0.000
#> GSM1182257     4  0.4161     0.0271 0.000 0.000 0.000 0.608 0.392
#> GSM1182258     4  0.0609     0.8292 0.000 0.000 0.000 0.980 0.020
#> GSM1182259     4  0.0000     0.8431 0.000 0.000 0.000 1.000 0.000
#> GSM1182260     2  0.1364     0.9257 0.000 0.952 0.012 0.000 0.036
#> GSM1182261     2  0.2561     0.8979 0.000 0.884 0.020 0.000 0.096
#> GSM1182262     2  0.2561     0.8979 0.000 0.884 0.020 0.000 0.096
#> GSM1182263     1  0.4701     0.6714 0.720 0.000 0.204 0.000 0.076
#> GSM1182264     2  0.1364     0.9257 0.000 0.952 0.012 0.000 0.036
#> GSM1182265     2  0.1364     0.9257 0.000 0.952 0.012 0.000 0.036
#> GSM1182266     2  0.1364     0.9257 0.000 0.952 0.012 0.000 0.036
#> GSM1182267     1  0.1732     0.6936 0.920 0.000 0.080 0.000 0.000
#> GSM1182268     1  0.1341     0.7295 0.944 0.000 0.056 0.000 0.000
#> GSM1182269     1  0.0000     0.7789 1.000 0.000 0.000 0.000 0.000
#> GSM1182270     1  0.0000     0.7789 1.000 0.000 0.000 0.000 0.000
#> GSM1182271     4  0.0162     0.8409 0.000 0.000 0.000 0.996 0.004
#> GSM1182272     4  0.0000     0.8431 0.000 0.000 0.000 1.000 0.000
#> GSM1182273     2  0.1469     0.9245 0.000 0.948 0.016 0.000 0.036
#> GSM1182275     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182276     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182277     3  0.4235     0.8887 0.424 0.000 0.576 0.000 0.000
#> GSM1182278     3  0.4235     0.8887 0.424 0.000 0.576 0.000 0.000
#> GSM1182279     1  0.5004     0.6562 0.692 0.000 0.216 0.000 0.092
#> GSM1182280     1  0.5004     0.6562 0.692 0.000 0.216 0.000 0.092
#> GSM1182281     3  0.2127     0.4367 0.000 0.000 0.892 0.108 0.000
#> GSM1182282     3  0.3857     0.8188 0.312 0.000 0.688 0.000 0.000
#> GSM1182283     3  0.4235     0.8887 0.424 0.000 0.576 0.000 0.000
#> GSM1182284     3  0.4235     0.8887 0.424 0.000 0.576 0.000 0.000
#> GSM1182285     2  0.5309     0.6598 0.000 0.644 0.092 0.000 0.264
#> GSM1182286     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182287     2  0.1965     0.9070 0.000 0.904 0.000 0.000 0.096
#> GSM1182288     2  0.2905     0.8887 0.000 0.868 0.036 0.000 0.096
#> GSM1182289     1  0.4964     0.6620 0.700 0.000 0.204 0.000 0.096
#> GSM1182290     1  0.1638     0.7712 0.932 0.000 0.004 0.000 0.064
#> GSM1182291     4  0.0000     0.8431 0.000 0.000 0.000 1.000 0.000
#> GSM1182274     2  0.1469     0.9245 0.000 0.948 0.016 0.000 0.036
#> GSM1182292     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182293     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182294     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182295     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182296     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182298     2  0.5639     0.5492 0.000 0.568 0.092 0.000 0.340
#> GSM1182299     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182300     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182301     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182303     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182304     1  0.5004     0.6562 0.692 0.000 0.216 0.000 0.092
#> GSM1182305     1  0.7517     0.4255 0.508 0.000 0.228 0.104 0.160
#> GSM1182306     4  0.4297    -0.2799 0.000 0.000 0.000 0.528 0.472
#> GSM1182307     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182309     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182312     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182314     4  0.0290     0.8392 0.000 0.000 0.000 0.992 0.008
#> GSM1182316     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182318     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182319     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182320     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182321     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182322     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182324     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182297     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182302     5  0.4227     0.4794 0.000 0.000 0.000 0.420 0.580
#> GSM1182308     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182310     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182311     1  0.0000     0.7789 1.000 0.000 0.000 0.000 0.000
#> GSM1182313     4  0.0000     0.8431 0.000 0.000 0.000 1.000 0.000
#> GSM1182315     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182317     2  0.0000     0.9364 0.000 1.000 0.000 0.000 0.000
#> GSM1182323     1  0.0000     0.7789 1.000 0.000 0.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1182186     6  0.5423    -0.0961 0.012 0.000 0.080 0.000 0.440 0.468
#> GSM1182187     6  0.1663     0.7661 0.000 0.000 0.000 0.088 0.000 0.912
#> GSM1182188     4  0.0000     0.9964 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182189     5  0.0865     0.7854 0.036 0.000 0.000 0.000 0.964 0.000
#> GSM1182190     5  0.0458     0.7901 0.016 0.000 0.000 0.000 0.984 0.000
#> GSM1182191     6  0.5423    -0.0961 0.012 0.000 0.080 0.000 0.440 0.468
#> GSM1182192     1  0.2996     0.8861 0.772 0.000 0.000 0.000 0.228 0.000
#> GSM1182193     1  0.2996     0.8861 0.772 0.000 0.000 0.000 0.228 0.000
#> GSM1182194     3  0.2793     0.9018 0.000 0.200 0.800 0.000 0.000 0.000
#> GSM1182195     3  0.2793     0.9018 0.000 0.200 0.800 0.000 0.000 0.000
#> GSM1182196     2  0.0363     0.8511 0.000 0.988 0.012 0.000 0.000 0.000
#> GSM1182197     2  0.1444     0.8196 0.000 0.928 0.072 0.000 0.000 0.000
#> GSM1182198     3  0.2793     0.9018 0.000 0.200 0.800 0.000 0.000 0.000
#> GSM1182199     3  0.2793     0.9018 0.000 0.200 0.800 0.000 0.000 0.000
#> GSM1182200     2  0.0146     0.8518 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182201     2  0.0790     0.8445 0.000 0.968 0.032 0.000 0.000 0.000
#> GSM1182202     6  0.0146     0.8002 0.000 0.000 0.000 0.004 0.000 0.996
#> GSM1182203     6  0.0458     0.8019 0.000 0.000 0.000 0.016 0.000 0.984
#> GSM1182204     6  0.0458     0.8019 0.000 0.000 0.000 0.016 0.000 0.984
#> GSM1182205     2  0.3634     0.4167 0.000 0.644 0.356 0.000 0.000 0.000
#> GSM1182206     2  0.3446     0.5313 0.000 0.692 0.308 0.000 0.000 0.000
#> GSM1182207     5  0.2852     0.7804 0.064 0.000 0.080 0.000 0.856 0.000
#> GSM1182208     5  0.2852     0.7804 0.064 0.000 0.080 0.000 0.856 0.000
#> GSM1182209     2  0.0000     0.8511 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182210     2  0.0000     0.8511 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182211     2  0.0260     0.8520 0.000 0.992 0.008 0.000 0.000 0.000
#> GSM1182212     2  0.0260     0.8520 0.000 0.992 0.008 0.000 0.000 0.000
#> GSM1182213     2  0.0000     0.8511 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182214     2  0.0000     0.8511 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182215     2  0.3428     0.5462 0.000 0.696 0.304 0.000 0.000 0.000
#> GSM1182216     2  0.0458     0.8508 0.000 0.984 0.016 0.000 0.000 0.000
#> GSM1182217     6  0.0291     0.7983 0.000 0.000 0.004 0.000 0.004 0.992
#> GSM1182218     5  0.0458     0.7901 0.016 0.000 0.000 0.000 0.984 0.000
#> GSM1182219     2  0.0146     0.8518 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182220     2  0.0146     0.8518 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182221     2  0.0260     0.8517 0.000 0.992 0.008 0.000 0.000 0.000
#> GSM1182222     2  0.0547     0.8498 0.000 0.980 0.020 0.000 0.000 0.000
#> GSM1182223     2  0.3309     0.5915 0.000 0.720 0.280 0.000 0.000 0.000
#> GSM1182224     3  0.3446     0.8319 0.000 0.308 0.692 0.000 0.000 0.000
#> GSM1182225     2  0.0547     0.8498 0.000 0.980 0.020 0.000 0.000 0.000
#> GSM1182226     2  0.0547     0.8498 0.000 0.980 0.020 0.000 0.000 0.000
#> GSM1182227     1  0.2996     0.8861 0.772 0.000 0.000 0.000 0.228 0.000
#> GSM1182228     2  0.3244     0.6015 0.000 0.732 0.268 0.000 0.000 0.000
#> GSM1182229     2  0.3620     0.4370 0.000 0.648 0.352 0.000 0.000 0.000
#> GSM1182230     2  0.3409     0.5515 0.000 0.700 0.300 0.000 0.000 0.000
#> GSM1182231     2  0.3330     0.5783 0.000 0.716 0.284 0.000 0.000 0.000
#> GSM1182232     5  0.2491     0.6618 0.164 0.000 0.000 0.000 0.836 0.000
#> GSM1182233     5  0.2491     0.6618 0.164 0.000 0.000 0.000 0.836 0.000
#> GSM1182234     1  0.3828     0.4797 0.560 0.000 0.000 0.000 0.440 0.000
#> GSM1182235     2  0.0000     0.8511 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182236     5  0.1075     0.7799 0.048 0.000 0.000 0.000 0.952 0.000
#> GSM1182237     2  0.3076     0.6389 0.000 0.760 0.240 0.000 0.000 0.000
#> GSM1182238     2  0.0260     0.8517 0.000 0.992 0.008 0.000 0.000 0.000
#> GSM1182239     2  0.0146     0.8510 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182240     2  0.0000     0.8511 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182241     2  0.0000     0.8511 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182242     2  0.3659     0.4024 0.000 0.636 0.364 0.000 0.000 0.000
#> GSM1182243     2  0.3050     0.6676 0.000 0.764 0.236 0.000 0.000 0.000
#> GSM1182244     3  0.3647     0.7582 0.000 0.360 0.640 0.000 0.000 0.000
#> GSM1182245     1  0.2048     0.8231 0.880 0.000 0.000 0.000 0.120 0.000
#> GSM1182246     4  0.0146     0.9940 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM1182247     2  0.3684     0.3786 0.000 0.628 0.372 0.000 0.000 0.000
#> GSM1182248     2  0.3684     0.3786 0.000 0.628 0.372 0.000 0.000 0.000
#> GSM1182249     2  0.2527     0.7471 0.000 0.832 0.168 0.000 0.000 0.000
#> GSM1182250     2  0.2562     0.7443 0.000 0.828 0.172 0.000 0.000 0.000
#> GSM1182251     5  0.4954     0.7033 0.100 0.000 0.196 0.000 0.684 0.020
#> GSM1182252     2  0.3634     0.4259 0.000 0.644 0.356 0.000 0.000 0.000
#> GSM1182253     2  0.3634     0.4192 0.000 0.644 0.356 0.000 0.000 0.000
#> GSM1182254     2  0.3101     0.6558 0.000 0.756 0.244 0.000 0.000 0.000
#> GSM1182255     4  0.0000     0.9964 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182256     4  0.0000     0.9964 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182257     6  0.2854     0.6412 0.000 0.000 0.000 0.208 0.000 0.792
#> GSM1182258     4  0.0547     0.9815 0.000 0.000 0.000 0.980 0.000 0.020
#> GSM1182259     4  0.0000     0.9964 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182260     2  0.2260     0.7704 0.000 0.860 0.140 0.000 0.000 0.000
#> GSM1182261     2  0.3371     0.5651 0.000 0.708 0.292 0.000 0.000 0.000
#> GSM1182262     2  0.3371     0.5651 0.000 0.708 0.292 0.000 0.000 0.000
#> GSM1182263     5  0.4650     0.7182 0.104 0.000 0.172 0.000 0.712 0.012
#> GSM1182264     2  0.2378     0.7615 0.000 0.848 0.152 0.000 0.000 0.000
#> GSM1182265     2  0.2378     0.7609 0.000 0.848 0.152 0.000 0.000 0.000
#> GSM1182266     2  0.2416     0.7582 0.000 0.844 0.156 0.000 0.000 0.000
#> GSM1182267     5  0.3175     0.5378 0.256 0.000 0.000 0.000 0.744 0.000
#> GSM1182268     5  0.2697     0.6377 0.188 0.000 0.000 0.000 0.812 0.000
#> GSM1182269     5  0.0458     0.7901 0.016 0.000 0.000 0.000 0.984 0.000
#> GSM1182270     5  0.0458     0.7901 0.016 0.000 0.000 0.000 0.984 0.000
#> GSM1182271     4  0.0146     0.9939 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM1182272     4  0.0000     0.9964 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182273     2  0.2823     0.7108 0.000 0.796 0.204 0.000 0.000 0.000
#> GSM1182275     2  0.0713     0.8467 0.000 0.972 0.028 0.000 0.000 0.000
#> GSM1182276     2  0.0547     0.8499 0.000 0.980 0.020 0.000 0.000 0.000
#> GSM1182277     1  0.3076     0.8819 0.760 0.000 0.000 0.000 0.240 0.000
#> GSM1182278     1  0.3076     0.8819 0.760 0.000 0.000 0.000 0.240 0.000
#> GSM1182279     5  0.4938     0.6948 0.112 0.000 0.200 0.000 0.676 0.012
#> GSM1182280     5  0.4938     0.6948 0.112 0.000 0.200 0.000 0.676 0.012
#> GSM1182281     1  0.3657     0.4900 0.792 0.000 0.100 0.108 0.000 0.000
#> GSM1182282     1  0.2416     0.8161 0.844 0.000 0.000 0.000 0.156 0.000
#> GSM1182283     1  0.3076     0.8822 0.760 0.000 0.000 0.000 0.240 0.000
#> GSM1182284     1  0.2996     0.8861 0.772 0.000 0.000 0.000 0.228 0.000
#> GSM1182285     3  0.3464     0.8258 0.000 0.312 0.688 0.000 0.000 0.000
#> GSM1182286     2  0.0000     0.8511 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182287     2  0.3309     0.5915 0.000 0.720 0.280 0.000 0.000 0.000
#> GSM1182288     2  0.3684     0.3775 0.000 0.628 0.372 0.000 0.000 0.000
#> GSM1182289     5  0.4954     0.7033 0.100 0.000 0.196 0.000 0.684 0.020
#> GSM1182290     5  0.2794     0.7811 0.060 0.000 0.080 0.000 0.860 0.000
#> GSM1182291     4  0.0000     0.9964 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182274     2  0.2823     0.7108 0.000 0.796 0.204 0.000 0.000 0.000
#> GSM1182292     2  0.0146     0.8510 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182293     2  0.0000     0.8511 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182294     2  0.0146     0.8516 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182295     2  0.0000     0.8511 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182296     2  0.0000     0.8511 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182298     3  0.2793     0.9018 0.000 0.200 0.800 0.000 0.000 0.000
#> GSM1182299     2  0.0260     0.8520 0.000 0.992 0.008 0.000 0.000 0.000
#> GSM1182300     2  0.0146     0.8510 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182301     2  0.0000     0.8511 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182303     2  0.0146     0.8518 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182304     5  0.4938     0.6948 0.112 0.000 0.200 0.000 0.676 0.012
#> GSM1182305     5  0.7640     0.5182 0.128 0.000 0.196 0.104 0.492 0.080
#> GSM1182306     6  0.1957     0.7484 0.000 0.000 0.000 0.112 0.000 0.888
#> GSM1182307     2  0.0000     0.8511 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182309     2  0.0000     0.8511 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182312     2  0.0260     0.8517 0.000 0.992 0.008 0.000 0.000 0.000
#> GSM1182314     4  0.0260     0.9924 0.000 0.000 0.000 0.992 0.000 0.008
#> GSM1182316     2  0.0363     0.8516 0.000 0.988 0.012 0.000 0.000 0.000
#> GSM1182318     2  0.0000     0.8511 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182319     2  0.0000     0.8511 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182320     2  0.0260     0.8517 0.000 0.992 0.008 0.000 0.000 0.000
#> GSM1182321     2  0.0713     0.8441 0.000 0.972 0.028 0.000 0.000 0.000
#> GSM1182322     2  0.0000     0.8511 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182324     2  0.0713     0.8470 0.000 0.972 0.028 0.000 0.000 0.000
#> GSM1182297     2  0.0000     0.8511 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182302     6  0.0146     0.8002 0.000 0.000 0.000 0.004 0.000 0.996
#> GSM1182308     2  0.0363     0.8517 0.000 0.988 0.012 0.000 0.000 0.000
#> GSM1182310     2  0.0260     0.8517 0.000 0.992 0.008 0.000 0.000 0.000
#> GSM1182311     5  0.0458     0.7901 0.016 0.000 0.000 0.000 0.984 0.000
#> GSM1182313     4  0.0000     0.9964 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182315     2  0.0000     0.8511 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182317     2  0.0146     0.8518 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182323     5  0.0363     0.7900 0.012 0.000 0.000 0.000 0.988 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-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 disease.state(p) gender(p) k
#> SD:hclust 139           0.0773     1.000 2
#> SD:hclust 137           0.1355     0.829 3
#> SD:hclust 134           0.1447     0.769 4
#> SD:hclust 126           0.1371     0.817 5
#> SD:hclust 127           0.1711     0.873 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 46361 rows and 139 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 1.000           1.000       1.000         0.4791 0.521   0.521
#> 3 3 0.746           0.863       0.812         0.2844 0.821   0.657
#> 4 4 0.620           0.871       0.808         0.1412 0.892   0.697
#> 5 5 0.659           0.612       0.766         0.0726 0.995   0.981
#> 6 6 0.656           0.622       0.701         0.0532 0.905   0.644

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
#> GSM1182186     1       0          1  1  0
#> GSM1182187     1       0          1  1  0
#> GSM1182188     1       0          1  1  0
#> GSM1182189     1       0          1  1  0
#> GSM1182190     1       0          1  1  0
#> GSM1182191     1       0          1  1  0
#> GSM1182192     1       0          1  1  0
#> GSM1182193     1       0          1  1  0
#> GSM1182194     2       0          1  0  1
#> GSM1182195     2       0          1  0  1
#> GSM1182196     2       0          1  0  1
#> GSM1182197     2       0          1  0  1
#> GSM1182198     2       0          1  0  1
#> GSM1182199     2       0          1  0  1
#> GSM1182200     2       0          1  0  1
#> GSM1182201     2       0          1  0  1
#> GSM1182202     1       0          1  1  0
#> GSM1182203     1       0          1  1  0
#> GSM1182204     1       0          1  1  0
#> GSM1182205     2       0          1  0  1
#> GSM1182206     2       0          1  0  1
#> GSM1182207     1       0          1  1  0
#> GSM1182208     1       0          1  1  0
#> GSM1182209     2       0          1  0  1
#> GSM1182210     2       0          1  0  1
#> GSM1182211     2       0          1  0  1
#> GSM1182212     2       0          1  0  1
#> GSM1182213     2       0          1  0  1
#> GSM1182214     2       0          1  0  1
#> GSM1182215     2       0          1  0  1
#> GSM1182216     2       0          1  0  1
#> GSM1182217     1       0          1  1  0
#> GSM1182218     1       0          1  1  0
#> GSM1182219     2       0          1  0  1
#> GSM1182220     2       0          1  0  1
#> GSM1182221     2       0          1  0  1
#> GSM1182222     2       0          1  0  1
#> GSM1182223     2       0          1  0  1
#> GSM1182224     2       0          1  0  1
#> GSM1182225     2       0          1  0  1
#> GSM1182226     2       0          1  0  1
#> GSM1182227     1       0          1  1  0
#> GSM1182228     2       0          1  0  1
#> GSM1182229     2       0          1  0  1
#> GSM1182230     2       0          1  0  1
#> GSM1182231     2       0          1  0  1
#> GSM1182232     1       0          1  1  0
#> GSM1182233     1       0          1  1  0
#> GSM1182234     1       0          1  1  0
#> GSM1182235     2       0          1  0  1
#> GSM1182236     1       0          1  1  0
#> GSM1182237     2       0          1  0  1
#> GSM1182238     2       0          1  0  1
#> GSM1182239     2       0          1  0  1
#> GSM1182240     2       0          1  0  1
#> GSM1182241     2       0          1  0  1
#> GSM1182242     2       0          1  0  1
#> GSM1182243     2       0          1  0  1
#> GSM1182244     2       0          1  0  1
#> GSM1182245     1       0          1  1  0
#> GSM1182246     1       0          1  1  0
#> GSM1182247     2       0          1  0  1
#> GSM1182248     2       0          1  0  1
#> GSM1182249     2       0          1  0  1
#> GSM1182250     2       0          1  0  1
#> GSM1182251     1       0          1  1  0
#> GSM1182252     2       0          1  0  1
#> GSM1182253     2       0          1  0  1
#> GSM1182254     2       0          1  0  1
#> GSM1182255     1       0          1  1  0
#> GSM1182256     1       0          1  1  0
#> GSM1182257     1       0          1  1  0
#> GSM1182258     1       0          1  1  0
#> GSM1182259     1       0          1  1  0
#> GSM1182260     2       0          1  0  1
#> GSM1182261     2       0          1  0  1
#> GSM1182262     2       0          1  0  1
#> GSM1182263     1       0          1  1  0
#> GSM1182264     2       0          1  0  1
#> GSM1182265     2       0          1  0  1
#> GSM1182266     2       0          1  0  1
#> GSM1182267     1       0          1  1  0
#> GSM1182268     1       0          1  1  0
#> GSM1182269     1       0          1  1  0
#> GSM1182270     1       0          1  1  0
#> GSM1182271     1       0          1  1  0
#> GSM1182272     1       0          1  1  0
#> GSM1182273     2       0          1  0  1
#> GSM1182275     2       0          1  0  1
#> GSM1182276     2       0          1  0  1
#> GSM1182277     1       0          1  1  0
#> GSM1182278     1       0          1  1  0
#> GSM1182279     1       0          1  1  0
#> GSM1182280     1       0          1  1  0
#> GSM1182281     1       0          1  1  0
#> GSM1182282     1       0          1  1  0
#> GSM1182283     1       0          1  1  0
#> GSM1182284     1       0          1  1  0
#> GSM1182285     2       0          1  0  1
#> GSM1182286     2       0          1  0  1
#> GSM1182287     2       0          1  0  1
#> GSM1182288     2       0          1  0  1
#> GSM1182289     1       0          1  1  0
#> GSM1182290     1       0          1  1  0
#> GSM1182291     1       0          1  1  0
#> GSM1182274     2       0          1  0  1
#> GSM1182292     2       0          1  0  1
#> GSM1182293     2       0          1  0  1
#> GSM1182294     2       0          1  0  1
#> GSM1182295     2       0          1  0  1
#> GSM1182296     2       0          1  0  1
#> GSM1182298     2       0          1  0  1
#> GSM1182299     2       0          1  0  1
#> GSM1182300     2       0          1  0  1
#> GSM1182301     2       0          1  0  1
#> GSM1182303     2       0          1  0  1
#> GSM1182304     1       0          1  1  0
#> GSM1182305     1       0          1  1  0
#> GSM1182306     1       0          1  1  0
#> GSM1182307     2       0          1  0  1
#> GSM1182309     2       0          1  0  1
#> GSM1182312     2       0          1  0  1
#> GSM1182314     1       0          1  1  0
#> GSM1182316     2       0          1  0  1
#> GSM1182318     2       0          1  0  1
#> GSM1182319     2       0          1  0  1
#> GSM1182320     2       0          1  0  1
#> GSM1182321     2       0          1  0  1
#> GSM1182322     2       0          1  0  1
#> GSM1182324     2       0          1  0  1
#> GSM1182297     2       0          1  0  1
#> GSM1182302     1       0          1  1  0
#> GSM1182308     2       0          1  0  1
#> GSM1182310     2       0          1  0  1
#> GSM1182311     1       0          1  1  0
#> GSM1182313     1       0          1  1  0
#> GSM1182315     2       0          1  0  1
#> GSM1182317     2       0          1  0  1
#> GSM1182323     1       0          1  1  0

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1182186     1  0.6225     0.7890 0.568 0.000 0.432
#> GSM1182187     1  0.6225     0.7890 0.568 0.000 0.432
#> GSM1182188     1  0.6225     0.7890 0.568 0.000 0.432
#> GSM1182189     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182190     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182191     1  0.6225     0.7890 0.568 0.000 0.432
#> GSM1182192     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182193     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182194     3  0.6235     0.9929 0.000 0.436 0.564
#> GSM1182195     3  0.6225     0.9938 0.000 0.432 0.568
#> GSM1182196     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182197     2  0.0424     0.9237 0.000 0.992 0.008
#> GSM1182198     3  0.6225     0.9938 0.000 0.432 0.568
#> GSM1182199     3  0.6235     0.9929 0.000 0.436 0.564
#> GSM1182200     2  0.0592     0.9192 0.000 0.988 0.012
#> GSM1182201     2  0.5397     0.0923 0.000 0.720 0.280
#> GSM1182202     1  0.6225     0.7890 0.568 0.000 0.432
#> GSM1182203     1  0.6225     0.7890 0.568 0.000 0.432
#> GSM1182204     1  0.6225     0.7890 0.568 0.000 0.432
#> GSM1182205     3  0.6235     0.9902 0.000 0.436 0.564
#> GSM1182206     3  0.6260     0.9702 0.000 0.448 0.552
#> GSM1182207     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182208     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182209     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182210     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182211     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182212     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182213     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182214     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182215     3  0.6225     0.9938 0.000 0.432 0.568
#> GSM1182216     2  0.0592     0.9218 0.000 0.988 0.012
#> GSM1182217     1  0.6225     0.7890 0.568 0.000 0.432
#> GSM1182218     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182219     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182220     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182221     2  0.0237     0.9295 0.000 0.996 0.004
#> GSM1182222     2  0.1411     0.8885 0.000 0.964 0.036
#> GSM1182223     3  0.6235     0.9929 0.000 0.436 0.564
#> GSM1182224     3  0.6225     0.9938 0.000 0.432 0.568
#> GSM1182225     2  0.0592     0.9222 0.000 0.988 0.012
#> GSM1182226     2  0.0592     0.9218 0.000 0.988 0.012
#> GSM1182227     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182228     3  0.6244     0.9886 0.000 0.440 0.560
#> GSM1182229     3  0.6225     0.9938 0.000 0.432 0.568
#> GSM1182230     3  0.6225     0.9938 0.000 0.432 0.568
#> GSM1182231     2  0.2537     0.8110 0.000 0.920 0.080
#> GSM1182232     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182233     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182234     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182235     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182236     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182237     2  0.6299    -0.8094 0.000 0.524 0.476
#> GSM1182238     2  0.0237     0.9295 0.000 0.996 0.004
#> GSM1182239     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182240     2  0.0237     0.9295 0.000 0.996 0.004
#> GSM1182241     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182242     3  0.6235     0.9929 0.000 0.436 0.564
#> GSM1182243     3  0.6225     0.9938 0.000 0.432 0.568
#> GSM1182244     3  0.6235     0.9929 0.000 0.436 0.564
#> GSM1182245     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182246     1  0.6225     0.7890 0.568 0.000 0.432
#> GSM1182247     3  0.6235     0.9929 0.000 0.436 0.564
#> GSM1182248     3  0.6225     0.9938 0.000 0.432 0.568
#> GSM1182249     2  0.6111    -0.5270 0.000 0.604 0.396
#> GSM1182250     3  0.6235     0.9902 0.000 0.436 0.564
#> GSM1182251     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182252     3  0.6235     0.9929 0.000 0.436 0.564
#> GSM1182253     3  0.6225     0.9938 0.000 0.432 0.568
#> GSM1182254     3  0.6225     0.9938 0.000 0.432 0.568
#> GSM1182255     1  0.6225     0.7890 0.568 0.000 0.432
#> GSM1182256     1  0.6225     0.7890 0.568 0.000 0.432
#> GSM1182257     1  0.6225     0.7890 0.568 0.000 0.432
#> GSM1182258     1  0.6225     0.7890 0.568 0.000 0.432
#> GSM1182259     1  0.6225     0.7890 0.568 0.000 0.432
#> GSM1182260     3  0.6252     0.9826 0.000 0.444 0.556
#> GSM1182261     3  0.6235     0.9902 0.000 0.436 0.564
#> GSM1182262     3  0.6225     0.9938 0.000 0.432 0.568
#> GSM1182263     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182264     3  0.6252     0.9826 0.000 0.444 0.556
#> GSM1182265     3  0.6225     0.9938 0.000 0.432 0.568
#> GSM1182266     3  0.6244     0.9886 0.000 0.440 0.560
#> GSM1182267     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182268     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182269     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182270     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182271     1  0.6225     0.7890 0.568 0.000 0.432
#> GSM1182272     1  0.6225     0.7890 0.568 0.000 0.432
#> GSM1182273     3  0.6225     0.9938 0.000 0.432 0.568
#> GSM1182275     3  0.6235     0.9929 0.000 0.436 0.564
#> GSM1182276     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182277     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182278     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182279     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182280     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182281     1  0.5810     0.8026 0.664 0.000 0.336
#> GSM1182282     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182283     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182284     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182285     3  0.6235     0.9929 0.000 0.436 0.564
#> GSM1182286     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182287     2  0.5327     0.1644 0.000 0.728 0.272
#> GSM1182288     3  0.6225     0.9938 0.000 0.432 0.568
#> GSM1182289     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182290     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182291     1  0.6225     0.7890 0.568 0.000 0.432
#> GSM1182274     3  0.6225     0.9938 0.000 0.432 0.568
#> GSM1182292     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182293     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182294     2  0.0237     0.9295 0.000 0.996 0.004
#> GSM1182295     2  0.0237     0.9295 0.000 0.996 0.004
#> GSM1182296     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182298     3  0.6235     0.9929 0.000 0.436 0.564
#> GSM1182299     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182300     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182301     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182303     2  0.0237     0.9295 0.000 0.996 0.004
#> GSM1182304     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182305     1  0.6225     0.7890 0.568 0.000 0.432
#> GSM1182306     1  0.6225     0.7890 0.568 0.000 0.432
#> GSM1182307     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182309     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182312     2  0.0237     0.9295 0.000 0.996 0.004
#> GSM1182314     1  0.6225     0.7890 0.568 0.000 0.432
#> GSM1182316     2  0.0237     0.9295 0.000 0.996 0.004
#> GSM1182318     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182319     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182320     2  0.0237     0.9295 0.000 0.996 0.004
#> GSM1182321     2  0.4062     0.6016 0.000 0.836 0.164
#> GSM1182322     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182324     2  0.4178     0.5898 0.000 0.828 0.172
#> GSM1182297     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182302     1  0.6225     0.7890 0.568 0.000 0.432
#> GSM1182308     2  0.0237     0.9295 0.000 0.996 0.004
#> GSM1182310     2  0.0237     0.9295 0.000 0.996 0.004
#> GSM1182311     1  0.0000     0.8515 1.000 0.000 0.000
#> GSM1182313     1  0.6225     0.7890 0.568 0.000 0.432
#> GSM1182315     2  0.0237     0.9295 0.000 0.996 0.004
#> GSM1182317     2  0.0000     0.9313 0.000 1.000 0.000
#> GSM1182323     1  0.0000     0.8515 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1182186     4  0.2813     0.8875 0.024 0.080 0.000 0.896
#> GSM1182187     4  0.1389     0.9346 0.000 0.048 0.000 0.952
#> GSM1182188     4  0.0000     0.9480 0.000 0.000 0.000 1.000
#> GSM1182189     1  0.5016     0.9446 0.600 0.004 0.000 0.396
#> GSM1182190     1  0.5016     0.9446 0.600 0.004 0.000 0.396
#> GSM1182191     4  0.3205     0.8644 0.024 0.104 0.000 0.872
#> GSM1182192     1  0.5980     0.9352 0.560 0.044 0.000 0.396
#> GSM1182193     1  0.5980     0.9352 0.560 0.044 0.000 0.396
#> GSM1182194     3  0.3266     0.8327 0.168 0.000 0.832 0.000
#> GSM1182195     3  0.3311     0.8330 0.172 0.000 0.828 0.000
#> GSM1182196     2  0.5657     0.8809 0.120 0.720 0.160 0.000
#> GSM1182197     2  0.5990     0.6843 0.056 0.608 0.336 0.000
#> GSM1182198     3  0.3448     0.8316 0.168 0.004 0.828 0.000
#> GSM1182199     3  0.3448     0.8316 0.168 0.004 0.828 0.000
#> GSM1182200     2  0.4638     0.8895 0.044 0.776 0.180 0.000
#> GSM1182201     3  0.5997     0.0918 0.048 0.376 0.576 0.000
#> GSM1182202     4  0.1389     0.9346 0.000 0.048 0.000 0.952
#> GSM1182203     4  0.1389     0.9346 0.000 0.048 0.000 0.952
#> GSM1182204     4  0.1389     0.9346 0.000 0.048 0.000 0.952
#> GSM1182205     3  0.1807     0.8862 0.052 0.008 0.940 0.000
#> GSM1182206     3  0.3286     0.8392 0.080 0.044 0.876 0.000
#> GSM1182207     1  0.5746     0.9298 0.572 0.032 0.000 0.396
#> GSM1182208     1  0.5827     0.9294 0.568 0.036 0.000 0.396
#> GSM1182209     2  0.4405     0.8967 0.048 0.800 0.152 0.000
#> GSM1182210     2  0.4285     0.8982 0.040 0.804 0.156 0.000
#> GSM1182211     2  0.4197     0.8977 0.036 0.808 0.156 0.000
#> GSM1182212     2  0.4285     0.8969 0.040 0.804 0.156 0.000
#> GSM1182213     2  0.4285     0.8970 0.040 0.804 0.156 0.000
#> GSM1182214     2  0.4105     0.9010 0.032 0.812 0.156 0.000
#> GSM1182215     3  0.1890     0.8766 0.056 0.008 0.936 0.000
#> GSM1182216     2  0.5376     0.8807 0.088 0.736 0.176 0.000
#> GSM1182217     4  0.2813     0.8875 0.024 0.080 0.000 0.896
#> GSM1182218     1  0.5016     0.9446 0.600 0.004 0.000 0.396
#> GSM1182219     2  0.4452     0.8968 0.048 0.796 0.156 0.000
#> GSM1182220     2  0.4452     0.8968 0.048 0.796 0.156 0.000
#> GSM1182221     2  0.6243     0.8543 0.160 0.668 0.172 0.000
#> GSM1182222     2  0.5572     0.8679 0.088 0.716 0.196 0.000
#> GSM1182223     3  0.2578     0.8561 0.036 0.052 0.912 0.000
#> GSM1182224     3  0.3311     0.8330 0.172 0.000 0.828 0.000
#> GSM1182225     2  0.5417     0.8781 0.088 0.732 0.180 0.000
#> GSM1182226     2  0.5495     0.8795 0.096 0.728 0.176 0.000
#> GSM1182227     1  0.5980     0.9352 0.560 0.044 0.000 0.396
#> GSM1182228     3  0.3323     0.8386 0.060 0.064 0.876 0.000
#> GSM1182229     3  0.0188     0.8891 0.004 0.000 0.996 0.000
#> GSM1182230     3  0.0188     0.8891 0.004 0.000 0.996 0.000
#> GSM1182231     2  0.6672     0.5023 0.088 0.504 0.408 0.000
#> GSM1182232     1  0.4843     0.9442 0.604 0.000 0.000 0.396
#> GSM1182233     1  0.5016     0.9446 0.600 0.004 0.000 0.396
#> GSM1182234     1  0.5980     0.9352 0.560 0.044 0.000 0.396
#> GSM1182235     2  0.4609     0.8998 0.056 0.788 0.156 0.000
#> GSM1182236     1  0.5016     0.9446 0.600 0.004 0.000 0.396
#> GSM1182237     3  0.4944     0.7033 0.072 0.160 0.768 0.000
#> GSM1182238     2  0.5248     0.8890 0.088 0.748 0.164 0.000
#> GSM1182239     2  0.4405     0.9004 0.048 0.800 0.152 0.000
#> GSM1182240     2  0.5050     0.8966 0.084 0.764 0.152 0.000
#> GSM1182241     2  0.4711     0.8936 0.064 0.784 0.152 0.000
#> GSM1182242     3  0.0937     0.8880 0.012 0.012 0.976 0.000
#> GSM1182243     3  0.1042     0.8868 0.020 0.008 0.972 0.000
#> GSM1182244     3  0.3881     0.8258 0.172 0.016 0.812 0.000
#> GSM1182245     1  0.5980     0.9352 0.560 0.044 0.000 0.396
#> GSM1182246     4  0.0000     0.9480 0.000 0.000 0.000 1.000
#> GSM1182247     3  0.0469     0.8883 0.012 0.000 0.988 0.000
#> GSM1182248     3  0.0592     0.8887 0.016 0.000 0.984 0.000
#> GSM1182249     3  0.6078     0.5529 0.152 0.164 0.684 0.000
#> GSM1182250     3  0.2021     0.8754 0.056 0.012 0.932 0.000
#> GSM1182251     1  0.6844     0.8620 0.500 0.104 0.000 0.396
#> GSM1182252     3  0.0469     0.8883 0.012 0.000 0.988 0.000
#> GSM1182253     3  0.0592     0.8887 0.016 0.000 0.984 0.000
#> GSM1182254     3  0.0469     0.8888 0.012 0.000 0.988 0.000
#> GSM1182255     4  0.0000     0.9480 0.000 0.000 0.000 1.000
#> GSM1182256     4  0.0000     0.9480 0.000 0.000 0.000 1.000
#> GSM1182257     4  0.0188     0.9474 0.000 0.004 0.000 0.996
#> GSM1182258     4  0.0000     0.9480 0.000 0.000 0.000 1.000
#> GSM1182259     4  0.0000     0.9480 0.000 0.000 0.000 1.000
#> GSM1182260     3  0.1733     0.8825 0.028 0.024 0.948 0.000
#> GSM1182261     3  0.2984     0.8508 0.084 0.028 0.888 0.000
#> GSM1182262     3  0.1389     0.8822 0.048 0.000 0.952 0.000
#> GSM1182263     1  0.6491     0.8949 0.528 0.076 0.000 0.396
#> GSM1182264     3  0.1629     0.8811 0.024 0.024 0.952 0.000
#> GSM1182265     3  0.3392     0.8225 0.124 0.020 0.856 0.000
#> GSM1182266     3  0.1059     0.8867 0.016 0.012 0.972 0.000
#> GSM1182267     1  0.5980     0.9352 0.560 0.044 0.000 0.396
#> GSM1182268     1  0.5016     0.9446 0.600 0.004 0.000 0.396
#> GSM1182269     1  0.5016     0.9446 0.600 0.004 0.000 0.396
#> GSM1182270     1  0.5016     0.9446 0.600 0.004 0.000 0.396
#> GSM1182271     4  0.0000     0.9480 0.000 0.000 0.000 1.000
#> GSM1182272     4  0.0000     0.9480 0.000 0.000 0.000 1.000
#> GSM1182273     3  0.0336     0.8891 0.008 0.000 0.992 0.000
#> GSM1182275     3  0.0804     0.8893 0.012 0.008 0.980 0.000
#> GSM1182276     2  0.4285     0.8969 0.040 0.804 0.156 0.000
#> GSM1182277     1  0.5980     0.9352 0.560 0.044 0.000 0.396
#> GSM1182278     1  0.5980     0.9352 0.560 0.044 0.000 0.396
#> GSM1182279     1  0.6798     0.8673 0.504 0.100 0.000 0.396
#> GSM1182280     1  0.6491     0.8949 0.528 0.076 0.000 0.396
#> GSM1182281     4  0.4318     0.6351 0.116 0.068 0.000 0.816
#> GSM1182282     1  0.5980     0.9352 0.560 0.044 0.000 0.396
#> GSM1182283     1  0.5980     0.9352 0.560 0.044 0.000 0.396
#> GSM1182284     1  0.5980     0.9352 0.560 0.044 0.000 0.396
#> GSM1182285     3  0.3266     0.8327 0.168 0.000 0.832 0.000
#> GSM1182286     2  0.4237     0.9013 0.040 0.808 0.152 0.000
#> GSM1182287     3  0.6302     0.0644 0.068 0.368 0.564 0.000
#> GSM1182288     3  0.0657     0.8880 0.012 0.004 0.984 0.000
#> GSM1182289     1  0.6798     0.8673 0.504 0.100 0.000 0.396
#> GSM1182290     1  0.5980     0.9215 0.560 0.044 0.000 0.396
#> GSM1182291     4  0.0000     0.9480 0.000 0.000 0.000 1.000
#> GSM1182274     3  0.0927     0.8873 0.016 0.008 0.976 0.000
#> GSM1182292     2  0.4562     0.8951 0.056 0.792 0.152 0.000
#> GSM1182293     2  0.5657     0.8734 0.120 0.720 0.160 0.000
#> GSM1182294     2  0.5742     0.8709 0.120 0.712 0.168 0.000
#> GSM1182295     2  0.4010     0.9024 0.028 0.816 0.156 0.000
#> GSM1182296     2  0.4562     0.8951 0.056 0.792 0.152 0.000
#> GSM1182298     3  0.3448     0.8316 0.168 0.004 0.828 0.000
#> GSM1182299     2  0.4010     0.9024 0.028 0.816 0.156 0.000
#> GSM1182300     2  0.4485     0.8999 0.052 0.796 0.152 0.000
#> GSM1182301     2  0.4405     0.8967 0.048 0.800 0.152 0.000
#> GSM1182303     2  0.4285     0.8969 0.040 0.804 0.156 0.000
#> GSM1182304     1  0.6844     0.8668 0.500 0.104 0.000 0.396
#> GSM1182305     4  0.3307     0.8597 0.028 0.104 0.000 0.868
#> GSM1182306     4  0.0336     0.9467 0.000 0.008 0.000 0.992
#> GSM1182307     2  0.4405     0.8978 0.048 0.800 0.152 0.000
#> GSM1182309     2  0.5763     0.8720 0.132 0.712 0.156 0.000
#> GSM1182312     2  0.6204     0.8576 0.164 0.672 0.164 0.000
#> GSM1182314     4  0.0000     0.9480 0.000 0.000 0.000 1.000
#> GSM1182316     2  0.6162     0.8561 0.156 0.676 0.168 0.000
#> GSM1182318     2  0.4285     0.9014 0.040 0.804 0.156 0.000
#> GSM1182319     2  0.5902     0.8671 0.140 0.700 0.160 0.000
#> GSM1182320     2  0.6162     0.8561 0.156 0.676 0.168 0.000
#> GSM1182321     2  0.7179     0.5181 0.140 0.480 0.380 0.000
#> GSM1182322     2  0.5944     0.8658 0.140 0.696 0.164 0.000
#> GSM1182324     2  0.7338     0.5078 0.160 0.464 0.376 0.000
#> GSM1182297     2  0.4322     0.9010 0.044 0.804 0.152 0.000
#> GSM1182302     4  0.1389     0.9346 0.000 0.048 0.000 0.952
#> GSM1182308     2  0.5056     0.8897 0.076 0.760 0.164 0.000
#> GSM1182310     2  0.6323     0.8497 0.164 0.660 0.176 0.000
#> GSM1182311     1  0.5016     0.9446 0.600 0.004 0.000 0.396
#> GSM1182313     4  0.0000     0.9480 0.000 0.000 0.000 1.000
#> GSM1182315     2  0.5560     0.8879 0.116 0.728 0.156 0.000
#> GSM1182317     2  0.5551     0.8752 0.112 0.728 0.160 0.000
#> GSM1182323     1  0.5016     0.9446 0.600 0.004 0.000 0.396

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1182186     4  0.6854     0.7817 0.340 0.000 0.020 0.468 0.172
#> GSM1182187     4  0.6323     0.8769 0.292 0.000 0.032 0.576 0.100
#> GSM1182188     4  0.3752     0.9030 0.292 0.000 0.000 0.708 0.000
#> GSM1182189     1  0.0000     0.8907 1.000 0.000 0.000 0.000 0.000
#> GSM1182190     1  0.0000     0.8907 1.000 0.000 0.000 0.000 0.000
#> GSM1182191     4  0.6949     0.7516 0.340 0.000 0.016 0.440 0.204
#> GSM1182192     1  0.2676     0.8687 0.884 0.000 0.036 0.000 0.080
#> GSM1182193     1  0.2676     0.8687 0.884 0.000 0.036 0.000 0.080
#> GSM1182194     3  0.7024     0.6097 0.000 0.076 0.568 0.192 0.164
#> GSM1182195     3  0.7216     0.6087 0.000 0.080 0.544 0.196 0.180
#> GSM1182196     2  0.5505     0.1147 0.000 0.636 0.020 0.056 0.288
#> GSM1182197     2  0.6107    -0.1369 0.000 0.568 0.332 0.036 0.064
#> GSM1182198     3  0.7077     0.6078 0.000 0.076 0.560 0.200 0.164
#> GSM1182199     3  0.7077     0.6078 0.000 0.076 0.560 0.200 0.164
#> GSM1182200     2  0.2390     0.5314 0.000 0.908 0.060 0.008 0.024
#> GSM1182201     3  0.5190     0.2800 0.000 0.404 0.560 0.016 0.020
#> GSM1182202     4  0.6366     0.8750 0.292 0.000 0.032 0.572 0.104
#> GSM1182203     4  0.6249     0.8780 0.292 0.000 0.028 0.580 0.100
#> GSM1182204     4  0.6292     0.8764 0.292 0.000 0.028 0.576 0.104
#> GSM1182205     3  0.4893     0.7382 0.000 0.080 0.740 0.016 0.164
#> GSM1182206     3  0.5937     0.6553 0.000 0.096 0.644 0.032 0.228
#> GSM1182207     1  0.1732     0.8593 0.920 0.000 0.000 0.000 0.080
#> GSM1182208     1  0.1732     0.8593 0.920 0.000 0.000 0.000 0.080
#> GSM1182209     2  0.1372     0.5985 0.000 0.956 0.004 0.024 0.016
#> GSM1182210     2  0.0798     0.6006 0.000 0.976 0.000 0.008 0.016
#> GSM1182211     2  0.0451     0.5983 0.000 0.988 0.000 0.004 0.008
#> GSM1182212     2  0.0740     0.5943 0.000 0.980 0.004 0.008 0.008
#> GSM1182213     2  0.0451     0.6008 0.000 0.988 0.000 0.008 0.004
#> GSM1182214     2  0.0693     0.6023 0.000 0.980 0.000 0.008 0.012
#> GSM1182215     3  0.5346     0.7061 0.000 0.084 0.696 0.020 0.200
#> GSM1182216     2  0.4452     0.2771 0.000 0.696 0.000 0.032 0.272
#> GSM1182217     4  0.6993     0.7878 0.340 0.000 0.032 0.468 0.160
#> GSM1182218     1  0.0000     0.8907 1.000 0.000 0.000 0.000 0.000
#> GSM1182219     2  0.1251     0.5963 0.000 0.956 0.000 0.008 0.036
#> GSM1182220     2  0.1059     0.5959 0.000 0.968 0.004 0.008 0.020
#> GSM1182221     2  0.4637    -0.4016 0.000 0.536 0.000 0.012 0.452
#> GSM1182222     2  0.4605     0.2641 0.000 0.692 0.004 0.032 0.272
#> GSM1182223     3  0.4052     0.7237 0.000 0.176 0.784 0.024 0.016
#> GSM1182224     3  0.7217     0.6119 0.000 0.080 0.544 0.184 0.192
#> GSM1182225     2  0.4452     0.2771 0.000 0.696 0.000 0.032 0.272
#> GSM1182226     2  0.4498     0.2559 0.000 0.688 0.000 0.032 0.280
#> GSM1182227     1  0.2694     0.8686 0.884 0.000 0.040 0.000 0.076
#> GSM1182228     3  0.4985     0.7080 0.000 0.164 0.740 0.068 0.028
#> GSM1182229     3  0.2331     0.7832 0.000 0.080 0.900 0.020 0.000
#> GSM1182230     3  0.3566     0.7841 0.000 0.080 0.848 0.020 0.052
#> GSM1182231     2  0.7390    -0.3465 0.000 0.388 0.332 0.032 0.248
#> GSM1182232     1  0.0000     0.8907 1.000 0.000 0.000 0.000 0.000
#> GSM1182233     1  0.0000     0.8907 1.000 0.000 0.000 0.000 0.000
#> GSM1182234     1  0.2676     0.8687 0.884 0.000 0.036 0.000 0.080
#> GSM1182235     2  0.3854     0.5528 0.000 0.816 0.004 0.080 0.100
#> GSM1182236     1  0.0000     0.8907 1.000 0.000 0.000 0.000 0.000
#> GSM1182237     3  0.6751     0.5595 0.000 0.172 0.608 0.088 0.132
#> GSM1182238     2  0.4451     0.3209 0.000 0.712 0.000 0.040 0.248
#> GSM1182239     2  0.3142     0.5837 0.000 0.864 0.004 0.056 0.076
#> GSM1182240     2  0.2813     0.5501 0.000 0.868 0.000 0.024 0.108
#> GSM1182241     2  0.2967     0.5706 0.000 0.884 0.024 0.060 0.032
#> GSM1182242     3  0.2116     0.7828 0.000 0.076 0.912 0.008 0.004
#> GSM1182243     3  0.3782     0.7736 0.000 0.084 0.836 0.024 0.056
#> GSM1182244     3  0.7247     0.5993 0.000 0.092 0.548 0.184 0.176
#> GSM1182245     1  0.2676     0.8687 0.884 0.000 0.036 0.000 0.080
#> GSM1182246     4  0.3752     0.9030 0.292 0.000 0.000 0.708 0.000
#> GSM1182247     3  0.2172     0.7831 0.000 0.076 0.908 0.000 0.016
#> GSM1182248     3  0.3093     0.7832 0.000 0.080 0.872 0.016 0.032
#> GSM1182249     3  0.6543     0.3900 0.000 0.156 0.548 0.020 0.276
#> GSM1182250     3  0.5183     0.7071 0.000 0.084 0.716 0.020 0.180
#> GSM1182251     1  0.3274     0.7322 0.780 0.000 0.000 0.000 0.220
#> GSM1182252     3  0.2429     0.7832 0.000 0.076 0.900 0.004 0.020
#> GSM1182253     3  0.2733     0.7844 0.000 0.080 0.888 0.016 0.016
#> GSM1182254     3  0.3426     0.7805 0.000 0.084 0.856 0.028 0.032
#> GSM1182255     4  0.3906     0.9028 0.292 0.000 0.004 0.704 0.000
#> GSM1182256     4  0.3906     0.9028 0.292 0.000 0.004 0.704 0.000
#> GSM1182257     4  0.5196     0.8968 0.292 0.000 0.036 0.652 0.020
#> GSM1182258     4  0.3752     0.9030 0.292 0.000 0.000 0.708 0.000
#> GSM1182259     4  0.3752     0.9030 0.292 0.000 0.000 0.708 0.000
#> GSM1182260     3  0.4056     0.7704 0.000 0.080 0.824 0.044 0.052
#> GSM1182261     3  0.5937     0.6462 0.000 0.096 0.644 0.032 0.228
#> GSM1182262     3  0.5250     0.7158 0.000 0.084 0.708 0.020 0.188
#> GSM1182263     1  0.3132     0.7862 0.820 0.000 0.008 0.000 0.172
#> GSM1182264     3  0.3844     0.7634 0.000 0.104 0.828 0.044 0.024
#> GSM1182265     3  0.5375     0.6003 0.000 0.080 0.640 0.004 0.276
#> GSM1182266     3  0.2647     0.7824 0.000 0.076 0.892 0.024 0.008
#> GSM1182267     1  0.2676     0.8687 0.884 0.000 0.036 0.000 0.080
#> GSM1182268     1  0.0000     0.8907 1.000 0.000 0.000 0.000 0.000
#> GSM1182269     1  0.0000     0.8907 1.000 0.000 0.000 0.000 0.000
#> GSM1182270     1  0.0000     0.8907 1.000 0.000 0.000 0.000 0.000
#> GSM1182271     4  0.3906     0.9028 0.292 0.000 0.004 0.704 0.000
#> GSM1182272     4  0.3906     0.9028 0.292 0.000 0.004 0.704 0.000
#> GSM1182273     3  0.2990     0.7851 0.000 0.080 0.876 0.012 0.032
#> GSM1182275     3  0.2116     0.7822 0.000 0.076 0.912 0.004 0.008
#> GSM1182276     2  0.1087     0.5917 0.000 0.968 0.016 0.008 0.008
#> GSM1182277     1  0.2694     0.8686 0.884 0.000 0.040 0.000 0.076
#> GSM1182278     1  0.2694     0.8686 0.884 0.000 0.040 0.000 0.076
#> GSM1182279     1  0.3109     0.7563 0.800 0.000 0.000 0.000 0.200
#> GSM1182280     1  0.2852     0.7850 0.828 0.000 0.000 0.000 0.172
#> GSM1182281     4  0.6888     0.6475 0.364 0.000 0.044 0.476 0.116
#> GSM1182282     1  0.2676     0.8687 0.884 0.000 0.036 0.000 0.080
#> GSM1182283     1  0.2676     0.8687 0.884 0.000 0.036 0.000 0.080
#> GSM1182284     1  0.2694     0.8686 0.884 0.000 0.040 0.000 0.076
#> GSM1182285     3  0.7059     0.6118 0.000 0.076 0.564 0.184 0.176
#> GSM1182286     2  0.3384     0.5769 0.000 0.848 0.004 0.060 0.088
#> GSM1182287     3  0.6008     0.2595 0.000 0.380 0.528 0.016 0.076
#> GSM1182288     3  0.2861     0.7835 0.000 0.076 0.884 0.016 0.024
#> GSM1182289     1  0.3143     0.7531 0.796 0.000 0.000 0.000 0.204
#> GSM1182290     1  0.2074     0.8426 0.896 0.000 0.000 0.000 0.104
#> GSM1182291     4  0.3752     0.9030 0.292 0.000 0.000 0.708 0.000
#> GSM1182274     3  0.3730     0.7757 0.000 0.084 0.840 0.028 0.048
#> GSM1182292     2  0.1808     0.5938 0.000 0.936 0.004 0.040 0.020
#> GSM1182293     2  0.4084     0.0248 0.000 0.668 0.000 0.004 0.328
#> GSM1182294     2  0.4313    -0.0617 0.000 0.636 0.000 0.008 0.356
#> GSM1182295     2  0.2304     0.5777 0.000 0.892 0.000 0.008 0.100
#> GSM1182296     2  0.1808     0.5944 0.000 0.936 0.004 0.040 0.020
#> GSM1182298     3  0.7077     0.6078 0.000 0.076 0.560 0.200 0.164
#> GSM1182299     2  0.1757     0.6014 0.000 0.936 0.004 0.012 0.048
#> GSM1182300     2  0.3322     0.5618 0.000 0.848 0.004 0.044 0.104
#> GSM1182301     2  0.1728     0.5971 0.000 0.940 0.004 0.036 0.020
#> GSM1182303     2  0.0854     0.5937 0.000 0.976 0.004 0.008 0.012
#> GSM1182304     1  0.3039     0.7621 0.808 0.000 0.000 0.000 0.192
#> GSM1182305     4  0.6593     0.7431 0.340 0.000 0.000 0.440 0.220
#> GSM1182306     4  0.5363     0.8952 0.292 0.000 0.032 0.644 0.032
#> GSM1182307     2  0.1978     0.5941 0.000 0.928 0.004 0.044 0.024
#> GSM1182309     2  0.4709     0.0533 0.000 0.648 0.004 0.024 0.324
#> GSM1182312     2  0.4440    -0.4250 0.000 0.528 0.000 0.004 0.468
#> GSM1182314     4  0.3752     0.9030 0.292 0.000 0.000 0.708 0.000
#> GSM1182316     2  0.4283    -0.4062 0.000 0.544 0.000 0.000 0.456
#> GSM1182318     2  0.2389     0.5501 0.000 0.880 0.000 0.004 0.116
#> GSM1182319     2  0.5278    -0.0269 0.000 0.600 0.004 0.052 0.344
#> GSM1182320     2  0.4278    -0.3909 0.000 0.548 0.000 0.000 0.452
#> GSM1182321     2  0.7323    -0.6195 0.000 0.440 0.164 0.052 0.344
#> GSM1182322     2  0.5278    -0.0269 0.000 0.600 0.004 0.052 0.344
#> GSM1182324     5  0.5995     0.0000 0.000 0.420 0.112 0.000 0.468
#> GSM1182297     2  0.3629     0.5665 0.000 0.832 0.004 0.072 0.092
#> GSM1182302     4  0.6366     0.8750 0.292 0.000 0.032 0.572 0.104
#> GSM1182308     2  0.2329     0.5071 0.000 0.876 0.000 0.000 0.124
#> GSM1182310     2  0.4430    -0.4147 0.000 0.540 0.000 0.004 0.456
#> GSM1182311     1  0.0000     0.8907 1.000 0.000 0.000 0.000 0.000
#> GSM1182313     4  0.3752     0.9030 0.292 0.000 0.000 0.708 0.000
#> GSM1182315     2  0.4562     0.2607 0.000 0.676 0.000 0.032 0.292
#> GSM1182317     2  0.4029     0.0658 0.000 0.680 0.000 0.004 0.316
#> GSM1182323     1  0.0000     0.8907 1.000 0.000 0.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1182186     4   0.583     0.6623 0.040 0.000 0.008 0.612 0.104 0.236
#> GSM1182187     4   0.397     0.8023 0.000 0.000 0.020 0.772 0.044 0.164
#> GSM1182188     4   0.000     0.8436 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182189     1   0.319     0.8128 0.776 0.000 0.000 0.216 0.004 0.004
#> GSM1182190     1   0.319     0.8128 0.776 0.000 0.000 0.216 0.004 0.004
#> GSM1182191     4   0.602     0.5740 0.040 0.000 0.004 0.540 0.100 0.316
#> GSM1182192     1   0.610     0.7808 0.568 0.000 0.000 0.216 0.172 0.044
#> GSM1182193     1   0.610     0.7808 0.568 0.000 0.000 0.216 0.172 0.044
#> GSM1182194     6   0.443     0.9703 0.000 0.028 0.424 0.000 0.000 0.548
#> GSM1182195     6   0.456     0.9561 0.000 0.028 0.424 0.000 0.004 0.544
#> GSM1182196     2   0.576     0.3947 0.048 0.676 0.108 0.000 0.136 0.032
#> GSM1182197     3   0.735     0.0668 0.080 0.240 0.424 0.000 0.240 0.016
#> GSM1182198     6   0.443     0.9703 0.000 0.028 0.424 0.000 0.000 0.548
#> GSM1182199     6   0.443     0.9703 0.000 0.028 0.424 0.000 0.000 0.548
#> GSM1182200     5   0.460     0.7662 0.000 0.348 0.024 0.000 0.612 0.016
#> GSM1182201     3   0.603     0.4069 0.032 0.116 0.604 0.000 0.228 0.020
#> GSM1182202     4   0.412     0.7989 0.000 0.000 0.024 0.764 0.048 0.164
#> GSM1182203     4   0.395     0.8036 0.000 0.000 0.024 0.776 0.040 0.160
#> GSM1182204     4   0.412     0.7989 0.000 0.000 0.024 0.764 0.048 0.164
#> GSM1182205     3   0.532     0.4876 0.032 0.112 0.696 0.000 0.016 0.144
#> GSM1182206     3   0.580     0.5087 0.092 0.196 0.648 0.000 0.036 0.028
#> GSM1182207     1   0.579     0.7590 0.628 0.000 0.004 0.216 0.076 0.076
#> GSM1182208     1   0.560     0.7612 0.636 0.000 0.000 0.216 0.076 0.072
#> GSM1182209     5   0.383     0.7972 0.000 0.376 0.000 0.000 0.620 0.004
#> GSM1182210     5   0.383     0.7767 0.000 0.444 0.000 0.000 0.556 0.000
#> GSM1182211     5   0.388     0.7934 0.000 0.396 0.000 0.000 0.600 0.004
#> GSM1182212     5   0.401     0.7930 0.000 0.372 0.000 0.000 0.616 0.012
#> GSM1182213     5   0.402     0.7995 0.004 0.400 0.000 0.000 0.592 0.004
#> GSM1182214     5   0.467     0.7661 0.028 0.428 0.000 0.000 0.536 0.008
#> GSM1182215     3   0.523     0.5438 0.092 0.140 0.712 0.000 0.028 0.028
#> GSM1182216     2   0.677     0.2223 0.152 0.552 0.056 0.000 0.208 0.032
#> GSM1182217     4   0.595     0.6764 0.040 0.000 0.020 0.620 0.100 0.220
#> GSM1182218     1   0.319     0.8128 0.776 0.000 0.000 0.216 0.004 0.004
#> GSM1182219     5   0.580     0.5114 0.120 0.420 0.004 0.000 0.448 0.008
#> GSM1182220     5   0.417     0.7905 0.008 0.376 0.000 0.000 0.608 0.008
#> GSM1182221     2   0.377     0.4857 0.108 0.812 0.004 0.000 0.052 0.024
#> GSM1182222     2   0.692     0.2328 0.156 0.540 0.068 0.000 0.204 0.032
#> GSM1182223     3   0.309     0.6154 0.000 0.044 0.852 0.000 0.088 0.016
#> GSM1182224     6   0.479     0.9526 0.008 0.028 0.424 0.000 0.004 0.536
#> GSM1182225     2   0.663     0.1880 0.152 0.552 0.040 0.000 0.224 0.032
#> GSM1182226     2   0.673     0.2441 0.156 0.560 0.056 0.000 0.196 0.032
#> GSM1182227     1   0.607     0.7812 0.572 0.000 0.000 0.216 0.168 0.044
#> GSM1182228     3   0.416     0.5937 0.004 0.052 0.788 0.000 0.112 0.044
#> GSM1182229     3   0.130     0.6204 0.000 0.032 0.952 0.000 0.004 0.012
#> GSM1182230     3   0.300     0.5974 0.036 0.040 0.876 0.000 0.012 0.036
#> GSM1182231     3   0.745     0.1246 0.148 0.344 0.392 0.000 0.084 0.032
#> GSM1182232     1   0.305     0.8130 0.780 0.000 0.004 0.216 0.000 0.000
#> GSM1182233     1   0.333     0.8125 0.772 0.000 0.004 0.216 0.004 0.004
#> GSM1182234     1   0.607     0.7812 0.572 0.000 0.000 0.216 0.168 0.044
#> GSM1182235     2   0.713    -0.2463 0.136 0.420 0.048 0.000 0.356 0.040
#> GSM1182236     1   0.319     0.8128 0.776 0.000 0.000 0.216 0.004 0.004
#> GSM1182237     3   0.714     0.3852 0.148 0.168 0.540 0.000 0.104 0.040
#> GSM1182238     2   0.618     0.2099 0.140 0.596 0.048 0.000 0.204 0.012
#> GSM1182239     5   0.692     0.3554 0.116 0.388 0.040 0.000 0.416 0.040
#> GSM1182240     5   0.458     0.6700 0.012 0.476 0.000 0.000 0.496 0.016
#> GSM1182241     5   0.612     0.6694 0.056 0.348 0.036 0.000 0.528 0.032
#> GSM1182242     3   0.246     0.5557 0.000 0.028 0.888 0.000 0.008 0.076
#> GSM1182243     3   0.293     0.6385 0.048 0.060 0.872 0.000 0.012 0.008
#> GSM1182244     6   0.531     0.8736 0.008 0.028 0.368 0.000 0.036 0.560
#> GSM1182245     1   0.610     0.7808 0.568 0.000 0.000 0.216 0.172 0.044
#> GSM1182246     4   0.000     0.8436 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182247     3   0.276     0.5533 0.008 0.028 0.876 0.000 0.008 0.080
#> GSM1182248     3   0.276     0.5499 0.008 0.028 0.872 0.000 0.004 0.088
#> GSM1182249     3   0.527     0.4779 0.052 0.300 0.616 0.000 0.020 0.012
#> GSM1182250     3   0.440     0.6077 0.056 0.152 0.760 0.000 0.012 0.020
#> GSM1182251     1   0.734     0.4681 0.360 0.000 0.000 0.216 0.120 0.304
#> GSM1182252     3   0.262     0.5391 0.008 0.028 0.876 0.000 0.000 0.088
#> GSM1182253     3   0.240     0.5523 0.000 0.028 0.888 0.000 0.004 0.080
#> GSM1182254     3   0.244     0.6329 0.032 0.036 0.904 0.000 0.020 0.008
#> GSM1182255     4   0.000     0.8436 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182256     4   0.000     0.8436 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182257     4   0.264     0.8284 0.000 0.000 0.024 0.876 0.012 0.088
#> GSM1182258     4   0.000     0.8436 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182259     4   0.000     0.8436 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182260     3   0.364     0.6278 0.044 0.072 0.836 0.000 0.032 0.016
#> GSM1182261     3   0.615     0.4783 0.120 0.196 0.616 0.000 0.036 0.032
#> GSM1182262     3   0.511     0.5489 0.088 0.132 0.724 0.000 0.028 0.028
#> GSM1182263     1   0.712     0.6400 0.468 0.000 0.004 0.216 0.112 0.200
#> GSM1182264     3   0.408     0.6063 0.040 0.040 0.816 0.000 0.048 0.056
#> GSM1182265     3   0.461     0.5115 0.048 0.248 0.688 0.000 0.008 0.008
#> GSM1182266     3   0.319     0.6148 0.040 0.036 0.868 0.000 0.024 0.032
#> GSM1182267     1   0.610     0.7808 0.568 0.000 0.000 0.216 0.172 0.044
#> GSM1182268     1   0.319     0.8128 0.776 0.000 0.000 0.216 0.004 0.004
#> GSM1182269     1   0.319     0.8128 0.776 0.000 0.000 0.216 0.004 0.004
#> GSM1182270     1   0.319     0.8128 0.776 0.000 0.000 0.216 0.004 0.004
#> GSM1182271     4   0.000     0.8436 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182272     4   0.000     0.8436 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182273     3   0.274     0.6107 0.040 0.040 0.888 0.000 0.008 0.024
#> GSM1182275     3   0.320     0.6101 0.032 0.032 0.868 0.000 0.032 0.036
#> GSM1182276     5   0.419     0.7873 0.000 0.356 0.004 0.000 0.624 0.016
#> GSM1182277     1   0.610     0.7808 0.568 0.000 0.000 0.216 0.172 0.044
#> GSM1182278     1   0.610     0.7808 0.568 0.000 0.000 0.216 0.172 0.044
#> GSM1182279     1   0.717     0.5741 0.432 0.000 0.000 0.216 0.116 0.236
#> GSM1182280     1   0.688     0.6536 0.504 0.000 0.004 0.216 0.096 0.180
#> GSM1182281     4   0.592     0.4219 0.076 0.000 0.000 0.620 0.176 0.128
#> GSM1182282     1   0.610     0.7808 0.568 0.000 0.000 0.216 0.172 0.044
#> GSM1182283     1   0.610     0.7808 0.568 0.000 0.000 0.216 0.172 0.044
#> GSM1182284     1   0.610     0.7808 0.568 0.000 0.000 0.216 0.172 0.044
#> GSM1182285     6   0.466     0.9660 0.008 0.028 0.424 0.000 0.000 0.540
#> GSM1182286     5   0.668     0.3718 0.124 0.404 0.020 0.000 0.412 0.040
#> GSM1182287     3   0.581     0.3969 0.004 0.152 0.596 0.000 0.224 0.024
#> GSM1182288     3   0.271     0.5480 0.008 0.028 0.876 0.000 0.004 0.084
#> GSM1182289     1   0.718     0.5751 0.432 0.000 0.000 0.216 0.120 0.232
#> GSM1182290     1   0.597     0.7473 0.612 0.000 0.004 0.216 0.080 0.088
#> GSM1182291     4   0.000     0.8436 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182274     3   0.251     0.6321 0.044 0.060 0.888 0.000 0.008 0.000
#> GSM1182292     5   0.460     0.7745 0.004 0.376 0.000 0.000 0.584 0.036
#> GSM1182293     2   0.214     0.4657 0.000 0.872 0.000 0.000 0.128 0.000
#> GSM1182294     2   0.201     0.5159 0.004 0.916 0.016 0.000 0.060 0.004
#> GSM1182295     2   0.408    -0.3816 0.008 0.608 0.000 0.000 0.380 0.004
#> GSM1182296     5   0.455     0.7698 0.004 0.384 0.000 0.000 0.580 0.032
#> GSM1182298     6   0.443     0.9703 0.000 0.028 0.424 0.000 0.000 0.548
#> GSM1182299     5   0.551     0.7014 0.048 0.372 0.036 0.000 0.540 0.004
#> GSM1182300     2   0.469    -0.3595 0.008 0.560 0.000 0.000 0.400 0.032
#> GSM1182301     5   0.394     0.7943 0.000 0.380 0.000 0.000 0.612 0.008
#> GSM1182303     5   0.415     0.7869 0.000 0.372 0.004 0.000 0.612 0.012
#> GSM1182304     1   0.722     0.5985 0.452 0.000 0.004 0.216 0.120 0.208
#> GSM1182305     4   0.614     0.5360 0.048 0.000 0.000 0.528 0.120 0.304
#> GSM1182306     4   0.282     0.8273 0.000 0.000 0.024 0.868 0.020 0.088
#> GSM1182307     5   0.477     0.7605 0.012 0.396 0.000 0.000 0.560 0.032
#> GSM1182309     2   0.272     0.4723 0.004 0.860 0.000 0.000 0.112 0.024
#> GSM1182312     2   0.226     0.5202 0.068 0.900 0.000 0.000 0.024 0.008
#> GSM1182314     4   0.000     0.8436 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182316     2   0.171     0.5249 0.008 0.940 0.012 0.000 0.020 0.020
#> GSM1182318     2   0.387    -0.3223 0.004 0.604 0.000 0.000 0.392 0.000
#> GSM1182319     2   0.372     0.4842 0.016 0.824 0.028 0.000 0.100 0.032
#> GSM1182320     2   0.134     0.5260 0.008 0.956 0.012 0.000 0.016 0.008
#> GSM1182321     2   0.508     0.4200 0.016 0.716 0.160 0.000 0.068 0.040
#> GSM1182322     2   0.362     0.4892 0.016 0.832 0.028 0.000 0.092 0.032
#> GSM1182324     2   0.369     0.4483 0.024 0.808 0.136 0.000 0.008 0.024
#> GSM1182297     2   0.677    -0.3281 0.128 0.428 0.024 0.000 0.380 0.040
#> GSM1182302     4   0.412     0.7989 0.000 0.000 0.024 0.764 0.048 0.164
#> GSM1182308     5   0.478     0.6387 0.012 0.460 0.004 0.000 0.504 0.020
#> GSM1182310     2   0.143     0.5289 0.016 0.948 0.028 0.000 0.000 0.008
#> GSM1182311     1   0.319     0.8128 0.776 0.000 0.000 0.216 0.004 0.004
#> GSM1182313     4   0.000     0.8436 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182315     2   0.429     0.3655 0.084 0.748 0.000 0.000 0.156 0.012
#> GSM1182317     2   0.249     0.4324 0.000 0.836 0.000 0.000 0.164 0.000
#> GSM1182323     1   0.333     0.8125 0.772 0.000 0.004 0.216 0.004 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-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 disease.state(p) gender(p) k
#> SD:kmeans 139         7.73e-02     1.000 2
#> SD:kmeans 135         8.84e-07     0.459 3
#> SD:kmeans 137         1.49e-06     0.613 4
#> SD:kmeans 114         5.22e-04     0.807 5
#> SD:kmeans 107         6.46e-06     0.775 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 46361 rows and 139 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#>   Subgroups are detected by 'skmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 3.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk SD-skmeans-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           1.000       1.000         0.4791 0.521   0.521
#> 3 3 1.000           0.962       0.984         0.3834 0.815   0.645
#> 4 4 0.824           0.911       0.916         0.1093 0.924   0.774
#> 5 5 0.805           0.835       0.871         0.0605 0.953   0.824
#> 6 6 0.762           0.758       0.830         0.0417 0.957   0.815

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
#> GSM1182186     1       0          1  1  0
#> GSM1182187     1       0          1  1  0
#> GSM1182188     1       0          1  1  0
#> GSM1182189     1       0          1  1  0
#> GSM1182190     1       0          1  1  0
#> GSM1182191     1       0          1  1  0
#> GSM1182192     1       0          1  1  0
#> GSM1182193     1       0          1  1  0
#> GSM1182194     2       0          1  0  1
#> GSM1182195     2       0          1  0  1
#> GSM1182196     2       0          1  0  1
#> GSM1182197     2       0          1  0  1
#> GSM1182198     2       0          1  0  1
#> GSM1182199     2       0          1  0  1
#> GSM1182200     2       0          1  0  1
#> GSM1182201     2       0          1  0  1
#> GSM1182202     1       0          1  1  0
#> GSM1182203     1       0          1  1  0
#> GSM1182204     1       0          1  1  0
#> GSM1182205     2       0          1  0  1
#> GSM1182206     2       0          1  0  1
#> GSM1182207     1       0          1  1  0
#> GSM1182208     1       0          1  1  0
#> GSM1182209     2       0          1  0  1
#> GSM1182210     2       0          1  0  1
#> GSM1182211     2       0          1  0  1
#> GSM1182212     2       0          1  0  1
#> GSM1182213     2       0          1  0  1
#> GSM1182214     2       0          1  0  1
#> GSM1182215     2       0          1  0  1
#> GSM1182216     2       0          1  0  1
#> GSM1182217     1       0          1  1  0
#> GSM1182218     1       0          1  1  0
#> GSM1182219     2       0          1  0  1
#> GSM1182220     2       0          1  0  1
#> GSM1182221     2       0          1  0  1
#> GSM1182222     2       0          1  0  1
#> GSM1182223     2       0          1  0  1
#> GSM1182224     2       0          1  0  1
#> GSM1182225     2       0          1  0  1
#> GSM1182226     2       0          1  0  1
#> GSM1182227     1       0          1  1  0
#> GSM1182228     2       0          1  0  1
#> GSM1182229     2       0          1  0  1
#> GSM1182230     2       0          1  0  1
#> GSM1182231     2       0          1  0  1
#> GSM1182232     1       0          1  1  0
#> GSM1182233     1       0          1  1  0
#> GSM1182234     1       0          1  1  0
#> GSM1182235     2       0          1  0  1
#> GSM1182236     1       0          1  1  0
#> GSM1182237     2       0          1  0  1
#> GSM1182238     2       0          1  0  1
#> GSM1182239     2       0          1  0  1
#> GSM1182240     2       0          1  0  1
#> GSM1182241     2       0          1  0  1
#> GSM1182242     2       0          1  0  1
#> GSM1182243     2       0          1  0  1
#> GSM1182244     2       0          1  0  1
#> GSM1182245     1       0          1  1  0
#> GSM1182246     1       0          1  1  0
#> GSM1182247     2       0          1  0  1
#> GSM1182248     2       0          1  0  1
#> GSM1182249     2       0          1  0  1
#> GSM1182250     2       0          1  0  1
#> GSM1182251     1       0          1  1  0
#> GSM1182252     2       0          1  0  1
#> GSM1182253     2       0          1  0  1
#> GSM1182254     2       0          1  0  1
#> GSM1182255     1       0          1  1  0
#> GSM1182256     1       0          1  1  0
#> GSM1182257     1       0          1  1  0
#> GSM1182258     1       0          1  1  0
#> GSM1182259     1       0          1  1  0
#> GSM1182260     2       0          1  0  1
#> GSM1182261     2       0          1  0  1
#> GSM1182262     2       0          1  0  1
#> GSM1182263     1       0          1  1  0
#> GSM1182264     2       0          1  0  1
#> GSM1182265     2       0          1  0  1
#> GSM1182266     2       0          1  0  1
#> GSM1182267     1       0          1  1  0
#> GSM1182268     1       0          1  1  0
#> GSM1182269     1       0          1  1  0
#> GSM1182270     1       0          1  1  0
#> GSM1182271     1       0          1  1  0
#> GSM1182272     1       0          1  1  0
#> GSM1182273     2       0          1  0  1
#> GSM1182275     2       0          1  0  1
#> GSM1182276     2       0          1  0  1
#> GSM1182277     1       0          1  1  0
#> GSM1182278     1       0          1  1  0
#> GSM1182279     1       0          1  1  0
#> GSM1182280     1       0          1  1  0
#> GSM1182281     1       0          1  1  0
#> GSM1182282     1       0          1  1  0
#> GSM1182283     1       0          1  1  0
#> GSM1182284     1       0          1  1  0
#> GSM1182285     2       0          1  0  1
#> GSM1182286     2       0          1  0  1
#> GSM1182287     2       0          1  0  1
#> GSM1182288     2       0          1  0  1
#> GSM1182289     1       0          1  1  0
#> GSM1182290     1       0          1  1  0
#> GSM1182291     1       0          1  1  0
#> GSM1182274     2       0          1  0  1
#> GSM1182292     2       0          1  0  1
#> GSM1182293     2       0          1  0  1
#> GSM1182294     2       0          1  0  1
#> GSM1182295     2       0          1  0  1
#> GSM1182296     2       0          1  0  1
#> GSM1182298     2       0          1  0  1
#> GSM1182299     2       0          1  0  1
#> GSM1182300     2       0          1  0  1
#> GSM1182301     2       0          1  0  1
#> GSM1182303     2       0          1  0  1
#> GSM1182304     1       0          1  1  0
#> GSM1182305     1       0          1  1  0
#> GSM1182306     1       0          1  1  0
#> GSM1182307     2       0          1  0  1
#> GSM1182309     2       0          1  0  1
#> GSM1182312     2       0          1  0  1
#> GSM1182314     1       0          1  1  0
#> GSM1182316     2       0          1  0  1
#> GSM1182318     2       0          1  0  1
#> GSM1182319     2       0          1  0  1
#> GSM1182320     2       0          1  0  1
#> GSM1182321     2       0          1  0  1
#> GSM1182322     2       0          1  0  1
#> GSM1182324     2       0          1  0  1
#> GSM1182297     2       0          1  0  1
#> GSM1182302     1       0          1  1  0
#> GSM1182308     2       0          1  0  1
#> GSM1182310     2       0          1  0  1
#> GSM1182311     1       0          1  1  0
#> GSM1182313     1       0          1  1  0
#> GSM1182315     2       0          1  0  1
#> GSM1182317     2       0          1  0  1
#> GSM1182323     1       0          1  1  0

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette p1    p2    p3
#> GSM1182186     1  0.0000      1.000  1 0.000 0.000
#> GSM1182187     1  0.0000      1.000  1 0.000 0.000
#> GSM1182188     1  0.0000      1.000  1 0.000 0.000
#> GSM1182189     1  0.0000      1.000  1 0.000 0.000
#> GSM1182190     1  0.0000      1.000  1 0.000 0.000
#> GSM1182191     1  0.0000      1.000  1 0.000 0.000
#> GSM1182192     1  0.0000      1.000  1 0.000 0.000
#> GSM1182193     1  0.0000      1.000  1 0.000 0.000
#> GSM1182194     3  0.0000      0.957  0 0.000 1.000
#> GSM1182195     3  0.0000      0.957  0 0.000 1.000
#> GSM1182196     2  0.0000      0.984  0 1.000 0.000
#> GSM1182197     2  0.0592      0.976  0 0.988 0.012
#> GSM1182198     3  0.0000      0.957  0 0.000 1.000
#> GSM1182199     3  0.0000      0.957  0 0.000 1.000
#> GSM1182200     2  0.0747      0.974  0 0.984 0.016
#> GSM1182201     3  0.6140      0.341  0 0.404 0.596
#> GSM1182202     1  0.0000      1.000  1 0.000 0.000
#> GSM1182203     1  0.0000      1.000  1 0.000 0.000
#> GSM1182204     1  0.0000      1.000  1 0.000 0.000
#> GSM1182205     3  0.0237      0.955  0 0.004 0.996
#> GSM1182206     3  0.1163      0.937  0 0.028 0.972
#> GSM1182207     1  0.0000      1.000  1 0.000 0.000
#> GSM1182208     1  0.0000      1.000  1 0.000 0.000
#> GSM1182209     2  0.0000      0.984  0 1.000 0.000
#> GSM1182210     2  0.0000      0.984  0 1.000 0.000
#> GSM1182211     2  0.0000      0.984  0 1.000 0.000
#> GSM1182212     2  0.0000      0.984  0 1.000 0.000
#> GSM1182213     2  0.0000      0.984  0 1.000 0.000
#> GSM1182214     2  0.0000      0.984  0 1.000 0.000
#> GSM1182215     3  0.0000      0.957  0 0.000 1.000
#> GSM1182216     2  0.1031      0.967  0 0.976 0.024
#> GSM1182217     1  0.0000      1.000  1 0.000 0.000
#> GSM1182218     1  0.0000      1.000  1 0.000 0.000
#> GSM1182219     2  0.0000      0.984  0 1.000 0.000
#> GSM1182220     2  0.0000      0.984  0 1.000 0.000
#> GSM1182221     2  0.0237      0.982  0 0.996 0.004
#> GSM1182222     2  0.2261      0.925  0 0.932 0.068
#> GSM1182223     3  0.0000      0.957  0 0.000 1.000
#> GSM1182224     3  0.0000      0.957  0 0.000 1.000
#> GSM1182225     2  0.1031      0.967  0 0.976 0.024
#> GSM1182226     2  0.0892      0.971  0 0.980 0.020
#> GSM1182227     1  0.0000      1.000  1 0.000 0.000
#> GSM1182228     3  0.0237      0.955  0 0.004 0.996
#> GSM1182229     3  0.0000      0.957  0 0.000 1.000
#> GSM1182230     3  0.0000      0.957  0 0.000 1.000
#> GSM1182231     2  0.3941      0.821  0 0.844 0.156
#> GSM1182232     1  0.0000      1.000  1 0.000 0.000
#> GSM1182233     1  0.0000      1.000  1 0.000 0.000
#> GSM1182234     1  0.0000      1.000  1 0.000 0.000
#> GSM1182235     2  0.0000      0.984  0 1.000 0.000
#> GSM1182236     1  0.0000      1.000  1 0.000 0.000
#> GSM1182237     3  0.4062      0.798  0 0.164 0.836
#> GSM1182238     2  0.0000      0.984  0 1.000 0.000
#> GSM1182239     2  0.0000      0.984  0 1.000 0.000
#> GSM1182240     2  0.0000      0.984  0 1.000 0.000
#> GSM1182241     2  0.0000      0.984  0 1.000 0.000
#> GSM1182242     3  0.0237      0.955  0 0.004 0.996
#> GSM1182243     3  0.0000      0.957  0 0.000 1.000
#> GSM1182244     3  0.0424      0.953  0 0.008 0.992
#> GSM1182245     1  0.0000      1.000  1 0.000 0.000
#> GSM1182246     1  0.0000      1.000  1 0.000 0.000
#> GSM1182247     3  0.0000      0.957  0 0.000 1.000
#> GSM1182248     3  0.0000      0.957  0 0.000 1.000
#> GSM1182249     3  0.6286      0.149  0 0.464 0.536
#> GSM1182250     3  0.0237      0.955  0 0.004 0.996
#> GSM1182251     1  0.0000      1.000  1 0.000 0.000
#> GSM1182252     3  0.0000      0.957  0 0.000 1.000
#> GSM1182253     3  0.0000      0.957  0 0.000 1.000
#> GSM1182254     3  0.0000      0.957  0 0.000 1.000
#> GSM1182255     1  0.0000      1.000  1 0.000 0.000
#> GSM1182256     1  0.0000      1.000  1 0.000 0.000
#> GSM1182257     1  0.0000      1.000  1 0.000 0.000
#> GSM1182258     1  0.0000      1.000  1 0.000 0.000
#> GSM1182259     1  0.0000      1.000  1 0.000 0.000
#> GSM1182260     3  0.0892      0.944  0 0.020 0.980
#> GSM1182261     3  0.0424      0.953  0 0.008 0.992
#> GSM1182262     3  0.0000      0.957  0 0.000 1.000
#> GSM1182263     1  0.0000      1.000  1 0.000 0.000
#> GSM1182264     3  0.1031      0.941  0 0.024 0.976
#> GSM1182265     3  0.0000      0.957  0 0.000 1.000
#> GSM1182266     3  0.0237      0.955  0 0.004 0.996
#> GSM1182267     1  0.0000      1.000  1 0.000 0.000
#> GSM1182268     1  0.0000      1.000  1 0.000 0.000
#> GSM1182269     1  0.0000      1.000  1 0.000 0.000
#> GSM1182270     1  0.0000      1.000  1 0.000 0.000
#> GSM1182271     1  0.0000      1.000  1 0.000 0.000
#> GSM1182272     1  0.0000      1.000  1 0.000 0.000
#> GSM1182273     3  0.0000      0.957  0 0.000 1.000
#> GSM1182275     3  0.0000      0.957  0 0.000 1.000
#> GSM1182276     2  0.0000      0.984  0 1.000 0.000
#> GSM1182277     1  0.0000      1.000  1 0.000 0.000
#> GSM1182278     1  0.0000      1.000  1 0.000 0.000
#> GSM1182279     1  0.0000      1.000  1 0.000 0.000
#> GSM1182280     1  0.0000      1.000  1 0.000 0.000
#> GSM1182281     1  0.0000      1.000  1 0.000 0.000
#> GSM1182282     1  0.0000      1.000  1 0.000 0.000
#> GSM1182283     1  0.0000      1.000  1 0.000 0.000
#> GSM1182284     1  0.0000      1.000  1 0.000 0.000
#> GSM1182285     3  0.0000      0.957  0 0.000 1.000
#> GSM1182286     2  0.0000      0.984  0 1.000 0.000
#> GSM1182287     3  0.5968      0.434  0 0.364 0.636
#> GSM1182288     3  0.0000      0.957  0 0.000 1.000
#> GSM1182289     1  0.0000      1.000  1 0.000 0.000
#> GSM1182290     1  0.0000      1.000  1 0.000 0.000
#> GSM1182291     1  0.0000      1.000  1 0.000 0.000
#> GSM1182274     3  0.0000      0.957  0 0.000 1.000
#> GSM1182292     2  0.0000      0.984  0 1.000 0.000
#> GSM1182293     2  0.0000      0.984  0 1.000 0.000
#> GSM1182294     2  0.0000      0.984  0 1.000 0.000
#> GSM1182295     2  0.0000      0.984  0 1.000 0.000
#> GSM1182296     2  0.0000      0.984  0 1.000 0.000
#> GSM1182298     3  0.0000      0.957  0 0.000 1.000
#> GSM1182299     2  0.0000      0.984  0 1.000 0.000
#> GSM1182300     2  0.0000      0.984  0 1.000 0.000
#> GSM1182301     2  0.0000      0.984  0 1.000 0.000
#> GSM1182303     2  0.0000      0.984  0 1.000 0.000
#> GSM1182304     1  0.0000      1.000  1 0.000 0.000
#> GSM1182305     1  0.0000      1.000  1 0.000 0.000
#> GSM1182306     1  0.0000      1.000  1 0.000 0.000
#> GSM1182307     2  0.0000      0.984  0 1.000 0.000
#> GSM1182309     2  0.0000      0.984  0 1.000 0.000
#> GSM1182312     2  0.0237      0.982  0 0.996 0.004
#> GSM1182314     1  0.0000      1.000  1 0.000 0.000
#> GSM1182316     2  0.0237      0.982  0 0.996 0.004
#> GSM1182318     2  0.0000      0.984  0 1.000 0.000
#> GSM1182319     2  0.0000      0.984  0 1.000 0.000
#> GSM1182320     2  0.0237      0.982  0 0.996 0.004
#> GSM1182321     2  0.4002      0.812  0 0.840 0.160
#> GSM1182322     2  0.0000      0.984  0 1.000 0.000
#> GSM1182324     2  0.4702      0.739  0 0.788 0.212
#> GSM1182297     2  0.0000      0.984  0 1.000 0.000
#> GSM1182302     1  0.0000      1.000  1 0.000 0.000
#> GSM1182308     2  0.0237      0.982  0 0.996 0.004
#> GSM1182310     2  0.0237      0.982  0 0.996 0.004
#> GSM1182311     1  0.0000      1.000  1 0.000 0.000
#> GSM1182313     1  0.0000      1.000  1 0.000 0.000
#> GSM1182315     2  0.0000      0.984  0 1.000 0.000
#> GSM1182317     2  0.0000      0.984  0 1.000 0.000
#> GSM1182323     1  0.0000      1.000  1 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1182186     1  0.3311     0.9762 0.828 0.000 0.000 0.172
#> GSM1182187     4  0.3907     0.6218 0.232 0.000 0.000 0.768
#> GSM1182188     4  0.0000     0.9578 0.000 0.000 0.000 1.000
#> GSM1182189     1  0.3311     0.9762 0.828 0.000 0.000 0.172
#> GSM1182190     1  0.3311     0.9762 0.828 0.000 0.000 0.172
#> GSM1182191     1  0.3311     0.9762 0.828 0.000 0.000 0.172
#> GSM1182192     4  0.0000     0.9578 0.000 0.000 0.000 1.000
#> GSM1182193     4  0.0000     0.9578 0.000 0.000 0.000 1.000
#> GSM1182194     3  0.0707     0.9226 0.020 0.000 0.980 0.000
#> GSM1182195     3  0.0921     0.9232 0.028 0.000 0.972 0.000
#> GSM1182196     2  0.0707     0.9508 0.020 0.980 0.000 0.000
#> GSM1182197     2  0.1022     0.9403 0.000 0.968 0.032 0.000
#> GSM1182198     3  0.0707     0.9226 0.020 0.000 0.980 0.000
#> GSM1182199     3  0.0707     0.9226 0.020 0.000 0.980 0.000
#> GSM1182200     2  0.1004     0.9464 0.004 0.972 0.024 0.000
#> GSM1182201     3  0.4817     0.3554 0.000 0.388 0.612 0.000
#> GSM1182202     1  0.3311     0.9762 0.828 0.000 0.000 0.172
#> GSM1182203     4  0.4746     0.2410 0.368 0.000 0.000 0.632
#> GSM1182204     1  0.3311     0.9762 0.828 0.000 0.000 0.172
#> GSM1182205     3  0.3024     0.8698 0.148 0.000 0.852 0.000
#> GSM1182206     3  0.3447     0.8619 0.128 0.020 0.852 0.000
#> GSM1182207     1  0.3311     0.9762 0.828 0.000 0.000 0.172
#> GSM1182208     1  0.3311     0.9762 0.828 0.000 0.000 0.172
#> GSM1182209     2  0.0707     0.9508 0.020 0.980 0.000 0.000
#> GSM1182210     2  0.0188     0.9524 0.004 0.996 0.000 0.000
#> GSM1182211     2  0.0000     0.9521 0.000 1.000 0.000 0.000
#> GSM1182212     2  0.0000     0.9521 0.000 1.000 0.000 0.000
#> GSM1182213     2  0.0000     0.9521 0.000 1.000 0.000 0.000
#> GSM1182214     2  0.0188     0.9524 0.004 0.996 0.000 0.000
#> GSM1182215     3  0.2760     0.8734 0.128 0.000 0.872 0.000
#> GSM1182216     2  0.2760     0.9115 0.128 0.872 0.000 0.000
#> GSM1182217     1  0.3311     0.9762 0.828 0.000 0.000 0.172
#> GSM1182218     1  0.3311     0.9762 0.828 0.000 0.000 0.172
#> GSM1182219     2  0.0000     0.9521 0.000 1.000 0.000 0.000
#> GSM1182220     2  0.0188     0.9522 0.004 0.996 0.000 0.000
#> GSM1182221     2  0.2814     0.9104 0.132 0.868 0.000 0.000
#> GSM1182222     2  0.3088     0.9067 0.128 0.864 0.008 0.000
#> GSM1182223     3  0.0188     0.9251 0.000 0.004 0.996 0.000
#> GSM1182224     3  0.0921     0.9232 0.028 0.000 0.972 0.000
#> GSM1182225     2  0.2760     0.9115 0.128 0.872 0.000 0.000
#> GSM1182226     2  0.2760     0.9115 0.128 0.872 0.000 0.000
#> GSM1182227     4  0.0000     0.9578 0.000 0.000 0.000 1.000
#> GSM1182228     3  0.1174     0.9178 0.020 0.012 0.968 0.000
#> GSM1182229     3  0.0000     0.9248 0.000 0.000 1.000 0.000
#> GSM1182230     3  0.0336     0.9253 0.008 0.000 0.992 0.000
#> GSM1182231     2  0.4259     0.8687 0.128 0.816 0.056 0.000
#> GSM1182232     1  0.3311     0.9762 0.828 0.000 0.000 0.172
#> GSM1182233     1  0.3311     0.9762 0.828 0.000 0.000 0.172
#> GSM1182234     4  0.0000     0.9578 0.000 0.000 0.000 1.000
#> GSM1182235     2  0.0707     0.9508 0.020 0.980 0.000 0.000
#> GSM1182236     1  0.3311     0.9762 0.828 0.000 0.000 0.172
#> GSM1182237     3  0.3962     0.8098 0.028 0.152 0.820 0.000
#> GSM1182238     2  0.2530     0.9184 0.112 0.888 0.000 0.000
#> GSM1182239     2  0.0707     0.9508 0.020 0.980 0.000 0.000
#> GSM1182240     2  0.2814     0.9190 0.132 0.868 0.000 0.000
#> GSM1182241     2  0.0707     0.9508 0.020 0.980 0.000 0.000
#> GSM1182242     3  0.0000     0.9248 0.000 0.000 1.000 0.000
#> GSM1182243     3  0.0469     0.9251 0.012 0.000 0.988 0.000
#> GSM1182244     3  0.1733     0.9135 0.028 0.024 0.948 0.000
#> GSM1182245     4  0.0000     0.9578 0.000 0.000 0.000 1.000
#> GSM1182246     4  0.0000     0.9578 0.000 0.000 0.000 1.000
#> GSM1182247     3  0.0000     0.9248 0.000 0.000 1.000 0.000
#> GSM1182248     3  0.0469     0.9251 0.012 0.000 0.988 0.000
#> GSM1182249     3  0.6707     0.0435 0.088 0.444 0.468 0.000
#> GSM1182250     3  0.2760     0.8734 0.128 0.000 0.872 0.000
#> GSM1182251     1  0.3311     0.9762 0.828 0.000 0.000 0.172
#> GSM1182252     3  0.0000     0.9248 0.000 0.000 1.000 0.000
#> GSM1182253     3  0.0592     0.9245 0.016 0.000 0.984 0.000
#> GSM1182254     3  0.0469     0.9251 0.012 0.000 0.988 0.000
#> GSM1182255     4  0.0000     0.9578 0.000 0.000 0.000 1.000
#> GSM1182256     4  0.0000     0.9578 0.000 0.000 0.000 1.000
#> GSM1182257     4  0.1389     0.9075 0.048 0.000 0.000 0.952
#> GSM1182258     4  0.0000     0.9578 0.000 0.000 0.000 1.000
#> GSM1182259     4  0.0000     0.9578 0.000 0.000 0.000 1.000
#> GSM1182260     3  0.0927     0.9205 0.016 0.008 0.976 0.000
#> GSM1182261     3  0.3217     0.8670 0.128 0.012 0.860 0.000
#> GSM1182262     3  0.2760     0.8734 0.128 0.000 0.872 0.000
#> GSM1182263     1  0.4916     0.5574 0.576 0.000 0.000 0.424
#> GSM1182264     3  0.1624     0.9095 0.020 0.028 0.952 0.000
#> GSM1182265     3  0.1302     0.9163 0.044 0.000 0.956 0.000
#> GSM1182266     3  0.0469     0.9234 0.012 0.000 0.988 0.000
#> GSM1182267     4  0.0000     0.9578 0.000 0.000 0.000 1.000
#> GSM1182268     1  0.3311     0.9762 0.828 0.000 0.000 0.172
#> GSM1182269     1  0.3311     0.9762 0.828 0.000 0.000 0.172
#> GSM1182270     1  0.3311     0.9762 0.828 0.000 0.000 0.172
#> GSM1182271     4  0.0000     0.9578 0.000 0.000 0.000 1.000
#> GSM1182272     4  0.0000     0.9578 0.000 0.000 0.000 1.000
#> GSM1182273     3  0.0469     0.9251 0.012 0.000 0.988 0.000
#> GSM1182275     3  0.0000     0.9248 0.000 0.000 1.000 0.000
#> GSM1182276     2  0.0000     0.9521 0.000 1.000 0.000 0.000
#> GSM1182277     4  0.0000     0.9578 0.000 0.000 0.000 1.000
#> GSM1182278     4  0.0000     0.9578 0.000 0.000 0.000 1.000
#> GSM1182279     1  0.3311     0.9762 0.828 0.000 0.000 0.172
#> GSM1182280     1  0.3311     0.9762 0.828 0.000 0.000 0.172
#> GSM1182281     4  0.0000     0.9578 0.000 0.000 0.000 1.000
#> GSM1182282     4  0.0000     0.9578 0.000 0.000 0.000 1.000
#> GSM1182283     4  0.0000     0.9578 0.000 0.000 0.000 1.000
#> GSM1182284     4  0.0000     0.9578 0.000 0.000 0.000 1.000
#> GSM1182285     3  0.0707     0.9226 0.020 0.000 0.980 0.000
#> GSM1182286     2  0.0707     0.9508 0.020 0.980 0.000 0.000
#> GSM1182287     3  0.5855     0.3932 0.044 0.356 0.600 0.000
#> GSM1182288     3  0.0188     0.9252 0.004 0.000 0.996 0.000
#> GSM1182289     1  0.3356     0.9718 0.824 0.000 0.000 0.176
#> GSM1182290     1  0.3311     0.9762 0.828 0.000 0.000 0.172
#> GSM1182291     4  0.0000     0.9578 0.000 0.000 0.000 1.000
#> GSM1182274     3  0.0188     0.9253 0.004 0.000 0.996 0.000
#> GSM1182292     2  0.0707     0.9508 0.020 0.980 0.000 0.000
#> GSM1182293     2  0.0188     0.9522 0.004 0.996 0.000 0.000
#> GSM1182294     2  0.0592     0.9515 0.016 0.984 0.000 0.000
#> GSM1182295     2  0.0336     0.9522 0.008 0.992 0.000 0.000
#> GSM1182296     2  0.0707     0.9508 0.020 0.980 0.000 0.000
#> GSM1182298     3  0.0707     0.9226 0.020 0.000 0.980 0.000
#> GSM1182299     2  0.0000     0.9521 0.000 1.000 0.000 0.000
#> GSM1182300     2  0.0707     0.9508 0.020 0.980 0.000 0.000
#> GSM1182301     2  0.0707     0.9508 0.020 0.980 0.000 0.000
#> GSM1182303     2  0.0469     0.9516 0.012 0.988 0.000 0.000
#> GSM1182304     1  0.3311     0.9762 0.828 0.000 0.000 0.172
#> GSM1182305     1  0.4855     0.6083 0.600 0.000 0.000 0.400
#> GSM1182306     4  0.3873     0.6298 0.228 0.000 0.000 0.772
#> GSM1182307     2  0.0707     0.9508 0.020 0.980 0.000 0.000
#> GSM1182309     2  0.0817     0.9504 0.024 0.976 0.000 0.000
#> GSM1182312     2  0.2760     0.9125 0.128 0.872 0.000 0.000
#> GSM1182314     4  0.0000     0.9578 0.000 0.000 0.000 1.000
#> GSM1182316     2  0.2814     0.9104 0.132 0.868 0.000 0.000
#> GSM1182318     2  0.0000     0.9521 0.000 1.000 0.000 0.000
#> GSM1182319     2  0.0817     0.9504 0.024 0.976 0.000 0.000
#> GSM1182320     2  0.2760     0.9125 0.128 0.872 0.000 0.000
#> GSM1182321     2  0.3711     0.8447 0.024 0.836 0.140 0.000
#> GSM1182322     2  0.0817     0.9504 0.024 0.976 0.000 0.000
#> GSM1182324     2  0.4740     0.8416 0.132 0.788 0.080 0.000
#> GSM1182297     2  0.0707     0.9508 0.020 0.980 0.000 0.000
#> GSM1182302     1  0.3311     0.9762 0.828 0.000 0.000 0.172
#> GSM1182308     2  0.2704     0.9133 0.124 0.876 0.000 0.000
#> GSM1182310     2  0.2760     0.9125 0.128 0.872 0.000 0.000
#> GSM1182311     1  0.3311     0.9762 0.828 0.000 0.000 0.172
#> GSM1182313     4  0.0000     0.9578 0.000 0.000 0.000 1.000
#> GSM1182315     2  0.2868     0.9182 0.136 0.864 0.000 0.000
#> GSM1182317     2  0.0188     0.9522 0.004 0.996 0.000 0.000
#> GSM1182323     1  0.3311     0.9762 0.828 0.000 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
#> GSM1182186     1  0.0000     0.9515 1.000 0.000 0.000 0.000 0.000
#> GSM1182187     4  0.4161     0.4010 0.392 0.000 0.000 0.608 0.000
#> GSM1182188     4  0.0963     0.9551 0.036 0.000 0.000 0.964 0.000
#> GSM1182189     1  0.0000     0.9515 1.000 0.000 0.000 0.000 0.000
#> GSM1182190     1  0.0000     0.9515 1.000 0.000 0.000 0.000 0.000
#> GSM1182191     1  0.0162     0.9511 0.996 0.000 0.000 0.004 0.000
#> GSM1182192     4  0.1364     0.9553 0.036 0.000 0.000 0.952 0.012
#> GSM1182193     4  0.1364     0.9553 0.036 0.000 0.000 0.952 0.012
#> GSM1182194     5  0.4171     0.9368 0.000 0.000 0.396 0.000 0.604
#> GSM1182195     5  0.4161     0.9312 0.000 0.000 0.392 0.000 0.608
#> GSM1182196     2  0.3283     0.8601 0.000 0.832 0.000 0.028 0.140
#> GSM1182197     3  0.4940     0.3149 0.000 0.436 0.540 0.004 0.020
#> GSM1182198     5  0.4161     0.9358 0.000 0.000 0.392 0.000 0.608
#> GSM1182199     5  0.4171     0.9368 0.000 0.000 0.396 0.000 0.604
#> GSM1182200     2  0.1644     0.8602 0.000 0.940 0.048 0.008 0.004
#> GSM1182201     3  0.3996     0.5829 0.000 0.228 0.752 0.008 0.012
#> GSM1182202     1  0.0404     0.9451 0.988 0.000 0.000 0.012 0.000
#> GSM1182203     1  0.4306    -0.0826 0.508 0.000 0.000 0.492 0.000
#> GSM1182204     1  0.0404     0.9451 0.988 0.000 0.000 0.012 0.000
#> GSM1182205     5  0.4321     0.5641 0.000 0.004 0.396 0.000 0.600
#> GSM1182206     3  0.3883     0.6685 0.000 0.036 0.780 0.000 0.184
#> GSM1182207     1  0.0162     0.9511 0.996 0.000 0.000 0.004 0.000
#> GSM1182208     1  0.0162     0.9511 0.996 0.000 0.000 0.004 0.000
#> GSM1182209     2  0.1364     0.8702 0.000 0.952 0.000 0.012 0.036
#> GSM1182210     2  0.1205     0.8774 0.000 0.956 0.000 0.004 0.040
#> GSM1182211     2  0.0579     0.8721 0.000 0.984 0.000 0.008 0.008
#> GSM1182212     2  0.0613     0.8716 0.000 0.984 0.004 0.008 0.004
#> GSM1182213     2  0.0566     0.8744 0.000 0.984 0.000 0.004 0.012
#> GSM1182214     2  0.0955     0.8773 0.000 0.968 0.000 0.004 0.028
#> GSM1182215     3  0.2970     0.7084 0.000 0.004 0.828 0.000 0.168
#> GSM1182216     2  0.3596     0.8300 0.000 0.784 0.016 0.000 0.200
#> GSM1182217     1  0.0000     0.9515 1.000 0.000 0.000 0.000 0.000
#> GSM1182218     1  0.0000     0.9515 1.000 0.000 0.000 0.000 0.000
#> GSM1182219     2  0.0451     0.8739 0.000 0.988 0.000 0.004 0.008
#> GSM1182220     2  0.0740     0.8717 0.000 0.980 0.004 0.008 0.008
#> GSM1182221     2  0.3876     0.7917 0.000 0.684 0.000 0.000 0.316
#> GSM1182222     2  0.3596     0.8300 0.000 0.784 0.016 0.000 0.200
#> GSM1182223     3  0.2361     0.7254 0.000 0.096 0.892 0.000 0.012
#> GSM1182224     5  0.4161     0.9312 0.000 0.000 0.392 0.000 0.608
#> GSM1182225     2  0.3596     0.8300 0.000 0.784 0.016 0.000 0.200
#> GSM1182226     2  0.3727     0.8272 0.000 0.768 0.016 0.000 0.216
#> GSM1182227     4  0.1364     0.9553 0.036 0.000 0.000 0.952 0.012
#> GSM1182228     3  0.4430     0.6459 0.000 0.136 0.784 0.024 0.056
#> GSM1182229     3  0.0290     0.7690 0.000 0.000 0.992 0.000 0.008
#> GSM1182230     3  0.0963     0.7593 0.000 0.000 0.964 0.000 0.036
#> GSM1182231     3  0.6098     0.4245 0.000 0.236 0.568 0.000 0.196
#> GSM1182232     1  0.0162     0.9511 0.996 0.000 0.000 0.004 0.000
#> GSM1182233     1  0.0162     0.9511 0.996 0.000 0.000 0.004 0.000
#> GSM1182234     4  0.1364     0.9553 0.036 0.000 0.000 0.952 0.012
#> GSM1182235     2  0.2734     0.8714 0.000 0.888 0.008 0.028 0.076
#> GSM1182236     1  0.0000     0.9515 1.000 0.000 0.000 0.000 0.000
#> GSM1182237     3  0.4816     0.6483 0.000 0.092 0.764 0.028 0.116
#> GSM1182238     2  0.3402     0.8411 0.000 0.804 0.008 0.004 0.184
#> GSM1182239     2  0.2178     0.8667 0.000 0.920 0.008 0.024 0.048
#> GSM1182240     2  0.2971     0.8572 0.000 0.836 0.000 0.008 0.156
#> GSM1182241     2  0.2483     0.8617 0.000 0.908 0.016 0.028 0.048
#> GSM1182242     3  0.0609     0.7630 0.000 0.000 0.980 0.000 0.020
#> GSM1182243     3  0.0404     0.7748 0.000 0.000 0.988 0.000 0.012
#> GSM1182244     5  0.4993     0.8673 0.000 0.024 0.340 0.012 0.624
#> GSM1182245     4  0.1364     0.9553 0.036 0.000 0.000 0.952 0.012
#> GSM1182246     4  0.0963     0.9551 0.036 0.000 0.000 0.964 0.000
#> GSM1182247     3  0.0703     0.7610 0.000 0.000 0.976 0.000 0.024
#> GSM1182248     3  0.0794     0.7643 0.000 0.000 0.972 0.000 0.028
#> GSM1182249     3  0.4441     0.5970 0.000 0.044 0.720 0.000 0.236
#> GSM1182250     3  0.2929     0.7097 0.000 0.008 0.840 0.000 0.152
#> GSM1182251     1  0.0162     0.9511 0.996 0.000 0.000 0.004 0.000
#> GSM1182252     3  0.0880     0.7561 0.000 0.000 0.968 0.000 0.032
#> GSM1182253     3  0.1121     0.7622 0.000 0.000 0.956 0.000 0.044
#> GSM1182254     3  0.0290     0.7725 0.000 0.000 0.992 0.000 0.008
#> GSM1182255     4  0.0963     0.9551 0.036 0.000 0.000 0.964 0.000
#> GSM1182256     4  0.0963     0.9551 0.036 0.000 0.000 0.964 0.000
#> GSM1182257     4  0.2690     0.8329 0.156 0.000 0.000 0.844 0.000
#> GSM1182258     4  0.0963     0.9551 0.036 0.000 0.000 0.964 0.000
#> GSM1182259     4  0.0963     0.9551 0.036 0.000 0.000 0.964 0.000
#> GSM1182260     3  0.1989     0.7568 0.000 0.020 0.932 0.016 0.032
#> GSM1182261     3  0.3527     0.6844 0.000 0.024 0.804 0.000 0.172
#> GSM1182262     3  0.2732     0.7147 0.000 0.000 0.840 0.000 0.160
#> GSM1182263     1  0.3895     0.5062 0.680 0.000 0.000 0.320 0.000
#> GSM1182264     3  0.2758     0.7373 0.000 0.032 0.896 0.024 0.048
#> GSM1182265     3  0.2966     0.6793 0.000 0.000 0.816 0.000 0.184
#> GSM1182266     3  0.1507     0.7652 0.000 0.012 0.952 0.012 0.024
#> GSM1182267     4  0.1364     0.9553 0.036 0.000 0.000 0.952 0.012
#> GSM1182268     1  0.0000     0.9515 1.000 0.000 0.000 0.000 0.000
#> GSM1182269     1  0.0000     0.9515 1.000 0.000 0.000 0.000 0.000
#> GSM1182270     1  0.0000     0.9515 1.000 0.000 0.000 0.000 0.000
#> GSM1182271     4  0.0963     0.9551 0.036 0.000 0.000 0.964 0.000
#> GSM1182272     4  0.0963     0.9551 0.036 0.000 0.000 0.964 0.000
#> GSM1182273     3  0.0703     0.7718 0.000 0.000 0.976 0.000 0.024
#> GSM1182275     3  0.1018     0.7687 0.000 0.016 0.968 0.000 0.016
#> GSM1182276     2  0.0854     0.8710 0.000 0.976 0.004 0.008 0.012
#> GSM1182277     4  0.1364     0.9553 0.036 0.000 0.000 0.952 0.012
#> GSM1182278     4  0.1364     0.9553 0.036 0.000 0.000 0.952 0.012
#> GSM1182279     1  0.0000     0.9515 1.000 0.000 0.000 0.000 0.000
#> GSM1182280     1  0.0162     0.9511 0.996 0.000 0.000 0.004 0.000
#> GSM1182281     4  0.1364     0.9553 0.036 0.000 0.000 0.952 0.012
#> GSM1182282     4  0.1364     0.9553 0.036 0.000 0.000 0.952 0.012
#> GSM1182283     4  0.1364     0.9553 0.036 0.000 0.000 0.952 0.012
#> GSM1182284     4  0.1364     0.9553 0.036 0.000 0.000 0.952 0.012
#> GSM1182285     5  0.4171     0.9368 0.000 0.000 0.396 0.000 0.604
#> GSM1182286     2  0.2124     0.8697 0.000 0.916 0.000 0.028 0.056
#> GSM1182287     3  0.4136     0.6160 0.000 0.188 0.764 0.000 0.048
#> GSM1182288     3  0.0794     0.7643 0.000 0.000 0.972 0.000 0.028
#> GSM1182289     1  0.0290     0.9486 0.992 0.000 0.000 0.008 0.000
#> GSM1182290     1  0.0162     0.9511 0.996 0.000 0.000 0.004 0.000
#> GSM1182291     4  0.0963     0.9551 0.036 0.000 0.000 0.964 0.000
#> GSM1182274     3  0.0162     0.7721 0.000 0.000 0.996 0.000 0.004
#> GSM1182292     2  0.1893     0.8645 0.000 0.928 0.000 0.024 0.048
#> GSM1182293     2  0.3231     0.8362 0.000 0.800 0.000 0.004 0.196
#> GSM1182294     2  0.3491     0.8298 0.000 0.768 0.000 0.004 0.228
#> GSM1182295     2  0.2068     0.8772 0.000 0.904 0.000 0.004 0.092
#> GSM1182296     2  0.1893     0.8645 0.000 0.928 0.000 0.024 0.048
#> GSM1182298     5  0.4171     0.9368 0.000 0.000 0.396 0.000 0.604
#> GSM1182299     2  0.1405     0.8689 0.000 0.956 0.016 0.008 0.020
#> GSM1182300     2  0.2482     0.8713 0.000 0.892 0.000 0.024 0.084
#> GSM1182301     2  0.1907     0.8697 0.000 0.928 0.000 0.028 0.044
#> GSM1182303     2  0.0960     0.8728 0.000 0.972 0.004 0.008 0.016
#> GSM1182304     1  0.0000     0.9515 1.000 0.000 0.000 0.000 0.000
#> GSM1182305     1  0.3424     0.6563 0.760 0.000 0.000 0.240 0.000
#> GSM1182306     4  0.4138     0.4213 0.384 0.000 0.000 0.616 0.000
#> GSM1182307     2  0.2236     0.8695 0.000 0.908 0.000 0.024 0.068
#> GSM1182309     2  0.3789     0.8291 0.000 0.760 0.000 0.016 0.224
#> GSM1182312     2  0.4066     0.7855 0.000 0.672 0.000 0.004 0.324
#> GSM1182314     4  0.0963     0.9551 0.036 0.000 0.000 0.964 0.000
#> GSM1182316     2  0.3966     0.7796 0.000 0.664 0.000 0.000 0.336
#> GSM1182318     2  0.1671     0.8749 0.000 0.924 0.000 0.000 0.076
#> GSM1182319     2  0.4238     0.8234 0.000 0.740 0.004 0.028 0.228
#> GSM1182320     2  0.3932     0.7845 0.000 0.672 0.000 0.000 0.328
#> GSM1182321     2  0.6436     0.6704 0.000 0.584 0.160 0.024 0.232
#> GSM1182322     2  0.4238     0.8234 0.000 0.740 0.004 0.028 0.228
#> GSM1182324     2  0.5852     0.6557 0.000 0.556 0.116 0.000 0.328
#> GSM1182297     2  0.2484     0.8711 0.000 0.900 0.004 0.028 0.068
#> GSM1182302     1  0.0404     0.9451 0.988 0.000 0.000 0.012 0.000
#> GSM1182308     2  0.2377     0.8485 0.000 0.872 0.000 0.000 0.128
#> GSM1182310     2  0.4218     0.7831 0.000 0.668 0.004 0.004 0.324
#> GSM1182311     1  0.0000     0.9515 1.000 0.000 0.000 0.000 0.000
#> GSM1182313     4  0.0963     0.9551 0.036 0.000 0.000 0.964 0.000
#> GSM1182315     2  0.3814     0.8314 0.000 0.720 0.000 0.004 0.276
#> GSM1182317     2  0.3209     0.8387 0.000 0.812 0.000 0.008 0.180
#> GSM1182323     1  0.0000     0.9515 1.000 0.000 0.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1182186     5  0.1858     0.8817 0.052 0.000 0.000 0.012 0.924 0.012
#> GSM1182187     4  0.5702     0.2476 0.096 0.000 0.000 0.480 0.404 0.020
#> GSM1182188     4  0.2555     0.8986 0.096 0.000 0.000 0.876 0.008 0.020
#> GSM1182189     5  0.2106     0.8595 0.064 0.000 0.000 0.000 0.904 0.032
#> GSM1182190     5  0.2448     0.8493 0.064 0.000 0.000 0.000 0.884 0.052
#> GSM1182191     5  0.2102     0.8797 0.068 0.000 0.000 0.012 0.908 0.012
#> GSM1182192     4  0.0551     0.8961 0.004 0.000 0.000 0.984 0.008 0.004
#> GSM1182193     4  0.0551     0.8961 0.004 0.000 0.000 0.984 0.008 0.004
#> GSM1182194     6  0.2697     0.9304 0.000 0.000 0.188 0.000 0.000 0.812
#> GSM1182195     6  0.2854     0.9215 0.000 0.000 0.208 0.000 0.000 0.792
#> GSM1182196     2  0.4833     0.0175 0.316 0.620 0.004 0.004 0.000 0.056
#> GSM1182197     3  0.5212     0.4765 0.048 0.312 0.608 0.004 0.000 0.028
#> GSM1182198     6  0.2697     0.9304 0.000 0.000 0.188 0.000 0.000 0.812
#> GSM1182199     6  0.2664     0.9304 0.000 0.000 0.184 0.000 0.000 0.816
#> GSM1182200     2  0.2290     0.7296 0.032 0.908 0.044 0.004 0.000 0.012
#> GSM1182201     3  0.3697     0.7373 0.024 0.148 0.800 0.004 0.000 0.024
#> GSM1182202     5  0.2362     0.8411 0.080 0.000 0.000 0.012 0.892 0.016
#> GSM1182203     5  0.5694     0.0183 0.096 0.000 0.000 0.396 0.488 0.020
#> GSM1182204     5  0.2916     0.8163 0.096 0.000 0.000 0.024 0.860 0.020
#> GSM1182205     6  0.5426     0.4584 0.152 0.000 0.292 0.000 0.000 0.556
#> GSM1182206     3  0.3883     0.7338 0.200 0.004 0.752 0.000 0.000 0.044
#> GSM1182207     5  0.2195     0.8789 0.068 0.000 0.000 0.012 0.904 0.016
#> GSM1182208     5  0.2195     0.8789 0.068 0.000 0.000 0.012 0.904 0.016
#> GSM1182209     2  0.1059     0.7618 0.016 0.964 0.000 0.004 0.000 0.016
#> GSM1182210     2  0.2264     0.7422 0.096 0.888 0.004 0.000 0.000 0.012
#> GSM1182211     2  0.1138     0.7589 0.024 0.960 0.000 0.004 0.000 0.012
#> GSM1182212     2  0.1672     0.7529 0.028 0.940 0.016 0.004 0.000 0.012
#> GSM1182213     2  0.0972     0.7655 0.028 0.964 0.000 0.000 0.000 0.008
#> GSM1182214     2  0.1686     0.7606 0.064 0.924 0.000 0.000 0.000 0.012
#> GSM1182215     3  0.3771     0.7450 0.180 0.000 0.764 0.000 0.000 0.056
#> GSM1182216     2  0.4469     0.5050 0.272 0.676 0.040 0.000 0.000 0.012
#> GSM1182217     5  0.0622     0.8812 0.008 0.000 0.000 0.012 0.980 0.000
#> GSM1182218     5  0.2173     0.8633 0.064 0.000 0.000 0.004 0.904 0.028
#> GSM1182219     2  0.1820     0.7625 0.056 0.924 0.008 0.000 0.000 0.012
#> GSM1182220     2  0.1592     0.7577 0.024 0.944 0.016 0.004 0.000 0.012
#> GSM1182221     1  0.4101     0.6869 0.632 0.352 0.008 0.000 0.000 0.008
#> GSM1182222     2  0.4550     0.4906 0.276 0.668 0.044 0.000 0.000 0.012
#> GSM1182223     3  0.1873     0.8147 0.008 0.048 0.924 0.000 0.000 0.020
#> GSM1182224     6  0.2854     0.9215 0.000 0.000 0.208 0.000 0.000 0.792
#> GSM1182225     2  0.4273     0.5378 0.260 0.696 0.032 0.000 0.000 0.012
#> GSM1182226     2  0.4741     0.3803 0.320 0.624 0.044 0.000 0.000 0.012
#> GSM1182227     4  0.0665     0.8952 0.004 0.000 0.000 0.980 0.008 0.008
#> GSM1182228     3  0.3524     0.7730 0.020 0.080 0.832 0.004 0.000 0.064
#> GSM1182229     3  0.0632     0.8192 0.000 0.000 0.976 0.000 0.000 0.024
#> GSM1182230     3  0.2145     0.8053 0.028 0.000 0.900 0.000 0.000 0.072
#> GSM1182231     3  0.5052     0.6146 0.224 0.108 0.656 0.000 0.000 0.012
#> GSM1182232     5  0.0725     0.8813 0.012 0.000 0.000 0.012 0.976 0.000
#> GSM1182233     5  0.0909     0.8810 0.020 0.000 0.000 0.012 0.968 0.000
#> GSM1182234     4  0.0665     0.8952 0.004 0.000 0.000 0.980 0.008 0.008
#> GSM1182235     2  0.3517     0.7179 0.084 0.832 0.020 0.004 0.000 0.060
#> GSM1182236     5  0.1829     0.8688 0.064 0.000 0.000 0.004 0.920 0.012
#> GSM1182237     3  0.5253     0.6950 0.096 0.100 0.708 0.004 0.000 0.092
#> GSM1182238     2  0.4141     0.4975 0.296 0.676 0.020 0.000 0.000 0.008
#> GSM1182239     2  0.2527     0.7476 0.040 0.892 0.008 0.004 0.000 0.056
#> GSM1182240     2  0.3014     0.7056 0.132 0.832 0.000 0.000 0.000 0.036
#> GSM1182241     2  0.2138     0.7443 0.036 0.908 0.000 0.004 0.000 0.052
#> GSM1182242     3  0.1531     0.8079 0.004 0.000 0.928 0.000 0.000 0.068
#> GSM1182243     3  0.0363     0.8242 0.012 0.000 0.988 0.000 0.000 0.000
#> GSM1182244     6  0.3163     0.8757 0.008 0.012 0.172 0.000 0.000 0.808
#> GSM1182245     4  0.0405     0.8966 0.004 0.000 0.000 0.988 0.008 0.000
#> GSM1182246     4  0.2555     0.8986 0.096 0.000 0.000 0.876 0.008 0.020
#> GSM1182247     3  0.1556     0.8033 0.000 0.000 0.920 0.000 0.000 0.080
#> GSM1182248     3  0.1765     0.7906 0.000 0.000 0.904 0.000 0.000 0.096
#> GSM1182249     3  0.3970     0.6886 0.260 0.016 0.712 0.000 0.000 0.012
#> GSM1182250     3  0.2884     0.7693 0.164 0.004 0.824 0.000 0.000 0.008
#> GSM1182251     5  0.2102     0.8797 0.068 0.000 0.000 0.012 0.908 0.012
#> GSM1182252     3  0.1765     0.7954 0.000 0.000 0.904 0.000 0.000 0.096
#> GSM1182253     3  0.1866     0.8015 0.008 0.000 0.908 0.000 0.000 0.084
#> GSM1182254     3  0.0622     0.8241 0.012 0.000 0.980 0.000 0.000 0.008
#> GSM1182255     4  0.2555     0.8986 0.096 0.000 0.000 0.876 0.008 0.020
#> GSM1182256     4  0.2555     0.8986 0.096 0.000 0.000 0.876 0.008 0.020
#> GSM1182257     4  0.4600     0.7590 0.096 0.000 0.000 0.728 0.156 0.020
#> GSM1182258     4  0.2555     0.8986 0.096 0.000 0.000 0.876 0.008 0.020
#> GSM1182259     4  0.2555     0.8986 0.096 0.000 0.000 0.876 0.008 0.020
#> GSM1182260     3  0.2226     0.8129 0.028 0.008 0.904 0.000 0.000 0.060
#> GSM1182261     3  0.3219     0.7443 0.192 0.004 0.792 0.000 0.000 0.012
#> GSM1182262     3  0.3578     0.7570 0.164 0.000 0.784 0.000 0.000 0.052
#> GSM1182263     5  0.5038     0.5428 0.068 0.000 0.000 0.292 0.624 0.016
#> GSM1182264     3  0.2976     0.8000 0.024 0.028 0.860 0.000 0.000 0.088
#> GSM1182265     3  0.3756     0.6574 0.268 0.000 0.712 0.000 0.000 0.020
#> GSM1182266     3  0.2069     0.8128 0.020 0.004 0.908 0.000 0.000 0.068
#> GSM1182267     4  0.0551     0.8961 0.004 0.000 0.000 0.984 0.008 0.004
#> GSM1182268     5  0.1625     0.8751 0.060 0.000 0.000 0.012 0.928 0.000
#> GSM1182269     5  0.2448     0.8493 0.064 0.000 0.000 0.000 0.884 0.052
#> GSM1182270     5  0.2448     0.8493 0.064 0.000 0.000 0.000 0.884 0.052
#> GSM1182271     4  0.2555     0.8986 0.096 0.000 0.000 0.876 0.008 0.020
#> GSM1182272     4  0.2555     0.8986 0.096 0.000 0.000 0.876 0.008 0.020
#> GSM1182273     3  0.1720     0.8203 0.032 0.000 0.928 0.000 0.000 0.040
#> GSM1182275     3  0.1767     0.8132 0.012 0.020 0.932 0.000 0.000 0.036
#> GSM1182276     2  0.1592     0.7503 0.016 0.944 0.024 0.004 0.000 0.012
#> GSM1182277     4  0.0551     0.8961 0.004 0.000 0.000 0.984 0.008 0.004
#> GSM1182278     4  0.0551     0.8961 0.004 0.000 0.000 0.984 0.008 0.004
#> GSM1182279     5  0.2094     0.8788 0.068 0.000 0.000 0.008 0.908 0.016
#> GSM1182280     5  0.2195     0.8789 0.068 0.000 0.000 0.012 0.904 0.016
#> GSM1182281     4  0.0405     0.8969 0.000 0.000 0.000 0.988 0.008 0.004
#> GSM1182282     4  0.0551     0.8964 0.004 0.000 0.000 0.984 0.008 0.004
#> GSM1182283     4  0.0551     0.8961 0.004 0.000 0.000 0.984 0.008 0.004
#> GSM1182284     4  0.0665     0.8952 0.004 0.000 0.000 0.980 0.008 0.008
#> GSM1182285     6  0.2697     0.9304 0.000 0.000 0.188 0.000 0.000 0.812
#> GSM1182286     2  0.2845     0.7416 0.064 0.872 0.008 0.004 0.000 0.052
#> GSM1182287     3  0.3352     0.7648 0.056 0.120 0.820 0.000 0.000 0.004
#> GSM1182288     3  0.1814     0.7908 0.000 0.000 0.900 0.000 0.000 0.100
#> GSM1182289     5  0.2375     0.8766 0.068 0.000 0.000 0.020 0.896 0.016
#> GSM1182290     5  0.2195     0.8789 0.068 0.000 0.000 0.012 0.904 0.016
#> GSM1182291     4  0.2555     0.8986 0.096 0.000 0.000 0.876 0.008 0.020
#> GSM1182274     3  0.0806     0.8239 0.020 0.000 0.972 0.000 0.000 0.008
#> GSM1182292     2  0.1693     0.7498 0.020 0.932 0.000 0.004 0.000 0.044
#> GSM1182293     1  0.4211     0.7000 0.532 0.456 0.004 0.000 0.000 0.008
#> GSM1182294     1  0.4032     0.7398 0.572 0.420 0.000 0.000 0.000 0.008
#> GSM1182295     2  0.2838     0.6550 0.188 0.808 0.000 0.000 0.000 0.004
#> GSM1182296     2  0.1605     0.7504 0.016 0.936 0.000 0.004 0.000 0.044
#> GSM1182298     6  0.2664     0.9304 0.000 0.000 0.184 0.000 0.000 0.816
#> GSM1182299     2  0.1440     0.7534 0.032 0.948 0.004 0.004 0.000 0.012
#> GSM1182300     2  0.3159     0.6921 0.108 0.836 0.000 0.004 0.000 0.052
#> GSM1182301     2  0.1788     0.7589 0.028 0.928 0.000 0.004 0.000 0.040
#> GSM1182303     2  0.1749     0.7526 0.032 0.936 0.016 0.004 0.000 0.012
#> GSM1182304     5  0.1982     0.8782 0.068 0.000 0.000 0.004 0.912 0.016
#> GSM1182305     5  0.4719     0.6270 0.060 0.000 0.000 0.248 0.676 0.016
#> GSM1182306     4  0.5651     0.3534 0.096 0.000 0.000 0.516 0.368 0.020
#> GSM1182307     2  0.2591     0.7346 0.064 0.880 0.000 0.004 0.000 0.052
#> GSM1182309     1  0.4513     0.7119 0.532 0.440 0.000 0.004 0.000 0.024
#> GSM1182312     1  0.3426     0.7824 0.720 0.276 0.000 0.000 0.000 0.004
#> GSM1182314     4  0.2555     0.8986 0.096 0.000 0.000 0.876 0.008 0.020
#> GSM1182316     1  0.3690     0.7853 0.684 0.308 0.000 0.000 0.000 0.008
#> GSM1182318     2  0.2778     0.6127 0.168 0.824 0.000 0.000 0.000 0.008
#> GSM1182319     1  0.4868     0.7199 0.548 0.396 0.000 0.004 0.000 0.052
#> GSM1182320     1  0.3390     0.7937 0.704 0.296 0.000 0.000 0.000 0.000
#> GSM1182321     1  0.6032     0.7067 0.536 0.328 0.064 0.004 0.000 0.068
#> GSM1182322     1  0.4897     0.7295 0.556 0.384 0.000 0.004 0.000 0.056
#> GSM1182324     1  0.4470     0.7497 0.684 0.256 0.052 0.000 0.000 0.008
#> GSM1182297     2  0.3081     0.7355 0.072 0.856 0.008 0.004 0.000 0.060
#> GSM1182302     5  0.2362     0.8411 0.080 0.000 0.000 0.012 0.892 0.016
#> GSM1182308     2  0.2794     0.6868 0.144 0.840 0.000 0.004 0.000 0.012
#> GSM1182310     1  0.3489     0.7935 0.708 0.288 0.000 0.000 0.000 0.004
#> GSM1182311     5  0.2094     0.8674 0.064 0.000 0.000 0.004 0.908 0.024
#> GSM1182313     4  0.2555     0.8986 0.096 0.000 0.000 0.876 0.008 0.020
#> GSM1182315     2  0.4276     0.0124 0.416 0.564 0.000 0.000 0.000 0.020
#> GSM1182317     2  0.4315    -0.6580 0.488 0.496 0.000 0.004 0.000 0.012
#> GSM1182323     5  0.1471     0.8718 0.064 0.000 0.000 0.004 0.932 0.000

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk SD-skmeans-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk SD-skmeans-collect-classes

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

test_to_known_factors(res)
#>              n disease.state(p) gender(p) k
#> SD:skmeans 139         7.73e-02     1.000 2
#> SD:skmeans 136         7.03e-07     0.442 3
#> SD:skmeans 135         3.08e-06     0.450 4
#> SD:skmeans 134         9.58e-07     0.556 5
#> SD:skmeans 128         3.76e-09     0.804 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 46361 rows and 139 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 1.000           1.000       1.000         0.4791 0.521   0.521
#> 3 3 1.000           0.987       0.994         0.1528 0.927   0.859
#> 4 4 0.813           0.904       0.946         0.3273 0.816   0.589
#> 5 5 0.763           0.824       0.903         0.0363 0.961   0.856
#> 6 6 0.752           0.757       0.828         0.0350 0.968   0.874

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
#> GSM1182186     1       0          1  1  0
#> GSM1182187     1       0          1  1  0
#> GSM1182188     1       0          1  1  0
#> GSM1182189     1       0          1  1  0
#> GSM1182190     1       0          1  1  0
#> GSM1182191     1       0          1  1  0
#> GSM1182192     1       0          1  1  0
#> GSM1182193     1       0          1  1  0
#> GSM1182194     2       0          1  0  1
#> GSM1182195     2       0          1  0  1
#> GSM1182196     2       0          1  0  1
#> GSM1182197     2       0          1  0  1
#> GSM1182198     2       0          1  0  1
#> GSM1182199     2       0          1  0  1
#> GSM1182200     2       0          1  0  1
#> GSM1182201     2       0          1  0  1
#> GSM1182202     1       0          1  1  0
#> GSM1182203     1       0          1  1  0
#> GSM1182204     1       0          1  1  0
#> GSM1182205     2       0          1  0  1
#> GSM1182206     2       0          1  0  1
#> GSM1182207     1       0          1  1  0
#> GSM1182208     1       0          1  1  0
#> GSM1182209     2       0          1  0  1
#> GSM1182210     2       0          1  0  1
#> GSM1182211     2       0          1  0  1
#> GSM1182212     2       0          1  0  1
#> GSM1182213     2       0          1  0  1
#> GSM1182214     2       0          1  0  1
#> GSM1182215     2       0          1  0  1
#> GSM1182216     2       0          1  0  1
#> GSM1182217     1       0          1  1  0
#> GSM1182218     1       0          1  1  0
#> GSM1182219     2       0          1  0  1
#> GSM1182220     2       0          1  0  1
#> GSM1182221     2       0          1  0  1
#> GSM1182222     2       0          1  0  1
#> GSM1182223     2       0          1  0  1
#> GSM1182224     2       0          1  0  1
#> GSM1182225     2       0          1  0  1
#> GSM1182226     2       0          1  0  1
#> GSM1182227     1       0          1  1  0
#> GSM1182228     2       0          1  0  1
#> GSM1182229     2       0          1  0  1
#> GSM1182230     2       0          1  0  1
#> GSM1182231     2       0          1  0  1
#> GSM1182232     1       0          1  1  0
#> GSM1182233     1       0          1  1  0
#> GSM1182234     1       0          1  1  0
#> GSM1182235     2       0          1  0  1
#> GSM1182236     1       0          1  1  0
#> GSM1182237     2       0          1  0  1
#> GSM1182238     2       0          1  0  1
#> GSM1182239     2       0          1  0  1
#> GSM1182240     2       0          1  0  1
#> GSM1182241     2       0          1  0  1
#> GSM1182242     2       0          1  0  1
#> GSM1182243     2       0          1  0  1
#> GSM1182244     2       0          1  0  1
#> GSM1182245     1       0          1  1  0
#> GSM1182246     1       0          1  1  0
#> GSM1182247     2       0          1  0  1
#> GSM1182248     2       0          1  0  1
#> GSM1182249     2       0          1  0  1
#> GSM1182250     2       0          1  0  1
#> GSM1182251     1       0          1  1  0
#> GSM1182252     2       0          1  0  1
#> GSM1182253     2       0          1  0  1
#> GSM1182254     2       0          1  0  1
#> GSM1182255     1       0          1  1  0
#> GSM1182256     1       0          1  1  0
#> GSM1182257     1       0          1  1  0
#> GSM1182258     1       0          1  1  0
#> GSM1182259     1       0          1  1  0
#> GSM1182260     2       0          1  0  1
#> GSM1182261     2       0          1  0  1
#> GSM1182262     2       0          1  0  1
#> GSM1182263     1       0          1  1  0
#> GSM1182264     2       0          1  0  1
#> GSM1182265     2       0          1  0  1
#> GSM1182266     2       0          1  0  1
#> GSM1182267     1       0          1  1  0
#> GSM1182268     1       0          1  1  0
#> GSM1182269     1       0          1  1  0
#> GSM1182270     1       0          1  1  0
#> GSM1182271     1       0          1  1  0
#> GSM1182272     1       0          1  1  0
#> GSM1182273     2       0          1  0  1
#> GSM1182275     2       0          1  0  1
#> GSM1182276     2       0          1  0  1
#> GSM1182277     1       0          1  1  0
#> GSM1182278     1       0          1  1  0
#> GSM1182279     1       0          1  1  0
#> GSM1182280     1       0          1  1  0
#> GSM1182281     1       0          1  1  0
#> GSM1182282     1       0          1  1  0
#> GSM1182283     1       0          1  1  0
#> GSM1182284     1       0          1  1  0
#> GSM1182285     2       0          1  0  1
#> GSM1182286     2       0          1  0  1
#> GSM1182287     2       0          1  0  1
#> GSM1182288     2       0          1  0  1
#> GSM1182289     1       0          1  1  0
#> GSM1182290     1       0          1  1  0
#> GSM1182291     1       0          1  1  0
#> GSM1182274     2       0          1  0  1
#> GSM1182292     2       0          1  0  1
#> GSM1182293     2       0          1  0  1
#> GSM1182294     2       0          1  0  1
#> GSM1182295     2       0          1  0  1
#> GSM1182296     2       0          1  0  1
#> GSM1182298     2       0          1  0  1
#> GSM1182299     2       0          1  0  1
#> GSM1182300     2       0          1  0  1
#> GSM1182301     2       0          1  0  1
#> GSM1182303     2       0          1  0  1
#> GSM1182304     1       0          1  1  0
#> GSM1182305     1       0          1  1  0
#> GSM1182306     1       0          1  1  0
#> GSM1182307     2       0          1  0  1
#> GSM1182309     2       0          1  0  1
#> GSM1182312     2       0          1  0  1
#> GSM1182314     1       0          1  1  0
#> GSM1182316     2       0          1  0  1
#> GSM1182318     2       0          1  0  1
#> GSM1182319     2       0          1  0  1
#> GSM1182320     2       0          1  0  1
#> GSM1182321     2       0          1  0  1
#> GSM1182322     2       0          1  0  1
#> GSM1182324     2       0          1  0  1
#> GSM1182297     2       0          1  0  1
#> GSM1182302     1       0          1  1  0
#> GSM1182308     2       0          1  0  1
#> GSM1182310     2       0          1  0  1
#> GSM1182311     1       0          1  1  0
#> GSM1182313     1       0          1  1  0
#> GSM1182315     2       0          1  0  1
#> GSM1182317     2       0          1  0  1
#> GSM1182323     1       0          1  1  0

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1 p2    p3
#> GSM1182186     3   0.175      0.944 0.048  0 0.952
#> GSM1182187     3   0.000      0.980 0.000  0 1.000
#> GSM1182188     3   0.000      0.980 0.000  0 1.000
#> GSM1182189     1   0.000      0.986 1.000  0 0.000
#> GSM1182190     1   0.000      0.986 1.000  0 0.000
#> GSM1182191     3   0.186      0.940 0.052  0 0.948
#> GSM1182192     1   0.000      0.986 1.000  0 0.000
#> GSM1182193     1   0.000      0.986 1.000  0 0.000
#> GSM1182194     2   0.000      1.000 0.000  1 0.000
#> GSM1182195     2   0.000      1.000 0.000  1 0.000
#> GSM1182196     2   0.000      1.000 0.000  1 0.000
#> GSM1182197     2   0.000      1.000 0.000  1 0.000
#> GSM1182198     2   0.000      1.000 0.000  1 0.000
#> GSM1182199     2   0.000      1.000 0.000  1 0.000
#> GSM1182200     2   0.000      1.000 0.000  1 0.000
#> GSM1182201     2   0.000      1.000 0.000  1 0.000
#> GSM1182202     3   0.000      0.980 0.000  0 1.000
#> GSM1182203     3   0.000      0.980 0.000  0 1.000
#> GSM1182204     3   0.000      0.980 0.000  0 1.000
#> GSM1182205     2   0.000      1.000 0.000  1 0.000
#> GSM1182206     2   0.000      1.000 0.000  1 0.000
#> GSM1182207     1   0.000      0.986 1.000  0 0.000
#> GSM1182208     1   0.000      0.986 1.000  0 0.000
#> GSM1182209     2   0.000      1.000 0.000  1 0.000
#> GSM1182210     2   0.000      1.000 0.000  1 0.000
#> GSM1182211     2   0.000      1.000 0.000  1 0.000
#> GSM1182212     2   0.000      1.000 0.000  1 0.000
#> GSM1182213     2   0.000      1.000 0.000  1 0.000
#> GSM1182214     2   0.000      1.000 0.000  1 0.000
#> GSM1182215     2   0.000      1.000 0.000  1 0.000
#> GSM1182216     2   0.000      1.000 0.000  1 0.000
#> GSM1182217     3   0.186      0.941 0.052  0 0.948
#> GSM1182218     1   0.000      0.986 1.000  0 0.000
#> GSM1182219     2   0.000      1.000 0.000  1 0.000
#> GSM1182220     2   0.000      1.000 0.000  1 0.000
#> GSM1182221     2   0.000      1.000 0.000  1 0.000
#> GSM1182222     2   0.000      1.000 0.000  1 0.000
#> GSM1182223     2   0.000      1.000 0.000  1 0.000
#> GSM1182224     2   0.000      1.000 0.000  1 0.000
#> GSM1182225     2   0.000      1.000 0.000  1 0.000
#> GSM1182226     2   0.000      1.000 0.000  1 0.000
#> GSM1182227     1   0.000      0.986 1.000  0 0.000
#> GSM1182228     2   0.000      1.000 0.000  1 0.000
#> GSM1182229     2   0.000      1.000 0.000  1 0.000
#> GSM1182230     2   0.000      1.000 0.000  1 0.000
#> GSM1182231     2   0.000      1.000 0.000  1 0.000
#> GSM1182232     1   0.000      0.986 1.000  0 0.000
#> GSM1182233     1   0.000      0.986 1.000  0 0.000
#> GSM1182234     1   0.000      0.986 1.000  0 0.000
#> GSM1182235     2   0.000      1.000 0.000  1 0.000
#> GSM1182236     1   0.000      0.986 1.000  0 0.000
#> GSM1182237     2   0.000      1.000 0.000  1 0.000
#> GSM1182238     2   0.000      1.000 0.000  1 0.000
#> GSM1182239     2   0.000      1.000 0.000  1 0.000
#> GSM1182240     2   0.000      1.000 0.000  1 0.000
#> GSM1182241     2   0.000      1.000 0.000  1 0.000
#> GSM1182242     2   0.000      1.000 0.000  1 0.000
#> GSM1182243     2   0.000      1.000 0.000  1 0.000
#> GSM1182244     2   0.000      1.000 0.000  1 0.000
#> GSM1182245     1   0.000      0.986 1.000  0 0.000
#> GSM1182246     3   0.000      0.980 0.000  0 1.000
#> GSM1182247     2   0.000      1.000 0.000  1 0.000
#> GSM1182248     2   0.000      1.000 0.000  1 0.000
#> GSM1182249     2   0.000      1.000 0.000  1 0.000
#> GSM1182250     2   0.000      1.000 0.000  1 0.000
#> GSM1182251     1   0.406      0.802 0.836  0 0.164
#> GSM1182252     2   0.000      1.000 0.000  1 0.000
#> GSM1182253     2   0.000      1.000 0.000  1 0.000
#> GSM1182254     2   0.000      1.000 0.000  1 0.000
#> GSM1182255     3   0.000      0.980 0.000  0 1.000
#> GSM1182256     3   0.000      0.980 0.000  0 1.000
#> GSM1182257     3   0.000      0.980 0.000  0 1.000
#> GSM1182258     3   0.000      0.980 0.000  0 1.000
#> GSM1182259     3   0.000      0.980 0.000  0 1.000
#> GSM1182260     2   0.000      1.000 0.000  1 0.000
#> GSM1182261     2   0.000      1.000 0.000  1 0.000
#> GSM1182262     2   0.000      1.000 0.000  1 0.000
#> GSM1182263     1   0.000      0.986 1.000  0 0.000
#> GSM1182264     2   0.000      1.000 0.000  1 0.000
#> GSM1182265     2   0.000      1.000 0.000  1 0.000
#> GSM1182266     2   0.000      1.000 0.000  1 0.000
#> GSM1182267     1   0.000      0.986 1.000  0 0.000
#> GSM1182268     1   0.000      0.986 1.000  0 0.000
#> GSM1182269     1   0.000      0.986 1.000  0 0.000
#> GSM1182270     1   0.000      0.986 1.000  0 0.000
#> GSM1182271     3   0.000      0.980 0.000  0 1.000
#> GSM1182272     3   0.000      0.980 0.000  0 1.000
#> GSM1182273     2   0.000      1.000 0.000  1 0.000
#> GSM1182275     2   0.000      1.000 0.000  1 0.000
#> GSM1182276     2   0.000      1.000 0.000  1 0.000
#> GSM1182277     1   0.000      0.986 1.000  0 0.000
#> GSM1182278     1   0.000      0.986 1.000  0 0.000
#> GSM1182279     1   0.000      0.986 1.000  0 0.000
#> GSM1182280     1   0.000      0.986 1.000  0 0.000
#> GSM1182281     3   0.525      0.643 0.264  0 0.736
#> GSM1182282     1   0.000      0.986 1.000  0 0.000
#> GSM1182283     1   0.000      0.986 1.000  0 0.000
#> GSM1182284     1   0.000      0.986 1.000  0 0.000
#> GSM1182285     2   0.000      1.000 0.000  1 0.000
#> GSM1182286     2   0.000      1.000 0.000  1 0.000
#> GSM1182287     2   0.000      1.000 0.000  1 0.000
#> GSM1182288     2   0.000      1.000 0.000  1 0.000
#> GSM1182289     1   0.000      0.986 1.000  0 0.000
#> GSM1182290     1   0.000      0.986 1.000  0 0.000
#> GSM1182291     3   0.000      0.980 0.000  0 1.000
#> GSM1182274     2   0.000      1.000 0.000  1 0.000
#> GSM1182292     2   0.000      1.000 0.000  1 0.000
#> GSM1182293     2   0.000      1.000 0.000  1 0.000
#> GSM1182294     2   0.000      1.000 0.000  1 0.000
#> GSM1182295     2   0.000      1.000 0.000  1 0.000
#> GSM1182296     2   0.000      1.000 0.000  1 0.000
#> GSM1182298     2   0.000      1.000 0.000  1 0.000
#> GSM1182299     2   0.000      1.000 0.000  1 0.000
#> GSM1182300     2   0.000      1.000 0.000  1 0.000
#> GSM1182301     2   0.000      1.000 0.000  1 0.000
#> GSM1182303     2   0.000      1.000 0.000  1 0.000
#> GSM1182304     1   0.000      0.986 1.000  0 0.000
#> GSM1182305     1   0.510      0.672 0.752  0 0.248
#> GSM1182306     3   0.000      0.980 0.000  0 1.000
#> GSM1182307     2   0.000      1.000 0.000  1 0.000
#> GSM1182309     2   0.000      1.000 0.000  1 0.000
#> GSM1182312     2   0.000      1.000 0.000  1 0.000
#> GSM1182314     3   0.000      0.980 0.000  0 1.000
#> GSM1182316     2   0.000      1.000 0.000  1 0.000
#> GSM1182318     2   0.000      1.000 0.000  1 0.000
#> GSM1182319     2   0.000      1.000 0.000  1 0.000
#> GSM1182320     2   0.000      1.000 0.000  1 0.000
#> GSM1182321     2   0.000      1.000 0.000  1 0.000
#> GSM1182322     2   0.000      1.000 0.000  1 0.000
#> GSM1182324     2   0.000      1.000 0.000  1 0.000
#> GSM1182297     2   0.000      1.000 0.000  1 0.000
#> GSM1182302     3   0.000      0.980 0.000  0 1.000
#> GSM1182308     2   0.000      1.000 0.000  1 0.000
#> GSM1182310     2   0.000      1.000 0.000  1 0.000
#> GSM1182311     1   0.000      0.986 1.000  0 0.000
#> GSM1182313     3   0.000      0.980 0.000  0 1.000
#> GSM1182315     2   0.000      1.000 0.000  1 0.000
#> GSM1182317     2   0.000      1.000 0.000  1 0.000
#> GSM1182323     1   0.000      0.986 1.000  0 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1182186     4  0.1389     0.9438 0.048 0.000 0.000 0.952
#> GSM1182187     4  0.0000     0.9797 0.000 0.000 0.000 1.000
#> GSM1182188     4  0.0000     0.9797 0.000 0.000 0.000 1.000
#> GSM1182189     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182190     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182191     4  0.1474     0.9404 0.052 0.000 0.000 0.948
#> GSM1182192     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182193     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182194     3  0.0000     0.9223 0.000 0.000 1.000 0.000
#> GSM1182195     3  0.0000     0.9223 0.000 0.000 1.000 0.000
#> GSM1182196     2  0.2081     0.8832 0.000 0.916 0.084 0.000
#> GSM1182197     2  0.4500     0.6928 0.000 0.684 0.316 0.000
#> GSM1182198     3  0.0000     0.9223 0.000 0.000 1.000 0.000
#> GSM1182199     3  0.0000     0.9223 0.000 0.000 1.000 0.000
#> GSM1182200     2  0.3907     0.8057 0.000 0.768 0.232 0.000
#> GSM1182201     3  0.2469     0.8462 0.000 0.108 0.892 0.000
#> GSM1182202     4  0.0000     0.9797 0.000 0.000 0.000 1.000
#> GSM1182203     4  0.0000     0.9797 0.000 0.000 0.000 1.000
#> GSM1182204     4  0.0000     0.9797 0.000 0.000 0.000 1.000
#> GSM1182205     3  0.1302     0.9008 0.000 0.044 0.956 0.000
#> GSM1182206     3  0.3172     0.8066 0.000 0.160 0.840 0.000
#> GSM1182207     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182208     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182209     2  0.0000     0.9066 0.000 1.000 0.000 0.000
#> GSM1182210     2  0.2469     0.9020 0.000 0.892 0.108 0.000
#> GSM1182211     2  0.0188     0.9075 0.000 0.996 0.004 0.000
#> GSM1182212     2  0.1940     0.9041 0.000 0.924 0.076 0.000
#> GSM1182213     2  0.0000     0.9066 0.000 1.000 0.000 0.000
#> GSM1182214     2  0.0188     0.9075 0.000 0.996 0.004 0.000
#> GSM1182215     3  0.4961     0.0668 0.000 0.448 0.552 0.000
#> GSM1182216     2  0.2760     0.8888 0.000 0.872 0.128 0.000
#> GSM1182217     4  0.1474     0.9405 0.052 0.000 0.000 0.948
#> GSM1182218     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182219     2  0.1637     0.9122 0.000 0.940 0.060 0.000
#> GSM1182220     2  0.2081     0.9038 0.000 0.916 0.084 0.000
#> GSM1182221     2  0.2589     0.8951 0.000 0.884 0.116 0.000
#> GSM1182222     2  0.3266     0.8634 0.000 0.832 0.168 0.000
#> GSM1182223     3  0.4933     0.1426 0.000 0.432 0.568 0.000
#> GSM1182224     3  0.0000     0.9223 0.000 0.000 1.000 0.000
#> GSM1182225     2  0.2814     0.8861 0.000 0.868 0.132 0.000
#> GSM1182226     2  0.2589     0.8956 0.000 0.884 0.116 0.000
#> GSM1182227     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182228     3  0.2921     0.8308 0.000 0.140 0.860 0.000
#> GSM1182229     3  0.0000     0.9223 0.000 0.000 1.000 0.000
#> GSM1182230     3  0.1211     0.9035 0.000 0.040 0.960 0.000
#> GSM1182231     2  0.3266     0.8610 0.000 0.832 0.168 0.000
#> GSM1182232     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182233     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182234     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182235     2  0.0000     0.9066 0.000 1.000 0.000 0.000
#> GSM1182236     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182237     2  0.3444     0.8353 0.000 0.816 0.184 0.000
#> GSM1182238     2  0.2011     0.9094 0.000 0.920 0.080 0.000
#> GSM1182239     2  0.1637     0.9033 0.000 0.940 0.060 0.000
#> GSM1182240     2  0.0469     0.9100 0.000 0.988 0.012 0.000
#> GSM1182241     2  0.2149     0.8821 0.000 0.912 0.088 0.000
#> GSM1182242     3  0.0188     0.9206 0.000 0.004 0.996 0.000
#> GSM1182243     3  0.0000     0.9223 0.000 0.000 1.000 0.000
#> GSM1182244     3  0.1792     0.8836 0.000 0.068 0.932 0.000
#> GSM1182245     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182246     4  0.0000     0.9797 0.000 0.000 0.000 1.000
#> GSM1182247     3  0.0000     0.9223 0.000 0.000 1.000 0.000
#> GSM1182248     3  0.0000     0.9223 0.000 0.000 1.000 0.000
#> GSM1182249     2  0.4454     0.6902 0.000 0.692 0.308 0.000
#> GSM1182250     3  0.1211     0.9031 0.000 0.040 0.960 0.000
#> GSM1182251     1  0.3219     0.8018 0.836 0.000 0.000 0.164
#> GSM1182252     3  0.0000     0.9223 0.000 0.000 1.000 0.000
#> GSM1182253     3  0.0000     0.9223 0.000 0.000 1.000 0.000
#> GSM1182254     3  0.0000     0.9223 0.000 0.000 1.000 0.000
#> GSM1182255     4  0.0000     0.9797 0.000 0.000 0.000 1.000
#> GSM1182256     4  0.0000     0.9797 0.000 0.000 0.000 1.000
#> GSM1182257     4  0.0000     0.9797 0.000 0.000 0.000 1.000
#> GSM1182258     4  0.0000     0.9797 0.000 0.000 0.000 1.000
#> GSM1182259     4  0.0000     0.9797 0.000 0.000 0.000 1.000
#> GSM1182260     3  0.0921     0.9133 0.000 0.028 0.972 0.000
#> GSM1182261     2  0.4406     0.6833 0.000 0.700 0.300 0.000
#> GSM1182262     3  0.4761     0.3539 0.000 0.372 0.628 0.000
#> GSM1182263     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182264     3  0.1637     0.8840 0.000 0.060 0.940 0.000
#> GSM1182265     3  0.0188     0.9215 0.000 0.004 0.996 0.000
#> GSM1182266     3  0.0469     0.9176 0.000 0.012 0.988 0.000
#> GSM1182267     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182268     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182269     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182270     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182271     4  0.0000     0.9797 0.000 0.000 0.000 1.000
#> GSM1182272     4  0.0000     0.9797 0.000 0.000 0.000 1.000
#> GSM1182273     3  0.0000     0.9223 0.000 0.000 1.000 0.000
#> GSM1182275     3  0.0188     0.9215 0.000 0.004 0.996 0.000
#> GSM1182276     2  0.1940     0.9010 0.000 0.924 0.076 0.000
#> GSM1182277     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182278     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182279     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182280     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182281     4  0.4164     0.6430 0.264 0.000 0.000 0.736
#> GSM1182282     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182283     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182284     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182285     3  0.0000     0.9223 0.000 0.000 1.000 0.000
#> GSM1182286     2  0.0336     0.9091 0.000 0.992 0.008 0.000
#> GSM1182287     3  0.2814     0.8311 0.000 0.132 0.868 0.000
#> GSM1182288     3  0.0000     0.9223 0.000 0.000 1.000 0.000
#> GSM1182289     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182290     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182291     4  0.0000     0.9797 0.000 0.000 0.000 1.000
#> GSM1182274     3  0.0000     0.9223 0.000 0.000 1.000 0.000
#> GSM1182292     2  0.0188     0.9075 0.000 0.996 0.004 0.000
#> GSM1182293     2  0.2081     0.9094 0.000 0.916 0.084 0.000
#> GSM1182294     2  0.1118     0.9127 0.000 0.964 0.036 0.000
#> GSM1182295     2  0.1940     0.9097 0.000 0.924 0.076 0.000
#> GSM1182296     2  0.0000     0.9066 0.000 1.000 0.000 0.000
#> GSM1182298     3  0.0000     0.9223 0.000 0.000 1.000 0.000
#> GSM1182299     2  0.2814     0.8647 0.000 0.868 0.132 0.000
#> GSM1182300     2  0.1211     0.9072 0.000 0.960 0.040 0.000
#> GSM1182301     2  0.1022     0.9096 0.000 0.968 0.032 0.000
#> GSM1182303     2  0.2530     0.8990 0.000 0.888 0.112 0.000
#> GSM1182304     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182305     1  0.4040     0.6723 0.752 0.000 0.000 0.248
#> GSM1182306     4  0.0000     0.9797 0.000 0.000 0.000 1.000
#> GSM1182307     2  0.0000     0.9066 0.000 1.000 0.000 0.000
#> GSM1182309     2  0.0592     0.9105 0.000 0.984 0.016 0.000
#> GSM1182312     2  0.2530     0.8976 0.000 0.888 0.112 0.000
#> GSM1182314     4  0.0000     0.9797 0.000 0.000 0.000 1.000
#> GSM1182316     2  0.2814     0.8911 0.000 0.868 0.132 0.000
#> GSM1182318     2  0.0188     0.9077 0.000 0.996 0.004 0.000
#> GSM1182319     2  0.2704     0.8721 0.000 0.876 0.124 0.000
#> GSM1182320     2  0.2469     0.8996 0.000 0.892 0.108 0.000
#> GSM1182321     3  0.2408     0.8623 0.000 0.104 0.896 0.000
#> GSM1182322     2  0.2011     0.8822 0.000 0.920 0.080 0.000
#> GSM1182324     3  0.3024     0.8031 0.000 0.148 0.852 0.000
#> GSM1182297     2  0.0000     0.9066 0.000 1.000 0.000 0.000
#> GSM1182302     4  0.0000     0.9797 0.000 0.000 0.000 1.000
#> GSM1182308     2  0.3400     0.8562 0.000 0.820 0.180 0.000
#> GSM1182310     2  0.2704     0.8925 0.000 0.876 0.124 0.000
#> GSM1182311     1  0.0000     0.9864 1.000 0.000 0.000 0.000
#> GSM1182313     4  0.0000     0.9797 0.000 0.000 0.000 1.000
#> GSM1182315     2  0.0188     0.9075 0.000 0.996 0.004 0.000
#> GSM1182317     2  0.0000     0.9066 0.000 1.000 0.000 0.000
#> GSM1182323     1  0.0000     0.9864 1.000 0.000 0.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
#> GSM1182186     5  0.2329     0.6380 0.000 0.000 0.000 0.124 0.876
#> GSM1182187     5  0.4219     0.2666 0.000 0.000 0.000 0.416 0.584
#> GSM1182188     4  0.0000     0.9349 0.000 0.000 0.000 1.000 0.000
#> GSM1182189     1  0.0000     0.9679 1.000 0.000 0.000 0.000 0.000
#> GSM1182190     1  0.0162     0.9654 0.996 0.000 0.000 0.000 0.004
#> GSM1182191     5  0.1908     0.6499 0.000 0.000 0.000 0.092 0.908
#> GSM1182192     1  0.0000     0.9679 1.000 0.000 0.000 0.000 0.000
#> GSM1182193     1  0.0000     0.9679 1.000 0.000 0.000 0.000 0.000
#> GSM1182194     3  0.0000     0.9099 0.000 0.000 1.000 0.000 0.000
#> GSM1182195     3  0.0000     0.9099 0.000 0.000 1.000 0.000 0.000
#> GSM1182196     2  0.2676     0.8808 0.000 0.884 0.080 0.000 0.036
#> GSM1182197     2  0.4290     0.6932 0.000 0.680 0.304 0.000 0.016
#> GSM1182198     3  0.0000     0.9099 0.000 0.000 1.000 0.000 0.000
#> GSM1182199     3  0.0000     0.9099 0.000 0.000 1.000 0.000 0.000
#> GSM1182200     2  0.3461     0.8050 0.000 0.772 0.224 0.000 0.004
#> GSM1182201     3  0.2230     0.8306 0.000 0.116 0.884 0.000 0.000
#> GSM1182202     5  0.4182     0.3038 0.000 0.000 0.000 0.400 0.600
#> GSM1182203     4  0.4182     0.2100 0.000 0.000 0.000 0.600 0.400
#> GSM1182204     5  0.4278     0.2283 0.000 0.000 0.000 0.452 0.548
#> GSM1182205     3  0.1836     0.8771 0.000 0.036 0.932 0.000 0.032
#> GSM1182206     3  0.3183     0.7926 0.000 0.156 0.828 0.000 0.016
#> GSM1182207     1  0.4307    -0.2432 0.500 0.000 0.000 0.000 0.500
#> GSM1182208     5  0.4297     0.2316 0.472 0.000 0.000 0.000 0.528
#> GSM1182209     2  0.0609     0.8996 0.000 0.980 0.000 0.000 0.020
#> GSM1182210     2  0.2653     0.9001 0.000 0.880 0.096 0.000 0.024
#> GSM1182211     2  0.0671     0.9005 0.000 0.980 0.004 0.000 0.016
#> GSM1182212     2  0.1774     0.9038 0.000 0.932 0.052 0.000 0.016
#> GSM1182213     2  0.0794     0.9028 0.000 0.972 0.000 0.000 0.028
#> GSM1182214     2  0.1121     0.9022 0.000 0.956 0.000 0.000 0.044
#> GSM1182215     3  0.4420     0.0699 0.000 0.448 0.548 0.000 0.004
#> GSM1182216     2  0.3237     0.8881 0.000 0.848 0.104 0.000 0.048
#> GSM1182217     5  0.2561     0.6260 0.000 0.000 0.000 0.144 0.856
#> GSM1182218     1  0.0000     0.9679 1.000 0.000 0.000 0.000 0.000
#> GSM1182219     2  0.2304     0.9069 0.000 0.908 0.044 0.000 0.048
#> GSM1182220     2  0.1845     0.9050 0.000 0.928 0.056 0.000 0.016
#> GSM1182221     2  0.3090     0.8941 0.000 0.860 0.088 0.000 0.052
#> GSM1182222     2  0.3409     0.8682 0.000 0.824 0.144 0.000 0.032
#> GSM1182223     3  0.4256     0.1416 0.000 0.436 0.564 0.000 0.000
#> GSM1182224     3  0.0162     0.9092 0.000 0.000 0.996 0.000 0.004
#> GSM1182225     2  0.3237     0.8872 0.000 0.848 0.104 0.000 0.048
#> GSM1182226     2  0.3090     0.8947 0.000 0.860 0.088 0.000 0.052
#> GSM1182227     1  0.0000     0.9679 1.000 0.000 0.000 0.000 0.000
#> GSM1182228     3  0.2629     0.8226 0.000 0.136 0.860 0.000 0.004
#> GSM1182229     3  0.0162     0.9098 0.000 0.000 0.996 0.000 0.004
#> GSM1182230     3  0.1205     0.8898 0.000 0.040 0.956 0.000 0.004
#> GSM1182231     2  0.3595     0.8657 0.000 0.816 0.140 0.000 0.044
#> GSM1182232     1  0.0162     0.9654 0.996 0.000 0.000 0.000 0.004
#> GSM1182233     1  0.0510     0.9566 0.984 0.000 0.000 0.000 0.016
#> GSM1182234     1  0.0000     0.9679 1.000 0.000 0.000 0.000 0.000
#> GSM1182235     2  0.0880     0.9012 0.000 0.968 0.000 0.000 0.032
#> GSM1182236     1  0.0000     0.9679 1.000 0.000 0.000 0.000 0.000
#> GSM1182237     2  0.3944     0.8365 0.000 0.788 0.160 0.000 0.052
#> GSM1182238     2  0.2592     0.9045 0.000 0.892 0.056 0.000 0.052
#> GSM1182239     2  0.1836     0.9032 0.000 0.932 0.036 0.000 0.032
#> GSM1182240     2  0.1364     0.9071 0.000 0.952 0.012 0.000 0.036
#> GSM1182241     2  0.2390     0.8730 0.000 0.896 0.084 0.000 0.020
#> GSM1182242     3  0.0162     0.9095 0.000 0.004 0.996 0.000 0.000
#> GSM1182243     3  0.0162     0.9098 0.000 0.000 0.996 0.000 0.004
#> GSM1182244     3  0.1768     0.8700 0.000 0.072 0.924 0.000 0.004
#> GSM1182245     1  0.0000     0.9679 1.000 0.000 0.000 0.000 0.000
#> GSM1182246     4  0.0000     0.9349 0.000 0.000 0.000 1.000 0.000
#> GSM1182247     3  0.0000     0.9099 0.000 0.000 1.000 0.000 0.000
#> GSM1182248     3  0.0162     0.9092 0.000 0.000 0.996 0.000 0.004
#> GSM1182249     2  0.4708     0.6898 0.000 0.668 0.292 0.000 0.040
#> GSM1182250     3  0.1750     0.8815 0.000 0.036 0.936 0.000 0.028
#> GSM1182251     5  0.2450     0.6772 0.048 0.000 0.000 0.052 0.900
#> GSM1182252     3  0.0162     0.9098 0.000 0.000 0.996 0.000 0.004
#> GSM1182253     3  0.0000     0.9099 0.000 0.000 1.000 0.000 0.000
#> GSM1182254     3  0.0000     0.9099 0.000 0.000 1.000 0.000 0.000
#> GSM1182255     4  0.0000     0.9349 0.000 0.000 0.000 1.000 0.000
#> GSM1182256     4  0.0000     0.9349 0.000 0.000 0.000 1.000 0.000
#> GSM1182257     4  0.1043     0.9094 0.000 0.000 0.000 0.960 0.040
#> GSM1182258     4  0.0162     0.9331 0.000 0.000 0.000 0.996 0.004
#> GSM1182259     4  0.0000     0.9349 0.000 0.000 0.000 1.000 0.000
#> GSM1182260     3  0.0992     0.9011 0.000 0.024 0.968 0.000 0.008
#> GSM1182261     2  0.4315     0.7004 0.000 0.700 0.276 0.000 0.024
#> GSM1182262     3  0.4367     0.3506 0.000 0.372 0.620 0.000 0.008
#> GSM1182263     5  0.4201     0.3674 0.408 0.000 0.000 0.000 0.592
#> GSM1182264     3  0.2104     0.8612 0.000 0.060 0.916 0.000 0.024
#> GSM1182265     3  0.0451     0.9089 0.000 0.008 0.988 0.000 0.004
#> GSM1182266     3  0.0451     0.9068 0.000 0.008 0.988 0.000 0.004
#> GSM1182267     1  0.0000     0.9679 1.000 0.000 0.000 0.000 0.000
#> GSM1182268     1  0.0000     0.9679 1.000 0.000 0.000 0.000 0.000
#> GSM1182269     1  0.0000     0.9679 1.000 0.000 0.000 0.000 0.000
#> GSM1182270     1  0.0703     0.9492 0.976 0.000 0.000 0.000 0.024
#> GSM1182271     4  0.0000     0.9349 0.000 0.000 0.000 1.000 0.000
#> GSM1182272     4  0.0000     0.9349 0.000 0.000 0.000 1.000 0.000
#> GSM1182273     3  0.0162     0.9098 0.000 0.000 0.996 0.000 0.004
#> GSM1182275     3  0.0324     0.9096 0.000 0.004 0.992 0.000 0.004
#> GSM1182276     2  0.1701     0.9019 0.000 0.936 0.048 0.000 0.016
#> GSM1182277     1  0.0000     0.9679 1.000 0.000 0.000 0.000 0.000
#> GSM1182278     1  0.0000     0.9679 1.000 0.000 0.000 0.000 0.000
#> GSM1182279     5  0.2471     0.6846 0.136 0.000 0.000 0.000 0.864
#> GSM1182280     5  0.4219     0.3521 0.416 0.000 0.000 0.000 0.584
#> GSM1182281     4  0.4280     0.6358 0.140 0.000 0.000 0.772 0.088
#> GSM1182282     1  0.0000     0.9679 1.000 0.000 0.000 0.000 0.000
#> GSM1182283     1  0.0000     0.9679 1.000 0.000 0.000 0.000 0.000
#> GSM1182284     1  0.0000     0.9679 1.000 0.000 0.000 0.000 0.000
#> GSM1182285     3  0.0000     0.9099 0.000 0.000 1.000 0.000 0.000
#> GSM1182286     2  0.1041     0.9029 0.000 0.964 0.004 0.000 0.032
#> GSM1182287     3  0.2377     0.8257 0.000 0.128 0.872 0.000 0.000
#> GSM1182288     3  0.0162     0.9092 0.000 0.000 0.996 0.000 0.004
#> GSM1182289     5  0.2424     0.6849 0.132 0.000 0.000 0.000 0.868
#> GSM1182290     5  0.4278     0.2859 0.452 0.000 0.000 0.000 0.548
#> GSM1182291     4  0.0000     0.9349 0.000 0.000 0.000 1.000 0.000
#> GSM1182274     3  0.0162     0.9098 0.000 0.000 0.996 0.000 0.004
#> GSM1182292     2  0.0771     0.9001 0.000 0.976 0.004 0.000 0.020
#> GSM1182293     2  0.2473     0.9055 0.000 0.896 0.072 0.000 0.032
#> GSM1182294     2  0.1965     0.9057 0.000 0.924 0.024 0.000 0.052
#> GSM1182295     2  0.2359     0.9067 0.000 0.904 0.060 0.000 0.036
#> GSM1182296     2  0.0609     0.8996 0.000 0.980 0.000 0.000 0.020
#> GSM1182298     3  0.0162     0.9098 0.000 0.000 0.996 0.000 0.004
#> GSM1182299     2  0.2573     0.8710 0.000 0.880 0.104 0.000 0.016
#> GSM1182300     2  0.1216     0.9010 0.000 0.960 0.020 0.000 0.020
#> GSM1182301     2  0.1310     0.9020 0.000 0.956 0.024 0.000 0.020
#> GSM1182303     2  0.2304     0.9002 0.000 0.892 0.100 0.000 0.008
#> GSM1182304     5  0.2516     0.6842 0.140 0.000 0.000 0.000 0.860
#> GSM1182305     5  0.2370     0.6747 0.040 0.000 0.000 0.056 0.904
#> GSM1182306     4  0.1608     0.8815 0.000 0.000 0.000 0.928 0.072
#> GSM1182307     2  0.0609     0.8996 0.000 0.980 0.000 0.000 0.020
#> GSM1182309     2  0.0798     0.9035 0.000 0.976 0.008 0.000 0.016
#> GSM1182312     2  0.3033     0.8964 0.000 0.864 0.084 0.000 0.052
#> GSM1182314     4  0.0162     0.9331 0.000 0.000 0.000 0.996 0.004
#> GSM1182316     2  0.3255     0.8922 0.000 0.848 0.100 0.000 0.052
#> GSM1182318     2  0.0451     0.9041 0.000 0.988 0.004 0.000 0.008
#> GSM1182319     2  0.2915     0.8721 0.000 0.860 0.116 0.000 0.024
#> GSM1182320     2  0.2962     0.8979 0.000 0.868 0.084 0.000 0.048
#> GSM1182321     3  0.2470     0.8419 0.000 0.104 0.884 0.000 0.012
#> GSM1182322     2  0.2511     0.8747 0.000 0.892 0.080 0.000 0.028
#> GSM1182324     3  0.2843     0.7987 0.000 0.144 0.848 0.000 0.008
#> GSM1182297     2  0.0880     0.9012 0.000 0.968 0.000 0.000 0.032
#> GSM1182302     5  0.4249     0.2592 0.000 0.000 0.000 0.432 0.568
#> GSM1182308     2  0.3048     0.8516 0.000 0.820 0.176 0.000 0.004
#> GSM1182310     2  0.3201     0.8918 0.000 0.852 0.096 0.000 0.052
#> GSM1182311     1  0.0510     0.9567 0.984 0.000 0.000 0.000 0.016
#> GSM1182313     4  0.0000     0.9349 0.000 0.000 0.000 1.000 0.000
#> GSM1182315     2  0.1341     0.9019 0.000 0.944 0.000 0.000 0.056
#> GSM1182317     2  0.0510     0.8999 0.000 0.984 0.000 0.000 0.016
#> GSM1182323     1  0.0404     0.9594 0.988 0.000 0.000 0.000 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
#> GSM1182186     5  0.2712      0.693 0.000 0.000 0.000 0.088 0.864 0.048
#> GSM1182187     4  0.5984      0.438 0.000 0.000 0.000 0.444 0.276 0.280
#> GSM1182188     4  0.0000      0.816 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182189     1  0.3629      0.833 0.724 0.000 0.000 0.000 0.016 0.260
#> GSM1182190     1  0.3789      0.830 0.716 0.000 0.000 0.000 0.024 0.260
#> GSM1182191     5  0.2258      0.722 0.000 0.000 0.000 0.060 0.896 0.044
#> GSM1182192     1  0.0000      0.846 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182193     1  0.0000      0.846 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182194     3  0.3023      0.775 0.000 0.000 0.768 0.000 0.000 0.232
#> GSM1182195     3  0.3050      0.773 0.000 0.000 0.764 0.000 0.000 0.236
#> GSM1182196     2  0.4723      0.649 0.000 0.664 0.232 0.000 0.000 0.104
#> GSM1182197     3  0.4535     -0.275 0.000 0.480 0.488 0.000 0.000 0.032
#> GSM1182198     3  0.2996      0.776 0.000 0.000 0.772 0.000 0.000 0.228
#> GSM1182199     3  0.3050      0.773 0.000 0.000 0.764 0.000 0.000 0.236
#> GSM1182200     2  0.4493      0.576 0.000 0.612 0.344 0.000 0.000 0.044
#> GSM1182201     3  0.1838      0.794 0.000 0.068 0.916 0.000 0.000 0.016
#> GSM1182202     4  0.6065      0.361 0.000 0.000 0.000 0.404 0.316 0.280
#> GSM1182203     4  0.5546      0.548 0.000 0.000 0.000 0.552 0.192 0.256
#> GSM1182204     4  0.5786      0.491 0.000 0.000 0.000 0.504 0.240 0.256
#> GSM1182205     3  0.4449      0.740 0.000 0.088 0.696 0.000 0.000 0.216
#> GSM1182206     3  0.4408      0.463 0.000 0.356 0.608 0.000 0.000 0.036
#> GSM1182207     5  0.4747      0.561 0.324 0.000 0.000 0.000 0.608 0.068
#> GSM1182208     5  0.4466      0.658 0.260 0.000 0.000 0.000 0.672 0.068
#> GSM1182209     2  0.2416      0.843 0.000 0.844 0.000 0.000 0.000 0.156
#> GSM1182210     2  0.2672      0.848 0.000 0.868 0.080 0.000 0.000 0.052
#> GSM1182211     2  0.2416      0.846 0.000 0.844 0.000 0.000 0.000 0.156
#> GSM1182212     2  0.2750      0.847 0.000 0.844 0.020 0.000 0.000 0.136
#> GSM1182213     2  0.0713      0.855 0.000 0.972 0.000 0.000 0.000 0.028
#> GSM1182214     2  0.1007      0.856 0.000 0.956 0.000 0.000 0.000 0.044
#> GSM1182215     3  0.5443      0.199 0.000 0.384 0.492 0.000 0.000 0.124
#> GSM1182216     2  0.2134      0.839 0.000 0.904 0.052 0.000 0.000 0.044
#> GSM1182217     5  0.5008      0.403 0.000 0.000 0.000 0.108 0.612 0.280
#> GSM1182218     1  0.3711      0.831 0.720 0.000 0.000 0.000 0.020 0.260
#> GSM1182219     2  0.1418      0.850 0.000 0.944 0.024 0.000 0.000 0.032
#> GSM1182220     2  0.3054      0.853 0.000 0.828 0.036 0.000 0.000 0.136
#> GSM1182221     2  0.2365      0.838 0.000 0.888 0.040 0.000 0.000 0.072
#> GSM1182222     2  0.2775      0.828 0.000 0.856 0.104 0.000 0.000 0.040
#> GSM1182223     2  0.3864      0.199 0.000 0.520 0.480 0.000 0.000 0.000
#> GSM1182224     3  0.3101      0.771 0.000 0.000 0.756 0.000 0.000 0.244
#> GSM1182225     2  0.2197      0.839 0.000 0.900 0.056 0.000 0.000 0.044
#> GSM1182226     2  0.2554      0.835 0.000 0.876 0.048 0.000 0.000 0.076
#> GSM1182227     1  0.0000      0.846 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182228     3  0.3558      0.642 0.000 0.248 0.736 0.000 0.000 0.016
#> GSM1182229     3  0.0146      0.823 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM1182230     3  0.2908      0.809 0.000 0.048 0.848 0.000 0.000 0.104
#> GSM1182231     2  0.2842      0.823 0.000 0.852 0.104 0.000 0.000 0.044
#> GSM1182232     1  0.3424      0.839 0.772 0.000 0.000 0.000 0.024 0.204
#> GSM1182233     1  0.4227      0.815 0.692 0.000 0.000 0.000 0.052 0.256
#> GSM1182234     1  0.0000      0.846 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182235     2  0.2378      0.849 0.000 0.848 0.000 0.000 0.000 0.152
#> GSM1182236     1  0.3629      0.833 0.724 0.000 0.000 0.000 0.016 0.260
#> GSM1182237     2  0.2908      0.813 0.000 0.848 0.104 0.000 0.000 0.048
#> GSM1182238     2  0.1780      0.844 0.000 0.924 0.028 0.000 0.000 0.048
#> GSM1182239     2  0.2669      0.849 0.000 0.836 0.008 0.000 0.000 0.156
#> GSM1182240     2  0.0935      0.856 0.000 0.964 0.004 0.000 0.000 0.032
#> GSM1182241     2  0.5277      0.610 0.000 0.592 0.256 0.000 0.000 0.152
#> GSM1182242     3  0.0291      0.824 0.000 0.004 0.992 0.000 0.000 0.004
#> GSM1182243     3  0.0260      0.823 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM1182244     3  0.3766      0.766 0.000 0.032 0.736 0.000 0.000 0.232
#> GSM1182245     1  0.0000      0.846 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182246     4  0.0146      0.815 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM1182247     3  0.1075      0.824 0.000 0.000 0.952 0.000 0.000 0.048
#> GSM1182248     3  0.2454      0.805 0.000 0.000 0.840 0.000 0.000 0.160
#> GSM1182249     2  0.4587      0.271 0.000 0.508 0.456 0.000 0.000 0.036
#> GSM1182250     3  0.2176      0.789 0.000 0.080 0.896 0.000 0.000 0.024
#> GSM1182251     5  0.1003      0.783 0.020 0.000 0.000 0.016 0.964 0.000
#> GSM1182252     3  0.1267      0.824 0.000 0.000 0.940 0.000 0.000 0.060
#> GSM1182253     3  0.0260      0.824 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM1182254     3  0.0000      0.823 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1182255     4  0.0000      0.816 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182256     4  0.0000      0.816 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182257     4  0.1575      0.792 0.000 0.000 0.000 0.936 0.032 0.032
#> GSM1182258     4  0.0146      0.815 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM1182259     4  0.0000      0.816 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182260     3  0.0820      0.820 0.000 0.016 0.972 0.000 0.000 0.012
#> GSM1182261     2  0.4122      0.673 0.000 0.704 0.248 0.000 0.000 0.048
#> GSM1182262     3  0.5071      0.322 0.000 0.376 0.540 0.000 0.000 0.084
#> GSM1182263     5  0.3136      0.743 0.228 0.000 0.000 0.000 0.768 0.004
#> GSM1182264     3  0.2039      0.787 0.000 0.020 0.904 0.000 0.000 0.076
#> GSM1182265     3  0.1196      0.815 0.000 0.008 0.952 0.000 0.000 0.040
#> GSM1182266     3  0.0405      0.822 0.000 0.004 0.988 0.000 0.000 0.008
#> GSM1182267     1  0.0146      0.846 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM1182268     1  0.3629      0.833 0.724 0.000 0.000 0.000 0.016 0.260
#> GSM1182269     1  0.3629      0.833 0.724 0.000 0.000 0.000 0.016 0.260
#> GSM1182270     1  0.4249      0.812 0.688 0.000 0.000 0.000 0.052 0.260
#> GSM1182271     4  0.0000      0.816 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182272     4  0.0000      0.816 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182273     3  0.0146      0.823 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM1182275     3  0.0260      0.822 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM1182276     2  0.2831      0.847 0.000 0.840 0.024 0.000 0.000 0.136
#> GSM1182277     1  0.0000      0.846 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182278     1  0.0000      0.846 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182279     5  0.1462      0.803 0.056 0.000 0.000 0.000 0.936 0.008
#> GSM1182280     5  0.3649      0.731 0.196 0.000 0.000 0.000 0.764 0.040
#> GSM1182281     4  0.5286      0.365 0.296 0.000 0.000 0.572 0.132 0.000
#> GSM1182282     1  0.0000      0.846 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182283     1  0.0000      0.846 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182284     1  0.0000      0.846 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182285     3  0.3050      0.773 0.000 0.000 0.764 0.000 0.000 0.236
#> GSM1182286     2  0.2558      0.849 0.000 0.840 0.004 0.000 0.000 0.156
#> GSM1182287     3  0.3464      0.555 0.000 0.312 0.688 0.000 0.000 0.000
#> GSM1182288     3  0.0937      0.825 0.000 0.000 0.960 0.000 0.000 0.040
#> GSM1182289     5  0.1398      0.802 0.052 0.000 0.000 0.000 0.940 0.008
#> GSM1182290     5  0.3933      0.711 0.248 0.000 0.000 0.000 0.716 0.036
#> GSM1182291     4  0.0000      0.816 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182274     3  0.0260      0.823 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM1182292     2  0.2378      0.843 0.000 0.848 0.000 0.000 0.000 0.152
#> GSM1182293     2  0.2263      0.849 0.000 0.896 0.048 0.000 0.000 0.056
#> GSM1182294     2  0.1719      0.848 0.000 0.924 0.016 0.000 0.000 0.060
#> GSM1182295     2  0.1649      0.853 0.000 0.932 0.032 0.000 0.000 0.036
#> GSM1182296     2  0.2378      0.843 0.000 0.848 0.000 0.000 0.000 0.152
#> GSM1182298     3  0.3050      0.776 0.000 0.000 0.764 0.000 0.000 0.236
#> GSM1182299     2  0.4693      0.729 0.000 0.684 0.176 0.000 0.000 0.140
#> GSM1182300     2  0.2631      0.843 0.000 0.840 0.008 0.000 0.000 0.152
#> GSM1182301     2  0.3279      0.837 0.000 0.796 0.028 0.000 0.000 0.176
#> GSM1182303     2  0.3375      0.842 0.000 0.816 0.088 0.000 0.000 0.096
#> GSM1182304     5  0.1524      0.804 0.060 0.000 0.000 0.000 0.932 0.008
#> GSM1182305     5  0.0914      0.780 0.016 0.000 0.000 0.016 0.968 0.000
#> GSM1182306     4  0.4040      0.673 0.000 0.000 0.000 0.688 0.032 0.280
#> GSM1182307     2  0.2340      0.844 0.000 0.852 0.000 0.000 0.000 0.148
#> GSM1182309     2  0.2631      0.848 0.000 0.840 0.008 0.000 0.000 0.152
#> GSM1182312     2  0.2420      0.838 0.000 0.884 0.040 0.000 0.000 0.076
#> GSM1182314     4  0.0260      0.814 0.000 0.000 0.000 0.992 0.008 0.000
#> GSM1182316     2  0.2629      0.835 0.000 0.872 0.068 0.000 0.000 0.060
#> GSM1182318     2  0.2006      0.856 0.000 0.892 0.004 0.000 0.000 0.104
#> GSM1182319     2  0.4545      0.713 0.000 0.696 0.192 0.000 0.000 0.112
#> GSM1182320     2  0.2250      0.842 0.000 0.896 0.040 0.000 0.000 0.064
#> GSM1182321     3  0.2985      0.748 0.000 0.056 0.844 0.000 0.000 0.100
#> GSM1182322     2  0.5488      0.575 0.000 0.556 0.272 0.000 0.000 0.172
#> GSM1182324     3  0.2740      0.773 0.000 0.076 0.864 0.000 0.000 0.060
#> GSM1182297     2  0.2416      0.848 0.000 0.844 0.000 0.000 0.000 0.156
#> GSM1182302     4  0.5899      0.463 0.000 0.000 0.000 0.472 0.252 0.276
#> GSM1182308     2  0.3354      0.793 0.000 0.796 0.168 0.000 0.000 0.036
#> GSM1182310     2  0.3020      0.823 0.000 0.844 0.076 0.000 0.000 0.080
#> GSM1182311     1  0.3841      0.829 0.716 0.000 0.000 0.000 0.028 0.256
#> GSM1182313     4  0.0000      0.816 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182315     2  0.1141      0.851 0.000 0.948 0.000 0.000 0.000 0.052
#> GSM1182317     2  0.2340      0.850 0.000 0.852 0.000 0.000 0.000 0.148
#> GSM1182323     1  0.4002      0.824 0.704 0.000 0.000 0.000 0.036 0.260

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk SD-pam-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk SD-pam-collect-classes

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

test_to_known_factors(res)
#>          n disease.state(p) gender(p) k
#> SD:pam 139         0.077250     1.000 2
#> SD:pam 139         0.127535     0.921 3
#> SD:pam 136         0.000374     0.649 4
#> SD:pam 126         0.001431     0.685 5
#> SD:pam 127         0.000629     0.607 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 46361 rows and 139 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 1.000           1.000       1.000         0.4791 0.521   0.521
#> 3 3 0.707           0.832       0.874         0.3258 0.823   0.661
#> 4 4 0.551           0.514       0.718         0.0905 0.944   0.843
#> 5 5 0.541           0.645       0.747         0.0609 0.915   0.744
#> 6 6 0.538           0.610       0.648         0.0387 0.932   0.766

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
#> GSM1182186     1       0          1  1  0
#> GSM1182187     1       0          1  1  0
#> GSM1182188     1       0          1  1  0
#> GSM1182189     1       0          1  1  0
#> GSM1182190     1       0          1  1  0
#> GSM1182191     1       0          1  1  0
#> GSM1182192     1       0          1  1  0
#> GSM1182193     1       0          1  1  0
#> GSM1182194     2       0          1  0  1
#> GSM1182195     2       0          1  0  1
#> GSM1182196     2       0          1  0  1
#> GSM1182197     2       0          1  0  1
#> GSM1182198     2       0          1  0  1
#> GSM1182199     2       0          1  0  1
#> GSM1182200     2       0          1  0  1
#> GSM1182201     2       0          1  0  1
#> GSM1182202     1       0          1  1  0
#> GSM1182203     1       0          1  1  0
#> GSM1182204     1       0          1  1  0
#> GSM1182205     2       0          1  0  1
#> GSM1182206     2       0          1  0  1
#> GSM1182207     1       0          1  1  0
#> GSM1182208     1       0          1  1  0
#> GSM1182209     2       0          1  0  1
#> GSM1182210     2       0          1  0  1
#> GSM1182211     2       0          1  0  1
#> GSM1182212     2       0          1  0  1
#> GSM1182213     2       0          1  0  1
#> GSM1182214     2       0          1  0  1
#> GSM1182215     2       0          1  0  1
#> GSM1182216     2       0          1  0  1
#> GSM1182217     1       0          1  1  0
#> GSM1182218     1       0          1  1  0
#> GSM1182219     2       0          1  0  1
#> GSM1182220     2       0          1  0  1
#> GSM1182221     2       0          1  0  1
#> GSM1182222     2       0          1  0  1
#> GSM1182223     2       0          1  0  1
#> GSM1182224     2       0          1  0  1
#> GSM1182225     2       0          1  0  1
#> GSM1182226     2       0          1  0  1
#> GSM1182227     1       0          1  1  0
#> GSM1182228     2       0          1  0  1
#> GSM1182229     2       0          1  0  1
#> GSM1182230     2       0          1  0  1
#> GSM1182231     2       0          1  0  1
#> GSM1182232     1       0          1  1  0
#> GSM1182233     1       0          1  1  0
#> GSM1182234     1       0          1  1  0
#> GSM1182235     2       0          1  0  1
#> GSM1182236     1       0          1  1  0
#> GSM1182237     2       0          1  0  1
#> GSM1182238     2       0          1  0  1
#> GSM1182239     2       0          1  0  1
#> GSM1182240     2       0          1  0  1
#> GSM1182241     2       0          1  0  1
#> GSM1182242     2       0          1  0  1
#> GSM1182243     2       0          1  0  1
#> GSM1182244     2       0          1  0  1
#> GSM1182245     1       0          1  1  0
#> GSM1182246     1       0          1  1  0
#> GSM1182247     2       0          1  0  1
#> GSM1182248     2       0          1  0  1
#> GSM1182249     2       0          1  0  1
#> GSM1182250     2       0          1  0  1
#> GSM1182251     1       0          1  1  0
#> GSM1182252     2       0          1  0  1
#> GSM1182253     2       0          1  0  1
#> GSM1182254     2       0          1  0  1
#> GSM1182255     1       0          1  1  0
#> GSM1182256     1       0          1  1  0
#> GSM1182257     1       0          1  1  0
#> GSM1182258     1       0          1  1  0
#> GSM1182259     1       0          1  1  0
#> GSM1182260     2       0          1  0  1
#> GSM1182261     2       0          1  0  1
#> GSM1182262     2       0          1  0  1
#> GSM1182263     1       0          1  1  0
#> GSM1182264     2       0          1  0  1
#> GSM1182265     2       0          1  0  1
#> GSM1182266     2       0          1  0  1
#> GSM1182267     1       0          1  1  0
#> GSM1182268     1       0          1  1  0
#> GSM1182269     1       0          1  1  0
#> GSM1182270     1       0          1  1  0
#> GSM1182271     1       0          1  1  0
#> GSM1182272     1       0          1  1  0
#> GSM1182273     2       0          1  0  1
#> GSM1182275     2       0          1  0  1
#> GSM1182276     2       0          1  0  1
#> GSM1182277     1       0          1  1  0
#> GSM1182278     1       0          1  1  0
#> GSM1182279     1       0          1  1  0
#> GSM1182280     1       0          1  1  0
#> GSM1182281     1       0          1  1  0
#> GSM1182282     1       0          1  1  0
#> GSM1182283     1       0          1  1  0
#> GSM1182284     1       0          1  1  0
#> GSM1182285     2       0          1  0  1
#> GSM1182286     2       0          1  0  1
#> GSM1182287     2       0          1  0  1
#> GSM1182288     2       0          1  0  1
#> GSM1182289     1       0          1  1  0
#> GSM1182290     1       0          1  1  0
#> GSM1182291     1       0          1  1  0
#> GSM1182274     2       0          1  0  1
#> GSM1182292     2       0          1  0  1
#> GSM1182293     2       0          1  0  1
#> GSM1182294     2       0          1  0  1
#> GSM1182295     2       0          1  0  1
#> GSM1182296     2       0          1  0  1
#> GSM1182298     2       0          1  0  1
#> GSM1182299     2       0          1  0  1
#> GSM1182300     2       0          1  0  1
#> GSM1182301     2       0          1  0  1
#> GSM1182303     2       0          1  0  1
#> GSM1182304     1       0          1  1  0
#> GSM1182305     1       0          1  1  0
#> GSM1182306     1       0          1  1  0
#> GSM1182307     2       0          1  0  1
#> GSM1182309     2       0          1  0  1
#> GSM1182312     2       0          1  0  1
#> GSM1182314     1       0          1  1  0
#> GSM1182316     2       0          1  0  1
#> GSM1182318     2       0          1  0  1
#> GSM1182319     2       0          1  0  1
#> GSM1182320     2       0          1  0  1
#> GSM1182321     2       0          1  0  1
#> GSM1182322     2       0          1  0  1
#> GSM1182324     2       0          1  0  1
#> GSM1182297     2       0          1  0  1
#> GSM1182302     1       0          1  1  0
#> GSM1182308     2       0          1  0  1
#> GSM1182310     2       0          1  0  1
#> GSM1182311     1       0          1  1  0
#> GSM1182313     1       0          1  1  0
#> GSM1182315     2       0          1  0  1
#> GSM1182317     2       0          1  0  1
#> GSM1182323     1       0          1  1  0

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1182186     1  0.0747     0.9752 0.984 0.000 0.016
#> GSM1182187     1  0.0000     0.9788 1.000 0.000 0.000
#> GSM1182188     1  0.0000     0.9788 1.000 0.000 0.000
#> GSM1182189     1  0.1031     0.9756 0.976 0.000 0.024
#> GSM1182190     1  0.1031     0.9756 0.976 0.000 0.024
#> GSM1182191     1  0.0747     0.9752 0.984 0.000 0.016
#> GSM1182192     1  0.2796     0.9459 0.908 0.000 0.092
#> GSM1182193     1  0.2796     0.9459 0.908 0.000 0.092
#> GSM1182194     2  0.1753     0.8192 0.000 0.952 0.048
#> GSM1182195     2  0.1643     0.8186 0.000 0.956 0.044
#> GSM1182196     2  0.5178     0.7204 0.000 0.744 0.256
#> GSM1182197     2  0.2625     0.8190 0.000 0.916 0.084
#> GSM1182198     2  0.2537     0.8092 0.000 0.920 0.080
#> GSM1182199     2  0.2711     0.8062 0.000 0.912 0.088
#> GSM1182200     2  0.2537     0.8221 0.000 0.920 0.080
#> GSM1182201     2  0.1753     0.8332 0.000 0.952 0.048
#> GSM1182202     1  0.0000     0.9788 1.000 0.000 0.000
#> GSM1182203     1  0.0000     0.9788 1.000 0.000 0.000
#> GSM1182204     1  0.0000     0.9788 1.000 0.000 0.000
#> GSM1182205     2  0.3267     0.8216 0.000 0.884 0.116
#> GSM1182206     2  0.3686     0.7572 0.000 0.860 0.140
#> GSM1182207     1  0.0747     0.9752 0.984 0.000 0.016
#> GSM1182208     1  0.0747     0.9752 0.984 0.000 0.016
#> GSM1182209     3  0.6308     0.2226 0.000 0.492 0.508
#> GSM1182210     3  0.4750     0.8564 0.000 0.216 0.784
#> GSM1182211     3  0.4842     0.8569 0.000 0.224 0.776
#> GSM1182212     2  0.4750     0.6704 0.000 0.784 0.216
#> GSM1182213     3  0.4796     0.8572 0.000 0.220 0.780
#> GSM1182214     3  0.4796     0.8569 0.000 0.220 0.780
#> GSM1182215     2  0.3038     0.7971 0.000 0.896 0.104
#> GSM1182216     3  0.5621     0.8247 0.000 0.308 0.692
#> GSM1182217     1  0.0000     0.9788 1.000 0.000 0.000
#> GSM1182218     1  0.1031     0.9756 0.976 0.000 0.024
#> GSM1182219     3  0.4931     0.8564 0.000 0.232 0.768
#> GSM1182220     3  0.5016     0.8545 0.000 0.240 0.760
#> GSM1182221     3  0.5529     0.8317 0.000 0.296 0.704
#> GSM1182222     3  0.5621     0.8247 0.000 0.308 0.692
#> GSM1182223     2  0.0592     0.8368 0.000 0.988 0.012
#> GSM1182224     2  0.0237     0.8348 0.000 0.996 0.004
#> GSM1182225     3  0.5621     0.8247 0.000 0.308 0.692
#> GSM1182226     3  0.6180     0.6778 0.000 0.416 0.584
#> GSM1182227     1  0.2796     0.9459 0.908 0.000 0.092
#> GSM1182228     2  0.3116     0.8109 0.000 0.892 0.108
#> GSM1182229     2  0.0747     0.8378 0.000 0.984 0.016
#> GSM1182230     2  0.3192     0.7861 0.000 0.888 0.112
#> GSM1182231     2  0.4062     0.7329 0.000 0.836 0.164
#> GSM1182232     1  0.1031     0.9756 0.976 0.000 0.024
#> GSM1182233     1  0.1031     0.9756 0.976 0.000 0.024
#> GSM1182234     1  0.2796     0.9459 0.908 0.000 0.092
#> GSM1182235     3  0.3879     0.8276 0.000 0.152 0.848
#> GSM1182236     1  0.1031     0.9756 0.976 0.000 0.024
#> GSM1182237     2  0.5016     0.7412 0.000 0.760 0.240
#> GSM1182238     3  0.5497     0.8336 0.000 0.292 0.708
#> GSM1182239     2  0.5529     0.6661 0.000 0.704 0.296
#> GSM1182240     2  0.6215     0.1563 0.000 0.572 0.428
#> GSM1182241     2  0.4399     0.7570 0.000 0.812 0.188
#> GSM1182242     2  0.2959     0.8142 0.000 0.900 0.100
#> GSM1182243     2  0.2711     0.8060 0.000 0.912 0.088
#> GSM1182244     2  0.3551     0.7971 0.000 0.868 0.132
#> GSM1182245     1  0.2625     0.9500 0.916 0.000 0.084
#> GSM1182246     1  0.0000     0.9788 1.000 0.000 0.000
#> GSM1182247     2  0.0424     0.8359 0.000 0.992 0.008
#> GSM1182248     2  0.0424     0.8359 0.000 0.992 0.008
#> GSM1182249     2  0.3482     0.7864 0.000 0.872 0.128
#> GSM1182250     2  0.2165     0.8251 0.000 0.936 0.064
#> GSM1182251     1  0.0747     0.9752 0.984 0.000 0.016
#> GSM1182252     2  0.0747     0.8368 0.000 0.984 0.016
#> GSM1182253     2  0.0000     0.8336 0.000 1.000 0.000
#> GSM1182254     2  0.0000     0.8336 0.000 1.000 0.000
#> GSM1182255     1  0.0000     0.9788 1.000 0.000 0.000
#> GSM1182256     1  0.0000     0.9788 1.000 0.000 0.000
#> GSM1182257     1  0.0000     0.9788 1.000 0.000 0.000
#> GSM1182258     1  0.0000     0.9788 1.000 0.000 0.000
#> GSM1182259     1  0.0000     0.9788 1.000 0.000 0.000
#> GSM1182260     2  0.3116     0.8107 0.000 0.892 0.108
#> GSM1182261     2  0.3412     0.7743 0.000 0.876 0.124
#> GSM1182262     2  0.0000     0.8336 0.000 1.000 0.000
#> GSM1182263     1  0.0747     0.9752 0.984 0.000 0.016
#> GSM1182264     2  0.3267     0.8047 0.000 0.884 0.116
#> GSM1182265     2  0.2878     0.8076 0.000 0.904 0.096
#> GSM1182266     2  0.3116     0.8107 0.000 0.892 0.108
#> GSM1182267     1  0.2796     0.9459 0.908 0.000 0.092
#> GSM1182268     1  0.1031     0.9756 0.976 0.000 0.024
#> GSM1182269     1  0.1031     0.9756 0.976 0.000 0.024
#> GSM1182270     1  0.1031     0.9756 0.976 0.000 0.024
#> GSM1182271     1  0.0000     0.9788 1.000 0.000 0.000
#> GSM1182272     1  0.0000     0.9788 1.000 0.000 0.000
#> GSM1182273     2  0.0237     0.8348 0.000 0.996 0.004
#> GSM1182275     2  0.0592     0.8365 0.000 0.988 0.012
#> GSM1182276     3  0.5650     0.7798 0.000 0.312 0.688
#> GSM1182277     1  0.2796     0.9459 0.908 0.000 0.092
#> GSM1182278     1  0.2796     0.9459 0.908 0.000 0.092
#> GSM1182279     1  0.0747     0.9752 0.984 0.000 0.016
#> GSM1182280     1  0.0747     0.9752 0.984 0.000 0.016
#> GSM1182281     1  0.0747     0.9771 0.984 0.000 0.016
#> GSM1182282     1  0.2796     0.9459 0.908 0.000 0.092
#> GSM1182283     1  0.2796     0.9459 0.908 0.000 0.092
#> GSM1182284     1  0.2796     0.9459 0.908 0.000 0.092
#> GSM1182285     2  0.0747     0.8368 0.000 0.984 0.016
#> GSM1182286     3  0.3752     0.8231 0.000 0.144 0.856
#> GSM1182287     2  0.3551     0.7236 0.000 0.868 0.132
#> GSM1182288     2  0.1163     0.8340 0.000 0.972 0.028
#> GSM1182289     1  0.0747     0.9752 0.984 0.000 0.016
#> GSM1182290     1  0.0747     0.9752 0.984 0.000 0.016
#> GSM1182291     1  0.0000     0.9788 1.000 0.000 0.000
#> GSM1182274     2  0.0424     0.8359 0.000 0.992 0.008
#> GSM1182292     3  0.3752     0.8231 0.000 0.144 0.856
#> GSM1182293     3  0.4750     0.8564 0.000 0.216 0.784
#> GSM1182294     3  0.5968     0.7116 0.000 0.364 0.636
#> GSM1182295     3  0.4750     0.8564 0.000 0.216 0.784
#> GSM1182296     3  0.3752     0.8231 0.000 0.144 0.856
#> GSM1182298     2  0.3038     0.8001 0.000 0.896 0.104
#> GSM1182299     2  0.3551     0.7879 0.000 0.868 0.132
#> GSM1182300     3  0.5591     0.6830 0.000 0.304 0.696
#> GSM1182301     3  0.4555     0.8535 0.000 0.200 0.800
#> GSM1182303     3  0.6225     0.6259 0.000 0.432 0.568
#> GSM1182304     1  0.0747     0.9752 0.984 0.000 0.016
#> GSM1182305     1  0.0747     0.9752 0.984 0.000 0.016
#> GSM1182306     1  0.0000     0.9788 1.000 0.000 0.000
#> GSM1182307     3  0.3816     0.8237 0.000 0.148 0.852
#> GSM1182309     3  0.4702     0.8528 0.000 0.212 0.788
#> GSM1182312     3  0.5465     0.8361 0.000 0.288 0.712
#> GSM1182314     1  0.0000     0.9788 1.000 0.000 0.000
#> GSM1182316     2  0.5431     0.4788 0.000 0.716 0.284
#> GSM1182318     2  0.6274    -0.1012 0.000 0.544 0.456
#> GSM1182319     2  0.5706     0.6283 0.000 0.680 0.320
#> GSM1182320     2  0.6244    -0.2200 0.000 0.560 0.440
#> GSM1182321     2  0.5016     0.7398 0.000 0.760 0.240
#> GSM1182322     3  0.6308     0.0255 0.000 0.492 0.508
#> GSM1182324     2  0.3482     0.7744 0.000 0.872 0.128
#> GSM1182297     3  0.3752     0.8231 0.000 0.144 0.856
#> GSM1182302     1  0.0000     0.9788 1.000 0.000 0.000
#> GSM1182308     3  0.5465     0.8363 0.000 0.288 0.712
#> GSM1182310     2  0.5397     0.4993 0.000 0.720 0.280
#> GSM1182311     1  0.1031     0.9756 0.976 0.000 0.024
#> GSM1182313     1  0.0000     0.9788 1.000 0.000 0.000
#> GSM1182315     3  0.4796     0.8464 0.000 0.220 0.780
#> GSM1182317     3  0.6291     0.4072 0.000 0.468 0.532
#> GSM1182323     1  0.1031     0.9756 0.976 0.000 0.024

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1182186     4  0.6814     0.5399 0.276 0.140 0.000 0.584
#> GSM1182187     1  0.4916    -0.0740 0.576 0.000 0.000 0.424
#> GSM1182188     1  0.6347     0.0491 0.548 0.068 0.000 0.384
#> GSM1182189     1  0.5193     0.0706 0.656 0.020 0.000 0.324
#> GSM1182190     1  0.5193     0.0706 0.656 0.020 0.000 0.324
#> GSM1182191     4  0.6814     0.5399 0.276 0.140 0.000 0.584
#> GSM1182192     1  0.0000     0.3424 1.000 0.000 0.000 0.000
#> GSM1182193     1  0.0000     0.3424 1.000 0.000 0.000 0.000
#> GSM1182194     3  0.1489     0.8278 0.000 0.004 0.952 0.044
#> GSM1182195     3  0.0336     0.8271 0.000 0.000 0.992 0.008
#> GSM1182196     3  0.6231     0.5843 0.000 0.184 0.668 0.148
#> GSM1182197     3  0.2060     0.8252 0.000 0.016 0.932 0.052
#> GSM1182198     3  0.1940     0.8237 0.000 0.000 0.924 0.076
#> GSM1182199     3  0.2593     0.8110 0.000 0.004 0.892 0.104
#> GSM1182200     3  0.3552     0.7469 0.000 0.128 0.848 0.024
#> GSM1182201     3  0.1584     0.8297 0.000 0.012 0.952 0.036
#> GSM1182202     4  0.4643     0.7362 0.344 0.000 0.000 0.656
#> GSM1182203     1  0.4916    -0.0740 0.576 0.000 0.000 0.424
#> GSM1182204     4  0.4679     0.7192 0.352 0.000 0.000 0.648
#> GSM1182205     3  0.1970     0.8225 0.000 0.008 0.932 0.060
#> GSM1182206     3  0.4755     0.5555 0.000 0.200 0.760 0.040
#> GSM1182207     1  0.7206    -0.1468 0.460 0.140 0.000 0.400
#> GSM1182208     1  0.7206    -0.1468 0.460 0.140 0.000 0.400
#> GSM1182209     2  0.5453     0.8245 0.000 0.660 0.304 0.036
#> GSM1182210     2  0.4155     0.8744 0.000 0.756 0.240 0.004
#> GSM1182211     2  0.4295     0.8755 0.000 0.752 0.240 0.008
#> GSM1182212     3  0.4980     0.4684 0.000 0.304 0.680 0.016
#> GSM1182213     2  0.4436     0.8670 0.000 0.764 0.216 0.020
#> GSM1182214     2  0.4086     0.8669 0.000 0.776 0.216 0.008
#> GSM1182215     3  0.1488     0.8188 0.000 0.032 0.956 0.012
#> GSM1182216     2  0.5512     0.8409 0.000 0.660 0.300 0.040
#> GSM1182217     4  0.5289     0.7296 0.344 0.020 0.000 0.636
#> GSM1182218     1  0.5193     0.0706 0.656 0.020 0.000 0.324
#> GSM1182219     2  0.4053     0.8692 0.000 0.768 0.228 0.004
#> GSM1182220     2  0.4188     0.8719 0.000 0.752 0.244 0.004
#> GSM1182221     2  0.5497     0.8509 0.000 0.672 0.284 0.044
#> GSM1182222     2  0.5790     0.8080 0.000 0.616 0.340 0.044
#> GSM1182223     3  0.0336     0.8281 0.000 0.008 0.992 0.000
#> GSM1182224     3  0.0188     0.8267 0.000 0.004 0.996 0.000
#> GSM1182225     2  0.5535     0.8388 0.000 0.656 0.304 0.040
#> GSM1182226     2  0.6060     0.6570 0.000 0.516 0.440 0.044
#> GSM1182227     1  0.0000     0.3424 1.000 0.000 0.000 0.000
#> GSM1182228     3  0.3280     0.7945 0.000 0.016 0.860 0.124
#> GSM1182229     3  0.0188     0.8267 0.000 0.004 0.996 0.000
#> GSM1182230     3  0.1637     0.8053 0.000 0.060 0.940 0.000
#> GSM1182231     3  0.4857     0.3313 0.000 0.284 0.700 0.016
#> GSM1182232     1  0.3278     0.2331 0.864 0.020 0.000 0.116
#> GSM1182233     1  0.5173     0.0706 0.660 0.020 0.000 0.320
#> GSM1182234     1  0.0188     0.3406 0.996 0.000 0.000 0.004
#> GSM1182235     2  0.5184     0.8656 0.000 0.732 0.212 0.056
#> GSM1182236     1  0.5173     0.0706 0.660 0.020 0.000 0.320
#> GSM1182237     3  0.6308     0.5386 0.000 0.208 0.656 0.136
#> GSM1182238     2  0.5085     0.8650 0.000 0.708 0.260 0.032
#> GSM1182239     3  0.7077     0.1292 0.000 0.316 0.536 0.148
#> GSM1182240     2  0.6446     0.7957 0.000 0.584 0.328 0.088
#> GSM1182241     3  0.4841     0.7353 0.000 0.080 0.780 0.140
#> GSM1182242     3  0.3161     0.7964 0.000 0.012 0.864 0.124
#> GSM1182243     3  0.1389     0.8135 0.000 0.048 0.952 0.000
#> GSM1182244     3  0.2928     0.8022 0.000 0.012 0.880 0.108
#> GSM1182245     1  0.0000     0.3424 1.000 0.000 0.000 0.000
#> GSM1182246     1  0.6347     0.0491 0.548 0.068 0.000 0.384
#> GSM1182247     3  0.1356     0.8290 0.000 0.008 0.960 0.032
#> GSM1182248     3  0.0188     0.8267 0.000 0.004 0.996 0.000
#> GSM1182249     3  0.2760     0.7281 0.000 0.128 0.872 0.000
#> GSM1182250     3  0.0000     0.8273 0.000 0.000 1.000 0.000
#> GSM1182251     1  0.7221    -0.2130 0.432 0.140 0.000 0.428
#> GSM1182252     3  0.1452     0.8285 0.000 0.008 0.956 0.036
#> GSM1182253     3  0.0000     0.8273 0.000 0.000 1.000 0.000
#> GSM1182254     3  0.0000     0.8273 0.000 0.000 1.000 0.000
#> GSM1182255     1  0.6337     0.0478 0.552 0.068 0.000 0.380
#> GSM1182256     1  0.6347     0.0491 0.548 0.068 0.000 0.384
#> GSM1182257     1  0.4916    -0.0740 0.576 0.000 0.000 0.424
#> GSM1182258     1  0.6347     0.0491 0.548 0.068 0.000 0.384
#> GSM1182259     1  0.6347     0.0491 0.548 0.068 0.000 0.384
#> GSM1182260     3  0.3161     0.7937 0.000 0.012 0.864 0.124
#> GSM1182261     3  0.3176     0.7632 0.000 0.084 0.880 0.036
#> GSM1182262     3  0.0376     0.8263 0.000 0.004 0.992 0.004
#> GSM1182263     1  0.6386    -0.0128 0.648 0.140 0.000 0.212
#> GSM1182264     3  0.3161     0.7937 0.000 0.012 0.864 0.124
#> GSM1182265     3  0.1389     0.8124 0.000 0.048 0.952 0.000
#> GSM1182266     3  0.3161     0.7937 0.000 0.012 0.864 0.124
#> GSM1182267     1  0.0000     0.3424 1.000 0.000 0.000 0.000
#> GSM1182268     1  0.5193     0.0706 0.656 0.020 0.000 0.324
#> GSM1182269     1  0.5193     0.0706 0.656 0.020 0.000 0.324
#> GSM1182270     1  0.5193     0.0706 0.656 0.020 0.000 0.324
#> GSM1182271     1  0.6337     0.0478 0.552 0.068 0.000 0.380
#> GSM1182272     1  0.6347     0.0491 0.548 0.068 0.000 0.384
#> GSM1182273     3  0.0000     0.8273 0.000 0.000 1.000 0.000
#> GSM1182275     3  0.1256     0.8308 0.000 0.008 0.964 0.028
#> GSM1182276     2  0.4776     0.8548 0.000 0.712 0.272 0.016
#> GSM1182277     1  0.0188     0.3406 0.996 0.000 0.000 0.004
#> GSM1182278     1  0.0000     0.3424 1.000 0.000 0.000 0.000
#> GSM1182279     1  0.7220    -0.1924 0.440 0.140 0.000 0.420
#> GSM1182280     1  0.7206    -0.1468 0.460 0.140 0.000 0.400
#> GSM1182281     1  0.0469     0.3362 0.988 0.000 0.000 0.012
#> GSM1182282     1  0.0000     0.3424 1.000 0.000 0.000 0.000
#> GSM1182283     1  0.0000     0.3424 1.000 0.000 0.000 0.000
#> GSM1182284     1  0.0000     0.3424 1.000 0.000 0.000 0.000
#> GSM1182285     3  0.1452     0.8285 0.000 0.008 0.956 0.036
#> GSM1182286     2  0.5221     0.8614 0.000 0.732 0.208 0.060
#> GSM1182287     3  0.2480     0.7750 0.000 0.088 0.904 0.008
#> GSM1182288     3  0.1109     0.8306 0.000 0.004 0.968 0.028
#> GSM1182289     1  0.7220    -0.1924 0.440 0.140 0.000 0.420
#> GSM1182290     1  0.7206    -0.1468 0.460 0.140 0.000 0.400
#> GSM1182291     1  0.6347     0.0491 0.548 0.068 0.000 0.384
#> GSM1182274     3  0.0000     0.8273 0.000 0.000 1.000 0.000
#> GSM1182292     2  0.5599     0.8605 0.000 0.700 0.228 0.072
#> GSM1182293     2  0.4155     0.8752 0.000 0.756 0.240 0.004
#> GSM1182294     2  0.5024     0.7703 0.000 0.632 0.360 0.008
#> GSM1182295     2  0.4018     0.8691 0.000 0.772 0.224 0.004
#> GSM1182296     2  0.5221     0.8614 0.000 0.732 0.208 0.060
#> GSM1182298     3  0.2888     0.8007 0.000 0.004 0.872 0.124
#> GSM1182299     3  0.4361     0.6651 0.000 0.208 0.772 0.020
#> GSM1182300     2  0.6980     0.6826 0.000 0.536 0.332 0.132
#> GSM1182301     2  0.4671     0.8701 0.000 0.752 0.220 0.028
#> GSM1182303     2  0.5650     0.6427 0.000 0.544 0.432 0.024
#> GSM1182304     1  0.7206    -0.1468 0.460 0.140 0.000 0.400
#> GSM1182305     1  0.7179    -0.3285 0.480 0.140 0.000 0.380
#> GSM1182306     1  0.4907    -0.0649 0.580 0.000 0.000 0.420
#> GSM1182307     2  0.5394     0.8623 0.000 0.712 0.228 0.060
#> GSM1182309     2  0.5546     0.8540 0.000 0.680 0.268 0.052
#> GSM1182312     2  0.5343     0.8447 0.000 0.656 0.316 0.028
#> GSM1182314     1  0.6347     0.0491 0.548 0.068 0.000 0.384
#> GSM1182316     3  0.5888    -0.3314 0.000 0.424 0.540 0.036
#> GSM1182318     2  0.5250     0.8161 0.000 0.660 0.316 0.024
#> GSM1182319     3  0.6993     0.2145 0.000 0.296 0.556 0.148
#> GSM1182320     2  0.5987     0.6353 0.000 0.520 0.440 0.040
#> GSM1182321     3  0.6341     0.5232 0.000 0.212 0.652 0.136
#> GSM1182322     2  0.6840     0.4703 0.000 0.468 0.432 0.100
#> GSM1182324     3  0.3852     0.6317 0.000 0.180 0.808 0.012
#> GSM1182297     2  0.5257     0.8624 0.000 0.728 0.212 0.060
#> GSM1182302     4  0.4643     0.7362 0.344 0.000 0.000 0.656
#> GSM1182308     2  0.5195     0.8643 0.000 0.692 0.276 0.032
#> GSM1182310     3  0.5420     0.0474 0.000 0.352 0.624 0.024
#> GSM1182311     1  0.5193     0.0706 0.656 0.020 0.000 0.324
#> GSM1182313     1  0.6347     0.0491 0.548 0.068 0.000 0.384
#> GSM1182315     2  0.5386     0.8710 0.000 0.708 0.236 0.056
#> GSM1182317     2  0.4770     0.8470 0.000 0.700 0.288 0.012
#> GSM1182323     1  0.5193     0.0706 0.656 0.020 0.000 0.324

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4 p5
#> GSM1182186     1  0.6098     0.1524 0.568 0.000 0.000 0.236 NA
#> GSM1182187     4  0.5302     0.5684 0.344 0.000 0.000 0.592 NA
#> GSM1182188     4  0.1671     0.7677 0.076 0.000 0.000 0.924 NA
#> GSM1182189     1  0.0404     0.6061 0.988 0.000 0.000 0.012 NA
#> GSM1182190     1  0.0404     0.6061 0.988 0.000 0.000 0.012 NA
#> GSM1182191     1  0.6080     0.2260 0.568 0.000 0.000 0.184 NA
#> GSM1182192     1  0.6579     0.4446 0.580 0.000 0.032 0.220 NA
#> GSM1182193     1  0.6800     0.4131 0.540 0.000 0.032 0.256 NA
#> GSM1182194     3  0.5322     0.7724 0.000 0.140 0.672 0.000 NA
#> GSM1182195     3  0.5043     0.7635 0.000 0.136 0.704 0.000 NA
#> GSM1182196     3  0.6292     0.6636 0.000 0.268 0.560 0.008 NA
#> GSM1182197     3  0.5379     0.7901 0.000 0.168 0.668 0.000 NA
#> GSM1182198     3  0.5414     0.7563 0.000 0.140 0.660 0.000 NA
#> GSM1182199     3  0.5668     0.7491 0.000 0.144 0.624 0.000 NA
#> GSM1182200     3  0.6227     0.6234 0.000 0.296 0.568 0.016 NA
#> GSM1182201     3  0.4732     0.8218 0.000 0.144 0.744 0.004 NA
#> GSM1182202     4  0.5488     0.4416 0.428 0.000 0.000 0.508 NA
#> GSM1182203     4  0.5289     0.5725 0.340 0.000 0.000 0.596 NA
#> GSM1182204     4  0.5483     0.4458 0.424 0.000 0.000 0.512 NA
#> GSM1182205     3  0.4151     0.8345 0.000 0.156 0.788 0.012 NA
#> GSM1182206     3  0.5356     0.7439 0.000 0.252 0.672 0.044 NA
#> GSM1182207     1  0.3074     0.5369 0.804 0.000 0.000 0.000 NA
#> GSM1182208     1  0.3074     0.5369 0.804 0.000 0.000 0.000 NA
#> GSM1182209     2  0.3617     0.7515 0.000 0.824 0.128 0.004 NA
#> GSM1182210     2  0.0833     0.8188 0.000 0.976 0.016 0.004 NA
#> GSM1182211     2  0.0740     0.8202 0.000 0.980 0.008 0.004 NA
#> GSM1182212     2  0.6155    -0.2163 0.000 0.488 0.400 0.008 NA
#> GSM1182213     2  0.1329     0.8192 0.000 0.956 0.008 0.004 NA
#> GSM1182214     2  0.0486     0.8175 0.000 0.988 0.004 0.004 NA
#> GSM1182215     3  0.3684     0.8185 0.000 0.192 0.788 0.004 NA
#> GSM1182216     2  0.3795     0.7955 0.000 0.840 0.064 0.060 NA
#> GSM1182217     1  0.5423    -0.1747 0.548 0.000 0.000 0.388 NA
#> GSM1182218     1  0.0404     0.6061 0.988 0.000 0.000 0.012 NA
#> GSM1182219     2  0.1471     0.8210 0.000 0.952 0.020 0.004 NA
#> GSM1182220     2  0.1865     0.8216 0.000 0.936 0.024 0.008 NA
#> GSM1182221     2  0.3432     0.8019 0.000 0.860 0.052 0.060 NA
#> GSM1182222     2  0.4204     0.7751 0.000 0.808 0.104 0.060 NA
#> GSM1182223     3  0.3734     0.8289 0.000 0.168 0.796 0.000 NA
#> GSM1182224     3  0.4781     0.7957 0.000 0.160 0.728 0.000 NA
#> GSM1182225     2  0.3849     0.7909 0.000 0.832 0.084 0.060 NA
#> GSM1182226     2  0.5371     0.5300 0.000 0.656 0.268 0.060 NA
#> GSM1182227     1  0.6800     0.4149 0.540 0.000 0.032 0.256 NA
#> GSM1182228     3  0.5478     0.7951 0.000 0.164 0.656 0.000 NA
#> GSM1182229     3  0.3304     0.8258 0.000 0.168 0.816 0.000 NA
#> GSM1182230     3  0.3527     0.8217 0.000 0.192 0.792 0.000 NA
#> GSM1182231     3  0.4970     0.4971 0.000 0.392 0.580 0.008 NA
#> GSM1182232     1  0.2519     0.5620 0.884 0.000 0.000 0.100 NA
#> GSM1182233     1  0.0404     0.6063 0.988 0.000 0.000 0.012 NA
#> GSM1182234     1  0.6649     0.4372 0.568 0.000 0.032 0.232 NA
#> GSM1182235     2  0.2136     0.8143 0.000 0.904 0.000 0.008 NA
#> GSM1182236     1  0.0290     0.6065 0.992 0.000 0.000 0.008 NA
#> GSM1182237     3  0.6547     0.6086 0.000 0.308 0.516 0.012 NA
#> GSM1182238     2  0.2747     0.8139 0.000 0.896 0.048 0.036 NA
#> GSM1182239     2  0.6916    -0.0235 0.000 0.440 0.328 0.012 NA
#> GSM1182240     2  0.5457     0.5942 0.000 0.680 0.228 0.032 NA
#> GSM1182241     3  0.6343     0.7068 0.000 0.176 0.572 0.012 NA
#> GSM1182242     3  0.5446     0.7985 0.000 0.164 0.660 0.000 NA
#> GSM1182243     3  0.3304     0.8250 0.000 0.168 0.816 0.000 NA
#> GSM1182244     3  0.5048     0.8081 0.000 0.152 0.704 0.000 NA
#> GSM1182245     1  0.6790     0.4113 0.540 0.000 0.032 0.260 NA
#> GSM1182246     4  0.1792     0.7689 0.084 0.000 0.000 0.916 NA
#> GSM1182247     3  0.4138     0.8300 0.000 0.160 0.776 0.000 NA
#> GSM1182248     3  0.3691     0.8283 0.000 0.156 0.804 0.000 NA
#> GSM1182249     3  0.3807     0.7790 0.000 0.240 0.748 0.000 NA
#> GSM1182250     3  0.3011     0.8275 0.000 0.140 0.844 0.000 NA
#> GSM1182251     1  0.4763     0.4229 0.632 0.000 0.000 0.032 NA
#> GSM1182252     3  0.4317     0.8295 0.000 0.160 0.764 0.000 NA
#> GSM1182253     3  0.2843     0.8287 0.000 0.144 0.848 0.000 NA
#> GSM1182254     3  0.3506     0.8292 0.000 0.132 0.824 0.000 NA
#> GSM1182255     4  0.1965     0.7631 0.096 0.000 0.000 0.904 NA
#> GSM1182256     4  0.1671     0.7677 0.076 0.000 0.000 0.924 NA
#> GSM1182257     4  0.5302     0.5684 0.344 0.000 0.000 0.592 NA
#> GSM1182258     4  0.1792     0.7689 0.084 0.000 0.000 0.916 NA
#> GSM1182259     4  0.1732     0.7672 0.080 0.000 0.000 0.920 NA
#> GSM1182260     3  0.5155     0.7921 0.000 0.140 0.692 0.000 NA
#> GSM1182261     3  0.4495     0.8101 0.000 0.196 0.752 0.028 NA
#> GSM1182262     3  0.3360     0.8239 0.000 0.168 0.816 0.004 NA
#> GSM1182263     1  0.5580     0.4269 0.576 0.000 0.000 0.088 NA
#> GSM1182264     3  0.5190     0.7920 0.000 0.140 0.688 0.000 NA
#> GSM1182265     3  0.3081     0.8289 0.000 0.156 0.832 0.000 NA
#> GSM1182266     3  0.5224     0.7910 0.000 0.140 0.684 0.000 NA
#> GSM1182267     1  0.6555     0.4471 0.584 0.000 0.032 0.216 NA
#> GSM1182268     1  0.0290     0.6065 0.992 0.000 0.000 0.008 NA
#> GSM1182269     1  0.0404     0.6061 0.988 0.000 0.000 0.012 NA
#> GSM1182270     1  0.0510     0.6057 0.984 0.000 0.000 0.016 NA
#> GSM1182271     4  0.2732     0.7272 0.160 0.000 0.000 0.840 NA
#> GSM1182272     4  0.1732     0.7672 0.080 0.000 0.000 0.920 NA
#> GSM1182273     3  0.2920     0.8285 0.000 0.132 0.852 0.000 NA
#> GSM1182275     3  0.3595     0.8296 0.000 0.140 0.816 0.000 NA
#> GSM1182276     2  0.1743     0.8189 0.000 0.940 0.028 0.004 NA
#> GSM1182277     1  0.6579     0.4446 0.580 0.000 0.032 0.220 NA
#> GSM1182278     1  0.6752     0.4196 0.548 0.000 0.032 0.252 NA
#> GSM1182279     1  0.4836     0.4193 0.628 0.000 0.000 0.036 NA
#> GSM1182280     1  0.4118     0.4558 0.660 0.000 0.000 0.004 NA
#> GSM1182281     1  0.7405     0.3032 0.396 0.000 0.032 0.268 NA
#> GSM1182282     1  0.6800     0.4150 0.540 0.000 0.032 0.256 NA
#> GSM1182283     1  0.6772     0.4161 0.544 0.000 0.032 0.256 NA
#> GSM1182284     1  0.6808     0.4084 0.536 0.000 0.032 0.264 NA
#> GSM1182285     3  0.5237     0.7940 0.000 0.160 0.684 0.000 NA
#> GSM1182286     2  0.2304     0.8111 0.000 0.892 0.000 0.008 NA
#> GSM1182287     3  0.4052     0.8141 0.000 0.204 0.764 0.004 NA
#> GSM1182288     3  0.3810     0.8320 0.000 0.168 0.792 0.000 NA
#> GSM1182289     1  0.4836     0.4224 0.628 0.000 0.000 0.036 NA
#> GSM1182290     1  0.3074     0.5369 0.804 0.000 0.000 0.000 NA
#> GSM1182291     4  0.1732     0.7672 0.080 0.000 0.000 0.920 NA
#> GSM1182274     3  0.3400     0.8297 0.000 0.136 0.828 0.000 NA
#> GSM1182292     2  0.3056     0.8056 0.000 0.860 0.020 0.008 NA
#> GSM1182293     2  0.1173     0.8226 0.000 0.964 0.012 0.004 NA
#> GSM1182294     2  0.3732     0.6242 0.000 0.776 0.208 0.008 NA
#> GSM1182295     2  0.0324     0.8172 0.000 0.992 0.004 0.004 NA
#> GSM1182296     2  0.2136     0.8116 0.000 0.904 0.000 0.008 NA
#> GSM1182298     3  0.5806     0.7363 0.000 0.144 0.600 0.000 NA
#> GSM1182299     3  0.6147     0.5967 0.000 0.328 0.536 0.004 NA
#> GSM1182300     2  0.5967     0.5035 0.000 0.628 0.200 0.012 NA
#> GSM1182301     2  0.1978     0.8194 0.000 0.928 0.024 0.004 NA
#> GSM1182303     2  0.3839     0.7849 0.000 0.828 0.092 0.016 NA
#> GSM1182304     1  0.4524     0.4478 0.644 0.000 0.000 0.020 NA
#> GSM1182305     1  0.6767     0.0211 0.388 0.000 0.000 0.336 NA
#> GSM1182306     4  0.5302     0.5684 0.344 0.000 0.000 0.592 NA
#> GSM1182307     2  0.2354     0.8121 0.000 0.904 0.012 0.008 NA
#> GSM1182309     2  0.3248     0.8005 0.000 0.856 0.052 0.004 NA
#> GSM1182312     2  0.3216     0.8092 0.000 0.868 0.068 0.048 NA
#> GSM1182314     4  0.1792     0.7689 0.084 0.000 0.000 0.916 NA
#> GSM1182316     3  0.5843     0.3592 0.000 0.420 0.508 0.052 NA
#> GSM1182318     2  0.4359     0.6694 0.000 0.756 0.188 0.004 NA
#> GSM1182319     3  0.6657     0.4638 0.000 0.352 0.472 0.012 NA
#> GSM1182320     2  0.5579     0.5106 0.000 0.640 0.280 0.048 NA
#> GSM1182321     3  0.6178     0.6341 0.000 0.296 0.536 0.000 NA
#> GSM1182322     2  0.6658    -0.1611 0.000 0.452 0.388 0.016 NA
#> GSM1182324     3  0.4161     0.7246 0.000 0.280 0.704 0.000 NA
#> GSM1182297     2  0.2295     0.8131 0.000 0.900 0.004 0.008 NA
#> GSM1182302     4  0.5492     0.4363 0.432 0.000 0.000 0.504 NA
#> GSM1182308     2  0.3170     0.8133 0.000 0.876 0.048 0.036 NA
#> GSM1182310     3  0.5140     0.3316 0.000 0.444 0.524 0.008 NA
#> GSM1182311     1  0.0404     0.6056 0.988 0.000 0.000 0.012 NA
#> GSM1182313     4  0.1671     0.7677 0.076 0.000 0.000 0.924 NA
#> GSM1182315     2  0.2532     0.8227 0.000 0.908 0.028 0.028 NA
#> GSM1182317     2  0.3566     0.7146 0.000 0.812 0.160 0.004 NA
#> GSM1182323     1  0.0290     0.6065 0.992 0.000 0.000 0.008 NA

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5 p6
#> GSM1182186     5  0.3547      0.213 0.004 0.000 0.000 0.300 0.696 NA
#> GSM1182187     4  0.4945      0.617 0.004 0.008 0.000 0.632 0.292 NA
#> GSM1182188     4  0.0363      0.755 0.000 0.000 0.000 0.988 0.012 NA
#> GSM1182189     5  0.6045      0.541 0.224 0.012 0.000 0.004 0.532 NA
#> GSM1182190     5  0.6045      0.540 0.228 0.012 0.000 0.004 0.532 NA
#> GSM1182191     5  0.3383      0.274 0.004 0.000 0.000 0.268 0.728 NA
#> GSM1182192     1  0.5408      0.841 0.552 0.000 0.000 0.144 0.304 NA
#> GSM1182193     1  0.5461      0.882 0.572 0.000 0.000 0.200 0.228 NA
#> GSM1182194     3  0.4559      0.580 0.020 0.012 0.620 0.004 0.000 NA
#> GSM1182195     3  0.5008      0.570 0.072 0.012 0.648 0.004 0.000 NA
#> GSM1182196     3  0.5879      0.381 0.044 0.172 0.604 0.000 0.000 NA
#> GSM1182197     3  0.4990      0.597 0.084 0.056 0.712 0.000 0.000 NA
#> GSM1182198     3  0.5114      0.561 0.076 0.012 0.632 0.004 0.000 NA
#> GSM1182199     3  0.5307      0.552 0.080 0.012 0.592 0.004 0.000 NA
#> GSM1182200     3  0.6180      0.406 0.164 0.172 0.588 0.000 0.000 NA
#> GSM1182201     3  0.3975      0.639 0.044 0.036 0.788 0.000 0.000 NA
#> GSM1182202     4  0.5145      0.559 0.004 0.008 0.000 0.588 0.332 NA
#> GSM1182203     4  0.4772      0.649 0.004 0.008 0.000 0.668 0.256 NA
#> GSM1182204     4  0.5011      0.591 0.004 0.008 0.000 0.616 0.308 NA
#> GSM1182205     3  0.4025      0.645 0.048 0.000 0.720 0.000 0.000 NA
#> GSM1182206     3  0.6154      0.509 0.088 0.100 0.576 0.000 0.000 NA
#> GSM1182207     5  0.2378      0.551 0.152 0.000 0.000 0.000 0.848 NA
#> GSM1182208     5  0.2378      0.551 0.152 0.000 0.000 0.000 0.848 NA
#> GSM1182209     2  0.5057      0.646 0.040 0.592 0.340 0.000 0.000 NA
#> GSM1182210     2  0.2783      0.794 0.016 0.836 0.148 0.000 0.000 NA
#> GSM1182211     2  0.3784      0.797 0.024 0.736 0.236 0.000 0.000 NA
#> GSM1182212     3  0.6353     -0.191 0.136 0.384 0.436 0.000 0.000 NA
#> GSM1182213     2  0.4354      0.793 0.052 0.704 0.236 0.000 0.000 NA
#> GSM1182214     2  0.3221      0.801 0.004 0.772 0.220 0.000 0.000 NA
#> GSM1182215     3  0.4661      0.594 0.028 0.048 0.696 0.000 0.000 NA
#> GSM1182216     2  0.5203      0.770 0.140 0.656 0.188 0.000 0.000 NA
#> GSM1182217     4  0.5490      0.318 0.004 0.008 0.000 0.488 0.416 NA
#> GSM1182218     5  0.6045      0.540 0.228 0.012 0.000 0.004 0.532 NA
#> GSM1182219     2  0.3425      0.798 0.028 0.800 0.164 0.000 0.000 NA
#> GSM1182220     2  0.4044      0.803 0.060 0.756 0.176 0.000 0.000 NA
#> GSM1182221     2  0.5232      0.773 0.132 0.664 0.180 0.000 0.000 NA
#> GSM1182222     2  0.5444      0.743 0.120 0.604 0.260 0.000 0.000 NA
#> GSM1182223     3  0.3509      0.655 0.028 0.040 0.824 0.000 0.000 NA
#> GSM1182224     3  0.4172      0.621 0.016 0.012 0.672 0.000 0.000 NA
#> GSM1182225     2  0.5284      0.763 0.140 0.644 0.200 0.000 0.000 NA
#> GSM1182226     2  0.5518      0.705 0.116 0.564 0.308 0.000 0.000 NA
#> GSM1182227     1  0.5501      0.891 0.564 0.000 0.000 0.200 0.236 NA
#> GSM1182228     3  0.4310      0.637 0.024 0.028 0.712 0.000 0.000 NA
#> GSM1182229     3  0.2868      0.655 0.000 0.028 0.840 0.000 0.000 NA
#> GSM1182230     3  0.4133      0.612 0.020 0.024 0.724 0.000 0.000 NA
#> GSM1182231     3  0.5637      0.459 0.032 0.172 0.624 0.000 0.000 NA
#> GSM1182232     5  0.6715      0.421 0.248 0.012 0.000 0.040 0.492 NA
#> GSM1182233     5  0.5913      0.543 0.228 0.012 0.000 0.000 0.536 NA
#> GSM1182234     1  0.5408      0.840 0.552 0.000 0.000 0.144 0.304 NA
#> GSM1182235     2  0.4764      0.794 0.044 0.732 0.156 0.004 0.000 NA
#> GSM1182236     5  0.5913      0.543 0.228 0.012 0.000 0.000 0.536 NA
#> GSM1182237     3  0.6203      0.491 0.056 0.088 0.500 0.004 0.000 NA
#> GSM1182238     2  0.3964      0.801 0.048 0.764 0.176 0.000 0.000 NA
#> GSM1182239     3  0.6904      0.193 0.136 0.196 0.516 0.004 0.000 NA
#> GSM1182240     2  0.6061      0.575 0.104 0.472 0.384 0.000 0.000 NA
#> GSM1182241     3  0.5959      0.498 0.108 0.072 0.620 0.004 0.000 NA
#> GSM1182242     3  0.4161      0.636 0.004 0.012 0.608 0.000 0.000 NA
#> GSM1182243     3  0.3622      0.640 0.020 0.024 0.792 0.000 0.000 NA
#> GSM1182244     3  0.4507      0.631 0.020 0.012 0.596 0.000 0.000 NA
#> GSM1182245     1  0.5643      0.877 0.536 0.000 0.000 0.216 0.248 NA
#> GSM1182246     4  0.1418      0.754 0.024 0.000 0.000 0.944 0.032 NA
#> GSM1182247     3  0.3790      0.653 0.004 0.016 0.716 0.000 0.000 NA
#> GSM1182248     3  0.3198      0.644 0.000 0.000 0.740 0.000 0.000 NA
#> GSM1182249     3  0.4111      0.563 0.024 0.112 0.780 0.000 0.000 NA
#> GSM1182250     3  0.2492      0.659 0.020 0.004 0.876 0.000 0.000 NA
#> GSM1182251     5  0.1075      0.531 0.000 0.000 0.000 0.048 0.952 NA
#> GSM1182252     3  0.3684      0.643 0.004 0.004 0.692 0.000 0.000 NA
#> GSM1182253     3  0.2838      0.660 0.000 0.004 0.808 0.000 0.000 NA
#> GSM1182254     3  0.3373      0.654 0.012 0.032 0.816 0.000 0.000 NA
#> GSM1182255     4  0.1003      0.757 0.004 0.000 0.000 0.964 0.028 NA
#> GSM1182256     4  0.0458      0.757 0.000 0.000 0.000 0.984 0.016 NA
#> GSM1182257     4  0.4758      0.620 0.000 0.008 0.000 0.640 0.292 NA
#> GSM1182258     4  0.1168      0.754 0.016 0.000 0.000 0.956 0.028 NA
#> GSM1182259     4  0.0363      0.755 0.000 0.000 0.000 0.988 0.012 NA
#> GSM1182260     3  0.4260      0.618 0.016 0.024 0.692 0.000 0.000 NA
#> GSM1182261     3  0.5568      0.566 0.060 0.076 0.628 0.000 0.000 NA
#> GSM1182262     3  0.3942      0.626 0.020 0.024 0.752 0.000 0.000 NA
#> GSM1182263     5  0.1007      0.506 0.000 0.000 0.000 0.044 0.956 NA
#> GSM1182264     3  0.3790      0.625 0.016 0.004 0.716 0.000 0.000 NA
#> GSM1182265     3  0.3344      0.656 0.020 0.032 0.828 0.000 0.000 NA
#> GSM1182266     3  0.3767      0.623 0.016 0.004 0.720 0.000 0.000 NA
#> GSM1182267     1  0.5373      0.828 0.552 0.000 0.000 0.136 0.312 NA
#> GSM1182268     5  0.5913      0.543 0.228 0.012 0.000 0.000 0.536 NA
#> GSM1182269     5  0.6045      0.540 0.228 0.012 0.000 0.004 0.532 NA
#> GSM1182270     5  0.6045      0.543 0.228 0.012 0.000 0.004 0.532 NA
#> GSM1182271     4  0.2257      0.735 0.000 0.008 0.000 0.876 0.116 NA
#> GSM1182272     4  0.0363      0.755 0.000 0.000 0.000 0.988 0.012 NA
#> GSM1182273     3  0.2378      0.655 0.000 0.000 0.848 0.000 0.000 NA
#> GSM1182275     3  0.2573      0.666 0.012 0.012 0.872 0.000 0.000 NA
#> GSM1182276     2  0.5250      0.719 0.116 0.612 0.264 0.000 0.000 NA
#> GSM1182277     1  0.5391      0.832 0.552 0.000 0.000 0.140 0.308 NA
#> GSM1182278     1  0.5543      0.892 0.556 0.000 0.000 0.204 0.240 NA
#> GSM1182279     5  0.0547      0.544 0.000 0.000 0.000 0.020 0.980 NA
#> GSM1182280     5  0.0146      0.546 0.000 0.000 0.000 0.004 0.996 NA
#> GSM1182281     1  0.5958      0.611 0.392 0.000 0.000 0.220 0.388 NA
#> GSM1182282     1  0.5480      0.889 0.564 0.000 0.000 0.184 0.252 NA
#> GSM1182283     1  0.5546      0.889 0.556 0.000 0.000 0.208 0.236 NA
#> GSM1182284     1  0.5551      0.882 0.556 0.000 0.000 0.220 0.224 NA
#> GSM1182285     3  0.4497      0.602 0.020 0.012 0.600 0.000 0.000 NA
#> GSM1182286     2  0.4754      0.793 0.040 0.732 0.156 0.004 0.000 NA
#> GSM1182287     3  0.4104      0.614 0.048 0.108 0.788 0.000 0.000 NA
#> GSM1182288     3  0.3354      0.654 0.004 0.004 0.752 0.000 0.000 NA
#> GSM1182289     5  0.0632      0.541 0.000 0.000 0.000 0.024 0.976 NA
#> GSM1182290     5  0.2520      0.550 0.152 0.000 0.000 0.004 0.844 NA
#> GSM1182291     4  0.0363      0.755 0.000 0.000 0.000 0.988 0.012 NA
#> GSM1182274     3  0.3299      0.655 0.012 0.028 0.820 0.000 0.000 NA
#> GSM1182292     2  0.5860      0.739 0.060 0.592 0.268 0.004 0.000 NA
#> GSM1182293     2  0.3799      0.808 0.024 0.764 0.196 0.000 0.000 NA
#> GSM1182294     2  0.5583      0.620 0.024 0.580 0.292 0.000 0.000 NA
#> GSM1182295     2  0.2814      0.804 0.008 0.820 0.172 0.000 0.000 NA
#> GSM1182296     2  0.5009      0.796 0.040 0.700 0.188 0.004 0.000 NA
#> GSM1182298     3  0.5374      0.544 0.080 0.012 0.572 0.004 0.000 NA
#> GSM1182299     3  0.6241      0.348 0.116 0.216 0.576 0.000 0.000 NA
#> GSM1182300     2  0.6643      0.456 0.056 0.424 0.376 0.004 0.000 NA
#> GSM1182301     2  0.4584      0.790 0.040 0.688 0.248 0.000 0.000 NA
#> GSM1182303     2  0.5838      0.673 0.152 0.568 0.256 0.000 0.000 NA
#> GSM1182304     5  0.0146      0.546 0.000 0.000 0.000 0.004 0.996 NA
#> GSM1182305     5  0.3728      0.139 0.004 0.000 0.000 0.344 0.652 NA
#> GSM1182306     4  0.4758      0.620 0.000 0.008 0.000 0.640 0.292 NA
#> GSM1182307     2  0.4952      0.784 0.024 0.684 0.220 0.004 0.000 NA
#> GSM1182309     2  0.5398      0.704 0.020 0.600 0.284 0.000 0.000 NA
#> GSM1182312     2  0.5011      0.762 0.084 0.672 0.220 0.000 0.000 NA
#> GSM1182314     4  0.1245      0.755 0.016 0.000 0.000 0.952 0.032 NA
#> GSM1182316     3  0.5901     -0.140 0.108 0.340 0.520 0.000 0.000 NA
#> GSM1182318     2  0.5126      0.581 0.052 0.544 0.388 0.000 0.000 NA
#> GSM1182319     3  0.6255      0.125 0.036 0.264 0.536 0.004 0.000 NA
#> GSM1182320     3  0.6005     -0.433 0.108 0.416 0.444 0.000 0.000 NA
#> GSM1182321     3  0.5760      0.392 0.020 0.180 0.584 0.000 0.000 NA
#> GSM1182322     3  0.6278     -0.108 0.044 0.328 0.504 0.004 0.000 NA
#> GSM1182324     3  0.4355      0.474 0.012 0.176 0.736 0.000 0.000 NA
#> GSM1182297     2  0.4782      0.796 0.048 0.728 0.164 0.004 0.000 NA
#> GSM1182302     4  0.5090      0.584 0.004 0.008 0.000 0.604 0.316 NA
#> GSM1182308     2  0.4681      0.799 0.088 0.708 0.188 0.000 0.000 NA
#> GSM1182310     3  0.4601      0.182 0.020 0.308 0.644 0.000 0.000 NA
#> GSM1182311     5  0.6045      0.543 0.228 0.012 0.000 0.004 0.532 NA
#> GSM1182313     4  0.0622      0.756 0.008 0.000 0.000 0.980 0.012 NA
#> GSM1182315     2  0.4647      0.810 0.056 0.724 0.180 0.000 0.000 NA
#> GSM1182317     2  0.4651      0.615 0.012 0.588 0.372 0.000 0.000 NA
#> GSM1182323     5  0.5913      0.543 0.228 0.012 0.000 0.000 0.536 NA

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk SD-mclust-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk SD-mclust-collect-classes

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

test_to_known_factors(res)
#>             n disease.state(p) gender(p) k
#> SD:mclust 139         7.73e-02     1.000 2
#> SD:mclust 131         1.42e-04     0.298 3
#> SD:mclust  84         2.13e-04     0.175 4
#> SD:mclust 107         3.22e-04     0.311 5
#> SD:mclust 118         4.82e-05     0.423 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 46361 rows and 139 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 1.000           1.000       1.000         0.4791 0.521   0.521
#> 3 3 0.784           0.842       0.867         0.1113 0.991   0.983
#> 4 4 0.582           0.464       0.806         0.1638 0.994   0.989
#> 5 5 0.531           0.603       0.768         0.1029 0.812   0.631
#> 6 6 0.511           0.560       0.723         0.0668 0.878   0.651

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
#> GSM1182186     1       0          1  1  0
#> GSM1182187     1       0          1  1  0
#> GSM1182188     1       0          1  1  0
#> GSM1182189     1       0          1  1  0
#> GSM1182190     1       0          1  1  0
#> GSM1182191     1       0          1  1  0
#> GSM1182192     1       0          1  1  0
#> GSM1182193     1       0          1  1  0
#> GSM1182194     2       0          1  0  1
#> GSM1182195     2       0          1  0  1
#> GSM1182196     2       0          1  0  1
#> GSM1182197     2       0          1  0  1
#> GSM1182198     2       0          1  0  1
#> GSM1182199     2       0          1  0  1
#> GSM1182200     2       0          1  0  1
#> GSM1182201     2       0          1  0  1
#> GSM1182202     1       0          1  1  0
#> GSM1182203     1       0          1  1  0
#> GSM1182204     1       0          1  1  0
#> GSM1182205     2       0          1  0  1
#> GSM1182206     2       0          1  0  1
#> GSM1182207     1       0          1  1  0
#> GSM1182208     1       0          1  1  0
#> GSM1182209     2       0          1  0  1
#> GSM1182210     2       0          1  0  1
#> GSM1182211     2       0          1  0  1
#> GSM1182212     2       0          1  0  1
#> GSM1182213     2       0          1  0  1
#> GSM1182214     2       0          1  0  1
#> GSM1182215     2       0          1  0  1
#> GSM1182216     2       0          1  0  1
#> GSM1182217     1       0          1  1  0
#> GSM1182218     1       0          1  1  0
#> GSM1182219     2       0          1  0  1
#> GSM1182220     2       0          1  0  1
#> GSM1182221     2       0          1  0  1
#> GSM1182222     2       0          1  0  1
#> GSM1182223     2       0          1  0  1
#> GSM1182224     2       0          1  0  1
#> GSM1182225     2       0          1  0  1
#> GSM1182226     2       0          1  0  1
#> GSM1182227     1       0          1  1  0
#> GSM1182228     2       0          1  0  1
#> GSM1182229     2       0          1  0  1
#> GSM1182230     2       0          1  0  1
#> GSM1182231     2       0          1  0  1
#> GSM1182232     1       0          1  1  0
#> GSM1182233     1       0          1  1  0
#> GSM1182234     1       0          1  1  0
#> GSM1182235     2       0          1  0  1
#> GSM1182236     1       0          1  1  0
#> GSM1182237     2       0          1  0  1
#> GSM1182238     2       0          1  0  1
#> GSM1182239     2       0          1  0  1
#> GSM1182240     2       0          1  0  1
#> GSM1182241     2       0          1  0  1
#> GSM1182242     2       0          1  0  1
#> GSM1182243     2       0          1  0  1
#> GSM1182244     2       0          1  0  1
#> GSM1182245     1       0          1  1  0
#> GSM1182246     1       0          1  1  0
#> GSM1182247     2       0          1  0  1
#> GSM1182248     2       0          1  0  1
#> GSM1182249     2       0          1  0  1
#> GSM1182250     2       0          1  0  1
#> GSM1182251     1       0          1  1  0
#> GSM1182252     2       0          1  0  1
#> GSM1182253     2       0          1  0  1
#> GSM1182254     2       0          1  0  1
#> GSM1182255     1       0          1  1  0
#> GSM1182256     1       0          1  1  0
#> GSM1182257     1       0          1  1  0
#> GSM1182258     1       0          1  1  0
#> GSM1182259     1       0          1  1  0
#> GSM1182260     2       0          1  0  1
#> GSM1182261     2       0          1  0  1
#> GSM1182262     2       0          1  0  1
#> GSM1182263     1       0          1  1  0
#> GSM1182264     2       0          1  0  1
#> GSM1182265     2       0          1  0  1
#> GSM1182266     2       0          1  0  1
#> GSM1182267     1       0          1  1  0
#> GSM1182268     1       0          1  1  0
#> GSM1182269     1       0          1  1  0
#> GSM1182270     1       0          1  1  0
#> GSM1182271     1       0          1  1  0
#> GSM1182272     1       0          1  1  0
#> GSM1182273     2       0          1  0  1
#> GSM1182275     2       0          1  0  1
#> GSM1182276     2       0          1  0  1
#> GSM1182277     1       0          1  1  0
#> GSM1182278     1       0          1  1  0
#> GSM1182279     1       0          1  1  0
#> GSM1182280     1       0          1  1  0
#> GSM1182281     1       0          1  1  0
#> GSM1182282     1       0          1  1  0
#> GSM1182283     1       0          1  1  0
#> GSM1182284     1       0          1  1  0
#> GSM1182285     2       0          1  0  1
#> GSM1182286     2       0          1  0  1
#> GSM1182287     2       0          1  0  1
#> GSM1182288     2       0          1  0  1
#> GSM1182289     1       0          1  1  0
#> GSM1182290     1       0          1  1  0
#> GSM1182291     1       0          1  1  0
#> GSM1182274     2       0          1  0  1
#> GSM1182292     2       0          1  0  1
#> GSM1182293     2       0          1  0  1
#> GSM1182294     2       0          1  0  1
#> GSM1182295     2       0          1  0  1
#> GSM1182296     2       0          1  0  1
#> GSM1182298     2       0          1  0  1
#> GSM1182299     2       0          1  0  1
#> GSM1182300     2       0          1  0  1
#> GSM1182301     2       0          1  0  1
#> GSM1182303     2       0          1  0  1
#> GSM1182304     1       0          1  1  0
#> GSM1182305     1       0          1  1  0
#> GSM1182306     1       0          1  1  0
#> GSM1182307     2       0          1  0  1
#> GSM1182309     2       0          1  0  1
#> GSM1182312     2       0          1  0  1
#> GSM1182314     1       0          1  1  0
#> GSM1182316     2       0          1  0  1
#> GSM1182318     2       0          1  0  1
#> GSM1182319     2       0          1  0  1
#> GSM1182320     2       0          1  0  1
#> GSM1182321     2       0          1  0  1
#> GSM1182322     2       0          1  0  1
#> GSM1182324     2       0          1  0  1
#> GSM1182297     2       0          1  0  1
#> GSM1182302     1       0          1  1  0
#> GSM1182308     2       0          1  0  1
#> GSM1182310     2       0          1  0  1
#> GSM1182311     1       0          1  1  0
#> GSM1182313     1       0          1  1  0
#> GSM1182315     2       0          1  0  1
#> GSM1182317     2       0          1  0  1
#> GSM1182323     1       0          1  1  0

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1182186     1  0.3686      0.937 0.860 0.000 0.140
#> GSM1182187     1  0.2625      0.942 0.916 0.000 0.084
#> GSM1182188     1  0.0424      0.935 0.992 0.000 0.008
#> GSM1182189     1  0.3752      0.936 0.856 0.000 0.144
#> GSM1182190     1  0.3482      0.939 0.872 0.000 0.128
#> GSM1182191     1  0.3686      0.937 0.860 0.000 0.140
#> GSM1182192     1  0.1411      0.940 0.964 0.000 0.036
#> GSM1182193     1  0.0592      0.935 0.988 0.000 0.012
#> GSM1182194     2  0.3116      0.827 0.000 0.892 0.108
#> GSM1182195     2  0.3116      0.827 0.000 0.892 0.108
#> GSM1182196     2  0.0892      0.846 0.000 0.980 0.020
#> GSM1182197     2  0.0892      0.846 0.000 0.980 0.020
#> GSM1182198     2  0.3116      0.827 0.000 0.892 0.108
#> GSM1182199     2  0.3116      0.827 0.000 0.892 0.108
#> GSM1182200     2  0.4121      0.566 0.000 0.832 0.168
#> GSM1182201     2  0.1031      0.848 0.000 0.976 0.024
#> GSM1182202     1  0.3686      0.937 0.860 0.000 0.140
#> GSM1182203     1  0.2878      0.942 0.904 0.000 0.096
#> GSM1182204     1  0.2878      0.942 0.904 0.000 0.096
#> GSM1182205     2  0.2711      0.840 0.000 0.912 0.088
#> GSM1182206     2  0.2796      0.838 0.000 0.908 0.092
#> GSM1182207     1  0.3752      0.936 0.856 0.000 0.144
#> GSM1182208     1  0.3752      0.936 0.856 0.000 0.144
#> GSM1182209     3  0.6307      0.000 0.000 0.488 0.512
#> GSM1182210     2  0.0892      0.846 0.000 0.980 0.020
#> GSM1182211     2  0.4235      0.538 0.000 0.824 0.176
#> GSM1182212     2  0.5760     -0.336 0.000 0.672 0.328
#> GSM1182213     2  0.4002      0.589 0.000 0.840 0.160
#> GSM1182214     2  0.2356      0.788 0.000 0.928 0.072
#> GSM1182215     2  0.3116      0.827 0.000 0.892 0.108
#> GSM1182216     2  0.1643      0.855 0.000 0.956 0.044
#> GSM1182217     1  0.3686      0.937 0.860 0.000 0.140
#> GSM1182218     1  0.3551      0.939 0.868 0.000 0.132
#> GSM1182219     2  0.0892      0.846 0.000 0.980 0.020
#> GSM1182220     2  0.0892      0.846 0.000 0.980 0.020
#> GSM1182221     2  0.0237      0.854 0.000 0.996 0.004
#> GSM1182222     2  0.1643      0.854 0.000 0.956 0.044
#> GSM1182223     2  0.2796      0.838 0.000 0.908 0.092
#> GSM1182224     2  0.3116      0.827 0.000 0.892 0.108
#> GSM1182225     2  0.0892      0.856 0.000 0.980 0.020
#> GSM1182226     2  0.1753      0.854 0.000 0.952 0.048
#> GSM1182227     1  0.0592      0.935 0.988 0.000 0.012
#> GSM1182228     2  0.0892      0.846 0.000 0.980 0.020
#> GSM1182229     2  0.3116      0.827 0.000 0.892 0.108
#> GSM1182230     2  0.3116      0.827 0.000 0.892 0.108
#> GSM1182231     2  0.2066      0.850 0.000 0.940 0.060
#> GSM1182232     1  0.3412      0.940 0.876 0.000 0.124
#> GSM1182233     1  0.3686      0.937 0.860 0.000 0.140
#> GSM1182234     1  0.0237      0.936 0.996 0.000 0.004
#> GSM1182235     2  0.2165      0.798 0.000 0.936 0.064
#> GSM1182236     1  0.3619      0.938 0.864 0.000 0.136
#> GSM1182237     2  0.0592      0.855 0.000 0.988 0.012
#> GSM1182238     2  0.0892      0.846 0.000 0.980 0.020
#> GSM1182239     2  0.2711      0.760 0.000 0.912 0.088
#> GSM1182240     2  0.0747      0.848 0.000 0.984 0.016
#> GSM1182241     2  0.0892      0.846 0.000 0.980 0.020
#> GSM1182242     2  0.2261      0.848 0.000 0.932 0.068
#> GSM1182243     2  0.3116      0.827 0.000 0.892 0.108
#> GSM1182244     2  0.1163      0.857 0.000 0.972 0.028
#> GSM1182245     1  0.0592      0.935 0.988 0.000 0.012
#> GSM1182246     1  0.0592      0.935 0.988 0.000 0.012
#> GSM1182247     2  0.3116      0.827 0.000 0.892 0.108
#> GSM1182248     2  0.3116      0.827 0.000 0.892 0.108
#> GSM1182249     2  0.2625      0.842 0.000 0.916 0.084
#> GSM1182250     2  0.3038      0.830 0.000 0.896 0.104
#> GSM1182251     1  0.3686      0.937 0.860 0.000 0.140
#> GSM1182252     2  0.3116      0.827 0.000 0.892 0.108
#> GSM1182253     2  0.3116      0.827 0.000 0.892 0.108
#> GSM1182254     2  0.3116      0.827 0.000 0.892 0.108
#> GSM1182255     1  0.0592      0.935 0.988 0.000 0.012
#> GSM1182256     1  0.0592      0.935 0.988 0.000 0.012
#> GSM1182257     1  0.0892      0.939 0.980 0.000 0.020
#> GSM1182258     1  0.0592      0.935 0.988 0.000 0.012
#> GSM1182259     1  0.0592      0.935 0.988 0.000 0.012
#> GSM1182260     2  0.0747      0.856 0.000 0.984 0.016
#> GSM1182261     2  0.2959      0.832 0.000 0.900 0.100
#> GSM1182262     2  0.3116      0.827 0.000 0.892 0.108
#> GSM1182263     1  0.2796      0.943 0.908 0.000 0.092
#> GSM1182264     2  0.0592      0.852 0.000 0.988 0.012
#> GSM1182265     2  0.3116      0.827 0.000 0.892 0.108
#> GSM1182266     2  0.0747      0.855 0.000 0.984 0.016
#> GSM1182267     1  0.0592      0.935 0.988 0.000 0.012
#> GSM1182268     1  0.3686      0.937 0.860 0.000 0.140
#> GSM1182269     1  0.3267      0.940 0.884 0.000 0.116
#> GSM1182270     1  0.3752      0.936 0.856 0.000 0.144
#> GSM1182271     1  0.0592      0.935 0.988 0.000 0.012
#> GSM1182272     1  0.0592      0.935 0.988 0.000 0.012
#> GSM1182273     2  0.3116      0.827 0.000 0.892 0.108
#> GSM1182275     2  0.2448      0.849 0.000 0.924 0.076
#> GSM1182276     2  0.2878      0.745 0.000 0.904 0.096
#> GSM1182277     1  0.0592      0.935 0.988 0.000 0.012
#> GSM1182278     1  0.0592      0.935 0.988 0.000 0.012
#> GSM1182279     1  0.3686      0.938 0.860 0.000 0.140
#> GSM1182280     1  0.3752      0.936 0.856 0.000 0.144
#> GSM1182281     1  0.0592      0.935 0.988 0.000 0.012
#> GSM1182282     1  0.0592      0.935 0.988 0.000 0.012
#> GSM1182283     1  0.0592      0.935 0.988 0.000 0.012
#> GSM1182284     1  0.0592      0.935 0.988 0.000 0.012
#> GSM1182285     2  0.3116      0.827 0.000 0.892 0.108
#> GSM1182286     2  0.0892      0.846 0.000 0.980 0.020
#> GSM1182287     2  0.2711      0.840 0.000 0.912 0.088
#> GSM1182288     2  0.2878      0.835 0.000 0.904 0.096
#> GSM1182289     1  0.3686      0.937 0.860 0.000 0.140
#> GSM1182290     1  0.3752      0.936 0.856 0.000 0.144
#> GSM1182291     1  0.0592      0.935 0.988 0.000 0.012
#> GSM1182274     2  0.3116      0.827 0.000 0.892 0.108
#> GSM1182292     2  0.4555      0.447 0.000 0.800 0.200
#> GSM1182293     2  0.0892      0.846 0.000 0.980 0.020
#> GSM1182294     2  0.0892      0.846 0.000 0.980 0.020
#> GSM1182295     2  0.0892      0.846 0.000 0.980 0.020
#> GSM1182296     2  0.1163      0.840 0.000 0.972 0.028
#> GSM1182298     2  0.3116      0.827 0.000 0.892 0.108
#> GSM1182299     2  0.3192      0.713 0.000 0.888 0.112
#> GSM1182300     2  0.0892      0.846 0.000 0.980 0.020
#> GSM1182301     2  0.1031      0.843 0.000 0.976 0.024
#> GSM1182303     2  0.3267      0.706 0.000 0.884 0.116
#> GSM1182304     1  0.3752      0.936 0.856 0.000 0.144
#> GSM1182305     1  0.1411      0.940 0.964 0.000 0.036
#> GSM1182306     1  0.2165      0.942 0.936 0.000 0.064
#> GSM1182307     2  0.5098      0.203 0.000 0.752 0.248
#> GSM1182309     2  0.0892      0.846 0.000 0.980 0.020
#> GSM1182312     2  0.0892      0.846 0.000 0.980 0.020
#> GSM1182314     1  0.0592      0.935 0.988 0.000 0.012
#> GSM1182316     2  0.0592      0.855 0.000 0.988 0.012
#> GSM1182318     2  0.4702      0.395 0.000 0.788 0.212
#> GSM1182319     2  0.0892      0.846 0.000 0.980 0.020
#> GSM1182320     2  0.0424      0.853 0.000 0.992 0.008
#> GSM1182321     2  0.1411      0.856 0.000 0.964 0.036
#> GSM1182322     2  0.0892      0.846 0.000 0.980 0.020
#> GSM1182324     2  0.3116      0.827 0.000 0.892 0.108
#> GSM1182297     2  0.3267      0.704 0.000 0.884 0.116
#> GSM1182302     1  0.3619      0.938 0.864 0.000 0.136
#> GSM1182308     2  0.2066      0.804 0.000 0.940 0.060
#> GSM1182310     2  0.1753      0.854 0.000 0.952 0.048
#> GSM1182311     1  0.3686      0.939 0.860 0.000 0.140
#> GSM1182313     1  0.0592      0.935 0.988 0.000 0.012
#> GSM1182315     2  0.0892      0.846 0.000 0.980 0.020
#> GSM1182317     2  0.2448      0.781 0.000 0.924 0.076
#> GSM1182323     1  0.3752      0.936 0.856 0.000 0.144

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1182186     1  0.4841     0.6942 0.780 0.000 0.140 0.080
#> GSM1182187     1  0.3051     0.7727 0.884 0.000 0.088 0.028
#> GSM1182188     1  0.1610     0.7685 0.952 0.000 0.032 0.016
#> GSM1182189     1  0.4300     0.7189 0.820 0.000 0.092 0.088
#> GSM1182190     1  0.2473     0.7810 0.908 0.000 0.080 0.012
#> GSM1182191     1  0.5293     0.6394 0.748 0.000 0.152 0.100
#> GSM1182192     1  0.3674     0.7525 0.852 0.000 0.104 0.044
#> GSM1182193     1  0.5209     0.6475 0.756 0.000 0.104 0.140
#> GSM1182194     2  0.5004     0.3974 0.000 0.604 0.004 0.392
#> GSM1182195     2  0.4961     0.3362 0.000 0.552 0.000 0.448
#> GSM1182196     2  0.0921     0.5764 0.000 0.972 0.028 0.000
#> GSM1182197     2  0.2216     0.5264 0.000 0.908 0.092 0.000
#> GSM1182198     2  0.5000     0.2762 0.000 0.504 0.000 0.496
#> GSM1182199     2  0.4999     0.2825 0.000 0.508 0.000 0.492
#> GSM1182200     2  0.4103     0.1513 0.000 0.744 0.256 0.000
#> GSM1182201     2  0.2329     0.5729 0.000 0.916 0.072 0.012
#> GSM1182202     1  0.3278     0.7641 0.864 0.000 0.116 0.020
#> GSM1182203     1  0.1284     0.7719 0.964 0.000 0.024 0.012
#> GSM1182204     1  0.1510     0.7704 0.956 0.000 0.028 0.016
#> GSM1182205     2  0.3764     0.5711 0.000 0.784 0.000 0.216
#> GSM1182206     2  0.2773     0.6117 0.000 0.880 0.004 0.116
#> GSM1182207     1  0.7332    -0.5836 0.480 0.000 0.164 0.356
#> GSM1182208     4  0.7693     0.0000 0.352 0.000 0.224 0.424
#> GSM1182209     3  0.4992     0.0000 0.000 0.476 0.524 0.000
#> GSM1182210     2  0.3444     0.3423 0.000 0.816 0.184 0.000
#> GSM1182211     2  0.4972    -0.8039 0.000 0.544 0.456 0.000
#> GSM1182212     2  0.4972    -0.7876 0.000 0.544 0.456 0.000
#> GSM1182213     2  0.4898    -0.6675 0.000 0.584 0.416 0.000
#> GSM1182214     2  0.4948    -0.7564 0.000 0.560 0.440 0.000
#> GSM1182215     2  0.3539     0.5926 0.000 0.820 0.004 0.176
#> GSM1182216     2  0.5384     0.4004 0.000 0.728 0.196 0.076
#> GSM1182217     1  0.3325     0.7601 0.864 0.000 0.112 0.024
#> GSM1182218     1  0.1398     0.7859 0.956 0.000 0.040 0.004
#> GSM1182219     2  0.3311     0.3737 0.000 0.828 0.172 0.000
#> GSM1182220     2  0.4222     0.0265 0.000 0.728 0.272 0.000
#> GSM1182221     2  0.1576     0.5657 0.000 0.948 0.048 0.004
#> GSM1182222     2  0.3354     0.6039 0.000 0.872 0.044 0.084
#> GSM1182223     2  0.3706     0.6088 0.000 0.848 0.040 0.112
#> GSM1182224     2  0.4730     0.4346 0.000 0.636 0.000 0.364
#> GSM1182225     2  0.3638     0.5141 0.000 0.848 0.120 0.032
#> GSM1182226     2  0.1792     0.6136 0.000 0.932 0.000 0.068
#> GSM1182227     1  0.1004     0.7751 0.972 0.000 0.024 0.004
#> GSM1182228     2  0.1576     0.5641 0.000 0.948 0.048 0.004
#> GSM1182229     2  0.2973     0.6064 0.000 0.856 0.000 0.144
#> GSM1182230     2  0.3400     0.5932 0.000 0.820 0.000 0.180
#> GSM1182231     2  0.2216     0.6143 0.000 0.908 0.000 0.092
#> GSM1182232     1  0.3674     0.7528 0.852 0.000 0.104 0.044
#> GSM1182233     1  0.4982     0.6743 0.772 0.000 0.136 0.092
#> GSM1182234     1  0.2565     0.7764 0.912 0.000 0.032 0.056
#> GSM1182235     2  0.4222     0.0117 0.000 0.728 0.272 0.000
#> GSM1182236     1  0.3166     0.7586 0.868 0.000 0.116 0.016
#> GSM1182237     2  0.0937     0.5904 0.000 0.976 0.012 0.012
#> GSM1182238     2  0.3610     0.2974 0.000 0.800 0.200 0.000
#> GSM1182239     2  0.3801     0.2378 0.000 0.780 0.220 0.000
#> GSM1182240     2  0.4155     0.1686 0.000 0.756 0.240 0.004
#> GSM1182241     2  0.1661     0.5609 0.000 0.944 0.052 0.004
#> GSM1182242     2  0.2216     0.6169 0.000 0.908 0.000 0.092
#> GSM1182243     2  0.3208     0.6038 0.000 0.848 0.004 0.148
#> GSM1182244     2  0.2469     0.6050 0.000 0.892 0.000 0.108
#> GSM1182245     1  0.3004     0.7765 0.892 0.000 0.048 0.060
#> GSM1182246     1  0.1913     0.7663 0.940 0.000 0.040 0.020
#> GSM1182247     2  0.3790     0.5934 0.000 0.820 0.016 0.164
#> GSM1182248     2  0.4262     0.5515 0.000 0.756 0.008 0.236
#> GSM1182249     2  0.2345     0.6146 0.000 0.900 0.000 0.100
#> GSM1182250     2  0.3356     0.5975 0.000 0.824 0.000 0.176
#> GSM1182251     1  0.4869     0.6834 0.780 0.000 0.132 0.088
#> GSM1182252     2  0.3907     0.5612 0.000 0.768 0.000 0.232
#> GSM1182253     2  0.4720     0.4731 0.000 0.672 0.004 0.324
#> GSM1182254     2  0.3718     0.5930 0.000 0.820 0.012 0.168
#> GSM1182255     1  0.1677     0.7637 0.948 0.000 0.040 0.012
#> GSM1182256     1  0.1798     0.7646 0.944 0.000 0.040 0.016
#> GSM1182257     1  0.1151     0.7770 0.968 0.000 0.024 0.008
#> GSM1182258     1  0.1174     0.7797 0.968 0.000 0.020 0.012
#> GSM1182259     1  0.1584     0.7645 0.952 0.000 0.036 0.012
#> GSM1182260     2  0.2271     0.6003 0.000 0.916 0.008 0.076
#> GSM1182261     2  0.2814     0.6091 0.000 0.868 0.000 0.132
#> GSM1182262     2  0.3123     0.6020 0.000 0.844 0.000 0.156
#> GSM1182263     1  0.5171     0.6613 0.760 0.000 0.112 0.128
#> GSM1182264     2  0.4175     0.4725 0.000 0.776 0.012 0.212
#> GSM1182265     2  0.4477     0.4880 0.000 0.688 0.000 0.312
#> GSM1182266     2  0.3032     0.5744 0.000 0.868 0.008 0.124
#> GSM1182267     1  0.3312     0.7619 0.876 0.000 0.052 0.072
#> GSM1182268     1  0.4969     0.6701 0.772 0.000 0.140 0.088
#> GSM1182269     1  0.4646     0.7039 0.796 0.000 0.120 0.084
#> GSM1182270     1  0.4609     0.7169 0.788 0.000 0.156 0.056
#> GSM1182271     1  0.1584     0.7651 0.952 0.000 0.036 0.012
#> GSM1182272     1  0.1584     0.7645 0.952 0.000 0.036 0.012
#> GSM1182273     2  0.4916     0.3654 0.000 0.576 0.000 0.424
#> GSM1182275     2  0.2924     0.6151 0.000 0.884 0.016 0.100
#> GSM1182276     2  0.4624    -0.3162 0.000 0.660 0.340 0.000
#> GSM1182277     1  0.1109     0.7855 0.968 0.000 0.028 0.004
#> GSM1182278     1  0.1406     0.7786 0.960 0.000 0.024 0.016
#> GSM1182279     1  0.5674     0.5808 0.720 0.000 0.148 0.132
#> GSM1182280     1  0.6457     0.3256 0.644 0.000 0.156 0.200
#> GSM1182281     1  0.1624     0.7791 0.952 0.000 0.028 0.020
#> GSM1182282     1  0.2675     0.7809 0.908 0.000 0.048 0.044
#> GSM1182283     1  0.2500     0.7841 0.916 0.000 0.040 0.044
#> GSM1182284     1  0.1209     0.7740 0.964 0.000 0.032 0.004
#> GSM1182285     2  0.4406     0.5021 0.000 0.700 0.000 0.300
#> GSM1182286     2  0.3569     0.3117 0.000 0.804 0.196 0.000
#> GSM1182287     2  0.3899     0.6061 0.000 0.840 0.052 0.108
#> GSM1182288     2  0.3610     0.5829 0.000 0.800 0.000 0.200
#> GSM1182289     1  0.5375     0.6312 0.744 0.000 0.140 0.116
#> GSM1182290     1  0.7304    -0.5487 0.492 0.000 0.164 0.344
#> GSM1182291     1  0.1677     0.7637 0.948 0.000 0.040 0.012
#> GSM1182274     2  0.3942     0.5582 0.000 0.764 0.000 0.236
#> GSM1182292     2  0.4955    -0.7626 0.000 0.556 0.444 0.000
#> GSM1182293     2  0.2345     0.5041 0.000 0.900 0.100 0.000
#> GSM1182294     2  0.1022     0.5736 0.000 0.968 0.032 0.000
#> GSM1182295     2  0.3024     0.4230 0.000 0.852 0.148 0.000
#> GSM1182296     2  0.3837     0.2294 0.000 0.776 0.224 0.000
#> GSM1182298     2  0.4996     0.2901 0.000 0.516 0.000 0.484
#> GSM1182299     2  0.3400     0.3793 0.000 0.820 0.180 0.000
#> GSM1182300     2  0.2408     0.4986 0.000 0.896 0.104 0.000
#> GSM1182301     2  0.4193     0.0354 0.000 0.732 0.268 0.000
#> GSM1182303     2  0.4624    -0.3158 0.000 0.660 0.340 0.000
#> GSM1182304     1  0.6025     0.5072 0.688 0.000 0.172 0.140
#> GSM1182305     1  0.4599     0.7113 0.800 0.000 0.112 0.088
#> GSM1182306     1  0.2060     0.7835 0.932 0.000 0.052 0.016
#> GSM1182307     2  0.4999    -0.9123 0.000 0.508 0.492 0.000
#> GSM1182309     2  0.2216     0.5213 0.000 0.908 0.092 0.000
#> GSM1182312     2  0.1302     0.5666 0.000 0.956 0.044 0.000
#> GSM1182314     1  0.1929     0.7689 0.940 0.000 0.036 0.024
#> GSM1182316     2  0.0672     0.5973 0.000 0.984 0.008 0.008
#> GSM1182318     2  0.4843    -0.5477 0.000 0.604 0.396 0.000
#> GSM1182319     2  0.1733     0.5878 0.000 0.948 0.024 0.028
#> GSM1182320     2  0.1211     0.6077 0.000 0.960 0.000 0.040
#> GSM1182321     2  0.2124     0.6061 0.000 0.924 0.008 0.068
#> GSM1182322     2  0.2635     0.5747 0.000 0.904 0.020 0.076
#> GSM1182324     2  0.3494     0.5962 0.000 0.824 0.004 0.172
#> GSM1182297     2  0.4679    -0.3998 0.000 0.648 0.352 0.000
#> GSM1182302     1  0.1938     0.7815 0.936 0.000 0.052 0.012
#> GSM1182308     2  0.4431    -0.1678 0.000 0.696 0.304 0.000
#> GSM1182310     2  0.2589     0.6022 0.000 0.884 0.000 0.116
#> GSM1182311     1  0.5102     0.6664 0.764 0.000 0.136 0.100
#> GSM1182313     1  0.1798     0.7646 0.944 0.000 0.040 0.016
#> GSM1182315     2  0.3539     0.3683 0.000 0.820 0.176 0.004
#> GSM1182317     2  0.4250     0.0453 0.000 0.724 0.276 0.000
#> GSM1182323     1  0.3856     0.7344 0.832 0.000 0.136 0.032

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1182186     1  0.3969     0.6451 0.692 0.004 0.000 0.304 0.000
#> GSM1182187     1  0.2813     0.7334 0.832 0.000 0.000 0.168 0.000
#> GSM1182188     1  0.1502     0.7338 0.940 0.000 0.000 0.056 0.004
#> GSM1182189     1  0.4540     0.5961 0.640 0.000 0.000 0.340 0.020
#> GSM1182190     1  0.4212     0.7031 0.736 0.004 0.000 0.236 0.024
#> GSM1182191     1  0.4438     0.5484 0.608 0.004 0.000 0.384 0.004
#> GSM1182192     1  0.3167     0.7447 0.820 0.004 0.000 0.172 0.004
#> GSM1182193     1  0.4323     0.7107 0.744 0.012 0.000 0.220 0.024
#> GSM1182194     3  0.2574     0.6213 0.000 0.012 0.876 0.000 0.112
#> GSM1182195     3  0.2179     0.5989 0.000 0.000 0.896 0.004 0.100
#> GSM1182196     3  0.4297     0.5148 0.000 0.288 0.692 0.000 0.020
#> GSM1182197     3  0.4602     0.6031 0.000 0.240 0.708 0.000 0.052
#> GSM1182198     3  0.3160     0.4569 0.000 0.000 0.808 0.004 0.188
#> GSM1182199     3  0.3047     0.5084 0.000 0.004 0.832 0.004 0.160
#> GSM1182200     3  0.5538     0.3999 0.000 0.312 0.596 0.000 0.092
#> GSM1182201     3  0.4791     0.6748 0.000 0.132 0.740 0.004 0.124
#> GSM1182202     1  0.3300     0.7048 0.792 0.004 0.000 0.204 0.000
#> GSM1182203     1  0.2424     0.7296 0.868 0.000 0.000 0.132 0.000
#> GSM1182204     1  0.2561     0.7284 0.856 0.000 0.000 0.144 0.000
#> GSM1182205     3  0.1830     0.6994 0.000 0.028 0.932 0.000 0.040
#> GSM1182206     3  0.2570     0.7240 0.000 0.108 0.880 0.004 0.008
#> GSM1182207     4  0.4157     0.8669 0.264 0.000 0.000 0.716 0.020
#> GSM1182208     4  0.4230     0.8140 0.168 0.008 0.000 0.776 0.048
#> GSM1182209     2  0.1704     0.4907 0.000 0.928 0.068 0.000 0.004
#> GSM1182210     2  0.4227     0.5028 0.000 0.580 0.420 0.000 0.000
#> GSM1182211     2  0.2249     0.5319 0.000 0.896 0.096 0.000 0.008
#> GSM1182212     2  0.5044     0.2295 0.000 0.504 0.464 0.000 0.032
#> GSM1182213     2  0.4161     0.5230 0.000 0.608 0.392 0.000 0.000
#> GSM1182214     2  0.1965     0.5375 0.000 0.904 0.096 0.000 0.000
#> GSM1182215     3  0.2359     0.7195 0.000 0.060 0.904 0.000 0.036
#> GSM1182216     2  0.4118     0.5019 0.000 0.660 0.336 0.000 0.004
#> GSM1182217     1  0.3010     0.7298 0.824 0.000 0.000 0.172 0.004
#> GSM1182218     1  0.3621     0.7310 0.788 0.000 0.000 0.192 0.020
#> GSM1182219     3  0.4242     0.1181 0.000 0.428 0.572 0.000 0.000
#> GSM1182220     3  0.4653    -0.1144 0.000 0.472 0.516 0.000 0.012
#> GSM1182221     2  0.3861     0.5512 0.000 0.712 0.284 0.000 0.004
#> GSM1182222     3  0.3611     0.6423 0.000 0.208 0.780 0.004 0.008
#> GSM1182223     3  0.3558     0.7234 0.000 0.108 0.828 0.000 0.064
#> GSM1182224     3  0.1864     0.6499 0.000 0.004 0.924 0.004 0.068
#> GSM1182225     3  0.4196     0.3060 0.000 0.356 0.640 0.000 0.004
#> GSM1182226     3  0.4564     0.2107 0.000 0.372 0.612 0.000 0.016
#> GSM1182227     1  0.3653     0.7207 0.828 0.012 0.000 0.124 0.036
#> GSM1182228     3  0.3675     0.6788 0.000 0.188 0.788 0.000 0.024
#> GSM1182229     3  0.2233     0.7297 0.000 0.080 0.904 0.000 0.016
#> GSM1182230     3  0.2171     0.7247 0.000 0.064 0.912 0.000 0.024
#> GSM1182231     3  0.2629     0.7119 0.000 0.136 0.860 0.000 0.004
#> GSM1182232     1  0.3662     0.7153 0.744 0.000 0.000 0.252 0.004
#> GSM1182233     1  0.4182     0.5952 0.644 0.000 0.000 0.352 0.004
#> GSM1182234     1  0.4407     0.7067 0.764 0.016 0.000 0.180 0.040
#> GSM1182235     2  0.3730     0.6331 0.000 0.712 0.288 0.000 0.000
#> GSM1182236     1  0.3967     0.7003 0.724 0.000 0.000 0.264 0.012
#> GSM1182237     3  0.3805     0.6749 0.000 0.184 0.784 0.000 0.032
#> GSM1182238     2  0.3398     0.6183 0.000 0.780 0.216 0.000 0.004
#> GSM1182239     2  0.4451     0.2212 0.000 0.504 0.492 0.000 0.004
#> GSM1182240     3  0.4659    -0.2463 0.000 0.492 0.496 0.000 0.012
#> GSM1182241     3  0.3961     0.6083 0.000 0.248 0.736 0.000 0.016
#> GSM1182242     3  0.2813     0.7173 0.000 0.048 0.884 0.004 0.064
#> GSM1182243     3  0.2623     0.7297 0.000 0.096 0.884 0.004 0.016
#> GSM1182244     3  0.3090     0.7231 0.000 0.104 0.856 0.000 0.040
#> GSM1182245     1  0.3541     0.7516 0.824 0.012 0.000 0.144 0.020
#> GSM1182246     1  0.1331     0.7195 0.952 0.000 0.000 0.040 0.008
#> GSM1182247     3  0.3413     0.6666 0.000 0.044 0.832 0.000 0.124
#> GSM1182248     3  0.2233     0.6390 0.000 0.000 0.892 0.004 0.104
#> GSM1182249     3  0.3060     0.7117 0.000 0.128 0.848 0.000 0.024
#> GSM1182250     3  0.1831     0.7274 0.000 0.076 0.920 0.000 0.004
#> GSM1182251     1  0.4387     0.5909 0.640 0.000 0.000 0.348 0.012
#> GSM1182252     3  0.1915     0.7135 0.000 0.032 0.928 0.000 0.040
#> GSM1182253     3  0.1740     0.6739 0.000 0.012 0.932 0.000 0.056
#> GSM1182254     3  0.2608     0.6741 0.000 0.020 0.888 0.004 0.088
#> GSM1182255     1  0.0955     0.7205 0.968 0.000 0.000 0.028 0.004
#> GSM1182256     1  0.1357     0.7123 0.948 0.000 0.000 0.048 0.004
#> GSM1182257     1  0.0794     0.7283 0.972 0.000 0.000 0.028 0.000
#> GSM1182258     1  0.1282     0.7320 0.952 0.000 0.000 0.044 0.004
#> GSM1182259     1  0.1894     0.7004 0.920 0.000 0.000 0.072 0.008
#> GSM1182260     3  0.2645     0.7141 0.000 0.068 0.888 0.000 0.044
#> GSM1182261     3  0.2077     0.7276 0.000 0.084 0.908 0.000 0.008
#> GSM1182262     3  0.1990     0.7281 0.000 0.068 0.920 0.004 0.008
#> GSM1182263     1  0.4348     0.6388 0.668 0.000 0.000 0.316 0.016
#> GSM1182264     3  0.3334     0.6939 0.000 0.080 0.852 0.004 0.064
#> GSM1182265     3  0.3169     0.6911 0.000 0.060 0.856 0.000 0.084
#> GSM1182266     3  0.3333     0.6959 0.000 0.060 0.856 0.008 0.076
#> GSM1182267     1  0.3495     0.7318 0.812 0.000 0.000 0.160 0.028
#> GSM1182268     1  0.4726     0.6296 0.644 0.004 0.000 0.328 0.024
#> GSM1182269     1  0.4674     0.6469 0.676 0.008 0.000 0.292 0.024
#> GSM1182270     1  0.4251     0.6401 0.672 0.000 0.000 0.316 0.012
#> GSM1182271     1  0.1124     0.7220 0.960 0.000 0.000 0.036 0.004
#> GSM1182272     1  0.1830     0.7004 0.924 0.000 0.000 0.068 0.008
#> GSM1182273     3  0.1952     0.6326 0.000 0.000 0.912 0.004 0.084
#> GSM1182275     3  0.3532     0.7225 0.000 0.092 0.832 0.000 0.076
#> GSM1182276     3  0.4904    -0.1306 0.000 0.472 0.504 0.000 0.024
#> GSM1182277     1  0.2720     0.7325 0.880 0.004 0.000 0.096 0.020
#> GSM1182278     1  0.2886     0.7351 0.864 0.004 0.000 0.116 0.016
#> GSM1182279     1  0.4928     0.5185 0.596 0.008 0.000 0.376 0.020
#> GSM1182280     1  0.4383     0.4473 0.572 0.000 0.000 0.424 0.004
#> GSM1182281     1  0.2069     0.7131 0.912 0.000 0.000 0.076 0.012
#> GSM1182282     1  0.3692     0.7339 0.812 0.008 0.000 0.152 0.028
#> GSM1182283     1  0.3194     0.7502 0.832 0.000 0.000 0.148 0.020
#> GSM1182284     1  0.3241     0.7209 0.856 0.008 0.000 0.100 0.036
#> GSM1182285     3  0.1197     0.6668 0.000 0.000 0.952 0.000 0.048
#> GSM1182286     2  0.4171     0.5575 0.000 0.604 0.396 0.000 0.000
#> GSM1182287     3  0.3291     0.7230 0.000 0.120 0.840 0.000 0.040
#> GSM1182288     3  0.1710     0.6934 0.000 0.016 0.940 0.004 0.040
#> GSM1182289     1  0.4564     0.5374 0.600 0.004 0.000 0.388 0.008
#> GSM1182290     4  0.4169     0.8771 0.256 0.004 0.000 0.724 0.016
#> GSM1182291     1  0.0955     0.7205 0.968 0.000 0.000 0.028 0.004
#> GSM1182274     3  0.2756     0.6995 0.000 0.036 0.892 0.012 0.060
#> GSM1182292     2  0.3861     0.6086 0.000 0.712 0.284 0.000 0.004
#> GSM1182293     2  0.3906     0.6208 0.000 0.704 0.292 0.000 0.004
#> GSM1182294     3  0.4902     0.0894 0.000 0.408 0.564 0.000 0.028
#> GSM1182295     2  0.4150     0.5800 0.000 0.612 0.388 0.000 0.000
#> GSM1182296     2  0.4171     0.5524 0.000 0.604 0.396 0.000 0.000
#> GSM1182298     3  0.3715     0.2570 0.000 0.004 0.736 0.000 0.260
#> GSM1182299     3  0.4985     0.2039 0.000 0.392 0.580 0.012 0.016
#> GSM1182300     3  0.4415     0.0141 0.000 0.444 0.552 0.000 0.004
#> GSM1182301     2  0.4464     0.4954 0.000 0.584 0.408 0.000 0.008
#> GSM1182303     3  0.5009     0.0745 0.000 0.428 0.540 0.000 0.032
#> GSM1182304     1  0.4359     0.4806 0.584 0.000 0.000 0.412 0.004
#> GSM1182305     1  0.4295     0.6894 0.724 0.004 0.000 0.248 0.024
#> GSM1182306     1  0.2230     0.7391 0.884 0.000 0.000 0.116 0.000
#> GSM1182307     2  0.1768     0.4986 0.000 0.924 0.072 0.000 0.004
#> GSM1182309     2  0.3988     0.5599 0.000 0.768 0.196 0.000 0.036
#> GSM1182312     2  0.3663     0.5309 0.000 0.776 0.208 0.000 0.016
#> GSM1182314     1  0.1205     0.7293 0.956 0.000 0.000 0.040 0.004
#> GSM1182316     2  0.5263     0.4025 0.000 0.576 0.368 0.000 0.056
#> GSM1182318     2  0.2193     0.5247 0.000 0.900 0.092 0.000 0.008
#> GSM1182319     5  0.6500     0.7987 0.000 0.236 0.276 0.000 0.488
#> GSM1182320     2  0.4969     0.3721 0.000 0.652 0.292 0.000 0.056
#> GSM1182321     3  0.4872     0.5631 0.000 0.120 0.720 0.000 0.160
#> GSM1182322     5  0.6287     0.8226 0.000 0.240 0.224 0.000 0.536
#> GSM1182324     3  0.2953     0.7205 0.000 0.100 0.868 0.004 0.028
#> GSM1182297     2  0.2516     0.5792 0.000 0.860 0.140 0.000 0.000
#> GSM1182302     1  0.2280     0.7303 0.880 0.000 0.000 0.120 0.000
#> GSM1182308     2  0.4416     0.5943 0.000 0.632 0.356 0.000 0.012
#> GSM1182310     5  0.6021     0.8098 0.000 0.144 0.304 0.000 0.552
#> GSM1182311     1  0.4492     0.6664 0.680 0.004 0.000 0.296 0.020
#> GSM1182313     1  0.2006     0.7084 0.916 0.000 0.000 0.072 0.012
#> GSM1182315     2  0.2848     0.5538 0.000 0.840 0.156 0.000 0.004
#> GSM1182317     2  0.2068     0.5213 0.000 0.904 0.092 0.000 0.004
#> GSM1182323     1  0.3928     0.6631 0.700 0.004 0.000 0.296 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
#> GSM1182186     5  0.4199     0.6575 0.000 0.000 0.000 0.380 0.600 NA
#> GSM1182187     4  0.3725     0.3984 0.000 0.000 0.000 0.676 0.316 NA
#> GSM1182188     4  0.2662     0.6106 0.004 0.000 0.000 0.840 0.152 NA
#> GSM1182189     5  0.4376     0.6366 0.012 0.000 0.000 0.384 0.592 NA
#> GSM1182190     5  0.4576     0.5839 0.008 0.000 0.000 0.412 0.556 NA
#> GSM1182191     5  0.3912     0.7114 0.000 0.000 0.000 0.340 0.648 NA
#> GSM1182192     4  0.4242    -0.3106 0.000 0.000 0.000 0.536 0.448 NA
#> GSM1182193     5  0.4712     0.5131 0.004 0.000 0.000 0.448 0.512 NA
#> GSM1182194     3  0.3254     0.6907 0.052 0.004 0.836 0.000 0.004 NA
#> GSM1182195     3  0.1845     0.6802 0.052 0.000 0.920 0.000 0.000 NA
#> GSM1182196     3  0.5120     0.0797 0.052 0.408 0.528 0.000 0.004 NA
#> GSM1182197     3  0.5716     0.4921 0.028 0.280 0.576 0.000 0.000 NA
#> GSM1182198     3  0.3516     0.5581 0.164 0.000 0.788 0.000 0.000 NA
#> GSM1182199     3  0.3102     0.6162 0.156 0.000 0.816 0.000 0.000 NA
#> GSM1182200     3  0.6069     0.4201 0.012 0.268 0.520 0.000 0.004 NA
#> GSM1182201     3  0.5183     0.5849 0.000 0.140 0.604 0.000 0.000 NA
#> GSM1182202     4  0.4019     0.3717 0.004 0.000 0.000 0.652 0.332 NA
#> GSM1182203     4  0.3672     0.4853 0.004 0.000 0.000 0.712 0.276 NA
#> GSM1182204     4  0.3452     0.5225 0.004 0.000 0.000 0.736 0.256 NA
#> GSM1182205     3  0.1944     0.7268 0.036 0.024 0.924 0.000 0.000 NA
#> GSM1182206     3  0.2805     0.6927 0.012 0.160 0.828 0.000 0.000 NA
#> GSM1182207     5  0.4079     0.5188 0.000 0.000 0.000 0.136 0.752 NA
#> GSM1182208     5  0.4374     0.3881 0.000 0.000 0.000 0.096 0.712 NA
#> GSM1182209     2  0.1268     0.4957 0.004 0.952 0.008 0.000 0.000 NA
#> GSM1182210     2  0.3380     0.7149 0.004 0.748 0.244 0.000 0.000 NA
#> GSM1182211     2  0.1478     0.5605 0.004 0.944 0.032 0.000 0.000 NA
#> GSM1182212     2  0.4882     0.4386 0.004 0.540 0.404 0.000 0.000 NA
#> GSM1182213     2  0.3606     0.7040 0.004 0.724 0.264 0.000 0.000 NA
#> GSM1182214     2  0.1788     0.6351 0.004 0.916 0.076 0.000 0.000 NA
#> GSM1182215     3  0.2886     0.7221 0.072 0.064 0.860 0.000 0.000 NA
#> GSM1182216     2  0.4867     0.5602 0.012 0.600 0.340 0.000 0.000 NA
#> GSM1182217     4  0.3921     0.4281 0.004 0.000 0.000 0.676 0.308 NA
#> GSM1182218     4  0.4832    -0.1039 0.016 0.000 0.000 0.532 0.424 NA
#> GSM1182219     2  0.4268     0.4203 0.012 0.556 0.428 0.000 0.000 NA
#> GSM1182220     2  0.4310     0.5170 0.000 0.580 0.396 0.000 0.000 NA
#> GSM1182221     2  0.3287     0.6882 0.012 0.768 0.220 0.000 0.000 NA
#> GSM1182222     3  0.4044     0.4208 0.012 0.312 0.668 0.000 0.000 NA
#> GSM1182223     3  0.2954     0.7397 0.004 0.096 0.852 0.000 0.000 NA
#> GSM1182224     3  0.1471     0.7123 0.064 0.004 0.932 0.000 0.000 NA
#> GSM1182225     3  0.4260    -0.2255 0.016 0.472 0.512 0.000 0.000 NA
#> GSM1182226     3  0.5272    -0.2247 0.052 0.460 0.468 0.000 0.000 NA
#> GSM1182227     4  0.5387    -0.0488 0.040 0.000 0.000 0.544 0.372 NA
#> GSM1182228     3  0.4168     0.6703 0.024 0.204 0.740 0.000 0.000 NA
#> GSM1182229     3  0.2122     0.7419 0.000 0.076 0.900 0.000 0.000 NA
#> GSM1182230     3  0.2106     0.7368 0.032 0.064 0.904 0.000 0.000 NA
#> GSM1182231     3  0.3161     0.6368 0.008 0.216 0.776 0.000 0.000 NA
#> GSM1182232     5  0.4419     0.6719 0.000 0.000 0.000 0.384 0.584 NA
#> GSM1182233     5  0.4134     0.7277 0.000 0.000 0.000 0.316 0.656 NA
#> GSM1182234     4  0.5148     0.0676 0.024 0.000 0.000 0.572 0.356 NA
#> GSM1182235     2  0.3860     0.7168 0.008 0.756 0.200 0.000 0.000 NA
#> GSM1182236     5  0.4554     0.6192 0.008 0.000 0.000 0.400 0.568 NA
#> GSM1182237     3  0.4927     0.5698 0.104 0.244 0.648 0.000 0.000 NA
#> GSM1182238     2  0.4289     0.6955 0.016 0.724 0.216 0.000 0.000 NA
#> GSM1182239     2  0.4559     0.5666 0.024 0.600 0.364 0.000 0.000 NA
#> GSM1182240     2  0.4347     0.6583 0.028 0.672 0.288 0.000 0.000 NA
#> GSM1182241     3  0.4671     0.4921 0.060 0.296 0.640 0.000 0.000 NA
#> GSM1182242     3  0.2911     0.7292 0.036 0.032 0.876 0.000 0.004 NA
#> GSM1182243     3  0.2162     0.7403 0.004 0.088 0.896 0.000 0.000 NA
#> GSM1182244     3  0.4143     0.6978 0.120 0.120 0.756 0.000 0.000 NA
#> GSM1182245     4  0.3207     0.6042 0.004 0.000 0.000 0.828 0.124 NA
#> GSM1182246     4  0.0717     0.6543 0.008 0.000 0.000 0.976 0.016 NA
#> GSM1182247     3  0.3205     0.7221 0.052 0.016 0.852 0.000 0.004 NA
#> GSM1182248     3  0.1542     0.7191 0.008 0.004 0.936 0.000 0.000 NA
#> GSM1182249     3  0.4305     0.5984 0.068 0.232 0.700 0.000 0.000 NA
#> GSM1182250     3  0.2687     0.7429 0.024 0.092 0.872 0.000 0.000 NA
#> GSM1182251     5  0.4064     0.7211 0.000 0.000 0.000 0.336 0.644 NA
#> GSM1182252     3  0.2259     0.7409 0.024 0.036 0.912 0.000 0.004 NA
#> GSM1182253     3  0.3119     0.7227 0.036 0.032 0.856 0.000 0.000 NA
#> GSM1182254     3  0.1957     0.7305 0.008 0.024 0.920 0.000 0.000 NA
#> GSM1182255     4  0.0551     0.6557 0.004 0.000 0.000 0.984 0.008 NA
#> GSM1182256     4  0.0622     0.6554 0.012 0.000 0.000 0.980 0.008 NA
#> GSM1182257     4  0.1426     0.6611 0.008 0.000 0.000 0.948 0.028 NA
#> GSM1182258     4  0.0806     0.6608 0.000 0.000 0.000 0.972 0.020 NA
#> GSM1182259     4  0.1275     0.6543 0.016 0.000 0.000 0.956 0.012 NA
#> GSM1182260     3  0.4877     0.7012 0.084 0.104 0.732 0.000 0.000 NA
#> GSM1182261     3  0.2907     0.7357 0.028 0.096 0.860 0.000 0.000 NA
#> GSM1182262     3  0.1461     0.7364 0.016 0.044 0.940 0.000 0.000 NA
#> GSM1182263     5  0.4767     0.5175 0.004 0.000 0.000 0.444 0.512 NA
#> GSM1182264     3  0.5375     0.6511 0.108 0.084 0.696 0.000 0.004 NA
#> GSM1182265     3  0.5950     0.5486 0.212 0.116 0.604 0.000 0.000 NA
#> GSM1182266     3  0.5942     0.5730 0.072 0.096 0.628 0.000 0.008 NA
#> GSM1182267     4  0.4574     0.4521 0.020 0.000 0.000 0.680 0.260 NA
#> GSM1182268     5  0.4883     0.6632 0.016 0.000 0.000 0.356 0.588 NA
#> GSM1182269     4  0.4664    -0.3734 0.004 0.000 0.000 0.488 0.476 NA
#> GSM1182270     5  0.4161     0.6943 0.004 0.000 0.000 0.348 0.632 NA
#> GSM1182271     4  0.0748     0.6590 0.004 0.000 0.000 0.976 0.016 NA
#> GSM1182272     4  0.1059     0.6520 0.016 0.000 0.000 0.964 0.004 NA
#> GSM1182273     3  0.2921     0.6208 0.000 0.008 0.828 0.000 0.008 NA
#> GSM1182275     3  0.4437     0.7170 0.012 0.132 0.748 0.000 0.004 NA
#> GSM1182276     2  0.4716     0.4980 0.004 0.576 0.376 0.000 0.000 NA
#> GSM1182277     4  0.4029     0.5491 0.012 0.000 0.000 0.736 0.220 NA
#> GSM1182278     4  0.3947     0.5692 0.016 0.000 0.000 0.756 0.196 NA
#> GSM1182279     5  0.4115     0.7241 0.004 0.000 0.000 0.268 0.696 NA
#> GSM1182280     5  0.3743     0.7121 0.000 0.000 0.000 0.252 0.724 NA
#> GSM1182281     4  0.1124     0.6598 0.008 0.000 0.000 0.956 0.036 NA
#> GSM1182282     4  0.3124     0.6046 0.008 0.000 0.000 0.828 0.140 NA
#> GSM1182283     4  0.4117     0.4664 0.004 0.000 0.000 0.704 0.256 NA
#> GSM1182284     4  0.3694     0.5942 0.024 0.000 0.000 0.808 0.120 NA
#> GSM1182285     3  0.1434     0.7202 0.024 0.008 0.948 0.000 0.000 NA
#> GSM1182286     2  0.3766     0.7052 0.024 0.720 0.256 0.000 0.000 NA
#> GSM1182287     3  0.2771     0.7297 0.000 0.116 0.852 0.000 0.000 NA
#> GSM1182288     3  0.1434     0.7227 0.020 0.008 0.948 0.000 0.000 NA
#> GSM1182289     4  0.5191    -0.4366 0.000 0.000 0.000 0.456 0.456 NA
#> GSM1182290     5  0.4795     0.4588 0.000 0.000 0.000 0.176 0.672 NA
#> GSM1182291     4  0.0405     0.6539 0.004 0.000 0.000 0.988 0.008 NA
#> GSM1182274     3  0.5411     0.3903 0.016 0.064 0.592 0.000 0.012 NA
#> GSM1182292     2  0.2425     0.6525 0.008 0.880 0.100 0.000 0.000 NA
#> GSM1182293     2  0.3111     0.7082 0.008 0.820 0.156 0.000 0.000 NA
#> GSM1182294     2  0.4947     0.6068 0.088 0.596 0.316 0.000 0.000 NA
#> GSM1182295     2  0.3110     0.7202 0.012 0.792 0.196 0.000 0.000 NA
#> GSM1182296     2  0.2946     0.7158 0.004 0.808 0.184 0.000 0.000 NA
#> GSM1182298     3  0.3630     0.5558 0.212 0.000 0.756 0.000 0.000 NA
#> GSM1182299     2  0.5423     0.0795 0.004 0.456 0.440 0.000 0.000 NA
#> GSM1182300     2  0.4218     0.5825 0.024 0.616 0.360 0.000 0.000 NA
#> GSM1182301     2  0.3534     0.6812 0.008 0.792 0.168 0.000 0.000 NA
#> GSM1182303     3  0.4930    -0.1160 0.004 0.448 0.496 0.000 0.000 NA
#> GSM1182304     5  0.3907     0.7231 0.000 0.000 0.000 0.268 0.704 NA
#> GSM1182305     5  0.4379     0.6103 0.000 0.000 0.000 0.396 0.576 NA
#> GSM1182306     4  0.3827     0.4198 0.004 0.000 0.000 0.680 0.308 NA
#> GSM1182307     2  0.1251     0.5516 0.012 0.956 0.024 0.000 0.000 NA
#> GSM1182309     2  0.3622     0.6486 0.072 0.800 0.124 0.000 0.000 NA
#> GSM1182312     2  0.3473     0.6692 0.048 0.804 0.144 0.000 0.000 NA
#> GSM1182314     4  0.1949     0.6428 0.004 0.000 0.000 0.904 0.088 NA
#> GSM1182316     2  0.3923     0.6185 0.080 0.772 0.144 0.000 0.004 NA
#> GSM1182318     2  0.1668     0.6173 0.004 0.928 0.060 0.000 0.000 NA
#> GSM1182319     1  0.5679     0.6268 0.532 0.316 0.144 0.000 0.000 NA
#> GSM1182320     2  0.3622     0.5351 0.072 0.800 0.124 0.000 0.000 NA
#> GSM1182321     3  0.6760     0.0637 0.300 0.220 0.428 0.000 0.000 NA
#> GSM1182322     1  0.4066     0.7891 0.692 0.272 0.036 0.000 0.000 NA
#> GSM1182324     3  0.4278     0.6078 0.076 0.212 0.712 0.000 0.000 NA
#> GSM1182297     2  0.3633     0.6979 0.024 0.800 0.148 0.000 0.000 NA
#> GSM1182302     4  0.3329     0.5495 0.004 0.000 0.000 0.756 0.236 NA
#> GSM1182308     2  0.3780     0.7163 0.004 0.728 0.248 0.000 0.000 NA
#> GSM1182310     1  0.4582     0.7951 0.684 0.216 0.100 0.000 0.000 NA
#> GSM1182311     5  0.4306     0.7315 0.004 0.000 0.000 0.308 0.656 NA
#> GSM1182313     4  0.2730     0.6152 0.012 0.000 0.000 0.836 0.152 NA
#> GSM1182315     2  0.3047     0.5983 0.060 0.852 0.080 0.000 0.000 NA
#> GSM1182317     2  0.1003     0.5469 0.000 0.964 0.020 0.000 0.000 NA
#> GSM1182323     5  0.4168     0.6561 0.000 0.000 0.000 0.400 0.584 NA

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk SD-NMF-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk SD-NMF-collect-classes

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

test_to_known_factors(res)
#>          n disease.state(p) gender(p) k
#> SD:NMF 139         7.73e-02    1.0000 2
#> SD:NMF 134         1.29e-01    1.0000 3
#> SD:NMF  96         4.74e-01    0.7516 4
#> SD:NMF 117         3.48e-07    0.0899 5
#> SD:NMF 109         7.31e-07    0.1212 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 46361 rows and 139 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#>   Subgroups are detected by 'hclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 4.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk CV-hclust-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           1.000       1.000         0.4791 0.521   0.521
#> 3 3 1.000           0.977       0.991         0.1480 0.931   0.867
#> 4 4 0.963           0.918       0.922         0.0414 0.972   0.939
#> 5 5 0.760           0.794       0.865         0.0859 0.993   0.983
#> 6 6 0.785           0.746       0.853         0.0692 0.931   0.835

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

suggest_best_k(res)
#> [1] 4
#> attr(,"optional")
#> [1] 2 3

There is also optional best \(k\) = 2 3 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
#> GSM1182186     1       0          1  1  0
#> GSM1182187     1       0          1  1  0
#> GSM1182188     1       0          1  1  0
#> GSM1182189     1       0          1  1  0
#> GSM1182190     1       0          1  1  0
#> GSM1182191     1       0          1  1  0
#> GSM1182192     1       0          1  1  0
#> GSM1182193     1       0          1  1  0
#> GSM1182194     2       0          1  0  1
#> GSM1182195     2       0          1  0  1
#> GSM1182196     2       0          1  0  1
#> GSM1182197     2       0          1  0  1
#> GSM1182198     2       0          1  0  1
#> GSM1182199     2       0          1  0  1
#> GSM1182200     2       0          1  0  1
#> GSM1182201     2       0          1  0  1
#> GSM1182202     1       0          1  1  0
#> GSM1182203     1       0          1  1  0
#> GSM1182204     1       0          1  1  0
#> GSM1182205     2       0          1  0  1
#> GSM1182206     2       0          1  0  1
#> GSM1182207     1       0          1  1  0
#> GSM1182208     1       0          1  1  0
#> GSM1182209     2       0          1  0  1
#> GSM1182210     2       0          1  0  1
#> GSM1182211     2       0          1  0  1
#> GSM1182212     2       0          1  0  1
#> GSM1182213     2       0          1  0  1
#> GSM1182214     2       0          1  0  1
#> GSM1182215     2       0          1  0  1
#> GSM1182216     2       0          1  0  1
#> GSM1182217     1       0          1  1  0
#> GSM1182218     1       0          1  1  0
#> GSM1182219     2       0          1  0  1
#> GSM1182220     2       0          1  0  1
#> GSM1182221     2       0          1  0  1
#> GSM1182222     2       0          1  0  1
#> GSM1182223     2       0          1  0  1
#> GSM1182224     2       0          1  0  1
#> GSM1182225     2       0          1  0  1
#> GSM1182226     2       0          1  0  1
#> GSM1182227     1       0          1  1  0
#> GSM1182228     2       0          1  0  1
#> GSM1182229     2       0          1  0  1
#> GSM1182230     2       0          1  0  1
#> GSM1182231     2       0          1  0  1
#> GSM1182232     1       0          1  1  0
#> GSM1182233     1       0          1  1  0
#> GSM1182234     1       0          1  1  0
#> GSM1182235     2       0          1  0  1
#> GSM1182236     1       0          1  1  0
#> GSM1182237     2       0          1  0  1
#> GSM1182238     2       0          1  0  1
#> GSM1182239     2       0          1  0  1
#> GSM1182240     2       0          1  0  1
#> GSM1182241     2       0          1  0  1
#> GSM1182242     2       0          1  0  1
#> GSM1182243     2       0          1  0  1
#> GSM1182244     2       0          1  0  1
#> GSM1182245     1       0          1  1  0
#> GSM1182246     1       0          1  1  0
#> GSM1182247     2       0          1  0  1
#> GSM1182248     2       0          1  0  1
#> GSM1182249     2       0          1  0  1
#> GSM1182250     2       0          1  0  1
#> GSM1182251     1       0          1  1  0
#> GSM1182252     2       0          1  0  1
#> GSM1182253     2       0          1  0  1
#> GSM1182254     2       0          1  0  1
#> GSM1182255     1       0          1  1  0
#> GSM1182256     1       0          1  1  0
#> GSM1182257     1       0          1  1  0
#> GSM1182258     1       0          1  1  0
#> GSM1182259     1       0          1  1  0
#> GSM1182260     2       0          1  0  1
#> GSM1182261     2       0          1  0  1
#> GSM1182262     2       0          1  0  1
#> GSM1182263     1       0          1  1  0
#> GSM1182264     2       0          1  0  1
#> GSM1182265     2       0          1  0  1
#> GSM1182266     2       0          1  0  1
#> GSM1182267     1       0          1  1  0
#> GSM1182268     1       0          1  1  0
#> GSM1182269     1       0          1  1  0
#> GSM1182270     1       0          1  1  0
#> GSM1182271     1       0          1  1  0
#> GSM1182272     1       0          1  1  0
#> GSM1182273     2       0          1  0  1
#> GSM1182275     2       0          1  0  1
#> GSM1182276     2       0          1  0  1
#> GSM1182277     1       0          1  1  0
#> GSM1182278     1       0          1  1  0
#> GSM1182279     1       0          1  1  0
#> GSM1182280     1       0          1  1  0
#> GSM1182281     1       0          1  1  0
#> GSM1182282     1       0          1  1  0
#> GSM1182283     1       0          1  1  0
#> GSM1182284     1       0          1  1  0
#> GSM1182285     2       0          1  0  1
#> GSM1182286     2       0          1  0  1
#> GSM1182287     2       0          1  0  1
#> GSM1182288     2       0          1  0  1
#> GSM1182289     1       0          1  1  0
#> GSM1182290     1       0          1  1  0
#> GSM1182291     1       0          1  1  0
#> GSM1182274     2       0          1  0  1
#> GSM1182292     2       0          1  0  1
#> GSM1182293     2       0          1  0  1
#> GSM1182294     2       0          1  0  1
#> GSM1182295     2       0          1  0  1
#> GSM1182296     2       0          1  0  1
#> GSM1182298     2       0          1  0  1
#> GSM1182299     2       0          1  0  1
#> GSM1182300     2       0          1  0  1
#> GSM1182301     2       0          1  0  1
#> GSM1182303     2       0          1  0  1
#> GSM1182304     1       0          1  1  0
#> GSM1182305     1       0          1  1  0
#> GSM1182306     1       0          1  1  0
#> GSM1182307     2       0          1  0  1
#> GSM1182309     2       0          1  0  1
#> GSM1182312     2       0          1  0  1
#> GSM1182314     1       0          1  1  0
#> GSM1182316     2       0          1  0  1
#> GSM1182318     2       0          1  0  1
#> GSM1182319     2       0          1  0  1
#> GSM1182320     2       0          1  0  1
#> GSM1182321     2       0          1  0  1
#> GSM1182322     2       0          1  0  1
#> GSM1182324     2       0          1  0  1
#> GSM1182297     2       0          1  0  1
#> GSM1182302     1       0          1  1  0
#> GSM1182308     2       0          1  0  1
#> GSM1182310     2       0          1  0  1
#> GSM1182311     1       0          1  1  0
#> GSM1182313     1       0          1  1  0
#> GSM1182315     2       0          1  0  1
#> GSM1182317     2       0          1  0  1
#> GSM1182323     1       0          1  1  0

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1 p2    p3
#> GSM1182186     1  0.6260      0.250 0.552  0 0.448
#> GSM1182187     3  0.0000      0.999 0.000  0 1.000
#> GSM1182188     3  0.0000      0.999 0.000  0 1.000
#> GSM1182189     1  0.0000      0.962 1.000  0 0.000
#> GSM1182190     1  0.0000      0.962 1.000  0 0.000
#> GSM1182191     1  0.6260      0.250 0.552  0 0.448
#> GSM1182192     1  0.0000      0.962 1.000  0 0.000
#> GSM1182193     1  0.0000      0.962 1.000  0 0.000
#> GSM1182194     2  0.0000      1.000 0.000  1 0.000
#> GSM1182195     2  0.0000      1.000 0.000  1 0.000
#> GSM1182196     2  0.0000      1.000 0.000  1 0.000
#> GSM1182197     2  0.0000      1.000 0.000  1 0.000
#> GSM1182198     2  0.0000      1.000 0.000  1 0.000
#> GSM1182199     2  0.0000      1.000 0.000  1 0.000
#> GSM1182200     2  0.0000      1.000 0.000  1 0.000
#> GSM1182201     2  0.0000      1.000 0.000  1 0.000
#> GSM1182202     3  0.0000      0.999 0.000  0 1.000
#> GSM1182203     3  0.0000      0.999 0.000  0 1.000
#> GSM1182204     3  0.0000      0.999 0.000  0 1.000
#> GSM1182205     2  0.0000      1.000 0.000  1 0.000
#> GSM1182206     2  0.0000      1.000 0.000  1 0.000
#> GSM1182207     1  0.0000      0.962 1.000  0 0.000
#> GSM1182208     1  0.0000      0.962 1.000  0 0.000
#> GSM1182209     2  0.0000      1.000 0.000  1 0.000
#> GSM1182210     2  0.0000      1.000 0.000  1 0.000
#> GSM1182211     2  0.0000      1.000 0.000  1 0.000
#> GSM1182212     2  0.0000      1.000 0.000  1 0.000
#> GSM1182213     2  0.0000      1.000 0.000  1 0.000
#> GSM1182214     2  0.0000      1.000 0.000  1 0.000
#> GSM1182215     2  0.0000      1.000 0.000  1 0.000
#> GSM1182216     2  0.0000      1.000 0.000  1 0.000
#> GSM1182217     3  0.0592      0.987 0.012  0 0.988
#> GSM1182218     1  0.0000      0.962 1.000  0 0.000
#> GSM1182219     2  0.0000      1.000 0.000  1 0.000
#> GSM1182220     2  0.0000      1.000 0.000  1 0.000
#> GSM1182221     2  0.0000      1.000 0.000  1 0.000
#> GSM1182222     2  0.0000      1.000 0.000  1 0.000
#> GSM1182223     2  0.0000      1.000 0.000  1 0.000
#> GSM1182224     2  0.0000      1.000 0.000  1 0.000
#> GSM1182225     2  0.0000      1.000 0.000  1 0.000
#> GSM1182226     2  0.0000      1.000 0.000  1 0.000
#> GSM1182227     1  0.0000      0.962 1.000  0 0.000
#> GSM1182228     2  0.0000      1.000 0.000  1 0.000
#> GSM1182229     2  0.0000      1.000 0.000  1 0.000
#> GSM1182230     2  0.0000      1.000 0.000  1 0.000
#> GSM1182231     2  0.0000      1.000 0.000  1 0.000
#> GSM1182232     1  0.0000      0.962 1.000  0 0.000
#> GSM1182233     1  0.0000      0.962 1.000  0 0.000
#> GSM1182234     1  0.0000      0.962 1.000  0 0.000
#> GSM1182235     2  0.0000      1.000 0.000  1 0.000
#> GSM1182236     1  0.0000      0.962 1.000  0 0.000
#> GSM1182237     2  0.0000      1.000 0.000  1 0.000
#> GSM1182238     2  0.0000      1.000 0.000  1 0.000
#> GSM1182239     2  0.0000      1.000 0.000  1 0.000
#> GSM1182240     2  0.0000      1.000 0.000  1 0.000
#> GSM1182241     2  0.0000      1.000 0.000  1 0.000
#> GSM1182242     2  0.0000      1.000 0.000  1 0.000
#> GSM1182243     2  0.0000      1.000 0.000  1 0.000
#> GSM1182244     2  0.0000      1.000 0.000  1 0.000
#> GSM1182245     1  0.0000      0.962 1.000  0 0.000
#> GSM1182246     3  0.0000      0.999 0.000  0 1.000
#> GSM1182247     2  0.0000      1.000 0.000  1 0.000
#> GSM1182248     2  0.0000      1.000 0.000  1 0.000
#> GSM1182249     2  0.0000      1.000 0.000  1 0.000
#> GSM1182250     2  0.0000      1.000 0.000  1 0.000
#> GSM1182251     1  0.1031      0.947 0.976  0 0.024
#> GSM1182252     2  0.0000      1.000 0.000  1 0.000
#> GSM1182253     2  0.0000      1.000 0.000  1 0.000
#> GSM1182254     2  0.0000      1.000 0.000  1 0.000
#> GSM1182255     3  0.0000      0.999 0.000  0 1.000
#> GSM1182256     3  0.0000      0.999 0.000  0 1.000
#> GSM1182257     3  0.0000      0.999 0.000  0 1.000
#> GSM1182258     3  0.0000      0.999 0.000  0 1.000
#> GSM1182259     3  0.0000      0.999 0.000  0 1.000
#> GSM1182260     2  0.0000      1.000 0.000  1 0.000
#> GSM1182261     2  0.0000      1.000 0.000  1 0.000
#> GSM1182262     2  0.0000      1.000 0.000  1 0.000
#> GSM1182263     1  0.0592      0.955 0.988  0 0.012
#> GSM1182264     2  0.0000      1.000 0.000  1 0.000
#> GSM1182265     2  0.0000      1.000 0.000  1 0.000
#> GSM1182266     2  0.0000      1.000 0.000  1 0.000
#> GSM1182267     1  0.0000      0.962 1.000  0 0.000
#> GSM1182268     1  0.0000      0.962 1.000  0 0.000
#> GSM1182269     1  0.0000      0.962 1.000  0 0.000
#> GSM1182270     1  0.0000      0.962 1.000  0 0.000
#> GSM1182271     3  0.0000      0.999 0.000  0 1.000
#> GSM1182272     3  0.0000      0.999 0.000  0 1.000
#> GSM1182273     2  0.0000      1.000 0.000  1 0.000
#> GSM1182275     2  0.0000      1.000 0.000  1 0.000
#> GSM1182276     2  0.0000      1.000 0.000  1 0.000
#> GSM1182277     1  0.0000      0.962 1.000  0 0.000
#> GSM1182278     1  0.0000      0.962 1.000  0 0.000
#> GSM1182279     1  0.0747      0.953 0.984  0 0.016
#> GSM1182280     1  0.0747      0.953 0.984  0 0.016
#> GSM1182281     1  0.3412      0.848 0.876  0 0.124
#> GSM1182282     1  0.0000      0.962 1.000  0 0.000
#> GSM1182283     1  0.0000      0.962 1.000  0 0.000
#> GSM1182284     1  0.0000      0.962 1.000  0 0.000
#> GSM1182285     2  0.0000      1.000 0.000  1 0.000
#> GSM1182286     2  0.0000      1.000 0.000  1 0.000
#> GSM1182287     2  0.0000      1.000 0.000  1 0.000
#> GSM1182288     2  0.0000      1.000 0.000  1 0.000
#> GSM1182289     1  0.0892      0.950 0.980  0 0.020
#> GSM1182290     1  0.0000      0.962 1.000  0 0.000
#> GSM1182291     3  0.0000      0.999 0.000  0 1.000
#> GSM1182274     2  0.0000      1.000 0.000  1 0.000
#> GSM1182292     2  0.0000      1.000 0.000  1 0.000
#> GSM1182293     2  0.0000      1.000 0.000  1 0.000
#> GSM1182294     2  0.0000      1.000 0.000  1 0.000
#> GSM1182295     2  0.0000      1.000 0.000  1 0.000
#> GSM1182296     2  0.0000      1.000 0.000  1 0.000
#> GSM1182298     2  0.0000      1.000 0.000  1 0.000
#> GSM1182299     2  0.0000      1.000 0.000  1 0.000
#> GSM1182300     2  0.0000      1.000 0.000  1 0.000
#> GSM1182301     2  0.0000      1.000 0.000  1 0.000
#> GSM1182303     2  0.0000      1.000 0.000  1 0.000
#> GSM1182304     1  0.0747      0.953 0.984  0 0.016
#> GSM1182305     1  0.4178      0.794 0.828  0 0.172
#> GSM1182306     3  0.0000      0.999 0.000  0 1.000
#> GSM1182307     2  0.0000      1.000 0.000  1 0.000
#> GSM1182309     2  0.0000      1.000 0.000  1 0.000
#> GSM1182312     2  0.0000      1.000 0.000  1 0.000
#> GSM1182314     3  0.0000      0.999 0.000  0 1.000
#> GSM1182316     2  0.0000      1.000 0.000  1 0.000
#> GSM1182318     2  0.0000      1.000 0.000  1 0.000
#> GSM1182319     2  0.0000      1.000 0.000  1 0.000
#> GSM1182320     2  0.0000      1.000 0.000  1 0.000
#> GSM1182321     2  0.0000      1.000 0.000  1 0.000
#> GSM1182322     2  0.0000      1.000 0.000  1 0.000
#> GSM1182324     2  0.0000      1.000 0.000  1 0.000
#> GSM1182297     2  0.0000      1.000 0.000  1 0.000
#> GSM1182302     3  0.0000      0.999 0.000  0 1.000
#> GSM1182308     2  0.0000      1.000 0.000  1 0.000
#> GSM1182310     2  0.0000      1.000 0.000  1 0.000
#> GSM1182311     1  0.0000      0.962 1.000  0 0.000
#> GSM1182313     3  0.0000      0.999 0.000  0 1.000
#> GSM1182315     2  0.0000      1.000 0.000  1 0.000
#> GSM1182317     2  0.0000      1.000 0.000  1 0.000
#> GSM1182323     1  0.0000      0.962 1.000  0 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1 p2    p3    p4
#> GSM1182186     1  0.4477      0.304 0.688  0 0.000 0.312
#> GSM1182187     4  0.2814      0.926 0.132  0 0.000 0.868
#> GSM1182188     4  0.0000      0.950 0.000  0 0.000 1.000
#> GSM1182189     1  0.4843      0.748 0.604  0 0.396 0.000
#> GSM1182190     1  0.4843      0.748 0.604  0 0.396 0.000
#> GSM1182191     1  0.4477      0.304 0.688  0 0.000 0.312
#> GSM1182192     3  0.1716      0.875 0.064  0 0.936 0.000
#> GSM1182193     3  0.1716      0.875 0.064  0 0.936 0.000
#> GSM1182194     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182195     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182196     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182197     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182198     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182199     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182200     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182201     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182202     4  0.2868      0.924 0.136  0 0.000 0.864
#> GSM1182203     4  0.2868      0.924 0.136  0 0.000 0.864
#> GSM1182204     4  0.2868      0.924 0.136  0 0.000 0.864
#> GSM1182205     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182206     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182207     1  0.4679      0.747 0.648  0 0.352 0.000
#> GSM1182208     1  0.4679      0.747 0.648  0 0.352 0.000
#> GSM1182209     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182210     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182211     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182212     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182213     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182214     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182215     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182216     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182217     4  0.3024      0.916 0.148  0 0.000 0.852
#> GSM1182218     1  0.4843      0.748 0.604  0 0.396 0.000
#> GSM1182219     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182220     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182221     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182222     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182223     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182224     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182225     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182226     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182227     3  0.1716      0.875 0.064  0 0.936 0.000
#> GSM1182228     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182229     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182230     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182231     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182232     1  0.4888      0.734 0.588  0 0.412 0.000
#> GSM1182233     1  0.4888      0.734 0.588  0 0.412 0.000
#> GSM1182234     3  0.3942      0.479 0.236  0 0.764 0.000
#> GSM1182235     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182236     1  0.4855      0.745 0.600  0 0.400 0.000
#> GSM1182237     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182238     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182239     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182240     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182241     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182242     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182243     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182244     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182245     3  0.0817      0.817 0.024  0 0.976 0.000
#> GSM1182246     4  0.0000      0.950 0.000  0 0.000 1.000
#> GSM1182247     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182248     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182249     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182250     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182251     1  0.2944      0.647 0.868  0 0.128 0.004
#> GSM1182252     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182253     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182254     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182255     4  0.0000      0.950 0.000  0 0.000 1.000
#> GSM1182256     4  0.0000      0.950 0.000  0 0.000 1.000
#> GSM1182257     4  0.2469      0.932 0.108  0 0.000 0.892
#> GSM1182258     4  0.0000      0.950 0.000  0 0.000 1.000
#> GSM1182259     4  0.0000      0.950 0.000  0 0.000 1.000
#> GSM1182260     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182261     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182262     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182263     1  0.3208      0.660 0.848  0 0.148 0.004
#> GSM1182264     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182265     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182266     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182267     1  0.4972      0.663 0.544  0 0.456 0.000
#> GSM1182268     1  0.4898      0.730 0.584  0 0.416 0.000
#> GSM1182269     1  0.4843      0.748 0.604  0 0.396 0.000
#> GSM1182270     1  0.4843      0.748 0.604  0 0.396 0.000
#> GSM1182271     4  0.0000      0.950 0.000  0 0.000 1.000
#> GSM1182272     4  0.0000      0.950 0.000  0 0.000 1.000
#> GSM1182273     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182275     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182276     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182277     3  0.1716      0.875 0.064  0 0.936 0.000
#> GSM1182278     3  0.1716      0.875 0.064  0 0.936 0.000
#> GSM1182279     1  0.2814      0.658 0.868  0 0.132 0.000
#> GSM1182280     1  0.2814      0.658 0.868  0 0.132 0.000
#> GSM1182281     3  0.6414      0.449 0.240  0 0.636 0.124
#> GSM1182282     3  0.0817      0.817 0.024  0 0.976 0.000
#> GSM1182283     3  0.1716      0.875 0.064  0 0.936 0.000
#> GSM1182284     3  0.1716      0.875 0.064  0 0.936 0.000
#> GSM1182285     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182286     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182287     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182288     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182289     1  0.2999      0.651 0.864  0 0.132 0.004
#> GSM1182290     1  0.4679      0.747 0.648  0 0.352 0.000
#> GSM1182291     4  0.0000      0.950 0.000  0 0.000 1.000
#> GSM1182274     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182292     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182293     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182294     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182295     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182296     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182298     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182299     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182300     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182301     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182303     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182304     1  0.2814      0.658 0.868  0 0.132 0.000
#> GSM1182305     1  0.3450      0.473 0.836  0 0.008 0.156
#> GSM1182306     4  0.2530      0.931 0.112  0 0.000 0.888
#> GSM1182307     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182309     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182312     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182314     4  0.0000      0.950 0.000  0 0.000 1.000
#> GSM1182316     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182318     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182319     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182320     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182321     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182322     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182324     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182297     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182302     4  0.2868      0.924 0.136  0 0.000 0.864
#> GSM1182308     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182310     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182311     1  0.4843      0.748 0.604  0 0.396 0.000
#> GSM1182313     4  0.0000      0.950 0.000  0 0.000 1.000
#> GSM1182315     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182317     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182323     1  0.4843      0.748 0.604  0 0.396 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
#> GSM1182186     1  0.4940      0.307 0.540 0.000 0.436 0.020 0.004
#> GSM1182187     4  0.4446     -0.836 0.000 0.000 0.476 0.520 0.004
#> GSM1182188     4  0.0000      0.801 0.000 0.000 0.000 1.000 0.000
#> GSM1182189     1  0.3857      0.707 0.688 0.000 0.000 0.000 0.312
#> GSM1182190     1  0.3857      0.707 0.688 0.000 0.000 0.000 0.312
#> GSM1182191     1  0.4940      0.307 0.540 0.000 0.436 0.020 0.004
#> GSM1182192     5  0.2424      0.869 0.132 0.000 0.000 0.000 0.868
#> GSM1182193     5  0.2424      0.869 0.132 0.000 0.000 0.000 0.868
#> GSM1182194     2  0.5315      0.626 0.000 0.600 0.332 0.000 0.068
#> GSM1182195     2  0.5315      0.626 0.000 0.600 0.332 0.000 0.068
#> GSM1182196     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182197     2  0.0290      0.926 0.000 0.992 0.008 0.000 0.000
#> GSM1182198     2  0.5315      0.626 0.000 0.600 0.332 0.000 0.068
#> GSM1182199     2  0.5315      0.626 0.000 0.600 0.332 0.000 0.068
#> GSM1182200     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182201     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182202     3  0.4434      0.946 0.000 0.000 0.536 0.460 0.004
#> GSM1182203     3  0.4449      0.936 0.000 0.000 0.512 0.484 0.004
#> GSM1182204     3  0.4450      0.930 0.000 0.000 0.508 0.488 0.004
#> GSM1182205     2  0.3513      0.837 0.000 0.800 0.180 0.000 0.020
#> GSM1182206     2  0.3209      0.846 0.000 0.812 0.180 0.000 0.008
#> GSM1182207     1  0.3210      0.707 0.788 0.000 0.000 0.000 0.212
#> GSM1182208     1  0.3210      0.707 0.788 0.000 0.000 0.000 0.212
#> GSM1182209     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182210     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182211     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182212     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182213     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182214     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182215     2  0.3048      0.851 0.000 0.820 0.176 0.000 0.004
#> GSM1182216     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182217     3  0.4390      0.908 0.000 0.000 0.568 0.428 0.004
#> GSM1182218     1  0.3857      0.707 0.688 0.000 0.000 0.000 0.312
#> GSM1182219     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182220     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182221     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182222     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182223     2  0.2813      0.858 0.000 0.832 0.168 0.000 0.000
#> GSM1182224     2  0.4995      0.712 0.000 0.668 0.264 0.000 0.068
#> GSM1182225     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182226     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182227     5  0.2424      0.869 0.132 0.000 0.000 0.000 0.868
#> GSM1182228     2  0.3093      0.853 0.000 0.824 0.168 0.000 0.008
#> GSM1182229     2  0.3093      0.853 0.000 0.824 0.168 0.000 0.008
#> GSM1182230     2  0.3048      0.851 0.000 0.820 0.176 0.000 0.004
#> GSM1182231     2  0.3048      0.851 0.000 0.820 0.176 0.000 0.004
#> GSM1182232     1  0.3949      0.688 0.668 0.000 0.000 0.000 0.332
#> GSM1182233     1  0.3949      0.688 0.668 0.000 0.000 0.000 0.332
#> GSM1182234     5  0.3816      0.490 0.304 0.000 0.000 0.000 0.696
#> GSM1182235     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182236     1  0.3876      0.703 0.684 0.000 0.000 0.000 0.316
#> GSM1182237     2  0.3048      0.851 0.000 0.820 0.176 0.000 0.004
#> GSM1182238     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182239     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182240     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182241     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182242     2  0.3203      0.851 0.000 0.820 0.168 0.000 0.012
#> GSM1182243     2  0.1121      0.915 0.000 0.956 0.044 0.000 0.000
#> GSM1182244     2  0.4995      0.712 0.000 0.668 0.264 0.000 0.068
#> GSM1182245     5  0.3471      0.798 0.092 0.000 0.072 0.000 0.836
#> GSM1182246     4  0.0510      0.788 0.000 0.000 0.016 0.984 0.000
#> GSM1182247     2  0.3343      0.846 0.000 0.812 0.172 0.000 0.016
#> GSM1182248     2  0.3343      0.846 0.000 0.812 0.172 0.000 0.016
#> GSM1182249     2  0.0609      0.923 0.000 0.980 0.020 0.000 0.000
#> GSM1182250     2  0.0609      0.923 0.000 0.980 0.020 0.000 0.000
#> GSM1182251     1  0.1502      0.615 0.940 0.000 0.056 0.000 0.004
#> GSM1182252     2  0.3343      0.846 0.000 0.812 0.172 0.000 0.016
#> GSM1182253     2  0.3123      0.856 0.000 0.828 0.160 0.000 0.012
#> GSM1182254     2  0.1851      0.896 0.000 0.912 0.088 0.000 0.000
#> GSM1182255     4  0.0000      0.801 0.000 0.000 0.000 1.000 0.000
#> GSM1182256     4  0.0000      0.801 0.000 0.000 0.000 1.000 0.000
#> GSM1182257     4  0.4126     -0.536 0.000 0.000 0.380 0.620 0.000
#> GSM1182258     4  0.0609      0.786 0.000 0.000 0.020 0.980 0.000
#> GSM1182259     4  0.0000      0.801 0.000 0.000 0.000 1.000 0.000
#> GSM1182260     2  0.0609      0.923 0.000 0.980 0.020 0.000 0.000
#> GSM1182261     2  0.3048      0.851 0.000 0.820 0.176 0.000 0.004
#> GSM1182262     2  0.3048      0.851 0.000 0.820 0.176 0.000 0.004
#> GSM1182263     1  0.1774      0.625 0.932 0.000 0.052 0.000 0.016
#> GSM1182264     2  0.0609      0.923 0.000 0.980 0.020 0.000 0.000
#> GSM1182265     2  0.0609      0.923 0.000 0.980 0.020 0.000 0.000
#> GSM1182266     2  0.0609      0.923 0.000 0.980 0.020 0.000 0.000
#> GSM1182267     1  0.4126      0.609 0.620 0.000 0.000 0.000 0.380
#> GSM1182268     1  0.3983      0.679 0.660 0.000 0.000 0.000 0.340
#> GSM1182269     1  0.3857      0.707 0.688 0.000 0.000 0.000 0.312
#> GSM1182270     1  0.3857      0.707 0.688 0.000 0.000 0.000 0.312
#> GSM1182271     4  0.0000      0.801 0.000 0.000 0.000 1.000 0.000
#> GSM1182272     4  0.0000      0.801 0.000 0.000 0.000 1.000 0.000
#> GSM1182273     2  0.0609      0.923 0.000 0.980 0.020 0.000 0.000
#> GSM1182275     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182276     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182277     5  0.2424      0.869 0.132 0.000 0.000 0.000 0.868
#> GSM1182278     5  0.2424      0.869 0.132 0.000 0.000 0.000 0.868
#> GSM1182279     1  0.1357      0.624 0.948 0.000 0.048 0.000 0.004
#> GSM1182280     1  0.1357      0.624 0.948 0.000 0.048 0.000 0.004
#> GSM1182281     5  0.6635      0.399 0.204 0.000 0.076 0.112 0.608
#> GSM1182282     5  0.3471      0.798 0.092 0.000 0.072 0.000 0.836
#> GSM1182283     5  0.2424      0.869 0.132 0.000 0.000 0.000 0.868
#> GSM1182284     5  0.2424      0.869 0.132 0.000 0.000 0.000 0.868
#> GSM1182285     2  0.4995      0.712 0.000 0.668 0.264 0.000 0.068
#> GSM1182286     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182287     2  0.2813      0.858 0.000 0.832 0.168 0.000 0.000
#> GSM1182288     2  0.3438      0.844 0.000 0.808 0.172 0.000 0.020
#> GSM1182289     1  0.1430      0.617 0.944 0.000 0.052 0.000 0.004
#> GSM1182290     1  0.3210      0.707 0.788 0.000 0.000 0.000 0.212
#> GSM1182291     4  0.0000      0.801 0.000 0.000 0.000 1.000 0.000
#> GSM1182274     2  0.0609      0.923 0.000 0.980 0.020 0.000 0.000
#> GSM1182292     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182293     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182294     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182295     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182296     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182298     2  0.5315      0.626 0.000 0.600 0.332 0.000 0.068
#> GSM1182299     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182300     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182301     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182303     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182304     1  0.1357      0.624 0.948 0.000 0.048 0.000 0.004
#> GSM1182305     1  0.4716      0.479 0.772 0.000 0.088 0.112 0.028
#> GSM1182306     4  0.4273     -0.764 0.000 0.000 0.448 0.552 0.000
#> GSM1182307     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182309     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182312     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182314     4  0.0510      0.788 0.000 0.000 0.016 0.984 0.000
#> GSM1182316     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182318     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182319     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182320     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182321     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182322     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182324     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182297     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182302     3  0.4437      0.947 0.000 0.000 0.532 0.464 0.004
#> GSM1182308     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182310     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182311     1  0.3857      0.707 0.688 0.000 0.000 0.000 0.312
#> GSM1182313     4  0.0000      0.801 0.000 0.000 0.000 1.000 0.000
#> GSM1182315     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182317     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM1182323     1  0.3857      0.707 0.688 0.000 0.000 0.000 0.312

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1182186     5  0.4504      0.321 0.000 0.000 0.032 0.000 0.536 0.432
#> GSM1182187     6  0.1812      0.922 0.000 0.000 0.008 0.080 0.000 0.912
#> GSM1182188     4  0.0000      0.995 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182189     5  0.3330      0.677 0.284 0.000 0.000 0.000 0.716 0.000
#> GSM1182190     5  0.3136      0.689 0.228 0.000 0.004 0.000 0.768 0.000
#> GSM1182191     5  0.4504      0.321 0.000 0.000 0.032 0.000 0.536 0.432
#> GSM1182192     1  0.1387      0.871 0.932 0.000 0.000 0.000 0.068 0.000
#> GSM1182193     1  0.1444      0.870 0.928 0.000 0.000 0.000 0.072 0.000
#> GSM1182194     3  0.3515      0.935 0.000 0.324 0.676 0.000 0.000 0.000
#> GSM1182195     3  0.3499      0.935 0.000 0.320 0.680 0.000 0.000 0.000
#> GSM1182196     2  0.0547      0.839 0.000 0.980 0.020 0.000 0.000 0.000
#> GSM1182197     2  0.1141      0.813 0.000 0.948 0.052 0.000 0.000 0.000
#> GSM1182198     3  0.3499      0.935 0.000 0.320 0.680 0.000 0.000 0.000
#> GSM1182199     3  0.3499      0.935 0.000 0.320 0.680 0.000 0.000 0.000
#> GSM1182200     2  0.0146      0.845 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182201     2  0.0363      0.841 0.000 0.988 0.012 0.000 0.000 0.000
#> GSM1182202     6  0.0363      0.936 0.000 0.000 0.000 0.012 0.000 0.988
#> GSM1182203     6  0.0937      0.941 0.000 0.000 0.000 0.040 0.000 0.960
#> GSM1182204     6  0.1007      0.941 0.000 0.000 0.000 0.044 0.000 0.956
#> GSM1182205     2  0.3634      0.138 0.000 0.644 0.356 0.000 0.000 0.000
#> GSM1182206     2  0.3592      0.207 0.000 0.656 0.344 0.000 0.000 0.000
#> GSM1182207     5  0.2882      0.684 0.180 0.000 0.008 0.000 0.812 0.000
#> GSM1182208     5  0.2882      0.684 0.180 0.000 0.008 0.000 0.812 0.000
#> GSM1182209     2  0.0146      0.846 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182210     2  0.0000      0.846 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182211     2  0.0000      0.846 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182212     2  0.0000      0.846 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182213     2  0.0146      0.846 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182214     2  0.0000      0.846 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182215     2  0.3428      0.354 0.000 0.696 0.304 0.000 0.000 0.000
#> GSM1182216     2  0.0000      0.846 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182217     6  0.0547      0.927 0.000 0.000 0.020 0.000 0.000 0.980
#> GSM1182218     5  0.3189      0.690 0.236 0.000 0.004 0.000 0.760 0.000
#> GSM1182219     2  0.0000      0.846 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182220     2  0.0146      0.845 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182221     2  0.0146      0.846 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182222     2  0.0000      0.846 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182223     2  0.3288      0.443 0.000 0.724 0.276 0.000 0.000 0.000
#> GSM1182224     3  0.3737      0.882 0.000 0.392 0.608 0.000 0.000 0.000
#> GSM1182225     2  0.0000      0.846 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182226     2  0.0000      0.846 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182227     1  0.1588      0.865 0.924 0.000 0.004 0.000 0.072 0.000
#> GSM1182228     2  0.3309      0.433 0.000 0.720 0.280 0.000 0.000 0.000
#> GSM1182229     2  0.3482      0.325 0.000 0.684 0.316 0.000 0.000 0.000
#> GSM1182230     2  0.3446      0.346 0.000 0.692 0.308 0.000 0.000 0.000
#> GSM1182231     2  0.3446      0.346 0.000 0.692 0.308 0.000 0.000 0.000
#> GSM1182232     5  0.3482      0.657 0.316 0.000 0.000 0.000 0.684 0.000
#> GSM1182233     5  0.3482      0.657 0.316 0.000 0.000 0.000 0.684 0.000
#> GSM1182234     1  0.3076      0.548 0.760 0.000 0.000 0.000 0.240 0.000
#> GSM1182235     2  0.0146      0.846 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182236     5  0.3584      0.668 0.308 0.000 0.004 0.000 0.688 0.000
#> GSM1182237     2  0.3409      0.376 0.000 0.700 0.300 0.000 0.000 0.000
#> GSM1182238     2  0.0146      0.846 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182239     2  0.0146      0.846 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182240     2  0.0146      0.846 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182241     2  0.0146      0.846 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182242     2  0.3531      0.278 0.000 0.672 0.328 0.000 0.000 0.000
#> GSM1182243     2  0.2416      0.694 0.000 0.844 0.156 0.000 0.000 0.000
#> GSM1182244     3  0.3774      0.859 0.000 0.408 0.592 0.000 0.000 0.000
#> GSM1182245     1  0.2277      0.804 0.892 0.000 0.076 0.000 0.032 0.000
#> GSM1182246     4  0.0520      0.987 0.000 0.000 0.008 0.984 0.000 0.008
#> GSM1182247     2  0.3620      0.179 0.000 0.648 0.352 0.000 0.000 0.000
#> GSM1182248     2  0.3620      0.179 0.000 0.648 0.352 0.000 0.000 0.000
#> GSM1182249     2  0.1765      0.778 0.000 0.904 0.096 0.000 0.000 0.000
#> GSM1182250     2  0.1714      0.782 0.000 0.908 0.092 0.000 0.000 0.000
#> GSM1182251     5  0.3459      0.640 0.004 0.000 0.212 0.000 0.768 0.016
#> GSM1182252     2  0.3620      0.179 0.000 0.648 0.352 0.000 0.000 0.000
#> GSM1182253     2  0.3547      0.255 0.000 0.668 0.332 0.000 0.000 0.000
#> GSM1182254     2  0.2793      0.618 0.000 0.800 0.200 0.000 0.000 0.000
#> GSM1182255     4  0.0000      0.995 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182256     4  0.0000      0.995 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182257     6  0.2597      0.831 0.000 0.000 0.000 0.176 0.000 0.824
#> GSM1182258     4  0.0622      0.984 0.000 0.000 0.008 0.980 0.000 0.012
#> GSM1182259     4  0.0000      0.995 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182260     2  0.1610      0.786 0.000 0.916 0.084 0.000 0.000 0.000
#> GSM1182261     2  0.3409      0.363 0.000 0.700 0.300 0.000 0.000 0.000
#> GSM1182262     2  0.3409      0.363 0.000 0.700 0.300 0.000 0.000 0.000
#> GSM1182263     5  0.3636      0.647 0.016 0.000 0.208 0.000 0.764 0.012
#> GSM1182264     2  0.1663      0.782 0.000 0.912 0.088 0.000 0.000 0.000
#> GSM1182265     2  0.1610      0.785 0.000 0.916 0.084 0.000 0.000 0.000
#> GSM1182266     2  0.1714      0.779 0.000 0.908 0.092 0.000 0.000 0.000
#> GSM1182267     5  0.3828      0.513 0.440 0.000 0.000 0.000 0.560 0.000
#> GSM1182268     5  0.3717      0.604 0.384 0.000 0.000 0.000 0.616 0.000
#> GSM1182269     5  0.3163      0.690 0.232 0.000 0.004 0.000 0.764 0.000
#> GSM1182270     5  0.3163      0.690 0.232 0.000 0.004 0.000 0.764 0.000
#> GSM1182271     4  0.0000      0.995 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182272     4  0.0000      0.995 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182273     2  0.1765      0.775 0.000 0.904 0.096 0.000 0.000 0.000
#> GSM1182275     2  0.0363      0.841 0.000 0.988 0.012 0.000 0.000 0.000
#> GSM1182276     2  0.0363      0.841 0.000 0.988 0.012 0.000 0.000 0.000
#> GSM1182277     1  0.1387      0.870 0.932 0.000 0.000 0.000 0.068 0.000
#> GSM1182278     1  0.1387      0.870 0.932 0.000 0.000 0.000 0.068 0.000
#> GSM1182279     5  0.3273      0.647 0.004 0.000 0.212 0.000 0.776 0.008
#> GSM1182280     5  0.3273      0.647 0.004 0.000 0.212 0.000 0.776 0.008
#> GSM1182281     1  0.5749      0.454 0.600 0.000 0.248 0.108 0.044 0.000
#> GSM1182282     1  0.2852      0.792 0.856 0.000 0.080 0.000 0.064 0.000
#> GSM1182283     1  0.1387      0.871 0.932 0.000 0.000 0.000 0.068 0.000
#> GSM1182284     1  0.1327      0.869 0.936 0.000 0.000 0.000 0.064 0.000
#> GSM1182285     3  0.3737      0.882 0.000 0.392 0.608 0.000 0.000 0.000
#> GSM1182286     2  0.0146      0.846 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182287     2  0.3288      0.443 0.000 0.724 0.276 0.000 0.000 0.000
#> GSM1182288     2  0.3578      0.224 0.000 0.660 0.340 0.000 0.000 0.000
#> GSM1182289     5  0.3370      0.642 0.004 0.000 0.212 0.000 0.772 0.012
#> GSM1182290     5  0.2778      0.686 0.168 0.000 0.008 0.000 0.824 0.000
#> GSM1182291     4  0.0000      0.995 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182274     2  0.1765      0.775 0.000 0.904 0.096 0.000 0.000 0.000
#> GSM1182292     2  0.0146      0.846 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182293     2  0.0000      0.846 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182294     2  0.0146      0.846 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182295     2  0.0000      0.846 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182296     2  0.0146      0.846 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182298     3  0.3499      0.935 0.000 0.320 0.680 0.000 0.000 0.000
#> GSM1182299     2  0.0000      0.846 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182300     2  0.0146      0.846 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182301     2  0.0146      0.846 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182303     2  0.0000      0.846 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182304     5  0.3273      0.647 0.004 0.000 0.212 0.000 0.776 0.008
#> GSM1182305     5  0.6189      0.560 0.024 0.000 0.224 0.108 0.600 0.044
#> GSM1182306     6  0.1863      0.907 0.000 0.000 0.000 0.104 0.000 0.896
#> GSM1182307     2  0.0146      0.846 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182309     2  0.0000      0.846 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182312     2  0.0146      0.846 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182314     4  0.0520      0.987 0.000 0.000 0.008 0.984 0.000 0.008
#> GSM1182316     2  0.0146      0.846 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182318     2  0.0000      0.846 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182319     2  0.0146      0.846 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182320     2  0.0146      0.846 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182321     2  0.0146      0.845 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182322     2  0.0146      0.846 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182324     2  0.0146      0.845 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182297     2  0.0146      0.846 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182302     6  0.0458      0.938 0.000 0.000 0.000 0.016 0.000 0.984
#> GSM1182308     2  0.0000      0.846 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182310     2  0.0146      0.846 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182311     5  0.3136      0.690 0.228 0.000 0.004 0.000 0.768 0.000
#> GSM1182313     4  0.0000      0.995 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182315     2  0.0146      0.846 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1182317     2  0.0000      0.846 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182323     5  0.3240      0.690 0.244 0.000 0.004 0.000 0.752 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-hclust-consensus-heatmap-1

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk CV-hclust-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk CV-hclust-collect-classes

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

test_to_known_factors(res)
#>             n disease.state(p) gender(p) k
#> CV:hclust 139           0.0773     1.000 2
#> CV:hclust 137           0.1355     0.829 3
#> CV:hclust 134           0.1447     0.769 4
#> CV:hclust 131           0.2322     0.734 5
#> CV:hclust 118           0.0481     0.840 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 46361 rows and 139 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 1.000           1.000       1.000         0.4791 0.521   0.521
#> 3 3 0.714           0.702       0.690         0.2813 0.815   0.645
#> 4 4 0.608           0.870       0.798         0.1437 0.834   0.567
#> 5 5 0.546           0.780       0.751         0.0675 0.991   0.967
#> 6 6 0.658           0.688       0.742         0.0595 0.915   0.684

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
#> GSM1182186     1       0          1  1  0
#> GSM1182187     1       0          1  1  0
#> GSM1182188     1       0          1  1  0
#> GSM1182189     1       0          1  1  0
#> GSM1182190     1       0          1  1  0
#> GSM1182191     1       0          1  1  0
#> GSM1182192     1       0          1  1  0
#> GSM1182193     1       0          1  1  0
#> GSM1182194     2       0          1  0  1
#> GSM1182195     2       0          1  0  1
#> GSM1182196     2       0          1  0  1
#> GSM1182197     2       0          1  0  1
#> GSM1182198     2       0          1  0  1
#> GSM1182199     2       0          1  0  1
#> GSM1182200     2       0          1  0  1
#> GSM1182201     2       0          1  0  1
#> GSM1182202     1       0          1  1  0
#> GSM1182203     1       0          1  1  0
#> GSM1182204     1       0          1  1  0
#> GSM1182205     2       0          1  0  1
#> GSM1182206     2       0          1  0  1
#> GSM1182207     1       0          1  1  0
#> GSM1182208     1       0          1  1  0
#> GSM1182209     2       0          1  0  1
#> GSM1182210     2       0          1  0  1
#> GSM1182211     2       0          1  0  1
#> GSM1182212     2       0          1  0  1
#> GSM1182213     2       0          1  0  1
#> GSM1182214     2       0          1  0  1
#> GSM1182215     2       0          1  0  1
#> GSM1182216     2       0          1  0  1
#> GSM1182217     1       0          1  1  0
#> GSM1182218     1       0          1  1  0
#> GSM1182219     2       0          1  0  1
#> GSM1182220     2       0          1  0  1
#> GSM1182221     2       0          1  0  1
#> GSM1182222     2       0          1  0  1
#> GSM1182223     2       0          1  0  1
#> GSM1182224     2       0          1  0  1
#> GSM1182225     2       0          1  0  1
#> GSM1182226     2       0          1  0  1
#> GSM1182227     1       0          1  1  0
#> GSM1182228     2       0          1  0  1
#> GSM1182229     2       0          1  0  1
#> GSM1182230     2       0          1  0  1
#> GSM1182231     2       0          1  0  1
#> GSM1182232     1       0          1  1  0
#> GSM1182233     1       0          1  1  0
#> GSM1182234     1       0          1  1  0
#> GSM1182235     2       0          1  0  1
#> GSM1182236     1       0          1  1  0
#> GSM1182237     2       0          1  0  1
#> GSM1182238     2       0          1  0  1
#> GSM1182239     2       0          1  0  1
#> GSM1182240     2       0          1  0  1
#> GSM1182241     2       0          1  0  1
#> GSM1182242     2       0          1  0  1
#> GSM1182243     2       0          1  0  1
#> GSM1182244     2       0          1  0  1
#> GSM1182245     1       0          1  1  0
#> GSM1182246     1       0          1  1  0
#> GSM1182247     2       0          1  0  1
#> GSM1182248     2       0          1  0  1
#> GSM1182249     2       0          1  0  1
#> GSM1182250     2       0          1  0  1
#> GSM1182251     1       0          1  1  0
#> GSM1182252     2       0          1  0  1
#> GSM1182253     2       0          1  0  1
#> GSM1182254     2       0          1  0  1
#> GSM1182255     1       0          1  1  0
#> GSM1182256     1       0          1  1  0
#> GSM1182257     1       0          1  1  0
#> GSM1182258     1       0          1  1  0
#> GSM1182259     1       0          1  1  0
#> GSM1182260     2       0          1  0  1
#> GSM1182261     2       0          1  0  1
#> GSM1182262     2       0          1  0  1
#> GSM1182263     1       0          1  1  0
#> GSM1182264     2       0          1  0  1
#> GSM1182265     2       0          1  0  1
#> GSM1182266     2       0          1  0  1
#> GSM1182267     1       0          1  1  0
#> GSM1182268     1       0          1  1  0
#> GSM1182269     1       0          1  1  0
#> GSM1182270     1       0          1  1  0
#> GSM1182271     1       0          1  1  0
#> GSM1182272     1       0          1  1  0
#> GSM1182273     2       0          1  0  1
#> GSM1182275     2       0          1  0  1
#> GSM1182276     2       0          1  0  1
#> GSM1182277     1       0          1  1  0
#> GSM1182278     1       0          1  1  0
#> GSM1182279     1       0          1  1  0
#> GSM1182280     1       0          1  1  0
#> GSM1182281     1       0          1  1  0
#> GSM1182282     1       0          1  1  0
#> GSM1182283     1       0          1  1  0
#> GSM1182284     1       0          1  1  0
#> GSM1182285     2       0          1  0  1
#> GSM1182286     2       0          1  0  1
#> GSM1182287     2       0          1  0  1
#> GSM1182288     2       0          1  0  1
#> GSM1182289     1       0          1  1  0
#> GSM1182290     1       0          1  1  0
#> GSM1182291     1       0          1  1  0
#> GSM1182274     2       0          1  0  1
#> GSM1182292     2       0          1  0  1
#> GSM1182293     2       0          1  0  1
#> GSM1182294     2       0          1  0  1
#> GSM1182295     2       0          1  0  1
#> GSM1182296     2       0          1  0  1
#> GSM1182298     2       0          1  0  1
#> GSM1182299     2       0          1  0  1
#> GSM1182300     2       0          1  0  1
#> GSM1182301     2       0          1  0  1
#> GSM1182303     2       0          1  0  1
#> GSM1182304     1       0          1  1  0
#> GSM1182305     1       0          1  1  0
#> GSM1182306     1       0          1  1  0
#> GSM1182307     2       0          1  0  1
#> GSM1182309     2       0          1  0  1
#> GSM1182312     2       0          1  0  1
#> GSM1182314     1       0          1  1  0
#> GSM1182316     2       0          1  0  1
#> GSM1182318     2       0          1  0  1
#> GSM1182319     2       0          1  0  1
#> GSM1182320     2       0          1  0  1
#> GSM1182321     2       0          1  0  1
#> GSM1182322     2       0          1  0  1
#> GSM1182324     2       0          1  0  1
#> GSM1182297     2       0          1  0  1
#> GSM1182302     1       0          1  1  0
#> GSM1182308     2       0          1  0  1
#> GSM1182310     2       0          1  0  1
#> GSM1182311     1       0          1  1  0
#> GSM1182313     1       0          1  1  0
#> GSM1182315     2       0          1  0  1
#> GSM1182317     2       0          1  0  1
#> GSM1182323     1       0          1  1  0

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1182186     1  0.6260    0.78319 0.552 0.000 0.448
#> GSM1182187     1  0.6260    0.78319 0.552 0.000 0.448
#> GSM1182188     1  0.6260    0.78319 0.552 0.000 0.448
#> GSM1182189     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182190     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182191     1  0.6260    0.78319 0.552 0.000 0.448
#> GSM1182192     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182193     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182194     2  0.0592    0.74336 0.000 0.988 0.012
#> GSM1182195     2  0.0000    0.74398 0.000 1.000 0.000
#> GSM1182196     3  0.6260    0.97798 0.000 0.448 0.552
#> GSM1182197     3  0.6286    0.96368 0.000 0.464 0.536
#> GSM1182198     2  0.0424    0.74327 0.000 0.992 0.008
#> GSM1182199     2  0.0747    0.74156 0.000 0.984 0.016
#> GSM1182200     3  0.6308    0.90850 0.000 0.492 0.508
#> GSM1182201     2  0.5560   -0.00864 0.000 0.700 0.300
#> GSM1182202     1  0.6260    0.78319 0.552 0.000 0.448
#> GSM1182203     1  0.6260    0.78319 0.552 0.000 0.448
#> GSM1182204     1  0.6260    0.78319 0.552 0.000 0.448
#> GSM1182205     2  0.0592    0.74131 0.000 0.988 0.012
#> GSM1182206     2  0.0424    0.74120 0.000 0.992 0.008
#> GSM1182207     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182208     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182209     3  0.6260    0.97798 0.000 0.448 0.552
#> GSM1182210     3  0.6274    0.97666 0.000 0.456 0.544
#> GSM1182211     3  0.6274    0.97666 0.000 0.456 0.544
#> GSM1182212     3  0.6274    0.97486 0.000 0.456 0.544
#> GSM1182213     3  0.6274    0.97666 0.000 0.456 0.544
#> GSM1182214     3  0.6274    0.97666 0.000 0.456 0.544
#> GSM1182215     2  0.0000    0.74398 0.000 1.000 0.000
#> GSM1182216     2  0.6274   -0.77863 0.000 0.544 0.456
#> GSM1182217     1  0.6260    0.78319 0.552 0.000 0.448
#> GSM1182218     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182219     3  0.6274    0.97666 0.000 0.456 0.544
#> GSM1182220     3  0.6286    0.96346 0.000 0.464 0.536
#> GSM1182221     2  0.6308   -0.87773 0.000 0.508 0.492
#> GSM1182222     2  0.6252   -0.74623 0.000 0.556 0.444
#> GSM1182223     2  0.0592    0.74336 0.000 0.988 0.012
#> GSM1182224     2  0.0000    0.74398 0.000 1.000 0.000
#> GSM1182225     2  0.6274   -0.77863 0.000 0.544 0.456
#> GSM1182226     2  0.6280   -0.79035 0.000 0.540 0.460
#> GSM1182227     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182228     2  0.2711    0.67447 0.000 0.912 0.088
#> GSM1182229     2  0.0424    0.74417 0.000 0.992 0.008
#> GSM1182230     2  0.0000    0.74398 0.000 1.000 0.000
#> GSM1182231     2  0.6244   -0.73522 0.000 0.560 0.440
#> GSM1182232     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182233     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182234     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182235     3  0.6260    0.97798 0.000 0.448 0.552
#> GSM1182236     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182237     2  0.3267    0.63776 0.000 0.884 0.116
#> GSM1182238     3  0.6291    0.96095 0.000 0.468 0.532
#> GSM1182239     3  0.6260    0.97798 0.000 0.448 0.552
#> GSM1182240     3  0.6280    0.96847 0.000 0.460 0.540
#> GSM1182241     3  0.6260    0.97798 0.000 0.448 0.552
#> GSM1182242     2  0.1529    0.72310 0.000 0.960 0.040
#> GSM1182243     2  0.0237    0.74404 0.000 0.996 0.004
#> GSM1182244     2  0.2625    0.67619 0.000 0.916 0.084
#> GSM1182245     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182246     1  0.6260    0.78319 0.552 0.000 0.448
#> GSM1182247     2  0.0592    0.74336 0.000 0.988 0.012
#> GSM1182248     2  0.0000    0.74398 0.000 1.000 0.000
#> GSM1182249     2  0.2261    0.68422 0.000 0.932 0.068
#> GSM1182250     2  0.0424    0.74120 0.000 0.992 0.008
#> GSM1182251     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182252     2  0.0592    0.74336 0.000 0.988 0.012
#> GSM1182253     2  0.0000    0.74398 0.000 1.000 0.000
#> GSM1182254     2  0.0000    0.74398 0.000 1.000 0.000
#> GSM1182255     1  0.6260    0.78319 0.552 0.000 0.448
#> GSM1182256     1  0.6260    0.78319 0.552 0.000 0.448
#> GSM1182257     1  0.6260    0.78319 0.552 0.000 0.448
#> GSM1182258     1  0.6260    0.78319 0.552 0.000 0.448
#> GSM1182259     1  0.6260    0.78319 0.552 0.000 0.448
#> GSM1182260     2  0.2537    0.68389 0.000 0.920 0.080
#> GSM1182261     2  0.0424    0.74120 0.000 0.992 0.008
#> GSM1182262     2  0.0000    0.74398 0.000 1.000 0.000
#> GSM1182263     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182264     2  0.2878    0.66321 0.000 0.904 0.096
#> GSM1182265     2  0.0000    0.74398 0.000 1.000 0.000
#> GSM1182266     2  0.1753    0.71601 0.000 0.952 0.048
#> GSM1182267     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182268     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182269     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182270     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182271     1  0.6260    0.78319 0.552 0.000 0.448
#> GSM1182272     1  0.6260    0.78319 0.552 0.000 0.448
#> GSM1182273     2  0.0000    0.74398 0.000 1.000 0.000
#> GSM1182275     2  0.0592    0.74336 0.000 0.988 0.012
#> GSM1182276     3  0.6280    0.97044 0.000 0.460 0.540
#> GSM1182277     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182278     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182279     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182280     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182281     1  0.5905    0.79647 0.648 0.000 0.352
#> GSM1182282     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182283     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182284     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182285     2  0.0592    0.74336 0.000 0.988 0.012
#> GSM1182286     3  0.6260    0.97798 0.000 0.448 0.552
#> GSM1182287     2  0.4842    0.25323 0.000 0.776 0.224
#> GSM1182288     2  0.0424    0.74327 0.000 0.992 0.008
#> GSM1182289     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182290     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182291     1  0.6260    0.78319 0.552 0.000 0.448
#> GSM1182274     2  0.0000    0.74398 0.000 1.000 0.000
#> GSM1182292     3  0.6260    0.97798 0.000 0.448 0.552
#> GSM1182293     3  0.6267    0.97758 0.000 0.452 0.548
#> GSM1182294     3  0.6280    0.97247 0.000 0.460 0.540
#> GSM1182295     3  0.6280    0.97247 0.000 0.460 0.540
#> GSM1182296     3  0.6260    0.97798 0.000 0.448 0.552
#> GSM1182298     2  0.0747    0.74156 0.000 0.984 0.016
#> GSM1182299     3  0.6267    0.97758 0.000 0.452 0.548
#> GSM1182300     3  0.6260    0.97798 0.000 0.448 0.552
#> GSM1182301     3  0.6260    0.97798 0.000 0.448 0.552
#> GSM1182303     3  0.6307    0.92006 0.000 0.488 0.512
#> GSM1182304     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182305     1  0.6260    0.78319 0.552 0.000 0.448
#> GSM1182306     1  0.6260    0.78319 0.552 0.000 0.448
#> GSM1182307     3  0.6260    0.97798 0.000 0.448 0.552
#> GSM1182309     3  0.6260    0.97798 0.000 0.448 0.552
#> GSM1182312     3  0.6309    0.90121 0.000 0.496 0.504
#> GSM1182314     1  0.6260    0.78319 0.552 0.000 0.448
#> GSM1182316     2  0.6309   -0.89628 0.000 0.500 0.500
#> GSM1182318     3  0.6274    0.97666 0.000 0.456 0.544
#> GSM1182319     3  0.6260    0.97798 0.000 0.448 0.552
#> GSM1182320     2  0.6309   -0.88781 0.000 0.504 0.496
#> GSM1182321     2  0.6204   -0.59520 0.000 0.576 0.424
#> GSM1182322     3  0.6260    0.97798 0.000 0.448 0.552
#> GSM1182324     2  0.5835   -0.36246 0.000 0.660 0.340
#> GSM1182297     3  0.6260    0.97798 0.000 0.448 0.552
#> GSM1182302     1  0.6260    0.78319 0.552 0.000 0.448
#> GSM1182308     2  0.6308   -0.87800 0.000 0.508 0.492
#> GSM1182310     3  0.6308    0.91038 0.000 0.492 0.508
#> GSM1182311     1  0.0000    0.84728 1.000 0.000 0.000
#> GSM1182313     1  0.6260    0.78319 0.552 0.000 0.448
#> GSM1182315     3  0.6286    0.96386 0.000 0.464 0.536
#> GSM1182317     3  0.6267    0.97758 0.000 0.452 0.548
#> GSM1182323     1  0.0000    0.84728 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1182186     4  0.6727      0.884 0.384 0.000 0.096 0.520
#> GSM1182187     4  0.6097      0.932 0.364 0.000 0.056 0.580
#> GSM1182188     4  0.4730      0.947 0.364 0.000 0.000 0.636
#> GSM1182189     1  0.0188      0.945 0.996 0.000 0.004 0.000
#> GSM1182190     1  0.0188      0.945 0.996 0.000 0.004 0.000
#> GSM1182191     4  0.7036      0.858 0.384 0.000 0.124 0.492
#> GSM1182192     1  0.1022      0.940 0.968 0.000 0.032 0.000
#> GSM1182193     1  0.1022      0.940 0.968 0.000 0.032 0.000
#> GSM1182194     3  0.5842      0.865 0.000 0.168 0.704 0.128
#> GSM1182195     3  0.5985      0.865 0.000 0.168 0.692 0.140
#> GSM1182196     2  0.3108      0.871 0.000 0.872 0.016 0.112
#> GSM1182197     2  0.3647      0.752 0.000 0.832 0.152 0.016
#> GSM1182198     3  0.5849      0.864 0.000 0.164 0.704 0.132
#> GSM1182199     3  0.5800      0.864 0.000 0.164 0.708 0.128
#> GSM1182200     2  0.2670      0.857 0.000 0.904 0.072 0.024
#> GSM1182201     2  0.5858     -0.281 0.000 0.500 0.468 0.032
#> GSM1182202     4  0.6097      0.932 0.364 0.000 0.056 0.580
#> GSM1182203     4  0.6097      0.932 0.364 0.000 0.056 0.580
#> GSM1182204     4  0.6097      0.932 0.364 0.000 0.056 0.580
#> GSM1182205     3  0.5160      0.888 0.000 0.180 0.748 0.072
#> GSM1182206     3  0.5669      0.866 0.000 0.200 0.708 0.092
#> GSM1182207     1  0.1211      0.925 0.960 0.000 0.040 0.000
#> GSM1182208     1  0.1211      0.925 0.960 0.000 0.040 0.000
#> GSM1182209     2  0.1576      0.881 0.000 0.948 0.004 0.048
#> GSM1182210     2  0.0817      0.885 0.000 0.976 0.000 0.024
#> GSM1182211     2  0.0817      0.884 0.000 0.976 0.000 0.024
#> GSM1182212     2  0.0817      0.883 0.000 0.976 0.000 0.024
#> GSM1182213     2  0.0707      0.883 0.000 0.980 0.000 0.020
#> GSM1182214     2  0.0592      0.883 0.000 0.984 0.000 0.016
#> GSM1182215     3  0.5007      0.893 0.000 0.172 0.760 0.068
#> GSM1182216     2  0.3745      0.834 0.000 0.852 0.060 0.088
#> GSM1182217     4  0.6727      0.884 0.384 0.000 0.096 0.520
#> GSM1182218     1  0.0188      0.945 0.996 0.000 0.004 0.000
#> GSM1182219     2  0.0592      0.883 0.000 0.984 0.000 0.016
#> GSM1182220     2  0.1388      0.882 0.000 0.960 0.012 0.028
#> GSM1182221     2  0.4095      0.831 0.000 0.804 0.024 0.172
#> GSM1182222     2  0.3820      0.831 0.000 0.848 0.064 0.088
#> GSM1182223     3  0.4248      0.882 0.000 0.220 0.768 0.012
#> GSM1182224     3  0.5985      0.865 0.000 0.168 0.692 0.140
#> GSM1182225     2  0.3745      0.834 0.000 0.852 0.060 0.088
#> GSM1182226     2  0.3796      0.835 0.000 0.848 0.056 0.096
#> GSM1182227     1  0.1022      0.940 0.968 0.000 0.032 0.000
#> GSM1182228     3  0.5623      0.787 0.000 0.292 0.660 0.048
#> GSM1182229     3  0.3266      0.903 0.000 0.168 0.832 0.000
#> GSM1182230     3  0.3836      0.905 0.000 0.168 0.816 0.016
#> GSM1182231     2  0.5867      0.603 0.000 0.688 0.216 0.096
#> GSM1182232     1  0.0000      0.945 1.000 0.000 0.000 0.000
#> GSM1182233     1  0.0188      0.945 0.996 0.000 0.004 0.000
#> GSM1182234     1  0.1022      0.940 0.968 0.000 0.032 0.000
#> GSM1182235     2  0.1489      0.883 0.000 0.952 0.004 0.044
#> GSM1182236     1  0.0188      0.945 0.996 0.000 0.004 0.000
#> GSM1182237     3  0.6079      0.760 0.000 0.300 0.628 0.072
#> GSM1182238     2  0.2011      0.875 0.000 0.920 0.000 0.080
#> GSM1182239     2  0.1398      0.882 0.000 0.956 0.004 0.040
#> GSM1182240     2  0.2401      0.881 0.000 0.904 0.004 0.092
#> GSM1182241     2  0.2021      0.876 0.000 0.932 0.012 0.056
#> GSM1182242     3  0.3836      0.901 0.000 0.168 0.816 0.016
#> GSM1182243     3  0.3946      0.904 0.000 0.168 0.812 0.020
#> GSM1182244     3  0.6868      0.783 0.000 0.264 0.584 0.152
#> GSM1182245     1  0.1022      0.940 0.968 0.000 0.032 0.000
#> GSM1182246     4  0.4730      0.947 0.364 0.000 0.000 0.636
#> GSM1182247     3  0.3448      0.903 0.000 0.168 0.828 0.004
#> GSM1182248     3  0.3836      0.904 0.000 0.168 0.816 0.016
#> GSM1182249     3  0.6157      0.815 0.000 0.232 0.660 0.108
#> GSM1182250     3  0.5212      0.883 0.000 0.192 0.740 0.068
#> GSM1182251     1  0.2760      0.843 0.872 0.000 0.128 0.000
#> GSM1182252     3  0.3448      0.903 0.000 0.168 0.828 0.004
#> GSM1182253     3  0.4379      0.902 0.000 0.172 0.792 0.036
#> GSM1182254     3  0.3591      0.904 0.000 0.168 0.824 0.008
#> GSM1182255     4  0.4730      0.947 0.364 0.000 0.000 0.636
#> GSM1182256     4  0.4730      0.947 0.364 0.000 0.000 0.636
#> GSM1182257     4  0.4905      0.947 0.364 0.000 0.004 0.632
#> GSM1182258     4  0.4730      0.947 0.364 0.000 0.000 0.636
#> GSM1182259     4  0.4730      0.947 0.364 0.000 0.000 0.636
#> GSM1182260     3  0.4974      0.863 0.000 0.224 0.736 0.040
#> GSM1182261     3  0.5572      0.869 0.000 0.196 0.716 0.088
#> GSM1182262     3  0.4937      0.894 0.000 0.172 0.764 0.064
#> GSM1182263     1  0.2530      0.862 0.888 0.000 0.112 0.000
#> GSM1182264     3  0.5227      0.829 0.000 0.256 0.704 0.040
#> GSM1182265     3  0.5728      0.855 0.000 0.188 0.708 0.104
#> GSM1182266     3  0.4375      0.893 0.000 0.180 0.788 0.032
#> GSM1182267     1  0.1022      0.940 0.968 0.000 0.032 0.000
#> GSM1182268     1  0.0188      0.945 0.996 0.000 0.004 0.000
#> GSM1182269     1  0.0188      0.945 0.996 0.000 0.004 0.000
#> GSM1182270     1  0.0188      0.945 0.996 0.000 0.004 0.000
#> GSM1182271     4  0.4730      0.947 0.364 0.000 0.000 0.636
#> GSM1182272     4  0.4730      0.947 0.364 0.000 0.000 0.636
#> GSM1182273     3  0.3718      0.904 0.000 0.168 0.820 0.012
#> GSM1182275     3  0.3266      0.903 0.000 0.168 0.832 0.000
#> GSM1182276     2  0.1833      0.875 0.000 0.944 0.032 0.024
#> GSM1182277     1  0.1022      0.940 0.968 0.000 0.032 0.000
#> GSM1182278     1  0.1022      0.940 0.968 0.000 0.032 0.000
#> GSM1182279     1  0.2704      0.848 0.876 0.000 0.124 0.000
#> GSM1182280     1  0.2530      0.862 0.888 0.000 0.112 0.000
#> GSM1182281     4  0.6393      0.736 0.456 0.000 0.064 0.480
#> GSM1182282     1  0.1022      0.940 0.968 0.000 0.032 0.000
#> GSM1182283     1  0.1022      0.940 0.968 0.000 0.032 0.000
#> GSM1182284     1  0.1022      0.940 0.968 0.000 0.032 0.000
#> GSM1182285     3  0.5842      0.865 0.000 0.168 0.704 0.128
#> GSM1182286     2  0.1305      0.882 0.000 0.960 0.004 0.036
#> GSM1182287     3  0.5938      0.294 0.000 0.480 0.484 0.036
#> GSM1182288     3  0.3790      0.904 0.000 0.164 0.820 0.016
#> GSM1182289     1  0.2704      0.848 0.876 0.000 0.124 0.000
#> GSM1182290     1  0.1211      0.925 0.960 0.000 0.040 0.000
#> GSM1182291     4  0.4730      0.947 0.364 0.000 0.000 0.636
#> GSM1182274     3  0.3808      0.903 0.000 0.176 0.812 0.012
#> GSM1182292     2  0.1743      0.877 0.000 0.940 0.004 0.056
#> GSM1182293     2  0.2647      0.860 0.000 0.880 0.000 0.120
#> GSM1182294     2  0.2814      0.858 0.000 0.868 0.000 0.132
#> GSM1182295     2  0.0921      0.887 0.000 0.972 0.000 0.028
#> GSM1182296     2  0.1824      0.880 0.000 0.936 0.004 0.060
#> GSM1182298     3  0.5849      0.863 0.000 0.164 0.704 0.132
#> GSM1182299     2  0.0469      0.886 0.000 0.988 0.000 0.012
#> GSM1182300     2  0.1902      0.882 0.000 0.932 0.004 0.064
#> GSM1182301     2  0.1743      0.881 0.000 0.940 0.004 0.056
#> GSM1182303     2  0.2089      0.876 0.000 0.932 0.020 0.048
#> GSM1182304     1  0.2760      0.847 0.872 0.000 0.128 0.000
#> GSM1182305     4  0.7081      0.849 0.388 0.000 0.128 0.484
#> GSM1182306     4  0.4905      0.947 0.364 0.000 0.004 0.632
#> GSM1182307     2  0.1824      0.880 0.000 0.936 0.004 0.060
#> GSM1182309     2  0.3157      0.857 0.000 0.852 0.004 0.144
#> GSM1182312     2  0.3925      0.834 0.000 0.808 0.016 0.176
#> GSM1182314     4  0.4730      0.947 0.364 0.000 0.000 0.636
#> GSM1182316     2  0.4035      0.831 0.000 0.804 0.020 0.176
#> GSM1182318     2  0.1474      0.884 0.000 0.948 0.000 0.052
#> GSM1182319     2  0.3306      0.855 0.000 0.840 0.004 0.156
#> GSM1182320     2  0.4035      0.831 0.000 0.804 0.020 0.176
#> GSM1182321     2  0.6457      0.587 0.000 0.644 0.200 0.156
#> GSM1182322     2  0.3306      0.855 0.000 0.840 0.004 0.156
#> GSM1182324     2  0.6950      0.473 0.000 0.584 0.236 0.180
#> GSM1182297     2  0.1398      0.883 0.000 0.956 0.004 0.040
#> GSM1182302     4  0.6097      0.932 0.364 0.000 0.056 0.580
#> GSM1182308     2  0.2563      0.867 0.000 0.908 0.020 0.072
#> GSM1182310     2  0.3636      0.839 0.000 0.820 0.008 0.172
#> GSM1182311     1  0.0188      0.945 0.996 0.000 0.004 0.000
#> GSM1182313     4  0.4730      0.947 0.364 0.000 0.000 0.636
#> GSM1182315     2  0.3157      0.870 0.000 0.852 0.004 0.144
#> GSM1182317     2  0.2530      0.864 0.000 0.888 0.000 0.112
#> GSM1182323     1  0.0188      0.945 0.996 0.000 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
#> GSM1182186     4  0.6938     0.7642 0.288 0.000 0.028 0.500 NA
#> GSM1182187     4  0.6041     0.8819 0.248 0.000 0.052 0.632 NA
#> GSM1182188     4  0.3480     0.9028 0.248 0.000 0.000 0.752 NA
#> GSM1182189     1  0.0404     0.8713 0.988 0.000 0.000 0.000 NA
#> GSM1182190     1  0.0566     0.8711 0.984 0.000 0.004 0.000 NA
#> GSM1182191     4  0.7233     0.7017 0.288 0.000 0.028 0.440 NA
#> GSM1182192     1  0.2708     0.8547 0.884 0.000 0.044 0.000 NA
#> GSM1182193     1  0.2708     0.8547 0.884 0.000 0.044 0.000 NA
#> GSM1182194     3  0.5739     0.7011 0.000 0.100 0.556 0.000 NA
#> GSM1182195     3  0.5762     0.6998 0.000 0.100 0.548 0.000 NA
#> GSM1182196     2  0.6479     0.6953 0.000 0.636 0.100 0.096 NA
#> GSM1182197     2  0.5729     0.3431 0.000 0.600 0.320 0.056 NA
#> GSM1182198     3  0.5822     0.6976 0.000 0.108 0.548 0.000 NA
#> GSM1182199     3  0.5845     0.6964 0.000 0.108 0.540 0.000 NA
#> GSM1182200     2  0.3289     0.7534 0.000 0.860 0.088 0.036 NA
#> GSM1182201     3  0.5545     0.3587 0.000 0.432 0.516 0.032 NA
#> GSM1182202     4  0.6041     0.8819 0.248 0.000 0.052 0.632 NA
#> GSM1182203     4  0.5856     0.8854 0.248 0.000 0.044 0.644 NA
#> GSM1182204     4  0.5913     0.8839 0.248 0.000 0.044 0.640 NA
#> GSM1182205     3  0.4543     0.8232 0.000 0.120 0.768 0.008 NA
#> GSM1182206     3  0.5195     0.7790 0.000 0.136 0.736 0.036 NA
#> GSM1182207     1  0.2329     0.8197 0.876 0.000 0.000 0.000 NA
#> GSM1182208     1  0.2329     0.8197 0.876 0.000 0.000 0.000 NA
#> GSM1182209     2  0.1830     0.8013 0.000 0.932 0.000 0.028 NA
#> GSM1182210     2  0.1854     0.8112 0.000 0.936 0.008 0.020 NA
#> GSM1182211     2  0.1200     0.8027 0.000 0.964 0.008 0.016 NA
#> GSM1182212     2  0.1518     0.7977 0.000 0.952 0.016 0.020 NA
#> GSM1182213     2  0.1455     0.8026 0.000 0.952 0.008 0.032 NA
#> GSM1182214     2  0.1569     0.8081 0.000 0.948 0.008 0.032 NA
#> GSM1182215     3  0.4244     0.8198 0.000 0.104 0.804 0.024 NA
#> GSM1182216     2  0.5258     0.7474 0.000 0.740 0.076 0.060 NA
#> GSM1182217     4  0.7129     0.7809 0.288 0.000 0.052 0.504 NA
#> GSM1182218     1  0.0566     0.8711 0.984 0.000 0.004 0.000 NA
#> GSM1182219     2  0.1538     0.8046 0.000 0.948 0.008 0.036 NA
#> GSM1182220     2  0.2060     0.7958 0.000 0.928 0.036 0.024 NA
#> GSM1182221     2  0.6802     0.6774 0.000 0.548 0.036 0.168 NA
#> GSM1182222     2  0.5422     0.7386 0.000 0.728 0.088 0.060 NA
#> GSM1182223     3  0.3940     0.7792 0.000 0.208 0.768 0.008 NA
#> GSM1182224     3  0.5909     0.7001 0.000 0.100 0.544 0.004 NA
#> GSM1182225     2  0.5093     0.7511 0.000 0.752 0.072 0.056 NA
#> GSM1182226     2  0.5436     0.7464 0.000 0.728 0.080 0.068 NA
#> GSM1182227     1  0.2782     0.8542 0.880 0.000 0.048 0.000 NA
#> GSM1182228     3  0.5310     0.6845 0.000 0.284 0.652 0.024 NA
#> GSM1182229     3  0.2416     0.8341 0.000 0.100 0.888 0.000 NA
#> GSM1182230     3  0.2914     0.8355 0.000 0.100 0.872 0.012 NA
#> GSM1182231     2  0.6963     0.0572 0.000 0.432 0.404 0.044 NA
#> GSM1182232     1  0.0162     0.8714 0.996 0.000 0.000 0.000 NA
#> GSM1182233     1  0.0404     0.8713 0.988 0.000 0.000 0.000 NA
#> GSM1182234     1  0.2708     0.8547 0.884 0.000 0.044 0.000 NA
#> GSM1182235     2  0.3142     0.8052 0.000 0.868 0.008 0.068 NA
#> GSM1182236     1  0.0566     0.8711 0.984 0.000 0.004 0.000 NA
#> GSM1182237     3  0.6276     0.6682 0.000 0.232 0.624 0.060 NA
#> GSM1182238     2  0.4079     0.7906 0.000 0.812 0.020 0.060 NA
#> GSM1182239     2  0.2381     0.8018 0.000 0.908 0.004 0.052 NA
#> GSM1182240     2  0.2388     0.8052 0.000 0.900 0.000 0.028 NA
#> GSM1182241     2  0.2745     0.7839 0.000 0.896 0.024 0.052 NA
#> GSM1182242     3  0.3192     0.8331 0.000 0.112 0.848 0.000 NA
#> GSM1182243     3  0.3387     0.8346 0.000 0.100 0.852 0.028 NA
#> GSM1182244     3  0.6739     0.6297 0.000 0.176 0.456 0.012 NA
#> GSM1182245     1  0.2708     0.8547 0.884 0.000 0.044 0.000 NA
#> GSM1182246     4  0.3635     0.9026 0.248 0.000 0.004 0.748 NA
#> GSM1182247     3  0.3037     0.8340 0.000 0.100 0.864 0.004 NA
#> GSM1182248     3  0.3195     0.8340 0.000 0.100 0.856 0.004 NA
#> GSM1182249     3  0.6170     0.7104 0.000 0.140 0.652 0.048 NA
#> GSM1182250     3  0.4575     0.8172 0.000 0.116 0.784 0.036 NA
#> GSM1182251     1  0.3661     0.6910 0.724 0.000 0.000 0.000 NA
#> GSM1182252     3  0.3117     0.8339 0.000 0.100 0.860 0.004 NA
#> GSM1182253     3  0.3342     0.8350 0.000 0.100 0.848 0.004 NA
#> GSM1182254     3  0.3204     0.8350 0.000 0.100 0.860 0.016 NA
#> GSM1182255     4  0.3480     0.9028 0.248 0.000 0.000 0.752 NA
#> GSM1182256     4  0.3480     0.9028 0.248 0.000 0.000 0.752 NA
#> GSM1182257     4  0.5129     0.8947 0.248 0.000 0.052 0.684 NA
#> GSM1182258     4  0.3635     0.9026 0.248 0.000 0.004 0.748 NA
#> GSM1182259     4  0.3480     0.9028 0.248 0.000 0.000 0.752 NA
#> GSM1182260     3  0.4411     0.8083 0.000 0.152 0.780 0.036 NA
#> GSM1182261     3  0.5361     0.7792 0.000 0.124 0.728 0.044 NA
#> GSM1182262     3  0.4364     0.8214 0.000 0.104 0.796 0.024 NA
#> GSM1182263     1  0.3635     0.7184 0.748 0.000 0.004 0.000 NA
#> GSM1182264     3  0.5071     0.7711 0.000 0.192 0.724 0.048 NA
#> GSM1182265     3  0.5924     0.7558 0.000 0.104 0.688 0.072 NA
#> GSM1182266     3  0.4025     0.8257 0.000 0.124 0.812 0.036 NA
#> GSM1182267     1  0.2708     0.8547 0.884 0.000 0.044 0.000 NA
#> GSM1182268     1  0.0404     0.8713 0.988 0.000 0.000 0.000 NA
#> GSM1182269     1  0.0566     0.8711 0.984 0.000 0.004 0.000 NA
#> GSM1182270     1  0.0566     0.8711 0.984 0.000 0.004 0.000 NA
#> GSM1182271     4  0.3480     0.9028 0.248 0.000 0.000 0.752 NA
#> GSM1182272     4  0.3480     0.9028 0.248 0.000 0.000 0.752 NA
#> GSM1182273     3  0.3561     0.8346 0.000 0.100 0.844 0.032 NA
#> GSM1182275     3  0.3405     0.8332 0.000 0.108 0.848 0.024 NA
#> GSM1182276     2  0.2047     0.7903 0.000 0.928 0.040 0.020 NA
#> GSM1182277     1  0.2708     0.8547 0.884 0.000 0.044 0.000 NA
#> GSM1182278     1  0.2708     0.8547 0.884 0.000 0.044 0.000 NA
#> GSM1182279     1  0.3561     0.7059 0.740 0.000 0.000 0.000 NA
#> GSM1182280     1  0.3452     0.7205 0.756 0.000 0.000 0.000 NA
#> GSM1182281     4  0.7193     0.5386 0.348 0.000 0.044 0.448 NA
#> GSM1182282     1  0.2782     0.8542 0.880 0.000 0.048 0.000 NA
#> GSM1182283     1  0.2708     0.8547 0.884 0.000 0.044 0.000 NA
#> GSM1182284     1  0.2708     0.8547 0.884 0.000 0.044 0.000 NA
#> GSM1182285     3  0.5898     0.7000 0.000 0.100 0.548 0.004 NA
#> GSM1182286     2  0.2304     0.8053 0.000 0.908 0.000 0.048 NA
#> GSM1182287     3  0.5283     0.4574 0.000 0.384 0.572 0.012 NA
#> GSM1182288     3  0.3299     0.8343 0.000 0.108 0.848 0.004 NA
#> GSM1182289     1  0.3586     0.7030 0.736 0.000 0.000 0.000 NA
#> GSM1182290     1  0.2329     0.8197 0.876 0.000 0.000 0.000 NA
#> GSM1182291     4  0.3480     0.9028 0.248 0.000 0.000 0.752 NA
#> GSM1182274     3  0.3374     0.8340 0.000 0.100 0.852 0.032 NA
#> GSM1182292     2  0.1750     0.7999 0.000 0.936 0.000 0.028 NA
#> GSM1182293     2  0.5753     0.7215 0.000 0.660 0.016 0.136 NA
#> GSM1182294     2  0.5911     0.7150 0.000 0.640 0.016 0.140 NA
#> GSM1182295     2  0.2968     0.8095 0.000 0.872 0.008 0.028 NA
#> GSM1182296     2  0.1907     0.8010 0.000 0.928 0.000 0.028 NA
#> GSM1182298     3  0.5845     0.6964 0.000 0.108 0.540 0.000 NA
#> GSM1182299     2  0.1904     0.8017 0.000 0.936 0.020 0.028 NA
#> GSM1182300     2  0.3012     0.8039 0.000 0.860 0.000 0.036 NA
#> GSM1182301     2  0.1818     0.8015 0.000 0.932 0.000 0.024 NA
#> GSM1182303     2  0.2269     0.7934 0.000 0.920 0.032 0.020 NA
#> GSM1182304     1  0.3586     0.7099 0.736 0.000 0.000 0.000 NA
#> GSM1182305     4  0.6723     0.6554 0.300 0.000 0.000 0.420 NA
#> GSM1182306     4  0.5219     0.8940 0.248 0.000 0.052 0.680 NA
#> GSM1182307     2  0.1893     0.8031 0.000 0.928 0.000 0.024 NA
#> GSM1182309     2  0.5777     0.7185 0.000 0.648 0.012 0.136 NA
#> GSM1182312     2  0.6721     0.6827 0.000 0.556 0.032 0.172 NA
#> GSM1182314     4  0.3635     0.9026 0.248 0.000 0.004 0.748 NA
#> GSM1182316     2  0.6632     0.6812 0.000 0.568 0.036 0.144 NA
#> GSM1182318     2  0.3265     0.8050 0.000 0.856 0.008 0.040 NA
#> GSM1182319     2  0.6150     0.7019 0.000 0.612 0.016 0.164 NA
#> GSM1182320     2  0.6679     0.6809 0.000 0.568 0.040 0.144 NA
#> GSM1182321     2  0.7798     0.5403 0.000 0.480 0.140 0.164 NA
#> GSM1182322     2  0.6056     0.7040 0.000 0.616 0.012 0.164 NA
#> GSM1182324     2  0.8150     0.4472 0.000 0.412 0.188 0.152 NA
#> GSM1182297     2  0.2522     0.8059 0.000 0.896 0.000 0.052 NA
#> GSM1182302     4  0.5978     0.8826 0.248 0.000 0.048 0.636 NA
#> GSM1182308     2  0.3054     0.7838 0.000 0.880 0.032 0.028 NA
#> GSM1182310     2  0.6525     0.6834 0.000 0.576 0.028 0.156 NA
#> GSM1182311     1  0.0566     0.8711 0.984 0.000 0.004 0.000 NA
#> GSM1182313     4  0.3480     0.9028 0.248 0.000 0.000 0.752 NA
#> GSM1182315     2  0.4779     0.7811 0.000 0.716 0.000 0.084 NA
#> GSM1182317     2  0.5553     0.7269 0.000 0.668 0.008 0.136 NA
#> GSM1182323     1  0.0404     0.8713 0.988 0.000 0.000 0.000 NA

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1182186     4  0.7203      0.716 0.240 0.000 0.008 0.468 0.148 0.136
#> GSM1182187     4  0.6335      0.827 0.188 0.000 0.016 0.600 0.124 0.072
#> GSM1182188     4  0.2697      0.870 0.188 0.000 0.000 0.812 0.000 0.000
#> GSM1182189     1  0.0653      0.843 0.980 0.000 0.004 0.000 0.012 0.004
#> GSM1182190     1  0.0748      0.843 0.976 0.000 0.004 0.000 0.016 0.004
#> GSM1182191     4  0.7401      0.649 0.240 0.000 0.004 0.412 0.132 0.212
#> GSM1182192     1  0.2979      0.823 0.840 0.000 0.000 0.000 0.116 0.044
#> GSM1182193     1  0.2979      0.823 0.840 0.000 0.000 0.000 0.116 0.044
#> GSM1182194     6  0.4419      0.936 0.000 0.032 0.384 0.000 0.000 0.584
#> GSM1182195     6  0.4845      0.911 0.000 0.032 0.392 0.000 0.016 0.560
#> GSM1182196     2  0.7023     -0.210 0.000 0.464 0.192 0.036 0.276 0.032
#> GSM1182197     3  0.6814      0.360 0.000 0.324 0.492 0.080 0.040 0.064
#> GSM1182198     6  0.4553      0.934 0.000 0.032 0.384 0.000 0.004 0.580
#> GSM1182199     6  0.4400      0.937 0.000 0.032 0.376 0.000 0.000 0.592
#> GSM1182200     2  0.2920      0.642 0.000 0.880 0.040 0.028 0.012 0.040
#> GSM1182201     3  0.5604      0.495 0.000 0.248 0.632 0.056 0.012 0.052
#> GSM1182202     4  0.6498      0.823 0.188 0.000 0.024 0.592 0.120 0.076
#> GSM1182203     4  0.6077      0.837 0.188 0.000 0.020 0.628 0.104 0.060
#> GSM1182204     4  0.6266      0.831 0.188 0.000 0.020 0.612 0.108 0.072
#> GSM1182205     3  0.4936      0.633 0.000 0.036 0.748 0.032 0.104 0.080
#> GSM1182206     3  0.5709      0.588 0.000 0.064 0.676 0.096 0.144 0.020
#> GSM1182207     1  0.2199      0.810 0.892 0.000 0.000 0.000 0.020 0.088
#> GSM1182208     1  0.2199      0.810 0.892 0.000 0.000 0.000 0.020 0.088
#> GSM1182209     2  0.1845      0.671 0.000 0.920 0.000 0.000 0.052 0.028
#> GSM1182210     2  0.1843      0.655 0.000 0.912 0.000 0.004 0.080 0.004
#> GSM1182211     2  0.1572      0.667 0.000 0.936 0.000 0.000 0.036 0.028
#> GSM1182212     2  0.2279      0.662 0.000 0.912 0.012 0.024 0.012 0.040
#> GSM1182213     2  0.1307      0.678 0.000 0.952 0.000 0.008 0.032 0.008
#> GSM1182214     2  0.2001      0.674 0.000 0.920 0.000 0.016 0.044 0.020
#> GSM1182215     3  0.4652      0.639 0.000 0.036 0.752 0.080 0.124 0.008
#> GSM1182216     2  0.6631      0.238 0.000 0.552 0.072 0.116 0.240 0.020
#> GSM1182217     4  0.7271      0.728 0.240 0.000 0.016 0.472 0.156 0.116
#> GSM1182218     1  0.0748      0.843 0.976 0.000 0.004 0.000 0.016 0.004
#> GSM1182219     2  0.2749      0.667 0.000 0.884 0.004 0.044 0.048 0.020
#> GSM1182220     2  0.1787      0.673 0.000 0.932 0.020 0.000 0.016 0.032
#> GSM1182221     5  0.5857      0.585 0.000 0.376 0.008 0.092 0.504 0.020
#> GSM1182222     2  0.6737      0.223 0.000 0.540 0.080 0.116 0.244 0.020
#> GSM1182223     3  0.3394      0.668 0.000 0.104 0.832 0.028 0.000 0.036
#> GSM1182224     6  0.5046      0.902 0.000 0.032 0.384 0.000 0.028 0.556
#> GSM1182225     2  0.6592      0.264 0.000 0.560 0.072 0.116 0.232 0.020
#> GSM1182226     2  0.6779      0.172 0.000 0.528 0.076 0.120 0.256 0.020
#> GSM1182227     1  0.3023      0.822 0.836 0.000 0.000 0.000 0.120 0.044
#> GSM1182228     3  0.4889      0.606 0.000 0.152 0.736 0.024 0.040 0.048
#> GSM1182229     3  0.1575      0.691 0.000 0.032 0.936 0.000 0.000 0.032
#> GSM1182230     3  0.3044      0.688 0.000 0.032 0.876 0.024 0.032 0.036
#> GSM1182231     3  0.7420      0.345 0.000 0.212 0.468 0.132 0.168 0.020
#> GSM1182232     1  0.0000      0.844 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182233     1  0.0508      0.844 0.984 0.000 0.000 0.000 0.012 0.004
#> GSM1182234     1  0.2979      0.823 0.840 0.000 0.000 0.000 0.116 0.044
#> GSM1182235     2  0.5623      0.484 0.000 0.684 0.032 0.080 0.156 0.048
#> GSM1182236     1  0.0748      0.843 0.976 0.000 0.004 0.000 0.016 0.004
#> GSM1182237     3  0.7022      0.464 0.000 0.152 0.568 0.100 0.124 0.056
#> GSM1182238     2  0.6017      0.267 0.000 0.592 0.036 0.092 0.260 0.020
#> GSM1182239     2  0.4873      0.585 0.000 0.752 0.032 0.056 0.116 0.044
#> GSM1182240     2  0.2760      0.664 0.000 0.868 0.004 0.016 0.100 0.012
#> GSM1182241     2  0.4075      0.626 0.000 0.816 0.048 0.056 0.044 0.036
#> GSM1182242     3  0.2322      0.671 0.000 0.036 0.896 0.000 0.004 0.064
#> GSM1182243     3  0.2643      0.709 0.000 0.036 0.888 0.036 0.040 0.000
#> GSM1182244     6  0.5253      0.794 0.000 0.084 0.280 0.000 0.020 0.616
#> GSM1182245     1  0.2979      0.823 0.840 0.000 0.000 0.000 0.116 0.044
#> GSM1182246     4  0.2838      0.869 0.188 0.000 0.004 0.808 0.000 0.000
#> GSM1182247     3  0.2307      0.666 0.000 0.032 0.896 0.000 0.004 0.068
#> GSM1182248     3  0.2259      0.676 0.000 0.032 0.908 0.000 0.020 0.040
#> GSM1182249     3  0.5689      0.598 0.000 0.076 0.660 0.036 0.196 0.032
#> GSM1182250     3  0.4065      0.685 0.000 0.040 0.784 0.048 0.128 0.000
#> GSM1182251     1  0.4808      0.582 0.636 0.000 0.000 0.000 0.092 0.272
#> GSM1182252     3  0.2249      0.664 0.000 0.032 0.900 0.000 0.004 0.064
#> GSM1182253     3  0.3136      0.694 0.000 0.036 0.868 0.012 0.044 0.040
#> GSM1182254     3  0.1944      0.707 0.000 0.036 0.924 0.024 0.016 0.000
#> GSM1182255     4  0.2838      0.869 0.188 0.000 0.004 0.808 0.000 0.000
#> GSM1182256     4  0.2838      0.869 0.188 0.000 0.004 0.808 0.000 0.000
#> GSM1182257     4  0.4678      0.858 0.188 0.000 0.024 0.720 0.064 0.004
#> GSM1182258     4  0.2697      0.870 0.188 0.000 0.000 0.812 0.000 0.000
#> GSM1182259     4  0.2838      0.869 0.188 0.000 0.004 0.808 0.000 0.000
#> GSM1182260     3  0.4199      0.686 0.000 0.060 0.808 0.040 0.052 0.040
#> GSM1182261     3  0.5861      0.567 0.000 0.060 0.660 0.116 0.144 0.020
#> GSM1182262     3  0.4527      0.642 0.000 0.036 0.764 0.080 0.112 0.008
#> GSM1182263     1  0.4455      0.658 0.688 0.000 0.000 0.000 0.080 0.232
#> GSM1182264     3  0.4865      0.643 0.000 0.096 0.756 0.036 0.036 0.076
#> GSM1182265     3  0.5140      0.584 0.000 0.040 0.680 0.040 0.224 0.016
#> GSM1182266     3  0.3624      0.676 0.000 0.048 0.840 0.032 0.020 0.060
#> GSM1182267     1  0.2979      0.823 0.840 0.000 0.000 0.000 0.116 0.044
#> GSM1182268     1  0.0653      0.843 0.980 0.000 0.004 0.000 0.012 0.004
#> GSM1182269     1  0.0748      0.843 0.976 0.000 0.004 0.000 0.016 0.004
#> GSM1182270     1  0.0748      0.843 0.976 0.000 0.004 0.000 0.016 0.004
#> GSM1182271     4  0.2697      0.870 0.188 0.000 0.000 0.812 0.000 0.000
#> GSM1182272     4  0.2838      0.869 0.188 0.000 0.004 0.808 0.000 0.000
#> GSM1182273     3  0.2889      0.696 0.000 0.032 0.884 0.032 0.032 0.020
#> GSM1182275     3  0.3140      0.684 0.000 0.040 0.864 0.028 0.008 0.060
#> GSM1182276     2  0.2341      0.659 0.000 0.908 0.024 0.016 0.008 0.044
#> GSM1182277     1  0.2979      0.823 0.840 0.000 0.000 0.000 0.116 0.044
#> GSM1182278     1  0.2979      0.823 0.840 0.000 0.000 0.000 0.116 0.044
#> GSM1182279     1  0.4680      0.602 0.652 0.000 0.000 0.000 0.084 0.264
#> GSM1182280     1  0.4229      0.665 0.712 0.000 0.000 0.000 0.068 0.220
#> GSM1182281     4  0.7113      0.484 0.280 0.000 0.004 0.448 0.116 0.152
#> GSM1182282     1  0.3023      0.822 0.836 0.000 0.000 0.000 0.120 0.044
#> GSM1182283     1  0.2979      0.823 0.840 0.000 0.000 0.000 0.116 0.044
#> GSM1182284     1  0.2979      0.823 0.840 0.000 0.000 0.000 0.116 0.044
#> GSM1182285     6  0.4553      0.936 0.000 0.032 0.384 0.000 0.004 0.580
#> GSM1182286     2  0.4579      0.604 0.000 0.776 0.024 0.060 0.092 0.048
#> GSM1182287     3  0.4755      0.457 0.000 0.288 0.656 0.028 0.020 0.008
#> GSM1182288     3  0.2469      0.673 0.000 0.032 0.900 0.008 0.012 0.048
#> GSM1182289     1  0.4700      0.599 0.648 0.000 0.000 0.000 0.084 0.268
#> GSM1182290     1  0.2510      0.797 0.872 0.000 0.000 0.000 0.028 0.100
#> GSM1182291     4  0.2697      0.870 0.188 0.000 0.000 0.812 0.000 0.000
#> GSM1182274     3  0.2925      0.704 0.000 0.036 0.880 0.040 0.032 0.012
#> GSM1182292     2  0.2314      0.659 0.000 0.900 0.000 0.008 0.056 0.036
#> GSM1182293     5  0.4279      0.739 0.000 0.436 0.000 0.004 0.548 0.012
#> GSM1182294     5  0.4018      0.764 0.000 0.412 0.000 0.008 0.580 0.000
#> GSM1182295     2  0.3298      0.462 0.000 0.756 0.000 0.008 0.236 0.000
#> GSM1182296     2  0.2164      0.657 0.000 0.900 0.000 0.000 0.068 0.032
#> GSM1182298     6  0.4400      0.937 0.000 0.032 0.376 0.000 0.000 0.592
#> GSM1182299     2  0.3922      0.649 0.000 0.824 0.032 0.064 0.044 0.036
#> GSM1182300     2  0.3858      0.464 0.000 0.732 0.000 0.004 0.236 0.028
#> GSM1182301     2  0.2189      0.666 0.000 0.904 0.000 0.004 0.060 0.032
#> GSM1182303     2  0.2632      0.657 0.000 0.896 0.020 0.016 0.028 0.040
#> GSM1182304     1  0.4707      0.619 0.660 0.000 0.000 0.000 0.096 0.244
#> GSM1182305     4  0.7182      0.594 0.248 0.000 0.000 0.388 0.092 0.272
#> GSM1182306     4  0.4786      0.858 0.188 0.000 0.024 0.716 0.064 0.008
#> GSM1182307     2  0.1984      0.662 0.000 0.912 0.000 0.000 0.056 0.032
#> GSM1182309     5  0.4338      0.732 0.000 0.420 0.000 0.004 0.560 0.016
#> GSM1182312     5  0.5074      0.702 0.000 0.372 0.004 0.036 0.568 0.020
#> GSM1182314     4  0.2697      0.870 0.188 0.000 0.000 0.812 0.000 0.000
#> GSM1182316     5  0.4102      0.757 0.000 0.356 0.004 0.012 0.628 0.000
#> GSM1182318     2  0.3545      0.408 0.000 0.748 0.000 0.008 0.236 0.008
#> GSM1182319     5  0.4388      0.700 0.000 0.400 0.000 0.000 0.572 0.028
#> GSM1182320     5  0.3782      0.764 0.000 0.360 0.004 0.000 0.636 0.000
#> GSM1182321     5  0.5912      0.603 0.000 0.276 0.112 0.000 0.568 0.044
#> GSM1182322     5  0.4388      0.700 0.000 0.400 0.000 0.000 0.572 0.028
#> GSM1182324     5  0.5537      0.583 0.000 0.216 0.140 0.024 0.620 0.000
#> GSM1182297     2  0.5081      0.543 0.000 0.728 0.024 0.060 0.140 0.048
#> GSM1182302     4  0.6416      0.827 0.188 0.000 0.024 0.600 0.116 0.072
#> GSM1182308     2  0.2796      0.636 0.000 0.876 0.016 0.020 0.080 0.008
#> GSM1182310     5  0.3782      0.770 0.000 0.360 0.004 0.000 0.636 0.000
#> GSM1182311     1  0.0748      0.843 0.976 0.000 0.004 0.000 0.016 0.004
#> GSM1182313     4  0.2697      0.870 0.188 0.000 0.000 0.812 0.000 0.000
#> GSM1182315     2  0.5188     -0.102 0.000 0.544 0.008 0.052 0.388 0.008
#> GSM1182317     5  0.4467      0.693 0.000 0.464 0.000 0.000 0.508 0.028
#> GSM1182323     1  0.0653      0.843 0.980 0.000 0.004 0.000 0.012 0.004

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

consensus_heatmap(res, k = 2)

plot of chunk tab-CV-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 disease.state(p) gender(p) k
#> CV:kmeans 139         7.73e-02     1.000 2
#> CV:kmeans 126         1.08e-06     0.422 3
#> CV:kmeans 136         2.82e-06     0.597 4
#> CV:kmeans 134         1.16e-06     0.564 5
#> CV:kmeans 122         4.08e-09     0.768 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 46361 rows and 139 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 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-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 1.000           1.000       1.000         0.4791 0.521   0.521
#> 3 3 0.941           0.948       0.972         0.3849 0.815   0.645
#> 4 4 0.800           0.912       0.894         0.1083 0.924   0.774
#> 5 5 0.792           0.811       0.828         0.0592 0.958   0.843
#> 6 6 0.777           0.775       0.825         0.0428 0.955   0.806

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
#> GSM1182186     1       0          1  1  0
#> GSM1182187     1       0          1  1  0
#> GSM1182188     1       0          1  1  0
#> GSM1182189     1       0          1  1  0
#> GSM1182190     1       0          1  1  0
#> GSM1182191     1       0          1  1  0
#> GSM1182192     1       0          1  1  0
#> GSM1182193     1       0          1  1  0
#> GSM1182194     2       0          1  0  1
#> GSM1182195     2       0          1  0  1
#> GSM1182196     2       0          1  0  1
#> GSM1182197     2       0          1  0  1
#> GSM1182198     2       0          1  0  1
#> GSM1182199     2       0          1  0  1
#> GSM1182200     2       0          1  0  1
#> GSM1182201     2       0          1  0  1
#> GSM1182202     1       0          1  1  0
#> GSM1182203     1       0          1  1  0
#> GSM1182204     1       0          1  1  0
#> GSM1182205     2       0          1  0  1
#> GSM1182206     2       0          1  0  1
#> GSM1182207     1       0          1  1  0
#> GSM1182208     1       0          1  1  0
#> GSM1182209     2       0          1  0  1
#> GSM1182210     2       0          1  0  1
#> GSM1182211     2       0          1  0  1
#> GSM1182212     2       0          1  0  1
#> GSM1182213     2       0          1  0  1
#> GSM1182214     2       0          1  0  1
#> GSM1182215     2       0          1  0  1
#> GSM1182216     2       0          1  0  1
#> GSM1182217     1       0          1  1  0
#> GSM1182218     1       0          1  1  0
#> GSM1182219     2       0          1  0  1
#> GSM1182220     2       0          1  0  1
#> GSM1182221     2       0          1  0  1
#> GSM1182222     2       0          1  0  1
#> GSM1182223     2       0          1  0  1
#> GSM1182224     2       0          1  0  1
#> GSM1182225     2       0          1  0  1
#> GSM1182226     2       0          1  0  1
#> GSM1182227     1       0          1  1  0
#> GSM1182228     2       0          1  0  1
#> GSM1182229     2       0          1  0  1
#> GSM1182230     2       0          1  0  1
#> GSM1182231     2       0          1  0  1
#> GSM1182232     1       0          1  1  0
#> GSM1182233     1       0          1  1  0
#> GSM1182234     1       0          1  1  0
#> GSM1182235     2       0          1  0  1
#> GSM1182236     1       0          1  1  0
#> GSM1182237     2       0          1  0  1
#> GSM1182238     2       0          1  0  1
#> GSM1182239     2       0          1  0  1
#> GSM1182240     2       0          1  0  1
#> GSM1182241     2       0          1  0  1
#> GSM1182242     2       0          1  0  1
#> GSM1182243     2       0          1  0  1
#> GSM1182244     2       0          1  0  1
#> GSM1182245     1       0          1  1  0
#> GSM1182246     1       0          1  1  0
#> GSM1182247     2       0          1  0  1
#> GSM1182248     2       0          1  0  1
#> GSM1182249     2       0          1  0  1
#> GSM1182250     2       0          1  0  1
#> GSM1182251     1       0          1  1  0
#> GSM1182252     2       0          1  0  1
#> GSM1182253     2       0          1  0  1
#> GSM1182254     2       0          1  0  1
#> GSM1182255     1       0          1  1  0
#> GSM1182256     1       0          1  1  0
#> GSM1182257     1       0          1  1  0
#> GSM1182258     1       0          1  1  0
#> GSM1182259     1       0          1  1  0
#> GSM1182260     2       0          1  0  1
#> GSM1182261     2       0          1  0  1
#> GSM1182262     2       0          1  0  1
#> GSM1182263     1       0          1  1  0
#> GSM1182264     2       0          1  0  1
#> GSM1182265     2       0          1  0  1
#> GSM1182266     2       0          1  0  1
#> GSM1182267     1       0          1  1  0
#> GSM1182268     1       0          1  1  0
#> GSM1182269     1       0          1  1  0
#> GSM1182270     1       0          1  1  0
#> GSM1182271     1       0          1  1  0
#> GSM1182272     1       0          1  1  0
#> GSM1182273     2       0          1  0  1
#> GSM1182275     2       0          1  0  1
#> GSM1182276     2       0          1  0  1
#> GSM1182277     1       0          1  1  0
#> GSM1182278     1       0          1  1  0
#> GSM1182279     1       0          1  1  0
#> GSM1182280     1       0          1  1  0
#> GSM1182281     1       0          1  1  0
#> GSM1182282     1       0          1  1  0
#> GSM1182283     1       0          1  1  0
#> GSM1182284     1       0          1  1  0
#> GSM1182285     2       0          1  0  1
#> GSM1182286     2       0          1  0  1
#> GSM1182287     2       0          1  0  1
#> GSM1182288     2       0          1  0  1
#> GSM1182289     1       0          1  1  0
#> GSM1182290     1       0          1  1  0
#> GSM1182291     1       0          1  1  0
#> GSM1182274     2       0          1  0  1
#> GSM1182292     2       0          1  0  1
#> GSM1182293     2       0          1  0  1
#> GSM1182294     2       0          1  0  1
#> GSM1182295     2       0          1  0  1
#> GSM1182296     2       0          1  0  1
#> GSM1182298     2       0          1  0  1
#> GSM1182299     2       0          1  0  1
#> GSM1182300     2       0          1  0  1
#> GSM1182301     2       0          1  0  1
#> GSM1182303     2       0          1  0  1
#> GSM1182304     1       0          1  1  0
#> GSM1182305     1       0          1  1  0
#> GSM1182306     1       0          1  1  0
#> GSM1182307     2       0          1  0  1
#> GSM1182309     2       0          1  0  1
#> GSM1182312     2       0          1  0  1
#> GSM1182314     1       0          1  1  0
#> GSM1182316     2       0          1  0  1
#> GSM1182318     2       0          1  0  1
#> GSM1182319     2       0          1  0  1
#> GSM1182320     2       0          1  0  1
#> GSM1182321     2       0          1  0  1
#> GSM1182322     2       0          1  0  1
#> GSM1182324     2       0          1  0  1
#> GSM1182297     2       0          1  0  1
#> GSM1182302     1       0          1  1  0
#> GSM1182308     2       0          1  0  1
#> GSM1182310     2       0          1  0  1
#> GSM1182311     1       0          1  1  0
#> GSM1182313     1       0          1  1  0
#> GSM1182315     2       0          1  0  1
#> GSM1182317     2       0          1  0  1
#> GSM1182323     1       0          1  1  0

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette p1    p2    p3
#> GSM1182186     1  0.0000      1.000  1 0.000 0.000
#> GSM1182187     1  0.0000      1.000  1 0.000 0.000
#> GSM1182188     1  0.0000      1.000  1 0.000 0.000
#> GSM1182189     1  0.0000      1.000  1 0.000 0.000
#> GSM1182190     1  0.0000      1.000  1 0.000 0.000
#> GSM1182191     1  0.0000      1.000  1 0.000 0.000
#> GSM1182192     1  0.0000      1.000  1 0.000 0.000
#> GSM1182193     1  0.0000      1.000  1 0.000 0.000
#> GSM1182194     3  0.0000      0.947  0 0.000 1.000
#> GSM1182195     3  0.0000      0.947  0 0.000 1.000
#> GSM1182196     2  0.0000      0.957  0 1.000 0.000
#> GSM1182197     2  0.0592      0.956  0 0.988 0.012
#> GSM1182198     3  0.0237      0.946  0 0.004 0.996
#> GSM1182199     3  0.0237      0.946  0 0.004 0.996
#> GSM1182200     2  0.2356      0.925  0 0.928 0.072
#> GSM1182201     3  0.6267      0.209  0 0.452 0.548
#> GSM1182202     1  0.0000      1.000  1 0.000 0.000
#> GSM1182203     1  0.0000      1.000  1 0.000 0.000
#> GSM1182204     1  0.0000      1.000  1 0.000 0.000
#> GSM1182205     3  0.0424      0.945  0 0.008 0.992
#> GSM1182206     3  0.0237      0.945  0 0.004 0.996
#> GSM1182207     1  0.0000      1.000  1 0.000 0.000
#> GSM1182208     1  0.0000      1.000  1 0.000 0.000
#> GSM1182209     2  0.0000      0.957  0 1.000 0.000
#> GSM1182210     2  0.0237      0.958  0 0.996 0.004
#> GSM1182211     2  0.0237      0.958  0 0.996 0.004
#> GSM1182212     2  0.0424      0.957  0 0.992 0.008
#> GSM1182213     2  0.0237      0.958  0 0.996 0.004
#> GSM1182214     2  0.0237      0.958  0 0.996 0.004
#> GSM1182215     3  0.0000      0.947  0 0.000 1.000
#> GSM1182216     2  0.4121      0.837  0 0.832 0.168
#> GSM1182217     1  0.0000      1.000  1 0.000 0.000
#> GSM1182218     1  0.0000      1.000  1 0.000 0.000
#> GSM1182219     2  0.0237      0.958  0 0.996 0.004
#> GSM1182220     2  0.1031      0.952  0 0.976 0.024
#> GSM1182221     2  0.2356      0.925  0 0.928 0.072
#> GSM1182222     2  0.4452      0.810  0 0.808 0.192
#> GSM1182223     3  0.0424      0.944  0 0.008 0.992
#> GSM1182224     3  0.0000      0.947  0 0.000 1.000
#> GSM1182225     2  0.4121      0.837  0 0.832 0.168
#> GSM1182226     2  0.4062      0.841  0 0.836 0.164
#> GSM1182227     1  0.0000      1.000  1 0.000 0.000
#> GSM1182228     3  0.3267      0.872  0 0.116 0.884
#> GSM1182229     3  0.0000      0.947  0 0.000 1.000
#> GSM1182230     3  0.0000      0.947  0 0.000 1.000
#> GSM1182231     2  0.4504      0.805  0 0.804 0.196
#> GSM1182232     1  0.0000      1.000  1 0.000 0.000
#> GSM1182233     1  0.0000      1.000  1 0.000 0.000
#> GSM1182234     1  0.0000      1.000  1 0.000 0.000
#> GSM1182235     2  0.0000      0.957  0 1.000 0.000
#> GSM1182236     1  0.0000      1.000  1 0.000 0.000
#> GSM1182237     3  0.4504      0.790  0 0.196 0.804
#> GSM1182238     2  0.1031      0.952  0 0.976 0.024
#> GSM1182239     2  0.0000      0.957  0 1.000 0.000
#> GSM1182240     2  0.0747      0.954  0 0.984 0.016
#> GSM1182241     2  0.0000      0.957  0 1.000 0.000
#> GSM1182242     3  0.1753      0.921  0 0.048 0.952
#> GSM1182243     3  0.0000      0.947  0 0.000 1.000
#> GSM1182244     3  0.3412      0.863  0 0.124 0.876
#> GSM1182245     1  0.0000      1.000  1 0.000 0.000
#> GSM1182246     1  0.0000      1.000  1 0.000 0.000
#> GSM1182247     3  0.0000      0.947  0 0.000 1.000
#> GSM1182248     3  0.0000      0.947  0 0.000 1.000
#> GSM1182249     3  0.4399      0.759  0 0.188 0.812
#> GSM1182250     3  0.0000      0.947  0 0.000 1.000
#> GSM1182251     1  0.0000      1.000  1 0.000 0.000
#> GSM1182252     3  0.0000      0.947  0 0.000 1.000
#> GSM1182253     3  0.0000      0.947  0 0.000 1.000
#> GSM1182254     3  0.0000      0.947  0 0.000 1.000
#> GSM1182255     1  0.0000      1.000  1 0.000 0.000
#> GSM1182256     1  0.0000      1.000  1 0.000 0.000
#> GSM1182257     1  0.0000      1.000  1 0.000 0.000
#> GSM1182258     1  0.0000      1.000  1 0.000 0.000
#> GSM1182259     1  0.0000      1.000  1 0.000 0.000
#> GSM1182260     3  0.3551      0.858  0 0.132 0.868
#> GSM1182261     3  0.0000      0.947  0 0.000 1.000
#> GSM1182262     3  0.0000      0.947  0 0.000 1.000
#> GSM1182263     1  0.0000      1.000  1 0.000 0.000
#> GSM1182264     3  0.4062      0.825  0 0.164 0.836
#> GSM1182265     3  0.0000      0.947  0 0.000 1.000
#> GSM1182266     3  0.2066      0.913  0 0.060 0.940
#> GSM1182267     1  0.0000      1.000  1 0.000 0.000
#> GSM1182268     1  0.0000      1.000  1 0.000 0.000
#> GSM1182269     1  0.0000      1.000  1 0.000 0.000
#> GSM1182270     1  0.0000      1.000  1 0.000 0.000
#> GSM1182271     1  0.0000      1.000  1 0.000 0.000
#> GSM1182272     1  0.0000      1.000  1 0.000 0.000
#> GSM1182273     3  0.0000      0.947  0 0.000 1.000
#> GSM1182275     3  0.0000      0.947  0 0.000 1.000
#> GSM1182276     2  0.0424      0.957  0 0.992 0.008
#> GSM1182277     1  0.0000      1.000  1 0.000 0.000
#> GSM1182278     1  0.0000      1.000  1 0.000 0.000
#> GSM1182279     1  0.0000      1.000  1 0.000 0.000
#> GSM1182280     1  0.0000      1.000  1 0.000 0.000
#> GSM1182281     1  0.0000      1.000  1 0.000 0.000
#> GSM1182282     1  0.0000      1.000  1 0.000 0.000
#> GSM1182283     1  0.0000      1.000  1 0.000 0.000
#> GSM1182284     1  0.0000      1.000  1 0.000 0.000
#> GSM1182285     3  0.0000      0.947  0 0.000 1.000
#> GSM1182286     2  0.0000      0.957  0 1.000 0.000
#> GSM1182287     3  0.5733      0.494  0 0.324 0.676
#> GSM1182288     3  0.0237      0.946  0 0.004 0.996
#> GSM1182289     1  0.0000      1.000  1 0.000 0.000
#> GSM1182290     1  0.0000      1.000  1 0.000 0.000
#> GSM1182291     1  0.0000      1.000  1 0.000 0.000
#> GSM1182274     3  0.0000      0.947  0 0.000 1.000
#> GSM1182292     2  0.0000      0.957  0 1.000 0.000
#> GSM1182293     2  0.0237      0.958  0 0.996 0.004
#> GSM1182294     2  0.0237      0.958  0 0.996 0.004
#> GSM1182295     2  0.0237      0.958  0 0.996 0.004
#> GSM1182296     2  0.0000      0.957  0 1.000 0.000
#> GSM1182298     3  0.0237      0.946  0 0.004 0.996
#> GSM1182299     2  0.0237      0.958  0 0.996 0.004
#> GSM1182300     2  0.0000      0.957  0 1.000 0.000
#> GSM1182301     2  0.0000      0.957  0 1.000 0.000
#> GSM1182303     2  0.1753      0.940  0 0.952 0.048
#> GSM1182304     1  0.0000      1.000  1 0.000 0.000
#> GSM1182305     1  0.0000      1.000  1 0.000 0.000
#> GSM1182306     1  0.0000      1.000  1 0.000 0.000
#> GSM1182307     2  0.0000      0.957  0 1.000 0.000
#> GSM1182309     2  0.0237      0.958  0 0.996 0.004
#> GSM1182312     2  0.1753      0.940  0 0.952 0.048
#> GSM1182314     1  0.0000      1.000  1 0.000 0.000
#> GSM1182316     2  0.2356      0.925  0 0.928 0.072
#> GSM1182318     2  0.0237      0.958  0 0.996 0.004
#> GSM1182319     2  0.0000      0.957  0 1.000 0.000
#> GSM1182320     2  0.2356      0.925  0 0.928 0.072
#> GSM1182321     2  0.4002      0.804  0 0.840 0.160
#> GSM1182322     2  0.0000      0.957  0 1.000 0.000
#> GSM1182324     2  0.5327      0.693  0 0.728 0.272
#> GSM1182297     2  0.0000      0.957  0 1.000 0.000
#> GSM1182302     1  0.0000      1.000  1 0.000 0.000
#> GSM1182308     2  0.2711      0.913  0 0.912 0.088
#> GSM1182310     2  0.1411      0.946  0 0.964 0.036
#> GSM1182311     1  0.0000      1.000  1 0.000 0.000
#> GSM1182313     1  0.0000      1.000  1 0.000 0.000
#> GSM1182315     2  0.0747      0.954  0 0.984 0.016
#> GSM1182317     2  0.0237      0.958  0 0.996 0.004
#> GSM1182323     1  0.0000      1.000  1 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1182186     1  0.3688      0.973 0.792 0.000 0.000 0.208
#> GSM1182187     4  0.3311      0.730 0.172 0.000 0.000 0.828
#> GSM1182188     4  0.0000      0.970 0.000 0.000 0.000 1.000
#> GSM1182189     1  0.3649      0.973 0.796 0.000 0.000 0.204
#> GSM1182190     1  0.3649      0.973 0.796 0.000 0.000 0.204
#> GSM1182191     1  0.3688      0.973 0.792 0.000 0.000 0.208
#> GSM1182192     4  0.0000      0.970 0.000 0.000 0.000 1.000
#> GSM1182193     4  0.0000      0.970 0.000 0.000 0.000 1.000
#> GSM1182194     3  0.0592      0.919 0.016 0.000 0.984 0.000
#> GSM1182195     3  0.0921      0.920 0.028 0.000 0.972 0.000
#> GSM1182196     2  0.1389      0.929 0.048 0.952 0.000 0.000
#> GSM1182197     2  0.1474      0.920 0.000 0.948 0.052 0.000
#> GSM1182198     3  0.0592      0.919 0.016 0.000 0.984 0.000
#> GSM1182199     3  0.0592      0.919 0.016 0.000 0.984 0.000
#> GSM1182200     2  0.1489      0.923 0.004 0.952 0.044 0.000
#> GSM1182201     3  0.4898      0.314 0.000 0.416 0.584 0.000
#> GSM1182202     1  0.3688      0.973 0.792 0.000 0.000 0.208
#> GSM1182203     4  0.3975      0.585 0.240 0.000 0.000 0.760
#> GSM1182204     1  0.3688      0.973 0.792 0.000 0.000 0.208
#> GSM1182205     3  0.3355      0.870 0.160 0.004 0.836 0.000
#> GSM1182206     3  0.3856      0.862 0.136 0.032 0.832 0.000
#> GSM1182207     1  0.3688      0.973 0.792 0.000 0.000 0.208
#> GSM1182208     1  0.3649      0.973 0.796 0.000 0.000 0.204
#> GSM1182209     2  0.1389      0.929 0.048 0.952 0.000 0.000
#> GSM1182210     2  0.0336      0.934 0.008 0.992 0.000 0.000
#> GSM1182211     2  0.0000      0.934 0.000 1.000 0.000 0.000
#> GSM1182212     2  0.0000      0.934 0.000 1.000 0.000 0.000
#> GSM1182213     2  0.0188      0.934 0.004 0.996 0.000 0.000
#> GSM1182214     2  0.0336      0.934 0.008 0.992 0.000 0.000
#> GSM1182215     3  0.3324      0.872 0.136 0.012 0.852 0.000
#> GSM1182216     2  0.3760      0.881 0.136 0.836 0.028 0.000
#> GSM1182217     1  0.3688      0.973 0.792 0.000 0.000 0.208
#> GSM1182218     1  0.3649      0.973 0.796 0.000 0.000 0.204
#> GSM1182219     2  0.0188      0.934 0.004 0.996 0.000 0.000
#> GSM1182220     2  0.0376      0.934 0.004 0.992 0.004 0.000
#> GSM1182221     2  0.3377      0.888 0.140 0.848 0.012 0.000
#> GSM1182222     2  0.3856      0.880 0.136 0.832 0.032 0.000
#> GSM1182223     3  0.0336      0.921 0.000 0.008 0.992 0.000
#> GSM1182224     3  0.1022      0.920 0.032 0.000 0.968 0.000
#> GSM1182225     2  0.3760      0.881 0.136 0.836 0.028 0.000
#> GSM1182226     2  0.3760      0.881 0.136 0.836 0.028 0.000
#> GSM1182227     4  0.0188      0.966 0.004 0.000 0.000 0.996
#> GSM1182228     3  0.3758      0.854 0.048 0.104 0.848 0.000
#> GSM1182229     3  0.0000      0.920 0.000 0.000 1.000 0.000
#> GSM1182230     3  0.0469      0.921 0.012 0.000 0.988 0.000
#> GSM1182231     2  0.4440      0.863 0.136 0.804 0.060 0.000
#> GSM1182232     1  0.3726      0.970 0.788 0.000 0.000 0.212
#> GSM1182233     1  0.3688      0.973 0.792 0.000 0.000 0.208
#> GSM1182234     4  0.0000      0.970 0.000 0.000 0.000 1.000
#> GSM1182235     2  0.1389      0.929 0.048 0.952 0.000 0.000
#> GSM1182236     1  0.3649      0.973 0.796 0.000 0.000 0.204
#> GSM1182237     3  0.4436      0.819 0.052 0.148 0.800 0.000
#> GSM1182238     2  0.3032      0.896 0.124 0.868 0.008 0.000
#> GSM1182239     2  0.1389      0.929 0.048 0.952 0.000 0.000
#> GSM1182240     2  0.3591      0.899 0.168 0.824 0.008 0.000
#> GSM1182241     2  0.1389      0.929 0.048 0.952 0.000 0.000
#> GSM1182242     3  0.0937      0.914 0.012 0.012 0.976 0.000
#> GSM1182243     3  0.0469      0.921 0.012 0.000 0.988 0.000
#> GSM1182244     3  0.3581      0.860 0.032 0.116 0.852 0.000
#> GSM1182245     4  0.0000      0.970 0.000 0.000 0.000 1.000
#> GSM1182246     4  0.0000      0.970 0.000 0.000 0.000 1.000
#> GSM1182247     3  0.0000      0.920 0.000 0.000 1.000 0.000
#> GSM1182248     3  0.0469      0.921 0.012 0.000 0.988 0.000
#> GSM1182249     3  0.5609      0.711 0.088 0.200 0.712 0.000
#> GSM1182250     3  0.3554      0.868 0.136 0.020 0.844 0.000
#> GSM1182251     1  0.3688      0.973 0.792 0.000 0.000 0.208
#> GSM1182252     3  0.0000      0.920 0.000 0.000 1.000 0.000
#> GSM1182253     3  0.1938      0.909 0.052 0.012 0.936 0.000
#> GSM1182254     3  0.0469      0.921 0.012 0.000 0.988 0.000
#> GSM1182255     4  0.0000      0.970 0.000 0.000 0.000 1.000
#> GSM1182256     4  0.0000      0.970 0.000 0.000 0.000 1.000
#> GSM1182257     4  0.0000      0.970 0.000 0.000 0.000 1.000
#> GSM1182258     4  0.0000      0.970 0.000 0.000 0.000 1.000
#> GSM1182259     4  0.0000      0.970 0.000 0.000 0.000 1.000
#> GSM1182260     3  0.1733      0.905 0.028 0.024 0.948 0.000
#> GSM1182261     3  0.3554      0.868 0.136 0.020 0.844 0.000
#> GSM1182262     3  0.3271      0.875 0.132 0.012 0.856 0.000
#> GSM1182263     1  0.4933      0.602 0.568 0.000 0.000 0.432
#> GSM1182264     3  0.3934      0.845 0.048 0.116 0.836 0.000
#> GSM1182265     3  0.1975      0.910 0.048 0.016 0.936 0.000
#> GSM1182266     3  0.1182      0.912 0.016 0.016 0.968 0.000
#> GSM1182267     4  0.0000      0.970 0.000 0.000 0.000 1.000
#> GSM1182268     1  0.3688      0.973 0.792 0.000 0.000 0.208
#> GSM1182269     1  0.3649      0.973 0.796 0.000 0.000 0.204
#> GSM1182270     1  0.3649      0.973 0.796 0.000 0.000 0.204
#> GSM1182271     4  0.0000      0.970 0.000 0.000 0.000 1.000
#> GSM1182272     4  0.0000      0.970 0.000 0.000 0.000 1.000
#> GSM1182273     3  0.0707      0.920 0.020 0.000 0.980 0.000
#> GSM1182275     3  0.0188      0.921 0.000 0.004 0.996 0.000
#> GSM1182276     2  0.0188      0.934 0.000 0.996 0.004 0.000
#> GSM1182277     4  0.0000      0.970 0.000 0.000 0.000 1.000
#> GSM1182278     4  0.0000      0.970 0.000 0.000 0.000 1.000
#> GSM1182279     1  0.3649      0.973 0.796 0.000 0.000 0.204
#> GSM1182280     1  0.3649      0.973 0.796 0.000 0.000 0.204
#> GSM1182281     4  0.0000      0.970 0.000 0.000 0.000 1.000
#> GSM1182282     4  0.0000      0.970 0.000 0.000 0.000 1.000
#> GSM1182283     4  0.0000      0.970 0.000 0.000 0.000 1.000
#> GSM1182284     4  0.0000      0.970 0.000 0.000 0.000 1.000
#> GSM1182285     3  0.0592      0.919 0.016 0.000 0.984 0.000
#> GSM1182286     2  0.1389      0.929 0.048 0.952 0.000 0.000
#> GSM1182287     3  0.5343      0.503 0.028 0.316 0.656 0.000
#> GSM1182288     3  0.0188      0.921 0.004 0.000 0.996 0.000
#> GSM1182289     1  0.3688      0.973 0.792 0.000 0.000 0.208
#> GSM1182290     1  0.3688      0.973 0.792 0.000 0.000 0.208
#> GSM1182291     4  0.0000      0.970 0.000 0.000 0.000 1.000
#> GSM1182274     3  0.0000      0.920 0.000 0.000 1.000 0.000
#> GSM1182292     2  0.1389      0.929 0.048 0.952 0.000 0.000
#> GSM1182293     2  0.0188      0.934 0.004 0.996 0.000 0.000
#> GSM1182294     2  0.1302      0.929 0.044 0.956 0.000 0.000
#> GSM1182295     2  0.0469      0.934 0.012 0.988 0.000 0.000
#> GSM1182296     2  0.1389      0.929 0.048 0.952 0.000 0.000
#> GSM1182298     3  0.0592      0.919 0.016 0.000 0.984 0.000
#> GSM1182299     2  0.0188      0.934 0.004 0.996 0.000 0.000
#> GSM1182300     2  0.1389      0.929 0.048 0.952 0.000 0.000
#> GSM1182301     2  0.1389      0.929 0.048 0.952 0.000 0.000
#> GSM1182303     2  0.1489      0.928 0.044 0.952 0.004 0.000
#> GSM1182304     1  0.3649      0.973 0.796 0.000 0.000 0.204
#> GSM1182305     1  0.4977      0.530 0.540 0.000 0.000 0.460
#> GSM1182306     4  0.3311      0.730 0.172 0.000 0.000 0.828
#> GSM1182307     2  0.1389      0.929 0.048 0.952 0.000 0.000
#> GSM1182309     2  0.0817      0.933 0.024 0.976 0.000 0.000
#> GSM1182312     2  0.3324      0.890 0.136 0.852 0.012 0.000
#> GSM1182314     4  0.0000      0.970 0.000 0.000 0.000 1.000
#> GSM1182316     2  0.3377      0.888 0.140 0.848 0.012 0.000
#> GSM1182318     2  0.0336      0.934 0.008 0.992 0.000 0.000
#> GSM1182319     2  0.1474      0.928 0.052 0.948 0.000 0.000
#> GSM1182320     2  0.3377      0.888 0.140 0.848 0.012 0.000
#> GSM1182321     2  0.4578      0.787 0.052 0.788 0.160 0.000
#> GSM1182322     2  0.1474      0.928 0.052 0.948 0.000 0.000
#> GSM1182324     2  0.5266      0.804 0.140 0.752 0.108 0.000
#> GSM1182297     2  0.1389      0.929 0.048 0.952 0.000 0.000
#> GSM1182302     1  0.3688      0.973 0.792 0.000 0.000 0.208
#> GSM1182308     2  0.3324      0.889 0.136 0.852 0.012 0.000
#> GSM1182310     2  0.3324      0.890 0.136 0.852 0.012 0.000
#> GSM1182311     1  0.3649      0.973 0.796 0.000 0.000 0.204
#> GSM1182313     4  0.0000      0.970 0.000 0.000 0.000 1.000
#> GSM1182315     2  0.3764      0.896 0.172 0.816 0.012 0.000
#> GSM1182317     2  0.0188      0.934 0.004 0.996 0.000 0.000
#> GSM1182323     1  0.3688      0.973 0.792 0.000 0.000 0.208

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1182186     1  0.0404      0.962 0.988 0.000 0.000 0.000 0.012
#> GSM1182187     4  0.4030      0.610 0.352 0.000 0.000 0.648 0.000
#> GSM1182188     4  0.1851      0.955 0.088 0.000 0.000 0.912 0.000
#> GSM1182189     1  0.0579      0.960 0.984 0.000 0.000 0.008 0.008
#> GSM1182190     1  0.0579      0.960 0.984 0.000 0.000 0.008 0.008
#> GSM1182191     1  0.0404      0.962 0.988 0.000 0.000 0.000 0.012
#> GSM1182192     4  0.2561      0.954 0.096 0.000 0.000 0.884 0.020
#> GSM1182193     4  0.2561      0.954 0.096 0.000 0.000 0.884 0.020
#> GSM1182194     5  0.4300      0.901 0.000 0.000 0.476 0.000 0.524
#> GSM1182195     5  0.4278      0.879 0.000 0.000 0.452 0.000 0.548
#> GSM1182196     2  0.4450      0.831 0.000 0.764 0.004 0.080 0.152
#> GSM1182197     3  0.4906      0.257 0.000 0.480 0.496 0.000 0.024
#> GSM1182198     5  0.4302      0.898 0.000 0.000 0.480 0.000 0.520
#> GSM1182199     5  0.4300      0.901 0.000 0.000 0.476 0.000 0.524
#> GSM1182200     2  0.1710      0.833 0.000 0.940 0.040 0.004 0.016
#> GSM1182201     3  0.4371      0.416 0.000 0.344 0.644 0.000 0.012
#> GSM1182202     1  0.0609      0.954 0.980 0.000 0.000 0.020 0.000
#> GSM1182203     4  0.4045      0.592 0.356 0.000 0.000 0.644 0.000
#> GSM1182204     1  0.1043      0.943 0.960 0.000 0.000 0.040 0.000
#> GSM1182205     5  0.4415      0.515 0.000 0.004 0.444 0.000 0.552
#> GSM1182206     3  0.3656      0.632 0.000 0.020 0.784 0.000 0.196
#> GSM1182207     1  0.0404      0.962 0.988 0.000 0.000 0.000 0.012
#> GSM1182208     1  0.0566      0.962 0.984 0.000 0.000 0.004 0.012
#> GSM1182209     2  0.2291      0.838 0.000 0.908 0.000 0.056 0.036
#> GSM1182210     2  0.1331      0.848 0.000 0.952 0.000 0.008 0.040
#> GSM1182211     2  0.0566      0.843 0.000 0.984 0.000 0.004 0.012
#> GSM1182212     2  0.0324      0.841 0.000 0.992 0.000 0.004 0.004
#> GSM1182213     2  0.0798      0.845 0.000 0.976 0.000 0.008 0.016
#> GSM1182214     2  0.1082      0.848 0.000 0.964 0.000 0.008 0.028
#> GSM1182215     3  0.3053      0.656 0.000 0.008 0.828 0.000 0.164
#> GSM1182216     2  0.4254      0.796 0.000 0.740 0.040 0.000 0.220
#> GSM1182217     1  0.0162      0.963 0.996 0.000 0.000 0.004 0.000
#> GSM1182218     1  0.0579      0.960 0.984 0.000 0.000 0.008 0.008
#> GSM1182219     2  0.0932      0.844 0.000 0.972 0.004 0.004 0.020
#> GSM1182220     2  0.0566      0.842 0.000 0.984 0.000 0.004 0.012
#> GSM1182221     2  0.4299      0.742 0.000 0.608 0.000 0.004 0.388
#> GSM1182222     2  0.4325      0.794 0.000 0.736 0.044 0.000 0.220
#> GSM1182223     3  0.2886      0.606 0.000 0.148 0.844 0.000 0.008
#> GSM1182224     5  0.4278      0.879 0.000 0.000 0.452 0.000 0.548
#> GSM1182225     2  0.4224      0.797 0.000 0.744 0.040 0.000 0.216
#> GSM1182226     2  0.4398      0.792 0.000 0.720 0.040 0.000 0.240
#> GSM1182227     4  0.2448      0.955 0.088 0.000 0.000 0.892 0.020
#> GSM1182228     3  0.5472      0.496 0.000 0.196 0.696 0.072 0.036
#> GSM1182229     3  0.0290      0.678 0.000 0.000 0.992 0.000 0.008
#> GSM1182230     3  0.1270      0.682 0.000 0.000 0.948 0.000 0.052
#> GSM1182231     3  0.6301      0.375 0.000 0.252 0.532 0.000 0.216
#> GSM1182232     1  0.0162      0.963 0.996 0.000 0.000 0.004 0.000
#> GSM1182233     1  0.0000      0.963 1.000 0.000 0.000 0.000 0.000
#> GSM1182234     4  0.2448      0.955 0.088 0.000 0.000 0.892 0.020
#> GSM1182235     2  0.3733      0.837 0.000 0.836 0.016 0.080 0.068
#> GSM1182236     1  0.0290      0.962 0.992 0.000 0.000 0.000 0.008
#> GSM1182237     3  0.5381      0.569 0.000 0.080 0.736 0.084 0.100
#> GSM1182238     2  0.3752      0.817 0.000 0.780 0.016 0.004 0.200
#> GSM1182239     2  0.3174      0.832 0.000 0.868 0.016 0.080 0.036
#> GSM1182240     2  0.3521      0.839 0.000 0.820 0.000 0.040 0.140
#> GSM1182241     2  0.3281      0.828 0.000 0.864 0.024 0.080 0.032
#> GSM1182242     3  0.1124      0.665 0.000 0.004 0.960 0.000 0.036
#> GSM1182243     3  0.1430      0.697 0.000 0.004 0.944 0.000 0.052
#> GSM1182244     5  0.6219      0.755 0.000 0.056 0.364 0.044 0.536
#> GSM1182245     4  0.2448      0.955 0.088 0.000 0.000 0.892 0.020
#> GSM1182246     4  0.1965      0.955 0.096 0.000 0.000 0.904 0.000
#> GSM1182247     3  0.0703      0.664 0.000 0.000 0.976 0.000 0.024
#> GSM1182248     3  0.1341      0.672 0.000 0.000 0.944 0.000 0.056
#> GSM1182249     3  0.4897      0.521 0.000 0.056 0.688 0.004 0.252
#> GSM1182250     3  0.3163      0.655 0.000 0.012 0.824 0.000 0.164
#> GSM1182251     1  0.0566      0.962 0.984 0.000 0.000 0.004 0.012
#> GSM1182252     3  0.0963      0.654 0.000 0.000 0.964 0.000 0.036
#> GSM1182253     3  0.2304      0.677 0.000 0.008 0.892 0.000 0.100
#> GSM1182254     3  0.0963      0.690 0.000 0.000 0.964 0.000 0.036
#> GSM1182255     4  0.1851      0.955 0.088 0.000 0.000 0.912 0.000
#> GSM1182256     4  0.1851      0.955 0.088 0.000 0.000 0.912 0.000
#> GSM1182257     4  0.1965      0.954 0.096 0.000 0.000 0.904 0.000
#> GSM1182258     4  0.1965      0.955 0.096 0.000 0.000 0.904 0.000
#> GSM1182259     4  0.1851      0.955 0.088 0.000 0.000 0.912 0.000
#> GSM1182260     3  0.2689      0.671 0.000 0.024 0.900 0.036 0.040
#> GSM1182261     3  0.3690      0.628 0.000 0.020 0.780 0.000 0.200
#> GSM1182262     3  0.2929      0.659 0.000 0.008 0.840 0.000 0.152
#> GSM1182263     1  0.4251      0.455 0.672 0.000 0.000 0.316 0.012
#> GSM1182264     3  0.3820      0.620 0.000 0.052 0.840 0.060 0.048
#> GSM1182265     3  0.3849      0.569 0.000 0.016 0.752 0.000 0.232
#> GSM1182266     3  0.2122      0.664 0.000 0.008 0.924 0.032 0.036
#> GSM1182267     4  0.2561      0.954 0.096 0.000 0.000 0.884 0.020
#> GSM1182268     1  0.0290      0.962 0.992 0.000 0.000 0.000 0.008
#> GSM1182269     1  0.0579      0.960 0.984 0.000 0.000 0.008 0.008
#> GSM1182270     1  0.0290      0.962 0.992 0.000 0.000 0.000 0.008
#> GSM1182271     4  0.1851      0.955 0.088 0.000 0.000 0.912 0.000
#> GSM1182272     4  0.1851      0.955 0.088 0.000 0.000 0.912 0.000
#> GSM1182273     3  0.1430      0.684 0.000 0.004 0.944 0.000 0.052
#> GSM1182275     3  0.1195      0.669 0.000 0.012 0.960 0.000 0.028
#> GSM1182276     2  0.0486      0.841 0.000 0.988 0.004 0.004 0.004
#> GSM1182277     4  0.2505      0.955 0.092 0.000 0.000 0.888 0.020
#> GSM1182278     4  0.2505      0.955 0.092 0.000 0.000 0.888 0.020
#> GSM1182279     1  0.0404      0.962 0.988 0.000 0.000 0.000 0.012
#> GSM1182280     1  0.0404      0.962 0.988 0.000 0.000 0.000 0.012
#> GSM1182281     4  0.2561      0.954 0.096 0.000 0.000 0.884 0.020
#> GSM1182282     4  0.2448      0.955 0.088 0.000 0.000 0.892 0.020
#> GSM1182283     4  0.2561      0.954 0.096 0.000 0.000 0.884 0.020
#> GSM1182284     4  0.2448      0.955 0.088 0.000 0.000 0.892 0.020
#> GSM1182285     5  0.4300      0.901 0.000 0.000 0.476 0.000 0.524
#> GSM1182286     2  0.3325      0.838 0.000 0.856 0.008 0.080 0.056
#> GSM1182287     3  0.4730      0.482 0.000 0.260 0.688 0.000 0.052
#> GSM1182288     3  0.1270      0.671 0.000 0.000 0.948 0.000 0.052
#> GSM1182289     1  0.0566      0.961 0.984 0.000 0.000 0.004 0.012
#> GSM1182290     1  0.0566      0.962 0.984 0.000 0.000 0.004 0.012
#> GSM1182291     4  0.1851      0.955 0.088 0.000 0.000 0.912 0.000
#> GSM1182274     3  0.0865      0.695 0.000 0.004 0.972 0.000 0.024
#> GSM1182292     2  0.2676      0.834 0.000 0.884 0.000 0.080 0.036
#> GSM1182293     2  0.3662      0.785 0.000 0.744 0.000 0.004 0.252
#> GSM1182294     2  0.4108      0.773 0.000 0.684 0.000 0.008 0.308
#> GSM1182295     2  0.2136      0.853 0.000 0.904 0.000 0.008 0.088
#> GSM1182296     2  0.2754      0.835 0.000 0.880 0.000 0.080 0.040
#> GSM1182298     5  0.4300      0.901 0.000 0.000 0.476 0.000 0.524
#> GSM1182299     2  0.0613      0.841 0.000 0.984 0.008 0.004 0.004
#> GSM1182300     2  0.3301      0.839 0.000 0.848 0.000 0.080 0.072
#> GSM1182301     2  0.2569      0.838 0.000 0.892 0.000 0.068 0.040
#> GSM1182303     2  0.1124      0.842 0.000 0.960 0.000 0.004 0.036
#> GSM1182304     1  0.0404      0.962 0.988 0.000 0.000 0.000 0.012
#> GSM1182305     1  0.3992      0.565 0.720 0.000 0.000 0.268 0.012
#> GSM1182306     4  0.3949      0.649 0.332 0.000 0.000 0.668 0.000
#> GSM1182307     2  0.2830      0.837 0.000 0.876 0.000 0.080 0.044
#> GSM1182309     2  0.4167      0.789 0.000 0.724 0.000 0.024 0.252
#> GSM1182312     2  0.4392      0.745 0.000 0.612 0.000 0.008 0.380
#> GSM1182314     4  0.1965      0.955 0.096 0.000 0.000 0.904 0.000
#> GSM1182316     2  0.4403      0.743 0.000 0.608 0.000 0.008 0.384
#> GSM1182318     2  0.2020      0.841 0.000 0.900 0.000 0.000 0.100
#> GSM1182319     2  0.5245      0.773 0.000 0.640 0.000 0.080 0.280
#> GSM1182320     2  0.4380      0.746 0.000 0.616 0.000 0.008 0.376
#> GSM1182321     2  0.7255      0.637 0.000 0.508 0.136 0.076 0.280
#> GSM1182322     2  0.5245      0.773 0.000 0.640 0.000 0.080 0.280
#> GSM1182324     2  0.6173      0.579 0.000 0.468 0.136 0.000 0.396
#> GSM1182297     2  0.3133      0.839 0.000 0.864 0.004 0.080 0.052
#> GSM1182302     1  0.0794      0.951 0.972 0.000 0.000 0.028 0.000
#> GSM1182308     2  0.2439      0.831 0.000 0.876 0.000 0.004 0.120
#> GSM1182310     2  0.4264      0.747 0.000 0.620 0.000 0.004 0.376
#> GSM1182311     1  0.0290      0.962 0.992 0.000 0.000 0.000 0.008
#> GSM1182313     4  0.1851      0.955 0.088 0.000 0.000 0.912 0.000
#> GSM1182315     2  0.4671      0.794 0.000 0.640 0.000 0.028 0.332
#> GSM1182317     2  0.3579      0.790 0.000 0.756 0.000 0.004 0.240
#> GSM1182323     1  0.0290      0.962 0.992 0.000 0.000 0.000 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
#> GSM1182186     5  0.2401     0.8977 0.060 0.000 0.000 0.044 0.892 0.004
#> GSM1182187     4  0.3647     0.4311 0.000 0.000 0.000 0.640 0.360 0.000
#> GSM1182188     4  0.0146     0.9308 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM1182189     5  0.3092     0.8750 0.088 0.000 0.000 0.044 0.852 0.016
#> GSM1182190     5  0.3435     0.8601 0.096 0.000 0.000 0.044 0.832 0.028
#> GSM1182191     5  0.2575     0.8953 0.072 0.000 0.000 0.044 0.880 0.004
#> GSM1182192     4  0.1857     0.9203 0.044 0.000 0.000 0.924 0.028 0.004
#> GSM1182193     4  0.1523     0.9266 0.044 0.000 0.000 0.940 0.008 0.008
#> GSM1182194     6  0.2416     0.9064 0.000 0.000 0.156 0.000 0.000 0.844
#> GSM1182195     6  0.3023     0.8776 0.004 0.000 0.212 0.000 0.000 0.784
#> GSM1182196     2  0.4411     0.3110 0.232 0.708 0.020 0.000 0.000 0.040
#> GSM1182197     3  0.6015     0.4802 0.052 0.264 0.592 0.000 0.016 0.076
#> GSM1182198     6  0.2527     0.9042 0.000 0.000 0.168 0.000 0.000 0.832
#> GSM1182199     6  0.2416     0.9064 0.000 0.000 0.156 0.000 0.000 0.844
#> GSM1182200     2  0.4060     0.7069 0.064 0.812 0.032 0.000 0.024 0.068
#> GSM1182201     3  0.5048     0.7020 0.028 0.132 0.724 0.000 0.020 0.096
#> GSM1182202     5  0.1700     0.8914 0.000 0.000 0.000 0.080 0.916 0.004
#> GSM1182203     4  0.3601     0.5334 0.000 0.000 0.000 0.684 0.312 0.004
#> GSM1182204     5  0.2302     0.8727 0.000 0.000 0.000 0.120 0.872 0.008
#> GSM1182205     6  0.5554     0.4062 0.124 0.004 0.316 0.000 0.004 0.552
#> GSM1182206     3  0.3900     0.7292 0.184 0.004 0.764 0.000 0.004 0.044
#> GSM1182207     5  0.2687     0.8943 0.072 0.000 0.000 0.044 0.876 0.008
#> GSM1182208     5  0.2719     0.8957 0.072 0.000 0.000 0.040 0.876 0.012
#> GSM1182209     2  0.1760     0.7534 0.020 0.928 0.000 0.000 0.004 0.048
#> GSM1182210     2  0.3339     0.7354 0.120 0.824 0.000 0.000 0.008 0.048
#> GSM1182211     2  0.3101     0.7367 0.056 0.856 0.000 0.000 0.020 0.068
#> GSM1182212     2  0.3182     0.7355 0.056 0.852 0.000 0.000 0.024 0.068
#> GSM1182213     2  0.1745     0.7601 0.068 0.920 0.000 0.000 0.000 0.012
#> GSM1182214     2  0.2333     0.7508 0.092 0.884 0.000 0.000 0.000 0.024
#> GSM1182215     3  0.3946     0.7348 0.164 0.000 0.764 0.000 0.004 0.068
#> GSM1182216     2  0.5040     0.4805 0.252 0.648 0.088 0.000 0.004 0.008
#> GSM1182217     5  0.1075     0.8991 0.000 0.000 0.000 0.048 0.952 0.000
#> GSM1182218     5  0.3142     0.8733 0.092 0.000 0.000 0.044 0.848 0.016
#> GSM1182219     2  0.2933     0.7505 0.096 0.856 0.000 0.000 0.008 0.040
#> GSM1182220     2  0.3182     0.7400 0.056 0.852 0.000 0.000 0.024 0.068
#> GSM1182221     1  0.4538     0.5923 0.600 0.364 0.028 0.000 0.000 0.008
#> GSM1182222     2  0.5040     0.4805 0.252 0.648 0.088 0.000 0.004 0.008
#> GSM1182223     3  0.2856     0.7948 0.004 0.064 0.868 0.000 0.004 0.060
#> GSM1182224     6  0.3023     0.8776 0.004 0.000 0.212 0.000 0.000 0.784
#> GSM1182225     2  0.4879     0.5074 0.248 0.664 0.076 0.000 0.004 0.008
#> GSM1182226     2  0.5158     0.4259 0.276 0.624 0.088 0.000 0.004 0.008
#> GSM1182227     4  0.1410     0.9283 0.044 0.000 0.000 0.944 0.008 0.004
#> GSM1182228     3  0.3992     0.7213 0.008 0.184 0.756 0.000 0.000 0.052
#> GSM1182229     3  0.1444     0.7976 0.000 0.000 0.928 0.000 0.000 0.072
#> GSM1182230     3  0.2436     0.7925 0.032 0.000 0.880 0.000 0.000 0.088
#> GSM1182231     3  0.5272     0.5714 0.216 0.132 0.640 0.000 0.004 0.008
#> GSM1182232     5  0.1333     0.9000 0.008 0.000 0.000 0.048 0.944 0.000
#> GSM1182233     5  0.1713     0.8987 0.028 0.000 0.000 0.044 0.928 0.000
#> GSM1182234     4  0.1410     0.9293 0.044 0.000 0.000 0.944 0.008 0.004
#> GSM1182235     2  0.3201     0.6866 0.088 0.848 0.028 0.000 0.000 0.036
#> GSM1182236     5  0.2790     0.8792 0.088 0.000 0.000 0.032 0.868 0.012
#> GSM1182237     3  0.5010     0.6807 0.072 0.168 0.704 0.000 0.000 0.056
#> GSM1182238     2  0.4220     0.5183 0.304 0.664 0.028 0.000 0.000 0.004
#> GSM1182239     2  0.1829     0.7357 0.028 0.928 0.008 0.000 0.000 0.036
#> GSM1182240     2  0.2308     0.7292 0.108 0.880 0.000 0.000 0.004 0.008
#> GSM1182241     2  0.1922     0.7250 0.024 0.924 0.012 0.000 0.000 0.040
#> GSM1182242     3  0.2234     0.7812 0.000 0.004 0.872 0.000 0.000 0.124
#> GSM1182243     3  0.0146     0.8086 0.004 0.000 0.996 0.000 0.000 0.000
#> GSM1182244     6  0.2506     0.8267 0.000 0.052 0.068 0.000 0.000 0.880
#> GSM1182245     4  0.1265     0.9267 0.044 0.000 0.000 0.948 0.000 0.008
#> GSM1182246     4  0.0260     0.9308 0.000 0.000 0.000 0.992 0.008 0.000
#> GSM1182247     3  0.2191     0.7823 0.000 0.000 0.876 0.000 0.004 0.120
#> GSM1182248     3  0.1858     0.7793 0.004 0.000 0.904 0.000 0.000 0.092
#> GSM1182249     3  0.4096     0.7311 0.204 0.024 0.744 0.000 0.000 0.028
#> GSM1182250     3  0.2346     0.7726 0.124 0.000 0.868 0.000 0.000 0.008
#> GSM1182251     5  0.2687     0.8964 0.072 0.000 0.000 0.044 0.876 0.008
#> GSM1182252     3  0.2378     0.7656 0.000 0.000 0.848 0.000 0.000 0.152
#> GSM1182253     3  0.3159     0.7801 0.052 0.000 0.836 0.000 0.004 0.108
#> GSM1182254     3  0.0260     0.8090 0.008 0.000 0.992 0.000 0.000 0.000
#> GSM1182255     4  0.0260     0.9309 0.000 0.000 0.000 0.992 0.008 0.000
#> GSM1182256     4  0.0146     0.9308 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM1182257     4  0.0865     0.9155 0.000 0.000 0.000 0.964 0.036 0.000
#> GSM1182258     4  0.0363     0.9305 0.000 0.000 0.000 0.988 0.012 0.000
#> GSM1182259     4  0.0260     0.9309 0.000 0.000 0.000 0.992 0.008 0.000
#> GSM1182260     3  0.2703     0.7968 0.016 0.028 0.876 0.000 0.000 0.080
#> GSM1182261     3  0.3025     0.7470 0.164 0.004 0.820 0.000 0.004 0.008
#> GSM1182262     3  0.3894     0.7411 0.152 0.000 0.772 0.000 0.004 0.072
#> GSM1182263     5  0.4943     0.5750 0.072 0.000 0.000 0.300 0.620 0.008
#> GSM1182264     3  0.4050     0.7558 0.016 0.104 0.780 0.000 0.000 0.100
#> GSM1182265     3  0.4112     0.6895 0.224 0.000 0.724 0.000 0.004 0.048
#> GSM1182266     3  0.2611     0.7947 0.016 0.016 0.876 0.000 0.000 0.092
#> GSM1182267     4  0.1605     0.9280 0.044 0.000 0.000 0.936 0.016 0.004
#> GSM1182268     5  0.2781     0.8847 0.084 0.000 0.000 0.040 0.868 0.008
#> GSM1182269     5  0.3387     0.8623 0.092 0.000 0.000 0.044 0.836 0.028
#> GSM1182270     5  0.3179     0.8667 0.092 0.000 0.000 0.032 0.848 0.028
#> GSM1182271     4  0.0260     0.9309 0.000 0.000 0.000 0.992 0.008 0.000
#> GSM1182272     4  0.0146     0.9308 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM1182273     3  0.1341     0.8094 0.028 0.000 0.948 0.000 0.000 0.024
#> GSM1182275     3  0.3018     0.7949 0.012 0.016 0.856 0.000 0.012 0.104
#> GSM1182276     2  0.3177     0.7363 0.052 0.852 0.000 0.000 0.024 0.072
#> GSM1182277     4  0.1410     0.9275 0.044 0.000 0.000 0.944 0.004 0.008
#> GSM1182278     4  0.1410     0.9275 0.044 0.000 0.000 0.944 0.004 0.008
#> GSM1182279     5  0.2549     0.8947 0.072 0.000 0.000 0.036 0.884 0.008
#> GSM1182280     5  0.2619     0.8946 0.072 0.000 0.000 0.040 0.880 0.008
#> GSM1182281     4  0.1340     0.9285 0.040 0.000 0.000 0.948 0.004 0.008
#> GSM1182282     4  0.1523     0.9223 0.044 0.000 0.000 0.940 0.008 0.008
#> GSM1182283     4  0.1410     0.9281 0.044 0.000 0.000 0.944 0.008 0.004
#> GSM1182284     4  0.1296     0.9282 0.044 0.000 0.000 0.948 0.004 0.004
#> GSM1182285     6  0.2416     0.9064 0.000 0.000 0.156 0.000 0.000 0.844
#> GSM1182286     2  0.1977     0.7336 0.040 0.920 0.008 0.000 0.000 0.032
#> GSM1182287     3  0.3195     0.7634 0.036 0.116 0.836 0.000 0.000 0.012
#> GSM1182288     3  0.2053     0.7756 0.004 0.000 0.888 0.000 0.000 0.108
#> GSM1182289     5  0.2817     0.8919 0.072 0.000 0.000 0.052 0.868 0.008
#> GSM1182290     5  0.2687     0.8943 0.072 0.000 0.000 0.044 0.876 0.008
#> GSM1182291     4  0.0146     0.9308 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM1182274     3  0.1391     0.8045 0.016 0.000 0.944 0.000 0.000 0.040
#> GSM1182292     2  0.1320     0.7357 0.016 0.948 0.000 0.000 0.000 0.036
#> GSM1182293     1  0.4953     0.7039 0.572 0.364 0.000 0.000 0.008 0.056
#> GSM1182294     1  0.4181     0.7367 0.600 0.384 0.004 0.000 0.000 0.012
#> GSM1182295     2  0.2912     0.7051 0.172 0.816 0.000 0.000 0.000 0.012
#> GSM1182296     2  0.1320     0.7366 0.016 0.948 0.000 0.000 0.000 0.036
#> GSM1182298     6  0.2416     0.9064 0.000 0.000 0.156 0.000 0.000 0.844
#> GSM1182299     2  0.3385     0.7304 0.064 0.844 0.004 0.000 0.024 0.064
#> GSM1182300     2  0.2680     0.6698 0.108 0.860 0.000 0.000 0.000 0.032
#> GSM1182301     2  0.1857     0.7485 0.028 0.924 0.000 0.000 0.004 0.044
#> GSM1182303     2  0.3468     0.7348 0.072 0.832 0.000 0.000 0.024 0.072
#> GSM1182304     5  0.2364     0.8952 0.072 0.000 0.000 0.032 0.892 0.004
#> GSM1182305     5  0.4758     0.5923 0.060 0.000 0.000 0.292 0.640 0.008
#> GSM1182306     4  0.3446     0.5591 0.000 0.000 0.000 0.692 0.308 0.000
#> GSM1182307     2  0.1575     0.7338 0.032 0.936 0.000 0.000 0.000 0.032
#> GSM1182309     1  0.4779     0.7267 0.568 0.384 0.000 0.000 0.008 0.040
#> GSM1182312     1  0.3499     0.7641 0.728 0.264 0.004 0.000 0.000 0.004
#> GSM1182314     4  0.0260     0.9308 0.000 0.000 0.000 0.992 0.008 0.000
#> GSM1182316     1  0.3871     0.7668 0.696 0.288 0.008 0.000 0.004 0.004
#> GSM1182318     2  0.4158     0.5352 0.224 0.724 0.000 0.000 0.008 0.044
#> GSM1182319     1  0.4783     0.6939 0.536 0.420 0.008 0.000 0.000 0.036
#> GSM1182320     1  0.3543     0.7776 0.720 0.272 0.004 0.000 0.000 0.004
#> GSM1182321     1  0.5875     0.6796 0.536 0.336 0.064 0.000 0.000 0.064
#> GSM1182322     1  0.4771     0.7006 0.544 0.412 0.008 0.000 0.000 0.036
#> GSM1182324     1  0.5004     0.6903 0.668 0.216 0.104 0.000 0.004 0.008
#> GSM1182297     2  0.2492     0.7173 0.068 0.888 0.008 0.000 0.000 0.036
#> GSM1182302     5  0.1858     0.8881 0.000 0.000 0.000 0.092 0.904 0.004
#> GSM1182308     2  0.4057     0.7230 0.112 0.796 0.020 0.000 0.012 0.060
#> GSM1182310     1  0.3541     0.7735 0.728 0.260 0.012 0.000 0.000 0.000
#> GSM1182311     5  0.3091     0.8735 0.092 0.000 0.000 0.036 0.852 0.020
#> GSM1182313     4  0.0146     0.9308 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM1182315     2  0.3890    -0.0994 0.400 0.596 0.000 0.000 0.000 0.004
#> GSM1182317     1  0.5263     0.6139 0.512 0.412 0.000 0.000 0.016 0.060
#> GSM1182323     5  0.2763     0.8820 0.088 0.000 0.000 0.036 0.868 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-skmeans-consensus-heatmap-1

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk CV-skmeans-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk CV-skmeans-collect-classes

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

test_to_known_factors(res)
#>              n disease.state(p) gender(p) k
#> CV:skmeans 139         7.73e-02     1.000 2
#> CV:skmeans 137         5.59e-07     0.425 3
#> CV:skmeans 138         1.63e-06     0.409 4
#> CV:skmeans 133         3.42e-06     0.543 5
#> CV:skmeans 131         2.63e-09     0.589 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 46361 rows and 139 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#>   Subgroups are detected by 'pam' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 3.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk CV-pam-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           1.000       1.000         0.4791 0.521   0.521
#> 3 3 1.000           0.983       0.993         0.1527 0.928   0.861
#> 4 4 0.787           0.889       0.910         0.3263 0.816   0.591
#> 5 5 0.742           0.813       0.894         0.0390 0.959   0.848
#> 6 6 0.737           0.741       0.822         0.0375 0.968   0.874

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
#> GSM1182186     1       0          1  1  0
#> GSM1182187     1       0          1  1  0
#> GSM1182188     1       0          1  1  0
#> GSM1182189     1       0          1  1  0
#> GSM1182190     1       0          1  1  0
#> GSM1182191     1       0          1  1  0
#> GSM1182192     1       0          1  1  0
#> GSM1182193     1       0          1  1  0
#> GSM1182194     2       0          1  0  1
#> GSM1182195     2       0          1  0  1
#> GSM1182196     2       0          1  0  1
#> GSM1182197     2       0          1  0  1
#> GSM1182198     2       0          1  0  1
#> GSM1182199     2       0          1  0  1
#> GSM1182200     2       0          1  0  1
#> GSM1182201     2       0          1  0  1
#> GSM1182202     1       0          1  1  0
#> GSM1182203     1       0          1  1  0
#> GSM1182204     1       0          1  1  0
#> GSM1182205     2       0          1  0  1
#> GSM1182206     2       0          1  0  1
#> GSM1182207     1       0          1  1  0
#> GSM1182208     1       0          1  1  0
#> GSM1182209     2       0          1  0  1
#> GSM1182210     2       0          1  0  1
#> GSM1182211     2       0          1  0  1
#> GSM1182212     2       0          1  0  1
#> GSM1182213     2       0          1  0  1
#> GSM1182214     2       0          1  0  1
#> GSM1182215     2       0          1  0  1
#> GSM1182216     2       0          1  0  1
#> GSM1182217     1       0          1  1  0
#> GSM1182218     1       0          1  1  0
#> GSM1182219     2       0          1  0  1
#> GSM1182220     2       0          1  0  1
#> GSM1182221     2       0          1  0  1
#> GSM1182222     2       0          1  0  1
#> GSM1182223     2       0          1  0  1
#> GSM1182224     2       0          1  0  1
#> GSM1182225     2       0          1  0  1
#> GSM1182226     2       0          1  0  1
#> GSM1182227     1       0          1  1  0
#> GSM1182228     2       0          1  0  1
#> GSM1182229     2       0          1  0  1
#> GSM1182230     2       0          1  0  1
#> GSM1182231     2       0          1  0  1
#> GSM1182232     1       0          1  1  0
#> GSM1182233     1       0          1  1  0
#> GSM1182234     1       0          1  1  0
#> GSM1182235     2       0          1  0  1
#> GSM1182236     1       0          1  1  0
#> GSM1182237     2       0          1  0  1
#> GSM1182238     2       0          1  0  1
#> GSM1182239     2       0          1  0  1
#> GSM1182240     2       0          1  0  1
#> GSM1182241     2       0          1  0  1
#> GSM1182242     2       0          1  0  1
#> GSM1182243     2       0          1  0  1
#> GSM1182244     2       0          1  0  1
#> GSM1182245     1       0          1  1  0
#> GSM1182246     1       0          1  1  0
#> GSM1182247     2       0          1  0  1
#> GSM1182248     2       0          1  0  1
#> GSM1182249     2       0          1  0  1
#> GSM1182250     2       0          1  0  1
#> GSM1182251     1       0          1  1  0
#> GSM1182252     2       0          1  0  1
#> GSM1182253     2       0          1  0  1
#> GSM1182254     2       0          1  0  1
#> GSM1182255     1       0          1  1  0
#> GSM1182256     1       0          1  1  0
#> GSM1182257     1       0          1  1  0
#> GSM1182258     1       0          1  1  0
#> GSM1182259     1       0          1  1  0
#> GSM1182260     2       0          1  0  1
#> GSM1182261     2       0          1  0  1
#> GSM1182262     2       0          1  0  1
#> GSM1182263     1       0          1  1  0
#> GSM1182264     2       0          1  0  1
#> GSM1182265     2       0          1  0  1
#> GSM1182266     2       0          1  0  1
#> GSM1182267     1       0          1  1  0
#> GSM1182268     1       0          1  1  0
#> GSM1182269     1       0          1  1  0
#> GSM1182270     1       0          1  1  0
#> GSM1182271     1       0          1  1  0
#> GSM1182272     1       0          1  1  0
#> GSM1182273     2       0          1  0  1
#> GSM1182275     2       0          1  0  1
#> GSM1182276     2       0          1  0  1
#> GSM1182277     1       0          1  1  0
#> GSM1182278     1       0          1  1  0
#> GSM1182279     1       0          1  1  0
#> GSM1182280     1       0          1  1  0
#> GSM1182281     1       0          1  1  0
#> GSM1182282     1       0          1  1  0
#> GSM1182283     1       0          1  1  0
#> GSM1182284     1       0          1  1  0
#> GSM1182285     2       0          1  0  1
#> GSM1182286     2       0          1  0  1
#> GSM1182287     2       0          1  0  1
#> GSM1182288     2       0          1  0  1
#> GSM1182289     1       0          1  1  0
#> GSM1182290     1       0          1  1  0
#> GSM1182291     1       0          1  1  0
#> GSM1182274     2       0          1  0  1
#> GSM1182292     2       0          1  0  1
#> GSM1182293     2       0          1  0  1
#> GSM1182294     2       0          1  0  1
#> GSM1182295     2       0          1  0  1
#> GSM1182296     2       0          1  0  1
#> GSM1182298     2       0          1  0  1
#> GSM1182299     2       0          1  0  1
#> GSM1182300     2       0          1  0  1
#> GSM1182301     2       0          1  0  1
#> GSM1182303     2       0          1  0  1
#> GSM1182304     1       0          1  1  0
#> GSM1182305     1       0          1  1  0
#> GSM1182306     1       0          1  1  0
#> GSM1182307     2       0          1  0  1
#> GSM1182309     2       0          1  0  1
#> GSM1182312     2       0          1  0  1
#> GSM1182314     1       0          1  1  0
#> GSM1182316     2       0          1  0  1
#> GSM1182318     2       0          1  0  1
#> GSM1182319     2       0          1  0  1
#> GSM1182320     2       0          1  0  1
#> GSM1182321     2       0          1  0  1
#> GSM1182322     2       0          1  0  1
#> GSM1182324     2       0          1  0  1
#> GSM1182297     2       0          1  0  1
#> GSM1182302     1       0          1  1  0
#> GSM1182308     2       0          1  0  1
#> GSM1182310     2       0          1  0  1
#> GSM1182311     1       0          1  1  0
#> GSM1182313     1       0          1  1  0
#> GSM1182315     2       0          1  0  1
#> GSM1182317     2       0          1  0  1
#> GSM1182323     1       0          1  1  0

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1 p2    p3
#> GSM1182186     3  0.0000      1.000 0.000  0 1.000
#> GSM1182187     3  0.0000      1.000 0.000  0 1.000
#> GSM1182188     3  0.0000      1.000 0.000  0 1.000
#> GSM1182189     1  0.0000      0.971 1.000  0 0.000
#> GSM1182190     1  0.0000      0.971 1.000  0 0.000
#> GSM1182191     3  0.0237      0.996 0.004  0 0.996
#> GSM1182192     1  0.0000      0.971 1.000  0 0.000
#> GSM1182193     1  0.0000      0.971 1.000  0 0.000
#> GSM1182194     2  0.0000      1.000 0.000  1 0.000
#> GSM1182195     2  0.0000      1.000 0.000  1 0.000
#> GSM1182196     2  0.0000      1.000 0.000  1 0.000
#> GSM1182197     2  0.0000      1.000 0.000  1 0.000
#> GSM1182198     2  0.0000      1.000 0.000  1 0.000
#> GSM1182199     2  0.0000      1.000 0.000  1 0.000
#> GSM1182200     2  0.0000      1.000 0.000  1 0.000
#> GSM1182201     2  0.0000      1.000 0.000  1 0.000
#> GSM1182202     3  0.0000      1.000 0.000  0 1.000
#> GSM1182203     3  0.0000      1.000 0.000  0 1.000
#> GSM1182204     3  0.0000      1.000 0.000  0 1.000
#> GSM1182205     2  0.0000      1.000 0.000  1 0.000
#> GSM1182206     2  0.0000      1.000 0.000  1 0.000
#> GSM1182207     1  0.0000      0.971 1.000  0 0.000
#> GSM1182208     1  0.0000      0.971 1.000  0 0.000
#> GSM1182209     2  0.0000      1.000 0.000  1 0.000
#> GSM1182210     2  0.0000      1.000 0.000  1 0.000
#> GSM1182211     2  0.0000      1.000 0.000  1 0.000
#> GSM1182212     2  0.0000      1.000 0.000  1 0.000
#> GSM1182213     2  0.0000      1.000 0.000  1 0.000
#> GSM1182214     2  0.0000      1.000 0.000  1 0.000
#> GSM1182215     2  0.0000      1.000 0.000  1 0.000
#> GSM1182216     2  0.0000      1.000 0.000  1 0.000
#> GSM1182217     3  0.0000      1.000 0.000  0 1.000
#> GSM1182218     1  0.0000      0.971 1.000  0 0.000
#> GSM1182219     2  0.0000      1.000 0.000  1 0.000
#> GSM1182220     2  0.0000      1.000 0.000  1 0.000
#> GSM1182221     2  0.0000      1.000 0.000  1 0.000
#> GSM1182222     2  0.0000      1.000 0.000  1 0.000
#> GSM1182223     2  0.0000      1.000 0.000  1 0.000
#> GSM1182224     2  0.0000      1.000 0.000  1 0.000
#> GSM1182225     2  0.0000      1.000 0.000  1 0.000
#> GSM1182226     2  0.0000      1.000 0.000  1 0.000
#> GSM1182227     1  0.0000      0.971 1.000  0 0.000
#> GSM1182228     2  0.0000      1.000 0.000  1 0.000
#> GSM1182229     2  0.0000      1.000 0.000  1 0.000
#> GSM1182230     2  0.0000      1.000 0.000  1 0.000
#> GSM1182231     2  0.0000      1.000 0.000  1 0.000
#> GSM1182232     1  0.0000      0.971 1.000  0 0.000
#> GSM1182233     1  0.0000      0.971 1.000  0 0.000
#> GSM1182234     1  0.0000      0.971 1.000  0 0.000
#> GSM1182235     2  0.0000      1.000 0.000  1 0.000
#> GSM1182236     1  0.0000      0.971 1.000  0 0.000
#> GSM1182237     2  0.0000      1.000 0.000  1 0.000
#> GSM1182238     2  0.0000      1.000 0.000  1 0.000
#> GSM1182239     2  0.0000      1.000 0.000  1 0.000
#> GSM1182240     2  0.0000      1.000 0.000  1 0.000
#> GSM1182241     2  0.0000      1.000 0.000  1 0.000
#> GSM1182242     2  0.0000      1.000 0.000  1 0.000
#> GSM1182243     2  0.0000      1.000 0.000  1 0.000
#> GSM1182244     2  0.0000      1.000 0.000  1 0.000
#> GSM1182245     1  0.0000      0.971 1.000  0 0.000
#> GSM1182246     3  0.0000      1.000 0.000  0 1.000
#> GSM1182247     2  0.0000      1.000 0.000  1 0.000
#> GSM1182248     2  0.0000      1.000 0.000  1 0.000
#> GSM1182249     2  0.0000      1.000 0.000  1 0.000
#> GSM1182250     2  0.0000      1.000 0.000  1 0.000
#> GSM1182251     1  0.4346      0.772 0.816  0 0.184
#> GSM1182252     2  0.0000      1.000 0.000  1 0.000
#> GSM1182253     2  0.0000      1.000 0.000  1 0.000
#> GSM1182254     2  0.0000      1.000 0.000  1 0.000
#> GSM1182255     3  0.0000      1.000 0.000  0 1.000
#> GSM1182256     3  0.0000      1.000 0.000  0 1.000
#> GSM1182257     3  0.0000      1.000 0.000  0 1.000
#> GSM1182258     3  0.0000      1.000 0.000  0 1.000
#> GSM1182259     3  0.0000      1.000 0.000  0 1.000
#> GSM1182260     2  0.0000      1.000 0.000  1 0.000
#> GSM1182261     2  0.0000      1.000 0.000  1 0.000
#> GSM1182262     2  0.0000      1.000 0.000  1 0.000
#> GSM1182263     1  0.0000      0.971 1.000  0 0.000
#> GSM1182264     2  0.0000      1.000 0.000  1 0.000
#> GSM1182265     2  0.0000      1.000 0.000  1 0.000
#> GSM1182266     2  0.0000      1.000 0.000  1 0.000
#> GSM1182267     1  0.0000      0.971 1.000  0 0.000
#> GSM1182268     1  0.0000      0.971 1.000  0 0.000
#> GSM1182269     1  0.0000      0.971 1.000  0 0.000
#> GSM1182270     1  0.0000      0.971 1.000  0 0.000
#> GSM1182271     3  0.0000      1.000 0.000  0 1.000
#> GSM1182272     3  0.0000      1.000 0.000  0 1.000
#> GSM1182273     2  0.0000      1.000 0.000  1 0.000
#> GSM1182275     2  0.0000      1.000 0.000  1 0.000
#> GSM1182276     2  0.0000      1.000 0.000  1 0.000
#> GSM1182277     1  0.0000      0.971 1.000  0 0.000
#> GSM1182278     1  0.0000      0.971 1.000  0 0.000
#> GSM1182279     1  0.0000      0.971 1.000  0 0.000
#> GSM1182280     1  0.0000      0.971 1.000  0 0.000
#> GSM1182281     1  0.6299      0.107 0.524  0 0.476
#> GSM1182282     1  0.0000      0.971 1.000  0 0.000
#> GSM1182283     1  0.0000      0.971 1.000  0 0.000
#> GSM1182284     1  0.0000      0.971 1.000  0 0.000
#> GSM1182285     2  0.0000      1.000 0.000  1 0.000
#> GSM1182286     2  0.0000      1.000 0.000  1 0.000
#> GSM1182287     2  0.0000      1.000 0.000  1 0.000
#> GSM1182288     2  0.0000      1.000 0.000  1 0.000
#> GSM1182289     1  0.0237      0.968 0.996  0 0.004
#> GSM1182290     1  0.0000      0.971 1.000  0 0.000
#> GSM1182291     3  0.0000      1.000 0.000  0 1.000
#> GSM1182274     2  0.0000      1.000 0.000  1 0.000
#> GSM1182292     2  0.0000      1.000 0.000  1 0.000
#> GSM1182293     2  0.0000      1.000 0.000  1 0.000
#> GSM1182294     2  0.0000      1.000 0.000  1 0.000
#> GSM1182295     2  0.0000      1.000 0.000  1 0.000
#> GSM1182296     2  0.0000      1.000 0.000  1 0.000
#> GSM1182298     2  0.0000      1.000 0.000  1 0.000
#> GSM1182299     2  0.0000      1.000 0.000  1 0.000
#> GSM1182300     2  0.0000      1.000 0.000  1 0.000
#> GSM1182301     2  0.0000      1.000 0.000  1 0.000
#> GSM1182303     2  0.0000      1.000 0.000  1 0.000
#> GSM1182304     1  0.0000      0.971 1.000  0 0.000
#> GSM1182305     1  0.5178      0.666 0.744  0 0.256
#> GSM1182306     3  0.0000      1.000 0.000  0 1.000
#> GSM1182307     2  0.0000      1.000 0.000  1 0.000
#> GSM1182309     2  0.0000      1.000 0.000  1 0.000
#> GSM1182312     2  0.0000      1.000 0.000  1 0.000
#> GSM1182314     3  0.0000      1.000 0.000  0 1.000
#> GSM1182316     2  0.0000      1.000 0.000  1 0.000
#> GSM1182318     2  0.0000      1.000 0.000  1 0.000
#> GSM1182319     2  0.0000      1.000 0.000  1 0.000
#> GSM1182320     2  0.0000      1.000 0.000  1 0.000
#> GSM1182321     2  0.0000      1.000 0.000  1 0.000
#> GSM1182322     2  0.0000      1.000 0.000  1 0.000
#> GSM1182324     2  0.0000      1.000 0.000  1 0.000
#> GSM1182297     2  0.0000      1.000 0.000  1 0.000
#> GSM1182302     3  0.0000      1.000 0.000  0 1.000
#> GSM1182308     2  0.0000      1.000 0.000  1 0.000
#> GSM1182310     2  0.0000      1.000 0.000  1 0.000
#> GSM1182311     1  0.0000      0.971 1.000  0 0.000
#> GSM1182313     3  0.0000      1.000 0.000  0 1.000
#> GSM1182315     2  0.0000      1.000 0.000  1 0.000
#> GSM1182317     2  0.0000      1.000 0.000  1 0.000
#> GSM1182323     1  0.0000      0.971 1.000  0 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1182186     4  0.0469     0.9944 0.000 0.000 0.012 0.988
#> GSM1182187     4  0.0469     0.9944 0.000 0.000 0.012 0.988
#> GSM1182188     4  0.0000     0.9967 0.000 0.000 0.000 1.000
#> GSM1182189     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182190     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182191     4  0.0657     0.9918 0.004 0.000 0.012 0.984
#> GSM1182192     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182193     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182194     3  0.0469     0.9132 0.000 0.012 0.988 0.000
#> GSM1182195     3  0.0707     0.9127 0.000 0.020 0.980 0.000
#> GSM1182196     2  0.2868     0.8402 0.000 0.864 0.136 0.000
#> GSM1182197     2  0.4898     0.4669 0.000 0.584 0.416 0.000
#> GSM1182198     3  0.0707     0.9127 0.000 0.020 0.980 0.000
#> GSM1182199     3  0.0592     0.9133 0.000 0.016 0.984 0.000
#> GSM1182200     2  0.3801     0.8128 0.000 0.780 0.220 0.000
#> GSM1182201     3  0.2011     0.8804 0.000 0.080 0.920 0.000
#> GSM1182202     4  0.0469     0.9944 0.000 0.000 0.012 0.988
#> GSM1182203     4  0.0336     0.9954 0.000 0.000 0.008 0.992
#> GSM1182204     4  0.0336     0.9954 0.000 0.000 0.008 0.992
#> GSM1182205     3  0.2704     0.8479 0.000 0.124 0.876 0.000
#> GSM1182206     3  0.4356     0.6404 0.000 0.292 0.708 0.000
#> GSM1182207     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182208     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182209     2  0.0188     0.8929 0.000 0.996 0.004 0.000
#> GSM1182210     2  0.2921     0.8777 0.000 0.860 0.140 0.000
#> GSM1182211     2  0.0188     0.8947 0.000 0.996 0.004 0.000
#> GSM1182212     2  0.2345     0.8814 0.000 0.900 0.100 0.000
#> GSM1182213     2  0.0188     0.8929 0.000 0.996 0.004 0.000
#> GSM1182214     2  0.0592     0.8974 0.000 0.984 0.016 0.000
#> GSM1182215     3  0.4817     0.3322 0.000 0.388 0.612 0.000
#> GSM1182216     2  0.2216     0.8918 0.000 0.908 0.092 0.000
#> GSM1182217     4  0.0469     0.9944 0.000 0.000 0.012 0.988
#> GSM1182218     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182219     2  0.1389     0.9015 0.000 0.952 0.048 0.000
#> GSM1182220     2  0.2814     0.8692 0.000 0.868 0.132 0.000
#> GSM1182221     2  0.2216     0.8918 0.000 0.908 0.092 0.000
#> GSM1182222     2  0.3172     0.8626 0.000 0.840 0.160 0.000
#> GSM1182223     3  0.4916     0.1935 0.000 0.424 0.576 0.000
#> GSM1182224     3  0.0707     0.9127 0.000 0.020 0.980 0.000
#> GSM1182225     2  0.2408     0.8903 0.000 0.896 0.104 0.000
#> GSM1182226     2  0.2149     0.8931 0.000 0.912 0.088 0.000
#> GSM1182227     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182228     3  0.3356     0.8106 0.000 0.176 0.824 0.000
#> GSM1182229     3  0.0469     0.9132 0.000 0.012 0.988 0.000
#> GSM1182230     3  0.1474     0.8984 0.000 0.052 0.948 0.000
#> GSM1182231     2  0.3172     0.8625 0.000 0.840 0.160 0.000
#> GSM1182232     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182233     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182234     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182235     2  0.0188     0.8929 0.000 0.996 0.004 0.000
#> GSM1182236     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182237     2  0.3486     0.7908 0.000 0.812 0.188 0.000
#> GSM1182238     2  0.1716     0.8979 0.000 0.936 0.064 0.000
#> GSM1182239     2  0.2345     0.8763 0.000 0.900 0.100 0.000
#> GSM1182240     2  0.0469     0.8960 0.000 0.988 0.012 0.000
#> GSM1182241     2  0.2814     0.8455 0.000 0.868 0.132 0.000
#> GSM1182242     3  0.0707     0.9104 0.000 0.020 0.980 0.000
#> GSM1182243     3  0.0469     0.9132 0.000 0.012 0.988 0.000
#> GSM1182244     3  0.1867     0.8892 0.000 0.072 0.928 0.000
#> GSM1182245     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182246     4  0.0000     0.9967 0.000 0.000 0.000 1.000
#> GSM1182247     3  0.0469     0.9132 0.000 0.012 0.988 0.000
#> GSM1182248     3  0.0707     0.9127 0.000 0.020 0.980 0.000
#> GSM1182249     2  0.4804     0.5047 0.000 0.616 0.384 0.000
#> GSM1182250     3  0.2530     0.8551 0.000 0.112 0.888 0.000
#> GSM1182251     1  0.3852     0.7664 0.808 0.000 0.012 0.180
#> GSM1182252     3  0.0469     0.9132 0.000 0.012 0.988 0.000
#> GSM1182253     3  0.0817     0.9118 0.000 0.024 0.976 0.000
#> GSM1182254     3  0.0592     0.9133 0.000 0.016 0.984 0.000
#> GSM1182255     4  0.0000     0.9967 0.000 0.000 0.000 1.000
#> GSM1182256     4  0.0000     0.9967 0.000 0.000 0.000 1.000
#> GSM1182257     4  0.0188     0.9961 0.000 0.000 0.004 0.996
#> GSM1182258     4  0.0000     0.9967 0.000 0.000 0.000 1.000
#> GSM1182259     4  0.0000     0.9967 0.000 0.000 0.000 1.000
#> GSM1182260     3  0.1867     0.8859 0.000 0.072 0.928 0.000
#> GSM1182261     2  0.4679     0.5627 0.000 0.648 0.352 0.000
#> GSM1182262     3  0.4250     0.6388 0.000 0.276 0.724 0.000
#> GSM1182263     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182264     3  0.2081     0.8717 0.000 0.084 0.916 0.000
#> GSM1182265     3  0.1118     0.9072 0.000 0.036 0.964 0.000
#> GSM1182266     3  0.1022     0.9051 0.000 0.032 0.968 0.000
#> GSM1182267     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182268     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182269     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182270     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182271     4  0.0000     0.9967 0.000 0.000 0.000 1.000
#> GSM1182272     4  0.0000     0.9967 0.000 0.000 0.000 1.000
#> GSM1182273     3  0.0707     0.9127 0.000 0.020 0.980 0.000
#> GSM1182275     3  0.0469     0.9132 0.000 0.012 0.988 0.000
#> GSM1182276     2  0.2647     0.8721 0.000 0.880 0.120 0.000
#> GSM1182277     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182278     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182279     1  0.0336     0.9648 0.992 0.000 0.008 0.000
#> GSM1182280     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182281     1  0.4994     0.0944 0.520 0.000 0.000 0.480
#> GSM1182282     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182283     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182284     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182285     3  0.0592     0.9129 0.000 0.016 0.984 0.000
#> GSM1182286     2  0.0921     0.8970 0.000 0.972 0.028 0.000
#> GSM1182287     3  0.4008     0.6928 0.000 0.244 0.756 0.000
#> GSM1182288     3  0.0592     0.9133 0.000 0.016 0.984 0.000
#> GSM1182289     1  0.0657     0.9593 0.984 0.000 0.012 0.004
#> GSM1182290     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182291     4  0.0000     0.9967 0.000 0.000 0.000 1.000
#> GSM1182274     3  0.0817     0.9129 0.000 0.024 0.976 0.000
#> GSM1182292     2  0.0707     0.8946 0.000 0.980 0.020 0.000
#> GSM1182293     2  0.2281     0.8976 0.000 0.904 0.096 0.000
#> GSM1182294     2  0.1637     0.8997 0.000 0.940 0.060 0.000
#> GSM1182295     2  0.2011     0.8973 0.000 0.920 0.080 0.000
#> GSM1182296     2  0.0469     0.8941 0.000 0.988 0.012 0.000
#> GSM1182298     3  0.0469     0.9132 0.000 0.012 0.988 0.000
#> GSM1182299     2  0.3528     0.8177 0.000 0.808 0.192 0.000
#> GSM1182300     2  0.1716     0.8913 0.000 0.936 0.064 0.000
#> GSM1182301     2  0.2011     0.8900 0.000 0.920 0.080 0.000
#> GSM1182303     2  0.3024     0.8707 0.000 0.852 0.148 0.000
#> GSM1182304     1  0.0336     0.9648 0.992 0.000 0.008 0.000
#> GSM1182305     1  0.4485     0.6658 0.740 0.000 0.012 0.248
#> GSM1182306     4  0.0188     0.9961 0.000 0.000 0.004 0.996
#> GSM1182307     2  0.0592     0.8950 0.000 0.984 0.016 0.000
#> GSM1182309     2  0.0817     0.8957 0.000 0.976 0.024 0.000
#> GSM1182312     2  0.2216     0.8918 0.000 0.908 0.092 0.000
#> GSM1182314     4  0.0000     0.9967 0.000 0.000 0.000 1.000
#> GSM1182316     2  0.2408     0.8902 0.000 0.896 0.104 0.000
#> GSM1182318     2  0.0469     0.8946 0.000 0.988 0.012 0.000
#> GSM1182319     2  0.2921     0.8375 0.000 0.860 0.140 0.000
#> GSM1182320     2  0.2216     0.8918 0.000 0.908 0.092 0.000
#> GSM1182321     3  0.2760     0.8466 0.000 0.128 0.872 0.000
#> GSM1182322     2  0.2530     0.8526 0.000 0.888 0.112 0.000
#> GSM1182324     3  0.3975     0.6983 0.000 0.240 0.760 0.000
#> GSM1182297     2  0.0188     0.8929 0.000 0.996 0.004 0.000
#> GSM1182302     4  0.0336     0.9954 0.000 0.000 0.008 0.992
#> GSM1182308     2  0.3311     0.8533 0.000 0.828 0.172 0.000
#> GSM1182310     2  0.2530     0.8883 0.000 0.888 0.112 0.000
#> GSM1182311     1  0.0000     0.9698 1.000 0.000 0.000 0.000
#> GSM1182313     4  0.0000     0.9967 0.000 0.000 0.000 1.000
#> GSM1182315     2  0.0817     0.8983 0.000 0.976 0.024 0.000
#> GSM1182317     2  0.0336     0.8924 0.000 0.992 0.008 0.000
#> GSM1182323     1  0.0000     0.9698 1.000 0.000 0.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
#> GSM1182186     5  0.2074     0.6046 0.000 0.000 0.000 0.104 0.896
#> GSM1182187     5  0.4307    -0.2485 0.000 0.000 0.000 0.500 0.500
#> GSM1182188     4  0.0000     0.8766 0.000 0.000 0.000 1.000 0.000
#> GSM1182189     1  0.0000     0.9986 1.000 0.000 0.000 0.000 0.000
#> GSM1182190     1  0.0000     0.9986 1.000 0.000 0.000 0.000 0.000
#> GSM1182191     5  0.1792     0.6161 0.000 0.000 0.000 0.084 0.916
#> GSM1182192     1  0.0000     0.9986 1.000 0.000 0.000 0.000 0.000
#> GSM1182193     1  0.0000     0.9986 1.000 0.000 0.000 0.000 0.000
#> GSM1182194     3  0.0000     0.8969 0.000 0.000 1.000 0.000 0.000
#> GSM1182195     3  0.0579     0.8963 0.000 0.008 0.984 0.000 0.008
#> GSM1182196     2  0.2629     0.8332 0.000 0.860 0.136 0.000 0.004
#> GSM1182197     2  0.4497     0.4481 0.000 0.568 0.424 0.000 0.008
#> GSM1182198     3  0.0290     0.8968 0.000 0.008 0.992 0.000 0.000
#> GSM1182199     3  0.0162     0.8972 0.000 0.004 0.996 0.000 0.000
#> GSM1182200     2  0.3305     0.8052 0.000 0.776 0.224 0.000 0.000
#> GSM1182201     3  0.1608     0.8675 0.000 0.072 0.928 0.000 0.000
#> GSM1182202     5  0.4242    -0.0445 0.000 0.000 0.000 0.428 0.572
#> GSM1182203     4  0.3508     0.6195 0.000 0.000 0.000 0.748 0.252
#> GSM1182204     4  0.4294     0.1584 0.000 0.000 0.000 0.532 0.468
#> GSM1182205     3  0.2864     0.8276 0.000 0.112 0.864 0.000 0.024
#> GSM1182206     3  0.4594     0.6132 0.000 0.284 0.680 0.000 0.036
#> GSM1182207     5  0.4283     0.4247 0.456 0.000 0.000 0.000 0.544
#> GSM1182208     5  0.4287     0.4148 0.460 0.000 0.000 0.000 0.540
#> GSM1182209     2  0.1124     0.8845 0.000 0.960 0.004 0.000 0.036
#> GSM1182210     2  0.2921     0.8787 0.000 0.856 0.124 0.000 0.020
#> GSM1182211     2  0.1408     0.8935 0.000 0.948 0.008 0.000 0.044
#> GSM1182212     2  0.2712     0.8830 0.000 0.880 0.088 0.000 0.032
#> GSM1182213     2  0.0162     0.8890 0.000 0.996 0.004 0.000 0.000
#> GSM1182214     2  0.1300     0.8937 0.000 0.956 0.016 0.000 0.028
#> GSM1182215     3  0.4663     0.3269 0.000 0.376 0.604 0.000 0.020
#> GSM1182216     2  0.2504     0.8846 0.000 0.896 0.064 0.000 0.040
#> GSM1182217     5  0.2230     0.5949 0.000 0.000 0.000 0.116 0.884
#> GSM1182218     1  0.0000     0.9986 1.000 0.000 0.000 0.000 0.000
#> GSM1182219     2  0.1444     0.8965 0.000 0.948 0.040 0.000 0.012
#> GSM1182220     2  0.2723     0.8680 0.000 0.864 0.124 0.000 0.012
#> GSM1182221     2  0.2504     0.8846 0.000 0.896 0.064 0.000 0.040
#> GSM1182222     2  0.3409     0.8585 0.000 0.824 0.144 0.000 0.032
#> GSM1182223     3  0.4210     0.2109 0.000 0.412 0.588 0.000 0.000
#> GSM1182224     3  0.0898     0.8937 0.000 0.008 0.972 0.000 0.020
#> GSM1182225     2  0.2694     0.8845 0.000 0.884 0.076 0.000 0.040
#> GSM1182226     2  0.2504     0.8846 0.000 0.896 0.064 0.000 0.040
#> GSM1182227     1  0.0000     0.9986 1.000 0.000 0.000 0.000 0.000
#> GSM1182228     3  0.3278     0.8003 0.000 0.156 0.824 0.000 0.020
#> GSM1182229     3  0.0162     0.8973 0.000 0.000 0.996 0.000 0.004
#> GSM1182230     3  0.1549     0.8819 0.000 0.040 0.944 0.000 0.016
#> GSM1182231     2  0.3432     0.8604 0.000 0.828 0.132 0.000 0.040
#> GSM1182232     1  0.0000     0.9986 1.000 0.000 0.000 0.000 0.000
#> GSM1182233     1  0.0510     0.9807 0.984 0.000 0.000 0.000 0.016
#> GSM1182234     1  0.0000     0.9986 1.000 0.000 0.000 0.000 0.000
#> GSM1182235     2  0.1357     0.8864 0.000 0.948 0.004 0.000 0.048
#> GSM1182236     1  0.0000     0.9986 1.000 0.000 0.000 0.000 0.000
#> GSM1182237     2  0.3562     0.7766 0.000 0.788 0.196 0.000 0.016
#> GSM1182238     2  0.2228     0.8880 0.000 0.912 0.048 0.000 0.040
#> GSM1182239     2  0.2694     0.8752 0.000 0.884 0.076 0.000 0.040
#> GSM1182240     2  0.0693     0.8929 0.000 0.980 0.012 0.000 0.008
#> GSM1182241     2  0.3432     0.8374 0.000 0.828 0.132 0.000 0.040
#> GSM1182242     3  0.0290     0.8942 0.000 0.008 0.992 0.000 0.000
#> GSM1182243     3  0.0162     0.8973 0.000 0.000 0.996 0.000 0.004
#> GSM1182244     3  0.1430     0.8794 0.000 0.052 0.944 0.000 0.004
#> GSM1182245     1  0.0000     0.9986 1.000 0.000 0.000 0.000 0.000
#> GSM1182246     4  0.0000     0.8766 0.000 0.000 0.000 1.000 0.000
#> GSM1182247     3  0.0000     0.8969 0.000 0.000 1.000 0.000 0.000
#> GSM1182248     3  0.0693     0.8956 0.000 0.008 0.980 0.000 0.012
#> GSM1182249     2  0.4494     0.5003 0.000 0.608 0.380 0.000 0.012
#> GSM1182250     3  0.2900     0.8299 0.000 0.108 0.864 0.000 0.028
#> GSM1182251     5  0.2012     0.6373 0.020 0.000 0.000 0.060 0.920
#> GSM1182252     3  0.0162     0.8973 0.000 0.000 0.996 0.000 0.004
#> GSM1182253     3  0.0807     0.8950 0.000 0.012 0.976 0.000 0.012
#> GSM1182254     3  0.0324     0.8977 0.000 0.004 0.992 0.000 0.004
#> GSM1182255     4  0.0000     0.8766 0.000 0.000 0.000 1.000 0.000
#> GSM1182256     4  0.0000     0.8766 0.000 0.000 0.000 1.000 0.000
#> GSM1182257     4  0.1410     0.8413 0.000 0.000 0.000 0.940 0.060
#> GSM1182258     4  0.0000     0.8766 0.000 0.000 0.000 1.000 0.000
#> GSM1182259     4  0.0000     0.8766 0.000 0.000 0.000 1.000 0.000
#> GSM1182260     3  0.2012     0.8626 0.000 0.060 0.920 0.000 0.020
#> GSM1182261     2  0.4638     0.5852 0.000 0.648 0.324 0.000 0.028
#> GSM1182262     3  0.4138     0.6185 0.000 0.276 0.708 0.000 0.016
#> GSM1182263     5  0.4210     0.4894 0.412 0.000 0.000 0.000 0.588
#> GSM1182264     3  0.2569     0.8405 0.000 0.068 0.892 0.000 0.040
#> GSM1182265     3  0.1168     0.8899 0.000 0.032 0.960 0.000 0.008
#> GSM1182266     3  0.0510     0.8906 0.000 0.016 0.984 0.000 0.000
#> GSM1182267     1  0.0000     0.9986 1.000 0.000 0.000 0.000 0.000
#> GSM1182268     1  0.0000     0.9986 1.000 0.000 0.000 0.000 0.000
#> GSM1182269     1  0.0000     0.9986 1.000 0.000 0.000 0.000 0.000
#> GSM1182270     1  0.0162     0.9947 0.996 0.000 0.000 0.000 0.004
#> GSM1182271     4  0.0000     0.8766 0.000 0.000 0.000 1.000 0.000
#> GSM1182272     4  0.0000     0.8766 0.000 0.000 0.000 1.000 0.000
#> GSM1182273     3  0.0290     0.8968 0.000 0.008 0.992 0.000 0.000
#> GSM1182275     3  0.0000     0.8969 0.000 0.000 1.000 0.000 0.000
#> GSM1182276     2  0.2795     0.8732 0.000 0.872 0.100 0.000 0.028
#> GSM1182277     1  0.0000     0.9986 1.000 0.000 0.000 0.000 0.000
#> GSM1182278     1  0.0000     0.9986 1.000 0.000 0.000 0.000 0.000
#> GSM1182279     5  0.2966     0.6850 0.184 0.000 0.000 0.000 0.816
#> GSM1182280     5  0.4242     0.4671 0.428 0.000 0.000 0.000 0.572
#> GSM1182281     4  0.4735     0.4071 0.284 0.000 0.000 0.672 0.044
#> GSM1182282     1  0.0000     0.9986 1.000 0.000 0.000 0.000 0.000
#> GSM1182283     1  0.0000     0.9986 1.000 0.000 0.000 0.000 0.000
#> GSM1182284     1  0.0000     0.9986 1.000 0.000 0.000 0.000 0.000
#> GSM1182285     3  0.0162     0.8968 0.000 0.004 0.996 0.000 0.000
#> GSM1182286     2  0.1741     0.8881 0.000 0.936 0.024 0.000 0.040
#> GSM1182287     3  0.3612     0.6972 0.000 0.228 0.764 0.000 0.008
#> GSM1182288     3  0.0671     0.8955 0.000 0.004 0.980 0.000 0.016
#> GSM1182289     5  0.2690     0.6829 0.156 0.000 0.000 0.000 0.844
#> GSM1182290     5  0.4268     0.4467 0.444 0.000 0.000 0.000 0.556
#> GSM1182291     4  0.0000     0.8766 0.000 0.000 0.000 1.000 0.000
#> GSM1182274     3  0.0566     0.8979 0.000 0.012 0.984 0.000 0.004
#> GSM1182292     2  0.1469     0.8848 0.000 0.948 0.016 0.000 0.036
#> GSM1182293     2  0.2408     0.8918 0.000 0.892 0.092 0.000 0.016
#> GSM1182294     2  0.2300     0.8894 0.000 0.908 0.052 0.000 0.040
#> GSM1182295     2  0.1764     0.8946 0.000 0.928 0.064 0.000 0.008
#> GSM1182296     2  0.1364     0.8851 0.000 0.952 0.012 0.000 0.036
#> GSM1182298     3  0.0000     0.8969 0.000 0.000 1.000 0.000 0.000
#> GSM1182299     2  0.3694     0.8259 0.000 0.796 0.172 0.000 0.032
#> GSM1182300     2  0.2074     0.8848 0.000 0.920 0.044 0.000 0.036
#> GSM1182301     2  0.2426     0.8823 0.000 0.900 0.064 0.000 0.036
#> GSM1182303     2  0.2763     0.8649 0.000 0.848 0.148 0.000 0.004
#> GSM1182304     5  0.2966     0.6850 0.184 0.000 0.000 0.000 0.816
#> GSM1182305     5  0.2036     0.6399 0.024 0.000 0.000 0.056 0.920
#> GSM1182306     4  0.1410     0.8413 0.000 0.000 0.000 0.940 0.060
#> GSM1182307     2  0.1444     0.8859 0.000 0.948 0.012 0.000 0.040
#> GSM1182309     2  0.1661     0.8860 0.000 0.940 0.024 0.000 0.036
#> GSM1182312     2  0.2504     0.8846 0.000 0.896 0.064 0.000 0.040
#> GSM1182314     4  0.0000     0.8766 0.000 0.000 0.000 1.000 0.000
#> GSM1182316     2  0.2616     0.8846 0.000 0.888 0.076 0.000 0.036
#> GSM1182318     2  0.0404     0.8908 0.000 0.988 0.012 0.000 0.000
#> GSM1182319     2  0.3197     0.8262 0.000 0.836 0.140 0.000 0.024
#> GSM1182320     2  0.2426     0.8854 0.000 0.900 0.064 0.000 0.036
#> GSM1182321     3  0.3267     0.8123 0.000 0.112 0.844 0.000 0.044
#> GSM1182322     2  0.3459     0.8406 0.000 0.832 0.116 0.000 0.052
#> GSM1182324     3  0.4313     0.6753 0.000 0.228 0.732 0.000 0.040
#> GSM1182297     2  0.1205     0.8851 0.000 0.956 0.004 0.000 0.040
#> GSM1182302     4  0.4297     0.1513 0.000 0.000 0.000 0.528 0.472
#> GSM1182308     2  0.3224     0.8525 0.000 0.824 0.160 0.000 0.016
#> GSM1182310     2  0.2813     0.8820 0.000 0.876 0.084 0.000 0.040
#> GSM1182311     1  0.0162     0.9947 0.996 0.000 0.000 0.000 0.004
#> GSM1182313     4  0.0000     0.8766 0.000 0.000 0.000 1.000 0.000
#> GSM1182315     2  0.1493     0.8929 0.000 0.948 0.028 0.000 0.024
#> GSM1182317     2  0.0798     0.8894 0.000 0.976 0.008 0.000 0.016
#> GSM1182323     1  0.0000     0.9986 1.000 0.000 0.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5 p6
#> GSM1182186     5  0.2119     0.6926 0.000 0.000 0.000 0.060 0.904 NA
#> GSM1182187     4  0.5858     0.5113 0.000 0.000 0.000 0.484 0.272 NA
#> GSM1182188     4  0.0146     0.8342 0.000 0.000 0.000 0.996 0.000 NA
#> GSM1182189     1  0.0000     0.8840 1.000 0.000 0.000 0.000 0.000 NA
#> GSM1182190     1  0.0000     0.8840 1.000 0.000 0.000 0.000 0.000 NA
#> GSM1182191     5  0.1720     0.7105 0.000 0.000 0.000 0.040 0.928 NA
#> GSM1182192     1  0.2730     0.8926 0.808 0.000 0.000 0.000 0.000 NA
#> GSM1182193     1  0.2730     0.8926 0.808 0.000 0.000 0.000 0.000 NA
#> GSM1182194     3  0.3390     0.6975 0.000 0.000 0.704 0.000 0.000 NA
#> GSM1182195     3  0.3499     0.6948 0.000 0.000 0.680 0.000 0.000 NA
#> GSM1182196     2  0.4330     0.4250 0.000 0.632 0.332 0.000 0.000 NA
#> GSM1182197     3  0.4514     0.1543 0.000 0.372 0.588 0.000 0.000 NA
#> GSM1182198     3  0.3428     0.6984 0.000 0.000 0.696 0.000 0.000 NA
#> GSM1182199     3  0.3428     0.6969 0.000 0.000 0.696 0.000 0.000 NA
#> GSM1182200     2  0.4219     0.4824 0.000 0.592 0.388 0.000 0.000 NA
#> GSM1182201     3  0.1563     0.7708 0.000 0.056 0.932 0.000 0.000 NA
#> GSM1182202     4  0.5961     0.4462 0.000 0.000 0.000 0.444 0.312 NA
#> GSM1182203     4  0.5135     0.6352 0.000 0.000 0.000 0.616 0.144 NA
#> GSM1182204     4  0.5351     0.6091 0.000 0.000 0.000 0.588 0.176 NA
#> GSM1182205     3  0.4968     0.6816 0.000 0.120 0.632 0.000 0.000 NA
#> GSM1182206     3  0.5184     0.1949 0.000 0.432 0.480 0.000 0.000 NA
#> GSM1182207     5  0.3717     0.5946 0.384 0.000 0.000 0.000 0.616 NA
#> GSM1182208     5  0.3727     0.5844 0.388 0.000 0.000 0.000 0.612 NA
#> GSM1182209     2  0.2219     0.8224 0.000 0.864 0.000 0.000 0.000 NA
#> GSM1182210     2  0.2905     0.8267 0.000 0.852 0.084 0.000 0.000 NA
#> GSM1182211     2  0.2482     0.8368 0.000 0.848 0.004 0.000 0.000 NA
#> GSM1182212     2  0.3032     0.8269 0.000 0.840 0.056 0.000 0.000 NA
#> GSM1182213     2  0.0790     0.8394 0.000 0.968 0.000 0.000 0.000 NA
#> GSM1182214     2  0.1753     0.8398 0.000 0.912 0.004 0.000 0.000 NA
#> GSM1182215     3  0.5377     0.3442 0.000 0.348 0.528 0.000 0.000 NA
#> GSM1182216     2  0.2118     0.8212 0.000 0.888 0.008 0.000 0.000 NA
#> GSM1182217     5  0.4428     0.4756 0.000 0.000 0.000 0.072 0.684 NA
#> GSM1182218     1  0.0000     0.8840 1.000 0.000 0.000 0.000 0.000 NA
#> GSM1182219     2  0.1563     0.8379 0.000 0.932 0.012 0.000 0.000 NA
#> GSM1182220     2  0.3078     0.8090 0.000 0.836 0.108 0.000 0.000 NA
#> GSM1182221     2  0.2212     0.8202 0.000 0.880 0.008 0.000 0.000 NA
#> GSM1182222     2  0.3514     0.8034 0.000 0.804 0.108 0.000 0.000 NA
#> GSM1182223     2  0.4333     0.1763 0.000 0.512 0.468 0.000 0.000 NA
#> GSM1182224     3  0.4039     0.6783 0.000 0.016 0.632 0.000 0.000 NA
#> GSM1182225     2  0.2358     0.8232 0.000 0.876 0.016 0.000 0.000 NA
#> GSM1182226     2  0.2266     0.8198 0.000 0.880 0.012 0.000 0.000 NA
#> GSM1182227     1  0.2730     0.8926 0.808 0.000 0.000 0.000 0.000 NA
#> GSM1182228     3  0.4270     0.5743 0.000 0.264 0.684 0.000 0.000 NA
#> GSM1182229     3  0.0458     0.7784 0.000 0.000 0.984 0.000 0.000 NA
#> GSM1182230     3  0.3657     0.7470 0.000 0.100 0.792 0.000 0.000 NA
#> GSM1182231     2  0.3321     0.8068 0.000 0.820 0.080 0.000 0.000 NA
#> GSM1182232     1  0.1075     0.8886 0.952 0.000 0.000 0.000 0.000 NA
#> GSM1182233     1  0.0865     0.8574 0.964 0.000 0.000 0.000 0.036 NA
#> GSM1182234     1  0.2730     0.8926 0.808 0.000 0.000 0.000 0.000 NA
#> GSM1182235     2  0.2558     0.8299 0.000 0.840 0.004 0.000 0.000 NA
#> GSM1182236     1  0.0000     0.8840 1.000 0.000 0.000 0.000 0.000 NA
#> GSM1182237     2  0.3860     0.7232 0.000 0.764 0.164 0.000 0.000 NA
#> GSM1182238     2  0.2053     0.8216 0.000 0.888 0.004 0.000 0.000 NA
#> GSM1182239     2  0.2768     0.8263 0.000 0.832 0.012 0.000 0.000 NA
#> GSM1182240     2  0.1082     0.8408 0.000 0.956 0.004 0.000 0.000 NA
#> GSM1182241     2  0.5556     0.4086 0.000 0.512 0.336 0.000 0.000 NA
#> GSM1182242     3  0.0146     0.7795 0.000 0.000 0.996 0.000 0.000 NA
#> GSM1182243     3  0.0632     0.7790 0.000 0.000 0.976 0.000 0.000 NA
#> GSM1182244     3  0.3652     0.7222 0.000 0.016 0.720 0.000 0.000 NA
#> GSM1182245     1  0.2730     0.8926 0.808 0.000 0.000 0.000 0.000 NA
#> GSM1182246     4  0.0146     0.8340 0.000 0.000 0.000 0.996 0.004 NA
#> GSM1182247     3  0.1007     0.7803 0.000 0.000 0.956 0.000 0.000 NA
#> GSM1182248     3  0.2805     0.7577 0.000 0.004 0.812 0.000 0.000 NA
#> GSM1182249     3  0.4726     0.0707 0.000 0.424 0.528 0.000 0.000 NA
#> GSM1182250     3  0.3563     0.7087 0.000 0.132 0.796 0.000 0.000 NA
#> GSM1182251     5  0.0146     0.7433 0.004 0.000 0.000 0.000 0.996 NA
#> GSM1182252     3  0.1204     0.7829 0.000 0.000 0.944 0.000 0.000 NA
#> GSM1182253     3  0.0632     0.7822 0.000 0.000 0.976 0.000 0.000 NA
#> GSM1182254     3  0.0260     0.7807 0.000 0.000 0.992 0.000 0.000 NA
#> GSM1182255     4  0.0000     0.8350 0.000 0.000 0.000 1.000 0.000 NA
#> GSM1182256     4  0.0000     0.8350 0.000 0.000 0.000 1.000 0.000 NA
#> GSM1182257     4  0.1745     0.8009 0.000 0.000 0.000 0.920 0.068 NA
#> GSM1182258     4  0.0000     0.8350 0.000 0.000 0.000 1.000 0.000 NA
#> GSM1182259     4  0.0000     0.8350 0.000 0.000 0.000 1.000 0.000 NA
#> GSM1182260     3  0.1908     0.7651 0.000 0.028 0.916 0.000 0.000 NA
#> GSM1182261     2  0.4596     0.6114 0.000 0.672 0.240 0.000 0.000 NA
#> GSM1182262     3  0.5193     0.4131 0.000 0.344 0.552 0.000 0.000 NA
#> GSM1182263     5  0.3860     0.7100 0.236 0.000 0.000 0.000 0.728 NA
#> GSM1182264     3  0.2972     0.7181 0.000 0.036 0.836 0.000 0.000 NA
#> GSM1182265     3  0.2070     0.7696 0.000 0.044 0.908 0.000 0.000 NA
#> GSM1182266     3  0.0146     0.7793 0.000 0.000 0.996 0.000 0.000 NA
#> GSM1182267     1  0.2730     0.8926 0.808 0.000 0.000 0.000 0.000 NA
#> GSM1182268     1  0.0000     0.8840 1.000 0.000 0.000 0.000 0.000 NA
#> GSM1182269     1  0.0000     0.8840 1.000 0.000 0.000 0.000 0.000 NA
#> GSM1182270     1  0.0146     0.8820 0.996 0.000 0.000 0.000 0.004 NA
#> GSM1182271     4  0.0000     0.8350 0.000 0.000 0.000 1.000 0.000 NA
#> GSM1182272     4  0.0000     0.8350 0.000 0.000 0.000 1.000 0.000 NA
#> GSM1182273     3  0.0363     0.7815 0.000 0.000 0.988 0.000 0.000 NA
#> GSM1182275     3  0.0508     0.7804 0.000 0.004 0.984 0.000 0.000 NA
#> GSM1182276     2  0.3017     0.8233 0.000 0.840 0.052 0.000 0.000 NA
#> GSM1182277     1  0.2730     0.8926 0.808 0.000 0.000 0.000 0.000 NA
#> GSM1182278     1  0.2730     0.8926 0.808 0.000 0.000 0.000 0.000 NA
#> GSM1182279     5  0.2048     0.7870 0.120 0.000 0.000 0.000 0.880 NA
#> GSM1182280     5  0.3351     0.7004 0.288 0.000 0.000 0.000 0.712 NA
#> GSM1182281     4  0.6606     0.2631 0.184 0.000 0.000 0.532 0.092 NA
#> GSM1182282     1  0.2730     0.8926 0.808 0.000 0.000 0.000 0.000 NA
#> GSM1182283     1  0.2730     0.8926 0.808 0.000 0.000 0.000 0.000 NA
#> GSM1182284     1  0.2730     0.8926 0.808 0.000 0.000 0.000 0.000 NA
#> GSM1182285     3  0.3428     0.6966 0.000 0.000 0.696 0.000 0.000 NA
#> GSM1182286     2  0.2520     0.8262 0.000 0.844 0.004 0.000 0.000 NA
#> GSM1182287     3  0.4332     0.4158 0.000 0.352 0.616 0.000 0.000 NA
#> GSM1182288     3  0.1588     0.7816 0.000 0.004 0.924 0.000 0.000 NA
#> GSM1182289     5  0.1663     0.7815 0.088 0.000 0.000 0.000 0.912 NA
#> GSM1182290     5  0.3578     0.6524 0.340 0.000 0.000 0.000 0.660 NA
#> GSM1182291     4  0.0000     0.8350 0.000 0.000 0.000 1.000 0.000 NA
#> GSM1182274     3  0.0858     0.7792 0.000 0.004 0.968 0.000 0.000 NA
#> GSM1182292     2  0.2402     0.8214 0.000 0.856 0.004 0.000 0.000 NA
#> GSM1182293     2  0.2389     0.8335 0.000 0.888 0.060 0.000 0.000 NA
#> GSM1182294     2  0.2311     0.8228 0.000 0.880 0.016 0.000 0.000 NA
#> GSM1182295     2  0.1151     0.8366 0.000 0.956 0.012 0.000 0.000 NA
#> GSM1182296     2  0.2362     0.8221 0.000 0.860 0.004 0.000 0.000 NA
#> GSM1182298     3  0.3409     0.6982 0.000 0.000 0.700 0.000 0.000 NA
#> GSM1182299     2  0.5029     0.5669 0.000 0.612 0.276 0.000 0.000 NA
#> GSM1182300     2  0.2402     0.8214 0.000 0.856 0.004 0.000 0.000 NA
#> GSM1182301     2  0.2911     0.8183 0.000 0.832 0.024 0.000 0.000 NA
#> GSM1182303     2  0.2901     0.8040 0.000 0.840 0.128 0.000 0.000 NA
#> GSM1182304     5  0.2092     0.7871 0.124 0.000 0.000 0.000 0.876 NA
#> GSM1182305     5  0.0260     0.7385 0.000 0.000 0.000 0.000 0.992 NA
#> GSM1182306     4  0.4229     0.7157 0.000 0.000 0.000 0.712 0.068 NA
#> GSM1182307     2  0.2402     0.8235 0.000 0.856 0.004 0.000 0.000 NA
#> GSM1182309     2  0.2520     0.8219 0.000 0.844 0.004 0.000 0.000 NA
#> GSM1182312     2  0.2346     0.8177 0.000 0.868 0.008 0.000 0.000 NA
#> GSM1182314     4  0.0000     0.8350 0.000 0.000 0.000 1.000 0.000 NA
#> GSM1182316     2  0.2398     0.8225 0.000 0.876 0.020 0.000 0.000 NA
#> GSM1182318     2  0.1219     0.8403 0.000 0.948 0.004 0.000 0.000 NA
#> GSM1182319     2  0.5267     0.4411 0.000 0.560 0.320 0.000 0.000 NA
#> GSM1182320     2  0.2118     0.8231 0.000 0.888 0.008 0.000 0.000 NA
#> GSM1182321     3  0.3627     0.6993 0.000 0.080 0.792 0.000 0.000 NA
#> GSM1182322     2  0.5771     0.3903 0.000 0.476 0.336 0.000 0.000 NA
#> GSM1182324     3  0.4036     0.6892 0.000 0.136 0.756 0.000 0.000 NA
#> GSM1182297     2  0.2482     0.8272 0.000 0.848 0.004 0.000 0.000 NA
#> GSM1182302     4  0.5391     0.6031 0.000 0.000 0.000 0.580 0.176 NA
#> GSM1182308     2  0.3149     0.7953 0.000 0.824 0.132 0.000 0.000 NA
#> GSM1182310     2  0.3534     0.7820 0.000 0.800 0.076 0.000 0.000 NA
#> GSM1182311     1  0.0146     0.8820 0.996 0.000 0.000 0.000 0.004 NA
#> GSM1182313     4  0.0000     0.8350 0.000 0.000 0.000 1.000 0.000 NA
#> GSM1182315     2  0.1644     0.8323 0.000 0.920 0.004 0.000 0.000 NA
#> GSM1182317     2  0.1910     0.8387 0.000 0.892 0.000 0.000 0.000 NA
#> GSM1182323     1  0.0000     0.8840 1.000 0.000 0.000 0.000 0.000 NA

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk CV-pam-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk CV-pam-collect-classes

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

test_to_known_factors(res)
#>          n disease.state(p) gender(p) k
#> CV:pam 139         0.077250     1.000 2
#> CV:pam 138         0.136924     0.899 3
#> CV:pam 135         0.000250     0.610 4
#> CV:pam 126         0.000894     0.659 5
#> CV:pam 124         0.000870     0.523 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 46361 rows and 139 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#>   Subgroups are detected by 'mclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk CV-mclust-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           1.000       1.000         0.4791 0.521   0.521
#> 3 3 0.727           0.849       0.890         0.3296 0.823   0.661
#> 4 4 0.553           0.680       0.721         0.0878 0.902   0.724
#> 5 5 0.553           0.566       0.769         0.0815 0.922   0.748
#> 6 6 0.531           0.602       0.670         0.0243 0.960   0.856

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
#> GSM1182186     1       0          1  1  0
#> GSM1182187     1       0          1  1  0
#> GSM1182188     1       0          1  1  0
#> GSM1182189     1       0          1  1  0
#> GSM1182190     1       0          1  1  0
#> GSM1182191     1       0          1  1  0
#> GSM1182192     1       0          1  1  0
#> GSM1182193     1       0          1  1  0
#> GSM1182194     2       0          1  0  1
#> GSM1182195     2       0          1  0  1
#> GSM1182196     2       0          1  0  1
#> GSM1182197     2       0          1  0  1
#> GSM1182198     2       0          1  0  1
#> GSM1182199     2       0          1  0  1
#> GSM1182200     2       0          1  0  1
#> GSM1182201     2       0          1  0  1
#> GSM1182202     1       0          1  1  0
#> GSM1182203     1       0          1  1  0
#> GSM1182204     1       0          1  1  0
#> GSM1182205     2       0          1  0  1
#> GSM1182206     2       0          1  0  1
#> GSM1182207     1       0          1  1  0
#> GSM1182208     1       0          1  1  0
#> GSM1182209     2       0          1  0  1
#> GSM1182210     2       0          1  0  1
#> GSM1182211     2       0          1  0  1
#> GSM1182212     2       0          1  0  1
#> GSM1182213     2       0          1  0  1
#> GSM1182214     2       0          1  0  1
#> GSM1182215     2       0          1  0  1
#> GSM1182216     2       0          1  0  1
#> GSM1182217     1       0          1  1  0
#> GSM1182218     1       0          1  1  0
#> GSM1182219     2       0          1  0  1
#> GSM1182220     2       0          1  0  1
#> GSM1182221     2       0          1  0  1
#> GSM1182222     2       0          1  0  1
#> GSM1182223     2       0          1  0  1
#> GSM1182224     2       0          1  0  1
#> GSM1182225     2       0          1  0  1
#> GSM1182226     2       0          1  0  1
#> GSM1182227     1       0          1  1  0
#> GSM1182228     2       0          1  0  1
#> GSM1182229     2       0          1  0  1
#> GSM1182230     2       0          1  0  1
#> GSM1182231     2       0          1  0  1
#> GSM1182232     1       0          1  1  0
#> GSM1182233     1       0          1  1  0
#> GSM1182234     1       0          1  1  0
#> GSM1182235     2       0          1  0  1
#> GSM1182236     1       0          1  1  0
#> GSM1182237     2       0          1  0  1
#> GSM1182238     2       0          1  0  1
#> GSM1182239     2       0          1  0  1
#> GSM1182240     2       0          1  0  1
#> GSM1182241     2       0          1  0  1
#> GSM1182242     2       0          1  0  1
#> GSM1182243     2       0          1  0  1
#> GSM1182244     2       0          1  0  1
#> GSM1182245     1       0          1  1  0
#> GSM1182246     1       0          1  1  0
#> GSM1182247     2       0          1  0  1
#> GSM1182248     2       0          1  0  1
#> GSM1182249     2       0          1  0  1
#> GSM1182250     2       0          1  0  1
#> GSM1182251     1       0          1  1  0
#> GSM1182252     2       0          1  0  1
#> GSM1182253     2       0          1  0  1
#> GSM1182254     2       0          1  0  1
#> GSM1182255     1       0          1  1  0
#> GSM1182256     1       0          1  1  0
#> GSM1182257     1       0          1  1  0
#> GSM1182258     1       0          1  1  0
#> GSM1182259     1       0          1  1  0
#> GSM1182260     2       0          1  0  1
#> GSM1182261     2       0          1  0  1
#> GSM1182262     2       0          1  0  1
#> GSM1182263     1       0          1  1  0
#> GSM1182264     2       0          1  0  1
#> GSM1182265     2       0          1  0  1
#> GSM1182266     2       0          1  0  1
#> GSM1182267     1       0          1  1  0
#> GSM1182268     1       0          1  1  0
#> GSM1182269     1       0          1  1  0
#> GSM1182270     1       0          1  1  0
#> GSM1182271     1       0          1  1  0
#> GSM1182272     1       0          1  1  0
#> GSM1182273     2       0          1  0  1
#> GSM1182275     2       0          1  0  1
#> GSM1182276     2       0          1  0  1
#> GSM1182277     1       0          1  1  0
#> GSM1182278     1       0          1  1  0
#> GSM1182279     1       0          1  1  0
#> GSM1182280     1       0          1  1  0
#> GSM1182281     1       0          1  1  0
#> GSM1182282     1       0          1  1  0
#> GSM1182283     1       0          1  1  0
#> GSM1182284     1       0          1  1  0
#> GSM1182285     2       0          1  0  1
#> GSM1182286     2       0          1  0  1
#> GSM1182287     2       0          1  0  1
#> GSM1182288     2       0          1  0  1
#> GSM1182289     1       0          1  1  0
#> GSM1182290     1       0          1  1  0
#> GSM1182291     1       0          1  1  0
#> GSM1182274     2       0          1  0  1
#> GSM1182292     2       0          1  0  1
#> GSM1182293     2       0          1  0  1
#> GSM1182294     2       0          1  0  1
#> GSM1182295     2       0          1  0  1
#> GSM1182296     2       0          1  0  1
#> GSM1182298     2       0          1  0  1
#> GSM1182299     2       0          1  0  1
#> GSM1182300     2       0          1  0  1
#> GSM1182301     2       0          1  0  1
#> GSM1182303     2       0          1  0  1
#> GSM1182304     1       0          1  1  0
#> GSM1182305     1       0          1  1  0
#> GSM1182306     1       0          1  1  0
#> GSM1182307     2       0          1  0  1
#> GSM1182309     2       0          1  0  1
#> GSM1182312     2       0          1  0  1
#> GSM1182314     1       0          1  1  0
#> GSM1182316     2       0          1  0  1
#> GSM1182318     2       0          1  0  1
#> GSM1182319     2       0          1  0  1
#> GSM1182320     2       0          1  0  1
#> GSM1182321     2       0          1  0  1
#> GSM1182322     2       0          1  0  1
#> GSM1182324     2       0          1  0  1
#> GSM1182297     2       0          1  0  1
#> GSM1182302     1       0          1  1  0
#> GSM1182308     2       0          1  0  1
#> GSM1182310     2       0          1  0  1
#> GSM1182311     1       0          1  1  0
#> GSM1182313     1       0          1  1  0
#> GSM1182315     2       0          1  0  1
#> GSM1182317     2       0          1  0  1
#> GSM1182323     1       0          1  1  0

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1182186     1  0.1289      0.969 0.968 0.000 0.032
#> GSM1182187     1  0.0000      0.975 1.000 0.000 0.000
#> GSM1182188     1  0.0424      0.975 0.992 0.000 0.008
#> GSM1182189     1  0.0892      0.973 0.980 0.000 0.020
#> GSM1182190     1  0.0892      0.973 0.980 0.000 0.020
#> GSM1182191     1  0.1289      0.969 0.968 0.000 0.032
#> GSM1182192     1  0.2878      0.940 0.904 0.000 0.096
#> GSM1182193     1  0.2878      0.940 0.904 0.000 0.096
#> GSM1182194     2  0.0892      0.865 0.000 0.980 0.020
#> GSM1182195     2  0.0892      0.864 0.000 0.980 0.020
#> GSM1182196     2  0.4796      0.733 0.000 0.780 0.220
#> GSM1182197     2  0.1529      0.865 0.000 0.960 0.040
#> GSM1182198     2  0.1643      0.857 0.000 0.956 0.044
#> GSM1182199     2  0.1964      0.854 0.000 0.944 0.056
#> GSM1182200     2  0.2356      0.848 0.000 0.928 0.072
#> GSM1182201     2  0.0747      0.872 0.000 0.984 0.016
#> GSM1182202     1  0.0000      0.975 1.000 0.000 0.000
#> GSM1182203     1  0.0000      0.975 1.000 0.000 0.000
#> GSM1182204     1  0.0000      0.975 1.000 0.000 0.000
#> GSM1182205     2  0.2261      0.870 0.000 0.932 0.068
#> GSM1182206     2  0.1964      0.858 0.000 0.944 0.056
#> GSM1182207     1  0.1289      0.969 0.968 0.000 0.032
#> GSM1182208     1  0.1289      0.969 0.968 0.000 0.032
#> GSM1182209     3  0.6079      0.569 0.000 0.388 0.612
#> GSM1182210     3  0.4555      0.869 0.000 0.200 0.800
#> GSM1182211     3  0.4605      0.869 0.000 0.204 0.796
#> GSM1182212     2  0.5327      0.567 0.000 0.728 0.272
#> GSM1182213     3  0.4555      0.869 0.000 0.200 0.800
#> GSM1182214     3  0.4555      0.869 0.000 0.200 0.800
#> GSM1182215     2  0.1753      0.863 0.000 0.952 0.048
#> GSM1182216     3  0.5650      0.811 0.000 0.312 0.688
#> GSM1182217     1  0.0000      0.975 1.000 0.000 0.000
#> GSM1182218     1  0.0892      0.973 0.980 0.000 0.020
#> GSM1182219     3  0.4555      0.869 0.000 0.200 0.800
#> GSM1182220     3  0.4887      0.866 0.000 0.228 0.772
#> GSM1182221     3  0.5291      0.848 0.000 0.268 0.732
#> GSM1182222     3  0.5733      0.797 0.000 0.324 0.676
#> GSM1182223     2  0.0747      0.872 0.000 0.984 0.016
#> GSM1182224     2  0.0592      0.871 0.000 0.988 0.012
#> GSM1182225     3  0.5650      0.811 0.000 0.312 0.688
#> GSM1182226     3  0.6225      0.639 0.000 0.432 0.568
#> GSM1182227     1  0.2878      0.940 0.904 0.000 0.096
#> GSM1182228     2  0.2356      0.851 0.000 0.928 0.072
#> GSM1182229     2  0.1031      0.872 0.000 0.976 0.024
#> GSM1182230     2  0.1964      0.861 0.000 0.944 0.056
#> GSM1182231     2  0.2261      0.850 0.000 0.932 0.068
#> GSM1182232     1  0.0892      0.973 0.980 0.000 0.020
#> GSM1182233     1  0.0892      0.973 0.980 0.000 0.020
#> GSM1182234     1  0.2878      0.940 0.904 0.000 0.096
#> GSM1182235     3  0.3752      0.847 0.000 0.144 0.856
#> GSM1182236     1  0.0892      0.973 0.980 0.000 0.020
#> GSM1182237     2  0.4002      0.811 0.000 0.840 0.160
#> GSM1182238     3  0.4974      0.863 0.000 0.236 0.764
#> GSM1182239     2  0.5016      0.704 0.000 0.760 0.240
#> GSM1182240     3  0.6286      0.379 0.000 0.464 0.536
#> GSM1182241     2  0.4452      0.749 0.000 0.808 0.192
#> GSM1182242     2  0.1964      0.853 0.000 0.944 0.056
#> GSM1182243     2  0.1529      0.867 0.000 0.960 0.040
#> GSM1182244     2  0.2711      0.847 0.000 0.912 0.088
#> GSM1182245     1  0.2796      0.947 0.908 0.000 0.092
#> GSM1182246     1  0.0424      0.975 0.992 0.000 0.008
#> GSM1182247     2  0.0237      0.872 0.000 0.996 0.004
#> GSM1182248     2  0.0424      0.871 0.000 0.992 0.008
#> GSM1182249     2  0.1964      0.861 0.000 0.944 0.056
#> GSM1182250     2  0.1163      0.871 0.000 0.972 0.028
#> GSM1182251     1  0.1289      0.969 0.968 0.000 0.032
#> GSM1182252     2  0.0237      0.872 0.000 0.996 0.004
#> GSM1182253     2  0.0592      0.871 0.000 0.988 0.012
#> GSM1182254     2  0.0237      0.871 0.000 0.996 0.004
#> GSM1182255     1  0.0424      0.975 0.992 0.000 0.008
#> GSM1182256     1  0.0424      0.975 0.992 0.000 0.008
#> GSM1182257     1  0.0000      0.975 1.000 0.000 0.000
#> GSM1182258     1  0.0424      0.975 0.992 0.000 0.008
#> GSM1182259     1  0.0424      0.975 0.992 0.000 0.008
#> GSM1182260     2  0.2261      0.849 0.000 0.932 0.068
#> GSM1182261     2  0.1860      0.861 0.000 0.948 0.052
#> GSM1182262     2  0.0747      0.872 0.000 0.984 0.016
#> GSM1182263     1  0.1289      0.969 0.968 0.000 0.032
#> GSM1182264     2  0.2625      0.841 0.000 0.916 0.084
#> GSM1182265     2  0.1643      0.868 0.000 0.956 0.044
#> GSM1182266     2  0.1964      0.853 0.000 0.944 0.056
#> GSM1182267     1  0.2878      0.940 0.904 0.000 0.096
#> GSM1182268     1  0.0892      0.973 0.980 0.000 0.020
#> GSM1182269     1  0.0892      0.973 0.980 0.000 0.020
#> GSM1182270     1  0.0892      0.973 0.980 0.000 0.020
#> GSM1182271     1  0.0424      0.975 0.992 0.000 0.008
#> GSM1182272     1  0.0424      0.975 0.992 0.000 0.008
#> GSM1182273     2  0.0237      0.871 0.000 0.996 0.004
#> GSM1182275     2  0.0592      0.873 0.000 0.988 0.012
#> GSM1182276     3  0.6026      0.668 0.000 0.376 0.624
#> GSM1182277     1  0.2878      0.940 0.904 0.000 0.096
#> GSM1182278     1  0.2878      0.940 0.904 0.000 0.096
#> GSM1182279     1  0.1289      0.969 0.968 0.000 0.032
#> GSM1182280     1  0.1289      0.969 0.968 0.000 0.032
#> GSM1182281     1  0.0747      0.975 0.984 0.000 0.016
#> GSM1182282     1  0.2878      0.940 0.904 0.000 0.096
#> GSM1182283     1  0.2878      0.940 0.904 0.000 0.096
#> GSM1182284     1  0.2878      0.940 0.904 0.000 0.096
#> GSM1182285     2  0.0237      0.872 0.000 0.996 0.004
#> GSM1182286     3  0.3816      0.846 0.000 0.148 0.852
#> GSM1182287     2  0.4346      0.665 0.000 0.816 0.184
#> GSM1182288     2  0.1289      0.870 0.000 0.968 0.032
#> GSM1182289     1  0.1289      0.969 0.968 0.000 0.032
#> GSM1182290     1  0.1289      0.969 0.968 0.000 0.032
#> GSM1182291     1  0.0424      0.975 0.992 0.000 0.008
#> GSM1182274     2  0.0237      0.871 0.000 0.996 0.004
#> GSM1182292     3  0.3816      0.846 0.000 0.148 0.852
#> GSM1182293     3  0.4654      0.870 0.000 0.208 0.792
#> GSM1182294     3  0.5926      0.725 0.000 0.356 0.644
#> GSM1182295     3  0.4605      0.869 0.000 0.204 0.796
#> GSM1182296     3  0.3816      0.846 0.000 0.148 0.852
#> GSM1182298     2  0.2165      0.848 0.000 0.936 0.064
#> GSM1182299     2  0.3686      0.780 0.000 0.860 0.140
#> GSM1182300     3  0.5706      0.702 0.000 0.320 0.680
#> GSM1182301     3  0.4235      0.863 0.000 0.176 0.824
#> GSM1182303     3  0.6180      0.643 0.000 0.416 0.584
#> GSM1182304     1  0.1289      0.969 0.968 0.000 0.032
#> GSM1182305     1  0.1289      0.969 0.968 0.000 0.032
#> GSM1182306     1  0.0000      0.975 1.000 0.000 0.000
#> GSM1182307     3  0.3816      0.846 0.000 0.148 0.852
#> GSM1182309     3  0.4555      0.868 0.000 0.200 0.800
#> GSM1182312     3  0.5363      0.844 0.000 0.276 0.724
#> GSM1182314     1  0.0424      0.975 0.992 0.000 0.008
#> GSM1182316     2  0.5327      0.505 0.000 0.728 0.272
#> GSM1182318     2  0.6305     -0.288 0.000 0.516 0.484
#> GSM1182319     2  0.5529      0.604 0.000 0.704 0.296
#> GSM1182320     2  0.6291     -0.340 0.000 0.532 0.468
#> GSM1182321     2  0.3192      0.844 0.000 0.888 0.112
#> GSM1182322     2  0.6286      0.021 0.000 0.536 0.464
#> GSM1182324     2  0.1860      0.861 0.000 0.948 0.052
#> GSM1182297     3  0.3816      0.846 0.000 0.148 0.852
#> GSM1182302     1  0.0000      0.975 1.000 0.000 0.000
#> GSM1182308     3  0.5178      0.854 0.000 0.256 0.744
#> GSM1182310     2  0.5431      0.463 0.000 0.716 0.284
#> GSM1182311     1  0.0892      0.973 0.980 0.000 0.020
#> GSM1182313     1  0.0424      0.975 0.992 0.000 0.008
#> GSM1182315     3  0.4555      0.864 0.000 0.200 0.800
#> GSM1182317     3  0.6225      0.545 0.000 0.432 0.568
#> GSM1182323     1  0.0892      0.973 0.980 0.000 0.020

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1182186     1  0.4761     0.4967 0.628 0.000 0.000 0.372
#> GSM1182187     4  0.2589     0.5485 0.116 0.000 0.000 0.884
#> GSM1182188     4  0.0000     0.5971 0.000 0.000 0.000 1.000
#> GSM1182189     1  0.6746     0.7064 0.568 0.116 0.000 0.316
#> GSM1182190     1  0.6763     0.7003 0.564 0.116 0.000 0.320
#> GSM1182191     1  0.4761     0.4967 0.628 0.000 0.000 0.372
#> GSM1182192     4  0.7168     0.3659 0.236 0.208 0.000 0.556
#> GSM1182193     4  0.7168     0.3659 0.236 0.208 0.000 0.556
#> GSM1182194     3  0.1557     0.8474 0.056 0.000 0.944 0.000
#> GSM1182195     3  0.0707     0.8526 0.020 0.000 0.980 0.000
#> GSM1182196     3  0.5897     0.6454 0.136 0.164 0.700 0.000
#> GSM1182197     3  0.2816     0.8445 0.064 0.036 0.900 0.000
#> GSM1182198     3  0.2675     0.8333 0.100 0.000 0.892 0.008
#> GSM1182199     3  0.2976     0.8247 0.120 0.000 0.872 0.008
#> GSM1182200     3  0.3447     0.7700 0.020 0.128 0.852 0.000
#> GSM1182201     3  0.2124     0.8537 0.040 0.028 0.932 0.000
#> GSM1182202     4  0.4661     0.0225 0.348 0.000 0.000 0.652
#> GSM1182203     4  0.2589     0.5485 0.116 0.000 0.000 0.884
#> GSM1182204     4  0.4624     0.0490 0.340 0.000 0.000 0.660
#> GSM1182205     3  0.1406     0.8531 0.024 0.016 0.960 0.000
#> GSM1182206     3  0.3342     0.7731 0.032 0.100 0.868 0.000
#> GSM1182207     1  0.3801     0.7281 0.780 0.000 0.000 0.220
#> GSM1182208     1  0.3801     0.7281 0.780 0.000 0.000 0.220
#> GSM1182209     2  0.5247     0.8459 0.032 0.684 0.284 0.000
#> GSM1182210     2  0.3726     0.8717 0.000 0.788 0.212 0.000
#> GSM1182211     2  0.4122     0.8779 0.004 0.760 0.236 0.000
#> GSM1182212     3  0.4699     0.4613 0.004 0.320 0.676 0.000
#> GSM1182213     2  0.3870     0.8714 0.004 0.788 0.208 0.000
#> GSM1182214     2  0.3870     0.8714 0.004 0.788 0.208 0.000
#> GSM1182215     3  0.1174     0.8481 0.012 0.020 0.968 0.000
#> GSM1182216     2  0.5311     0.8264 0.024 0.648 0.328 0.000
#> GSM1182217     4  0.4776    -0.0735 0.376 0.000 0.000 0.624
#> GSM1182218     1  0.6746     0.7064 0.568 0.116 0.000 0.316
#> GSM1182219     2  0.3726     0.8724 0.000 0.788 0.212 0.000
#> GSM1182220     2  0.4485     0.8734 0.012 0.740 0.248 0.000
#> GSM1182221     2  0.5206     0.8397 0.024 0.668 0.308 0.000
#> GSM1182222     2  0.5386     0.8118 0.024 0.632 0.344 0.000
#> GSM1182223     3  0.0804     0.8499 0.008 0.012 0.980 0.000
#> GSM1182224     3  0.0804     0.8502 0.008 0.012 0.980 0.000
#> GSM1182225     2  0.5386     0.8118 0.024 0.632 0.344 0.000
#> GSM1182226     2  0.5771     0.6209 0.028 0.512 0.460 0.000
#> GSM1182227     4  0.7193     0.3570 0.240 0.208 0.000 0.552
#> GSM1182228     3  0.3157     0.8168 0.144 0.004 0.852 0.000
#> GSM1182229     3  0.0657     0.8495 0.004 0.012 0.984 0.000
#> GSM1182230     3  0.1356     0.8450 0.008 0.032 0.960 0.000
#> GSM1182231     3  0.4019     0.6201 0.012 0.196 0.792 0.000
#> GSM1182232     4  0.6837     0.1169 0.340 0.116 0.000 0.544
#> GSM1182233     1  0.6779     0.6928 0.560 0.116 0.000 0.324
#> GSM1182234     4  0.7062     0.3751 0.224 0.204 0.000 0.572
#> GSM1182235     2  0.5558     0.8627 0.080 0.712 0.208 0.000
#> GSM1182236     1  0.6746     0.7064 0.568 0.116 0.000 0.316
#> GSM1182237     3  0.5470     0.6778 0.100 0.168 0.732 0.000
#> GSM1182238     2  0.4422     0.8715 0.008 0.736 0.256 0.000
#> GSM1182239     3  0.6463     0.5389 0.160 0.196 0.644 0.000
#> GSM1182240     2  0.5577     0.8270 0.036 0.636 0.328 0.000
#> GSM1182241     3  0.5416     0.7049 0.148 0.112 0.740 0.000
#> GSM1182242     3  0.3052     0.8223 0.136 0.004 0.860 0.000
#> GSM1182243     3  0.1151     0.8477 0.008 0.024 0.968 0.000
#> GSM1182244     3  0.2976     0.8239 0.120 0.008 0.872 0.000
#> GSM1182245     4  0.7239     0.3399 0.248 0.208 0.000 0.544
#> GSM1182246     4  0.0000     0.5971 0.000 0.000 0.000 1.000
#> GSM1182247     3  0.1743     0.8486 0.056 0.004 0.940 0.000
#> GSM1182248     3  0.0376     0.8506 0.004 0.004 0.992 0.000
#> GSM1182249     3  0.1305     0.8437 0.004 0.036 0.960 0.000
#> GSM1182250     3  0.0376     0.8520 0.004 0.004 0.992 0.000
#> GSM1182251     1  0.3975     0.7151 0.760 0.000 0.000 0.240
#> GSM1182252     3  0.1978     0.8462 0.068 0.004 0.928 0.000
#> GSM1182253     3  0.0336     0.8502 0.000 0.008 0.992 0.000
#> GSM1182254     3  0.0000     0.8511 0.000 0.000 1.000 0.000
#> GSM1182255     4  0.0000     0.5971 0.000 0.000 0.000 1.000
#> GSM1182256     4  0.0000     0.5971 0.000 0.000 0.000 1.000
#> GSM1182257     4  0.2589     0.5485 0.116 0.000 0.000 0.884
#> GSM1182258     4  0.0000     0.5971 0.000 0.000 0.000 1.000
#> GSM1182259     4  0.0000     0.5971 0.000 0.000 0.000 1.000
#> GSM1182260     3  0.2921     0.8157 0.140 0.000 0.860 0.000
#> GSM1182261     3  0.2256     0.8263 0.020 0.056 0.924 0.000
#> GSM1182262     3  0.0804     0.8495 0.008 0.012 0.980 0.000
#> GSM1182263     1  0.4907     0.3081 0.580 0.000 0.000 0.420
#> GSM1182264     3  0.2973     0.8136 0.144 0.000 0.856 0.000
#> GSM1182265     3  0.1004     0.8495 0.004 0.024 0.972 0.000
#> GSM1182266     3  0.2868     0.8185 0.136 0.000 0.864 0.000
#> GSM1182267     4  0.7062     0.3751 0.224 0.204 0.000 0.572
#> GSM1182268     1  0.6746     0.7064 0.568 0.116 0.000 0.316
#> GSM1182269     1  0.6763     0.7003 0.564 0.116 0.000 0.320
#> GSM1182270     1  0.6746     0.7064 0.568 0.116 0.000 0.316
#> GSM1182271     4  0.0000     0.5971 0.000 0.000 0.000 1.000
#> GSM1182272     4  0.0000     0.5971 0.000 0.000 0.000 1.000
#> GSM1182273     3  0.0000     0.8511 0.000 0.000 1.000 0.000
#> GSM1182275     3  0.1042     0.8541 0.020 0.008 0.972 0.000
#> GSM1182276     2  0.4483     0.8459 0.004 0.712 0.284 0.000
#> GSM1182277     4  0.7062     0.3751 0.224 0.204 0.000 0.572
#> GSM1182278     4  0.7168     0.3659 0.236 0.208 0.000 0.556
#> GSM1182279     1  0.3942     0.7191 0.764 0.000 0.000 0.236
#> GSM1182280     1  0.3801     0.7281 0.780 0.000 0.000 0.220
#> GSM1182281     4  0.7004     0.3808 0.220 0.200 0.000 0.580
#> GSM1182282     4  0.7140     0.3678 0.236 0.204 0.000 0.560
#> GSM1182283     4  0.7168     0.3659 0.236 0.208 0.000 0.556
#> GSM1182284     4  0.7114     0.3708 0.232 0.204 0.000 0.564
#> GSM1182285     3  0.1792     0.8449 0.068 0.000 0.932 0.000
#> GSM1182286     2  0.5558     0.8627 0.080 0.712 0.208 0.000
#> GSM1182287     3  0.2469     0.7870 0.000 0.108 0.892 0.000
#> GSM1182288     3  0.0927     0.8542 0.016 0.008 0.976 0.000
#> GSM1182289     1  0.3942     0.7191 0.764 0.000 0.000 0.236
#> GSM1182290     1  0.3801     0.7281 0.780 0.000 0.000 0.220
#> GSM1182291     4  0.0000     0.5971 0.000 0.000 0.000 1.000
#> GSM1182274     3  0.0592     0.8524 0.016 0.000 0.984 0.000
#> GSM1182292     2  0.5727     0.8631 0.080 0.692 0.228 0.000
#> GSM1182293     2  0.3801     0.8758 0.000 0.780 0.220 0.000
#> GSM1182294     2  0.4855     0.7757 0.004 0.644 0.352 0.000
#> GSM1182295     2  0.3726     0.8724 0.000 0.788 0.212 0.000
#> GSM1182296     2  0.5620     0.8613 0.084 0.708 0.208 0.000
#> GSM1182298     3  0.2760     0.8242 0.128 0.000 0.872 0.000
#> GSM1182299     3  0.4606     0.6019 0.012 0.264 0.724 0.000
#> GSM1182300     2  0.7061     0.7233 0.148 0.540 0.312 0.000
#> GSM1182301     2  0.5022     0.8747 0.044 0.736 0.220 0.000
#> GSM1182303     2  0.5543     0.6694 0.020 0.556 0.424 0.000
#> GSM1182304     1  0.3837     0.7270 0.776 0.000 0.000 0.224
#> GSM1182305     4  0.4877     0.0921 0.408 0.000 0.000 0.592
#> GSM1182306     4  0.2589     0.5485 0.116 0.000 0.000 0.884
#> GSM1182307     2  0.5756     0.8626 0.084 0.692 0.224 0.000
#> GSM1182309     2  0.4833     0.8785 0.032 0.740 0.228 0.000
#> GSM1182312     2  0.4980     0.8522 0.016 0.680 0.304 0.000
#> GSM1182314     4  0.0000     0.5971 0.000 0.000 0.000 1.000
#> GSM1182316     3  0.5323     0.1263 0.020 0.352 0.628 0.000
#> GSM1182318     2  0.4769     0.8261 0.008 0.684 0.308 0.000
#> GSM1182319     3  0.6934     0.2750 0.152 0.276 0.572 0.000
#> GSM1182320     2  0.5508     0.7284 0.020 0.572 0.408 0.000
#> GSM1182321     3  0.5993     0.6362 0.148 0.160 0.692 0.000
#> GSM1182322     2  0.6792     0.5043 0.096 0.476 0.428 0.000
#> GSM1182324     3  0.3450     0.6956 0.008 0.156 0.836 0.000
#> GSM1182297     2  0.5558     0.8627 0.080 0.712 0.208 0.000
#> GSM1182302     4  0.4661     0.0225 0.348 0.000 0.000 0.652
#> GSM1182308     2  0.5013     0.8536 0.020 0.688 0.292 0.000
#> GSM1182310     3  0.4584     0.3391 0.004 0.300 0.696 0.000
#> GSM1182311     1  0.6746     0.7064 0.568 0.116 0.000 0.316
#> GSM1182313     4  0.0000     0.5971 0.000 0.000 0.000 1.000
#> GSM1182315     2  0.4964     0.8782 0.032 0.724 0.244 0.000
#> GSM1182317     2  0.4456     0.8546 0.004 0.716 0.280 0.000
#> GSM1182323     1  0.6763     0.7003 0.564 0.116 0.000 0.320

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1182186     1  0.6151     0.1326 0.596 0.032 0.000 0.284 0.088
#> GSM1182187     4  0.4914     0.6556 0.260 0.000 0.000 0.676 0.064
#> GSM1182188     4  0.1768     0.7779 0.072 0.000 0.000 0.924 0.004
#> GSM1182189     1  0.0703     0.4560 0.976 0.000 0.000 0.024 0.000
#> GSM1182190     1  0.0703     0.4560 0.976 0.000 0.000 0.024 0.000
#> GSM1182191     1  0.6390     0.2024 0.596 0.032 0.000 0.240 0.132
#> GSM1182192     1  0.6303    -0.4826 0.524 0.000 0.000 0.196 0.280
#> GSM1182193     1  0.6417    -0.5105 0.504 0.000 0.000 0.216 0.280
#> GSM1182194     3  0.2929     0.7811 0.000 0.000 0.820 0.000 0.180
#> GSM1182195     3  0.2516     0.7867 0.000 0.000 0.860 0.000 0.140
#> GSM1182196     3  0.5139     0.7186 0.000 0.104 0.708 0.008 0.180
#> GSM1182197     3  0.2707     0.8095 0.000 0.024 0.876 0.000 0.100
#> GSM1182198     3  0.3210     0.7634 0.000 0.000 0.788 0.000 0.212
#> GSM1182199     3  0.3395     0.7532 0.000 0.000 0.764 0.000 0.236
#> GSM1182200     3  0.4107     0.7612 0.000 0.124 0.808 0.032 0.036
#> GSM1182201     3  0.1774     0.8168 0.000 0.016 0.932 0.000 0.052
#> GSM1182202     4  0.5369     0.5076 0.388 0.000 0.000 0.552 0.060
#> GSM1182203     4  0.4788     0.6704 0.240 0.000 0.000 0.696 0.064
#> GSM1182204     4  0.5309     0.5418 0.364 0.000 0.000 0.576 0.060
#> GSM1182205     3  0.2769     0.8212 0.000 0.024 0.892 0.020 0.064
#> GSM1182206     3  0.5367     0.7380 0.000 0.120 0.732 0.056 0.092
#> GSM1182207     1  0.2712     0.4405 0.880 0.032 0.000 0.000 0.088
#> GSM1182208     1  0.2712     0.4405 0.880 0.032 0.000 0.000 0.088
#> GSM1182209     2  0.4576     0.6714 0.000 0.692 0.268 0.000 0.040
#> GSM1182210     2  0.2676     0.8469 0.000 0.884 0.080 0.000 0.036
#> GSM1182211     2  0.1768     0.8495 0.000 0.924 0.072 0.000 0.004
#> GSM1182212     3  0.4946     0.4967 0.000 0.368 0.596 0.000 0.036
#> GSM1182213     2  0.1697     0.8451 0.000 0.932 0.060 0.000 0.008
#> GSM1182214     2  0.1571     0.8457 0.000 0.936 0.060 0.000 0.004
#> GSM1182215     3  0.3709     0.7929 0.000 0.072 0.840 0.020 0.068
#> GSM1182216     2  0.4538     0.8129 0.000 0.776 0.140 0.060 0.024
#> GSM1182217     1  0.5309    -0.0187 0.576 0.000 0.000 0.364 0.060
#> GSM1182218     1  0.0703     0.4560 0.976 0.000 0.000 0.024 0.000
#> GSM1182219     2  0.1628     0.8454 0.000 0.936 0.056 0.000 0.008
#> GSM1182220     2  0.2644     0.8500 0.000 0.888 0.088 0.012 0.012
#> GSM1182221     2  0.4956     0.8157 0.000 0.760 0.124 0.060 0.056
#> GSM1182222     2  0.5087     0.7836 0.000 0.728 0.180 0.060 0.032
#> GSM1182223     3  0.2775     0.8005 0.000 0.068 0.888 0.008 0.036
#> GSM1182224     3  0.3355     0.8009 0.000 0.048 0.856 0.012 0.084
#> GSM1182225     2  0.4942     0.7964 0.000 0.744 0.164 0.060 0.032
#> GSM1182226     2  0.6255     0.4742 0.000 0.540 0.356 0.060 0.044
#> GSM1182227     1  0.6396    -0.5001 0.508 0.000 0.000 0.212 0.280
#> GSM1182228     3  0.4226     0.7936 0.000 0.060 0.764 0.000 0.176
#> GSM1182229     3  0.3113     0.7990 0.000 0.068 0.872 0.012 0.048
#> GSM1182230     3  0.3508     0.7941 0.000 0.076 0.848 0.012 0.064
#> GSM1182231     3  0.5635     0.4859 0.000 0.284 0.624 0.012 0.080
#> GSM1182232     1  0.3639     0.1693 0.812 0.000 0.000 0.144 0.044
#> GSM1182233     1  0.0880     0.4492 0.968 0.000 0.000 0.032 0.000
#> GSM1182234     1  0.6335    -0.4831 0.520 0.000 0.000 0.204 0.276
#> GSM1182235     2  0.3714     0.8383 0.000 0.832 0.056 0.012 0.100
#> GSM1182236     1  0.0703     0.4558 0.976 0.000 0.000 0.024 0.000
#> GSM1182237     3  0.6276     0.6122 0.000 0.228 0.584 0.012 0.176
#> GSM1182238     2  0.2878     0.8485 0.000 0.880 0.084 0.024 0.012
#> GSM1182239     3  0.5649     0.6690 0.000 0.132 0.664 0.012 0.192
#> GSM1182240     2  0.5380     0.4753 0.000 0.588 0.360 0.016 0.036
#> GSM1182241     3  0.4377     0.7513 0.000 0.044 0.756 0.008 0.192
#> GSM1182242     3  0.3914     0.8006 0.000 0.048 0.788 0.000 0.164
#> GSM1182243     3  0.3277     0.7965 0.000 0.068 0.856 0.004 0.072
#> GSM1182244     3  0.3616     0.8042 0.000 0.032 0.804 0.000 0.164
#> GSM1182245     1  0.6438    -0.5122 0.500 0.000 0.000 0.220 0.280
#> GSM1182246     4  0.1851     0.7775 0.088 0.000 0.000 0.912 0.000
#> GSM1182247     3  0.2782     0.8154 0.000 0.048 0.880 0.000 0.072
#> GSM1182248     3  0.2227     0.8100 0.000 0.048 0.916 0.004 0.032
#> GSM1182249     3  0.1830     0.8121 0.000 0.012 0.932 0.004 0.052
#> GSM1182250     3  0.1197     0.8129 0.000 0.000 0.952 0.000 0.048
#> GSM1182251     1  0.4945     0.3522 0.688 0.032 0.000 0.020 0.260
#> GSM1182252     3  0.3019     0.8143 0.000 0.048 0.864 0.000 0.088
#> GSM1182253     3  0.1267     0.8167 0.000 0.004 0.960 0.012 0.024
#> GSM1182254     3  0.0000     0.8130 0.000 0.000 1.000 0.000 0.000
#> GSM1182255     4  0.1892     0.7775 0.080 0.000 0.000 0.916 0.004
#> GSM1182256     4  0.1608     0.7787 0.072 0.000 0.000 0.928 0.000
#> GSM1182257     4  0.4937     0.6521 0.264 0.000 0.000 0.672 0.064
#> GSM1182258     4  0.1851     0.7775 0.088 0.000 0.000 0.912 0.000
#> GSM1182259     4  0.1608     0.7787 0.072 0.000 0.000 0.928 0.000
#> GSM1182260     3  0.2690     0.7893 0.000 0.000 0.844 0.000 0.156
#> GSM1182261     3  0.4037     0.7872 0.000 0.072 0.820 0.024 0.084
#> GSM1182262     3  0.3209     0.7977 0.000 0.068 0.864 0.008 0.060
#> GSM1182263     1  0.6459     0.2023 0.580 0.032 0.000 0.128 0.260
#> GSM1182264     3  0.2690     0.7858 0.000 0.000 0.844 0.000 0.156
#> GSM1182265     3  0.1717     0.8122 0.000 0.004 0.936 0.008 0.052
#> GSM1182266     3  0.2516     0.7931 0.000 0.000 0.860 0.000 0.140
#> GSM1182267     1  0.6287    -0.4776 0.528 0.000 0.000 0.196 0.276
#> GSM1182268     1  0.0703     0.4558 0.976 0.000 0.000 0.024 0.000
#> GSM1182269     1  0.0794     0.4545 0.972 0.000 0.000 0.028 0.000
#> GSM1182270     1  0.0609     0.4565 0.980 0.000 0.000 0.020 0.000
#> GSM1182271     4  0.2488     0.7559 0.124 0.000 0.000 0.872 0.004
#> GSM1182272     4  0.1608     0.7787 0.072 0.000 0.000 0.928 0.000
#> GSM1182273     3  0.0000     0.8130 0.000 0.000 1.000 0.000 0.000
#> GSM1182275     3  0.1041     0.8163 0.000 0.004 0.964 0.000 0.032
#> GSM1182276     2  0.2574     0.8382 0.000 0.876 0.112 0.000 0.012
#> GSM1182277     1  0.6335    -0.4862 0.520 0.000 0.000 0.204 0.276
#> GSM1182278     1  0.6374    -0.4981 0.512 0.000 0.000 0.208 0.280
#> GSM1182279     1  0.4855     0.3532 0.692 0.032 0.000 0.016 0.260
#> GSM1182280     1  0.4652     0.3562 0.700 0.032 0.000 0.008 0.260
#> GSM1182281     5  0.6623     0.0000 0.320 0.000 0.000 0.236 0.444
#> GSM1182282     1  0.6443    -0.5111 0.500 0.000 0.000 0.224 0.276
#> GSM1182283     1  0.6396    -0.5042 0.508 0.000 0.000 0.212 0.280
#> GSM1182284     1  0.6443    -0.5111 0.500 0.000 0.000 0.224 0.276
#> GSM1182285     3  0.3752     0.7962 0.000 0.048 0.804 0.000 0.148
#> GSM1182286     2  0.3817     0.8360 0.000 0.824 0.056 0.012 0.108
#> GSM1182287     3  0.3214     0.7898 0.000 0.104 0.856 0.008 0.032
#> GSM1182288     3  0.2536     0.8155 0.000 0.052 0.900 0.004 0.044
#> GSM1182289     1  0.4855     0.3532 0.692 0.032 0.000 0.016 0.260
#> GSM1182290     1  0.2712     0.4405 0.880 0.032 0.000 0.000 0.088
#> GSM1182291     4  0.1608     0.7787 0.072 0.000 0.000 0.928 0.000
#> GSM1182274     3  0.0290     0.8136 0.000 0.000 0.992 0.000 0.008
#> GSM1182292     2  0.4458     0.8178 0.000 0.780 0.108 0.012 0.100
#> GSM1182293     2  0.2782     0.8498 0.000 0.880 0.072 0.000 0.048
#> GSM1182294     2  0.5144     0.5455 0.000 0.640 0.292 0.000 0.068
#> GSM1182295     2  0.1410     0.8458 0.000 0.940 0.060 0.000 0.000
#> GSM1182296     2  0.3766     0.8360 0.000 0.828 0.056 0.012 0.104
#> GSM1182298     3  0.3452     0.7495 0.000 0.000 0.756 0.000 0.244
#> GSM1182299     3  0.4096     0.7113 0.000 0.200 0.760 0.000 0.040
#> GSM1182300     2  0.6141     0.6191 0.000 0.600 0.232 0.012 0.156
#> GSM1182301     2  0.3192     0.8306 0.000 0.848 0.112 0.000 0.040
#> GSM1182303     2  0.4578     0.7869 0.000 0.744 0.200 0.040 0.016
#> GSM1182304     1  0.4855     0.3529 0.692 0.032 0.000 0.016 0.260
#> GSM1182305     1  0.7195     0.0300 0.464 0.032 0.000 0.280 0.224
#> GSM1182306     4  0.4937     0.6521 0.264 0.000 0.000 0.672 0.064
#> GSM1182307     2  0.4285     0.8334 0.000 0.792 0.080 0.012 0.116
#> GSM1182309     2  0.4298     0.8384 0.000 0.788 0.096 0.008 0.108
#> GSM1182312     2  0.4711     0.8247 0.000 0.764 0.152 0.040 0.044
#> GSM1182314     4  0.1851     0.7775 0.088 0.000 0.000 0.912 0.000
#> GSM1182316     3  0.5790     0.4675 0.000 0.268 0.636 0.052 0.044
#> GSM1182318     2  0.4457     0.4781 0.000 0.620 0.368 0.000 0.012
#> GSM1182319     3  0.6347     0.4791 0.000 0.216 0.564 0.008 0.212
#> GSM1182320     3  0.6326    -0.2648 0.000 0.448 0.452 0.052 0.048
#> GSM1182321     3  0.5107     0.7026 0.000 0.108 0.688 0.000 0.204
#> GSM1182322     3  0.6537     0.2031 0.000 0.324 0.508 0.012 0.156
#> GSM1182324     3  0.3766     0.7459 0.000 0.104 0.828 0.012 0.056
#> GSM1182297     2  0.3727     0.8367 0.000 0.832 0.060 0.012 0.096
#> GSM1182302     4  0.5331     0.5280 0.372 0.000 0.000 0.568 0.060
#> GSM1182308     2  0.3739     0.8338 0.000 0.824 0.116 0.052 0.008
#> GSM1182310     3  0.5271     0.4292 0.000 0.284 0.652 0.016 0.048
#> GSM1182311     1  0.0703     0.4558 0.976 0.000 0.000 0.024 0.000
#> GSM1182313     4  0.1608     0.7787 0.072 0.000 0.000 0.928 0.000
#> GSM1182315     2  0.3340     0.8538 0.000 0.860 0.076 0.016 0.048
#> GSM1182317     2  0.4526     0.6260 0.000 0.672 0.300 0.000 0.028
#> GSM1182323     1  0.0609     0.4565 0.980 0.000 0.000 0.020 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
#> GSM1182186     5  0.6031     0.3992 0.248 0.000 0.000 0.360 0.392 NA
#> GSM1182187     4  0.4104     0.7386 0.148 0.000 0.000 0.748 0.000 NA
#> GSM1182188     4  0.0632     0.8243 0.024 0.000 0.000 0.976 0.000 NA
#> GSM1182189     1  0.5490     0.4317 0.624 0.016 0.000 0.008 0.108 NA
#> GSM1182190     1  0.5468     0.4339 0.628 0.016 0.000 0.008 0.108 NA
#> GSM1182191     5  0.6001     0.4943 0.252 0.000 0.000 0.320 0.428 NA
#> GSM1182192     1  0.2178     0.5448 0.868 0.000 0.000 0.132 0.000 NA
#> GSM1182193     1  0.2662     0.5385 0.840 0.000 0.000 0.152 0.004 NA
#> GSM1182194     3  0.3659     0.6092 0.000 0.000 0.636 0.000 0.000 NA
#> GSM1182195     3  0.4009     0.6164 0.000 0.000 0.684 0.000 0.028 NA
#> GSM1182196     3  0.6691     0.4578 0.000 0.152 0.576 0.020 0.100 NA
#> GSM1182197     3  0.4632     0.6482 0.000 0.060 0.736 0.000 0.048 NA
#> GSM1182198     3  0.4252     0.5889 0.000 0.000 0.604 0.000 0.024 NA
#> GSM1182199     3  0.4326     0.5755 0.000 0.000 0.572 0.000 0.024 NA
#> GSM1182200     3  0.5470     0.5235 0.000 0.124 0.672 0.000 0.136 NA
#> GSM1182201     3  0.3725     0.6756 0.000 0.064 0.804 0.000 0.016 NA
#> GSM1182202     4  0.5007     0.6007 0.244 0.000 0.000 0.640 0.004 NA
#> GSM1182203     4  0.3914     0.7526 0.128 0.000 0.000 0.768 0.000 NA
#> GSM1182204     4  0.4725     0.6539 0.204 0.000 0.000 0.684 0.004 NA
#> GSM1182205     3  0.3867     0.6825 0.000 0.000 0.748 0.000 0.052 NA
#> GSM1182206     3  0.6265     0.5588 0.000 0.068 0.568 0.000 0.164 NA
#> GSM1182207     1  0.3881    -0.1685 0.600 0.000 0.000 0.004 0.396 NA
#> GSM1182208     1  0.3881    -0.1685 0.600 0.000 0.000 0.004 0.396 NA
#> GSM1182209     2  0.4883     0.6585 0.000 0.616 0.320 0.000 0.048 NA
#> GSM1182210     2  0.2398     0.7732 0.000 0.876 0.104 0.000 0.020 NA
#> GSM1182211     2  0.3514     0.7788 0.000 0.752 0.228 0.000 0.020 NA
#> GSM1182212     3  0.6033     0.0752 0.000 0.368 0.496 0.000 0.072 NA
#> GSM1182213     2  0.4049     0.7849 0.000 0.740 0.208 0.000 0.044 NA
#> GSM1182214     2  0.3183     0.7915 0.000 0.788 0.200 0.000 0.008 NA
#> GSM1182215     3  0.4399     0.6452 0.000 0.024 0.728 0.000 0.048 NA
#> GSM1182216     2  0.4713     0.7643 0.000 0.692 0.180 0.000 0.124 NA
#> GSM1182217     4  0.6465     0.3404 0.248 0.000 0.000 0.536 0.092 NA
#> GSM1182218     1  0.5468     0.4353 0.628 0.016 0.000 0.008 0.108 NA
#> GSM1182219     2  0.2581     0.7868 0.000 0.856 0.128 0.000 0.016 NA
#> GSM1182220     2  0.3394     0.7942 0.000 0.804 0.144 0.000 0.052 NA
#> GSM1182221     2  0.4909     0.7608 0.000 0.680 0.168 0.000 0.144 NA
#> GSM1182222     2  0.5137     0.7205 0.000 0.604 0.288 0.000 0.104 NA
#> GSM1182223     3  0.2883     0.6864 0.000 0.040 0.860 0.000 0.008 NA
#> GSM1182224     3  0.3288     0.6647 0.000 0.000 0.724 0.000 0.000 NA
#> GSM1182225     2  0.4893     0.7577 0.000 0.668 0.200 0.000 0.128 NA
#> GSM1182226     2  0.5342     0.6710 0.000 0.560 0.324 0.000 0.112 NA
#> GSM1182227     1  0.2520     0.5425 0.844 0.000 0.000 0.152 0.004 NA
#> GSM1182228     3  0.3704     0.6867 0.000 0.016 0.744 0.000 0.008 NA
#> GSM1182229     3  0.3033     0.6900 0.000 0.012 0.848 0.000 0.032 NA
#> GSM1182230     3  0.4580     0.6380 0.000 0.036 0.716 0.000 0.044 NA
#> GSM1182231     3  0.5650     0.5469 0.000 0.132 0.640 0.000 0.052 NA
#> GSM1182232     1  0.6250     0.4503 0.596 0.016 0.000 0.080 0.084 NA
#> GSM1182233     1  0.5189     0.4321 0.640 0.016 0.000 0.000 0.104 NA
#> GSM1182234     1  0.2260     0.5451 0.860 0.000 0.000 0.140 0.000 NA
#> GSM1182235     2  0.5103     0.7733 0.000 0.724 0.128 0.020 0.092 NA
#> GSM1182236     1  0.5229     0.4314 0.636 0.016 0.000 0.000 0.108 NA
#> GSM1182237     3  0.7467     0.4450 0.000 0.136 0.444 0.020 0.144 NA
#> GSM1182238     2  0.3139     0.7959 0.000 0.816 0.152 0.000 0.032 NA
#> GSM1182239     3  0.6837     0.3939 0.000 0.136 0.556 0.016 0.136 NA
#> GSM1182240     2  0.5110     0.6096 0.000 0.556 0.368 0.000 0.068 NA
#> GSM1182241     3  0.5911     0.5512 0.000 0.072 0.656 0.020 0.096 NA
#> GSM1182242     3  0.4134     0.6754 0.000 0.004 0.640 0.000 0.016 NA
#> GSM1182243     3  0.3837     0.6665 0.000 0.008 0.768 0.000 0.044 NA
#> GSM1182244     3  0.5219     0.6701 0.000 0.032 0.620 0.008 0.040 NA
#> GSM1182245     1  0.2805     0.5321 0.828 0.000 0.000 0.160 0.012 NA
#> GSM1182246     4  0.1155     0.8227 0.036 0.000 0.000 0.956 0.004 NA
#> GSM1182247     3  0.3136     0.6938 0.000 0.000 0.768 0.000 0.004 NA
#> GSM1182248     3  0.3231     0.6880 0.000 0.000 0.784 0.000 0.016 NA
#> GSM1182249     3  0.4041     0.6385 0.000 0.068 0.796 0.000 0.048 NA
#> GSM1182250     3  0.2625     0.6980 0.000 0.000 0.872 0.000 0.056 NA
#> GSM1182251     5  0.4504     0.7341 0.368 0.000 0.000 0.040 0.592 NA
#> GSM1182252     3  0.3351     0.6846 0.000 0.000 0.712 0.000 0.000 NA
#> GSM1182253     3  0.2340     0.6970 0.000 0.000 0.852 0.000 0.000 NA
#> GSM1182254     3  0.2342     0.6961 0.000 0.020 0.888 0.000 0.004 NA
#> GSM1182255     4  0.0713     0.8253 0.028 0.000 0.000 0.972 0.000 NA
#> GSM1182256     4  0.0547     0.8241 0.020 0.000 0.000 0.980 0.000 NA
#> GSM1182257     4  0.4209     0.7317 0.160 0.000 0.000 0.736 0.000 NA
#> GSM1182258     4  0.1080     0.8229 0.032 0.000 0.000 0.960 0.004 NA
#> GSM1182259     4  0.0547     0.8241 0.020 0.000 0.000 0.980 0.000 NA
#> GSM1182260     3  0.3533     0.6651 0.000 0.004 0.748 0.000 0.012 NA
#> GSM1182261     3  0.5238     0.6288 0.000 0.052 0.672 0.000 0.076 NA
#> GSM1182262     3  0.3867     0.6667 0.000 0.008 0.768 0.000 0.048 NA
#> GSM1182263     5  0.5042     0.6389 0.308 0.000 0.000 0.100 0.592 NA
#> GSM1182264     3  0.3860     0.6629 0.000 0.000 0.728 0.000 0.036 NA
#> GSM1182265     3  0.2814     0.7002 0.000 0.004 0.864 0.000 0.052 NA
#> GSM1182266     3  0.3509     0.6657 0.000 0.000 0.744 0.000 0.016 NA
#> GSM1182267     1  0.2048     0.5422 0.880 0.000 0.000 0.120 0.000 NA
#> GSM1182268     1  0.5229     0.4314 0.636 0.016 0.000 0.000 0.108 NA
#> GSM1182269     1  0.5646     0.4361 0.620 0.016 0.000 0.016 0.108 NA
#> GSM1182270     1  0.5468     0.4340 0.628 0.016 0.000 0.008 0.108 NA
#> GSM1182271     4  0.1866     0.8056 0.084 0.000 0.000 0.908 0.000 NA
#> GSM1182272     4  0.0547     0.8241 0.020 0.000 0.000 0.980 0.000 NA
#> GSM1182273     3  0.2112     0.6966 0.000 0.000 0.896 0.000 0.016 NA
#> GSM1182275     3  0.1787     0.7020 0.000 0.004 0.920 0.000 0.008 NA
#> GSM1182276     2  0.4703     0.7345 0.000 0.684 0.236 0.000 0.064 NA
#> GSM1182277     1  0.2219     0.5449 0.864 0.000 0.000 0.136 0.000 NA
#> GSM1182278     1  0.2340     0.5438 0.852 0.000 0.000 0.148 0.000 NA
#> GSM1182279     5  0.4400     0.7338 0.376 0.000 0.000 0.032 0.592 NA
#> GSM1182280     5  0.4283     0.7281 0.384 0.000 0.000 0.024 0.592 NA
#> GSM1182281     1  0.5436     0.1781 0.596 0.000 0.000 0.192 0.208 NA
#> GSM1182282     1  0.2558     0.5400 0.840 0.000 0.000 0.156 0.004 NA
#> GSM1182283     1  0.2558     0.5379 0.840 0.000 0.000 0.156 0.004 NA
#> GSM1182284     1  0.2520     0.5416 0.844 0.000 0.000 0.152 0.004 NA
#> GSM1182285     3  0.3737     0.6423 0.000 0.000 0.608 0.000 0.000 NA
#> GSM1182286     2  0.5232     0.7720 0.000 0.716 0.128 0.020 0.092 NA
#> GSM1182287     3  0.3760     0.6300 0.000 0.128 0.800 0.000 0.020 NA
#> GSM1182288     3  0.2664     0.6971 0.000 0.000 0.816 0.000 0.000 NA
#> GSM1182289     5  0.4400     0.7346 0.376 0.000 0.000 0.032 0.592 NA
#> GSM1182290     1  0.3881    -0.1685 0.600 0.000 0.000 0.004 0.396 NA
#> GSM1182291     4  0.0547     0.8241 0.020 0.000 0.000 0.980 0.000 NA
#> GSM1182274     3  0.2214     0.6970 0.000 0.016 0.888 0.000 0.000 NA
#> GSM1182292     2  0.5959     0.7466 0.000 0.612 0.232 0.020 0.100 NA
#> GSM1182293     2  0.3390     0.7979 0.000 0.808 0.152 0.000 0.032 NA
#> GSM1182294     2  0.5583     0.6028 0.000 0.588 0.288 0.000 0.032 NA
#> GSM1182295     2  0.2260     0.7922 0.000 0.860 0.140 0.000 0.000 NA
#> GSM1182296     2  0.5317     0.7753 0.000 0.704 0.144 0.020 0.092 NA
#> GSM1182298     3  0.4348     0.5699 0.000 0.000 0.560 0.000 0.024 NA
#> GSM1182299     3  0.5641     0.4240 0.000 0.240 0.620 0.000 0.064 NA
#> GSM1182300     2  0.6925     0.5188 0.000 0.460 0.336 0.020 0.096 NA
#> GSM1182301     2  0.4077     0.7919 0.000 0.736 0.212 0.000 0.044 NA
#> GSM1182303     2  0.5495     0.7140 0.000 0.612 0.224 0.000 0.148 NA
#> GSM1182304     5  0.4283     0.7281 0.384 0.000 0.000 0.024 0.592 NA
#> GSM1182305     5  0.5559     0.5621 0.176 0.000 0.000 0.284 0.540 NA
#> GSM1182306     4  0.4209     0.7317 0.160 0.000 0.000 0.736 0.000 NA
#> GSM1182307     2  0.5794     0.7554 0.000 0.640 0.212 0.020 0.084 NA
#> GSM1182309     2  0.5248     0.7529 0.000 0.656 0.248 0.020 0.056 NA
#> GSM1182312     2  0.4693     0.7636 0.000 0.692 0.188 0.000 0.116 NA
#> GSM1182314     4  0.1080     0.8229 0.032 0.000 0.000 0.960 0.004 NA
#> GSM1182316     3  0.5781    -0.1228 0.000 0.336 0.520 0.000 0.128 NA
#> GSM1182318     2  0.4967     0.5251 0.000 0.552 0.392 0.000 0.040 NA
#> GSM1182319     3  0.7122     0.0722 0.000 0.276 0.480 0.020 0.116 NA
#> GSM1182320     2  0.5757     0.4693 0.000 0.440 0.420 0.000 0.132 NA
#> GSM1182321     3  0.6470     0.4902 0.000 0.144 0.544 0.000 0.088 NA
#> GSM1182322     3  0.6758    -0.2614 0.000 0.372 0.444 0.020 0.104 NA
#> GSM1182324     3  0.5058     0.5386 0.000 0.144 0.708 0.000 0.088 NA
#> GSM1182297     2  0.5187     0.7738 0.000 0.716 0.132 0.020 0.096 NA
#> GSM1182302     4  0.4843     0.6379 0.216 0.000 0.000 0.668 0.004 NA
#> GSM1182308     2  0.4449     0.7800 0.000 0.712 0.164 0.000 0.124 NA
#> GSM1182310     3  0.4840     0.0316 0.000 0.360 0.580 0.000 0.056 NA
#> GSM1182311     1  0.5468     0.4340 0.628 0.016 0.000 0.008 0.108 NA
#> GSM1182313     4  0.0632     0.8256 0.024 0.000 0.000 0.976 0.000 NA
#> GSM1182315     2  0.3710     0.8001 0.000 0.788 0.144 0.000 0.064 NA
#> GSM1182317     2  0.4462     0.6099 0.000 0.612 0.356 0.000 0.020 NA
#> GSM1182323     1  0.5229     0.4314 0.636 0.016 0.000 0.000 0.108 NA

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk CV-mclust-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk CV-mclust-collect-classes

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

test_to_known_factors(res)
#>             n disease.state(p) gender(p) k
#> CV:mclust 139         7.73e-02     1.000 2
#> CV:mclust 134         1.92e-04     0.162 3
#> CV:mclust 114         1.24e-04     0.367 4
#> CV:mclust  93         2.72e-04     0.165 5
#> CV:mclust 110         8.31e-05     0.308 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 46361 rows and 139 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 1.000           1.000       1.000         0.4791 0.521   0.521
#> 3 3 0.852           0.937       0.923         0.1006 1.000   1.000
#> 4 4 0.583           0.639       0.811         0.1650 0.966   0.935
#> 5 5 0.533           0.609       0.763         0.1162 0.789   0.585
#> 6 6 0.499           0.531       0.693         0.0602 0.898   0.701

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
#> GSM1182186     1       0          1  1  0
#> GSM1182187     1       0          1  1  0
#> GSM1182188     1       0          1  1  0
#> GSM1182189     1       0          1  1  0
#> GSM1182190     1       0          1  1  0
#> GSM1182191     1       0          1  1  0
#> GSM1182192     1       0          1  1  0
#> GSM1182193     1       0          1  1  0
#> GSM1182194     2       0          1  0  1
#> GSM1182195     2       0          1  0  1
#> GSM1182196     2       0          1  0  1
#> GSM1182197     2       0          1  0  1
#> GSM1182198     2       0          1  0  1
#> GSM1182199     2       0          1  0  1
#> GSM1182200     2       0          1  0  1
#> GSM1182201     2       0          1  0  1
#> GSM1182202     1       0          1  1  0
#> GSM1182203     1       0          1  1  0
#> GSM1182204     1       0          1  1  0
#> GSM1182205     2       0          1  0  1
#> GSM1182206     2       0          1  0  1
#> GSM1182207     1       0          1  1  0
#> GSM1182208     1       0          1  1  0
#> GSM1182209     2       0          1  0  1
#> GSM1182210     2       0          1  0  1
#> GSM1182211     2       0          1  0  1
#> GSM1182212     2       0          1  0  1
#> GSM1182213     2       0          1  0  1
#> GSM1182214     2       0          1  0  1
#> GSM1182215     2       0          1  0  1
#> GSM1182216     2       0          1  0  1
#> GSM1182217     1       0          1  1  0
#> GSM1182218     1       0          1  1  0
#> GSM1182219     2       0          1  0  1
#> GSM1182220     2       0          1  0  1
#> GSM1182221     2       0          1  0  1
#> GSM1182222     2       0          1  0  1
#> GSM1182223     2       0          1  0  1
#> GSM1182224     2       0          1  0  1
#> GSM1182225     2       0          1  0  1
#> GSM1182226     2       0          1  0  1
#> GSM1182227     1       0          1  1  0
#> GSM1182228     2       0          1  0  1
#> GSM1182229     2       0          1  0  1
#> GSM1182230     2       0          1  0  1
#> GSM1182231     2       0          1  0  1
#> GSM1182232     1       0          1  1  0
#> GSM1182233     1       0          1  1  0
#> GSM1182234     1       0          1  1  0
#> GSM1182235     2       0          1  0  1
#> GSM1182236     1       0          1  1  0
#> GSM1182237     2       0          1  0  1
#> GSM1182238     2       0          1  0  1
#> GSM1182239     2       0          1  0  1
#> GSM1182240     2       0          1  0  1
#> GSM1182241     2       0          1  0  1
#> GSM1182242     2       0          1  0  1
#> GSM1182243     2       0          1  0  1
#> GSM1182244     2       0          1  0  1
#> GSM1182245     1       0          1  1  0
#> GSM1182246     1       0          1  1  0
#> GSM1182247     2       0          1  0  1
#> GSM1182248     2       0          1  0  1
#> GSM1182249     2       0          1  0  1
#> GSM1182250     2       0          1  0  1
#> GSM1182251     1       0          1  1  0
#> GSM1182252     2       0          1  0  1
#> GSM1182253     2       0          1  0  1
#> GSM1182254     2       0          1  0  1
#> GSM1182255     1       0          1  1  0
#> GSM1182256     1       0          1  1  0
#> GSM1182257     1       0          1  1  0
#> GSM1182258     1       0          1  1  0
#> GSM1182259     1       0          1  1  0
#> GSM1182260     2       0          1  0  1
#> GSM1182261     2       0          1  0  1
#> GSM1182262     2       0          1  0  1
#> GSM1182263     1       0          1  1  0
#> GSM1182264     2       0          1  0  1
#> GSM1182265     2       0          1  0  1
#> GSM1182266     2       0          1  0  1
#> GSM1182267     1       0          1  1  0
#> GSM1182268     1       0          1  1  0
#> GSM1182269     1       0          1  1  0
#> GSM1182270     1       0          1  1  0
#> GSM1182271     1       0          1  1  0
#> GSM1182272     1       0          1  1  0
#> GSM1182273     2       0          1  0  1
#> GSM1182275     2       0          1  0  1
#> GSM1182276     2       0          1  0  1
#> GSM1182277     1       0          1  1  0
#> GSM1182278     1       0          1  1  0
#> GSM1182279     1       0          1  1  0
#> GSM1182280     1       0          1  1  0
#> GSM1182281     1       0          1  1  0
#> GSM1182282     1       0          1  1  0
#> GSM1182283     1       0          1  1  0
#> GSM1182284     1       0          1  1  0
#> GSM1182285     2       0          1  0  1
#> GSM1182286     2       0          1  0  1
#> GSM1182287     2       0          1  0  1
#> GSM1182288     2       0          1  0  1
#> GSM1182289     1       0          1  1  0
#> GSM1182290     1       0          1  1  0
#> GSM1182291     1       0          1  1  0
#> GSM1182274     2       0          1  0  1
#> GSM1182292     2       0          1  0  1
#> GSM1182293     2       0          1  0  1
#> GSM1182294     2       0          1  0  1
#> GSM1182295     2       0          1  0  1
#> GSM1182296     2       0          1  0  1
#> GSM1182298     2       0          1  0  1
#> GSM1182299     2       0          1  0  1
#> GSM1182300     2       0          1  0  1
#> GSM1182301     2       0          1  0  1
#> GSM1182303     2       0          1  0  1
#> GSM1182304     1       0          1  1  0
#> GSM1182305     1       0          1  1  0
#> GSM1182306     1       0          1  1  0
#> GSM1182307     2       0          1  0  1
#> GSM1182309     2       0          1  0  1
#> GSM1182312     2       0          1  0  1
#> GSM1182314     1       0          1  1  0
#> GSM1182316     2       0          1  0  1
#> GSM1182318     2       0          1  0  1
#> GSM1182319     2       0          1  0  1
#> GSM1182320     2       0          1  0  1
#> GSM1182321     2       0          1  0  1
#> GSM1182322     2       0          1  0  1
#> GSM1182324     2       0          1  0  1
#> GSM1182297     2       0          1  0  1
#> GSM1182302     1       0          1  1  0
#> GSM1182308     2       0          1  0  1
#> GSM1182310     2       0          1  0  1
#> GSM1182311     1       0          1  1  0
#> GSM1182313     1       0          1  1  0
#> GSM1182315     2       0          1  0  1
#> GSM1182317     2       0          1  0  1
#> GSM1182323     1       0          1  1  0

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2 p3
#> GSM1182186     1  0.4605      0.934 0.796 0.000 NA
#> GSM1182187     1  0.3116      0.943 0.892 0.000 NA
#> GSM1182188     1  0.0000      0.937 1.000 0.000 NA
#> GSM1182189     1  0.4555      0.936 0.800 0.000 NA
#> GSM1182190     1  0.3816      0.941 0.852 0.000 NA
#> GSM1182191     1  0.4555      0.935 0.800 0.000 NA
#> GSM1182192     1  0.3192      0.942 0.888 0.000 NA
#> GSM1182193     1  0.0424      0.938 0.992 0.000 NA
#> GSM1182194     2  0.2448      0.948 0.000 0.924 NA
#> GSM1182195     2  0.2448      0.948 0.000 0.924 NA
#> GSM1182196     2  0.0237      0.954 0.000 0.996 NA
#> GSM1182197     2  0.0424      0.953 0.000 0.992 NA
#> GSM1182198     2  0.2261      0.950 0.000 0.932 NA
#> GSM1182199     2  0.2261      0.950 0.000 0.932 NA
#> GSM1182200     2  0.4062      0.880 0.000 0.836 NA
#> GSM1182201     2  0.1411      0.956 0.000 0.964 NA
#> GSM1182202     1  0.4605      0.934 0.796 0.000 NA
#> GSM1182203     1  0.2537      0.943 0.920 0.000 NA
#> GSM1182204     1  0.2959      0.941 0.900 0.000 NA
#> GSM1182205     2  0.1753      0.954 0.000 0.952 NA
#> GSM1182206     2  0.2066      0.952 0.000 0.940 NA
#> GSM1182207     1  0.4654      0.935 0.792 0.000 NA
#> GSM1182208     1  0.4654      0.933 0.792 0.000 NA
#> GSM1182209     2  0.6180      0.614 0.000 0.584 NA
#> GSM1182210     2  0.0237      0.954 0.000 0.996 NA
#> GSM1182211     2  0.3816      0.885 0.000 0.852 NA
#> GSM1182212     2  0.5363      0.775 0.000 0.724 NA
#> GSM1182213     2  0.3412      0.900 0.000 0.876 NA
#> GSM1182214     2  0.2356      0.930 0.000 0.928 NA
#> GSM1182215     2  0.2356      0.949 0.000 0.928 NA
#> GSM1182216     2  0.1860      0.955 0.000 0.948 NA
#> GSM1182217     1  0.4555      0.935 0.800 0.000 NA
#> GSM1182218     1  0.4121      0.940 0.832 0.000 NA
#> GSM1182219     2  0.0424      0.953 0.000 0.992 NA
#> GSM1182220     2  0.0592      0.952 0.000 0.988 NA
#> GSM1182221     2  0.0592      0.956 0.000 0.988 NA
#> GSM1182222     2  0.1753      0.954 0.000 0.952 NA
#> GSM1182223     2  0.2448      0.949 0.000 0.924 NA
#> GSM1182224     2  0.2356      0.949 0.000 0.928 NA
#> GSM1182225     2  0.1289      0.955 0.000 0.968 NA
#> GSM1182226     2  0.1529      0.955 0.000 0.960 NA
#> GSM1182227     1  0.0000      0.937 1.000 0.000 NA
#> GSM1182228     2  0.0237      0.954 0.000 0.996 NA
#> GSM1182229     2  0.2356      0.949 0.000 0.928 NA
#> GSM1182230     2  0.2356      0.949 0.000 0.928 NA
#> GSM1182231     2  0.1753      0.954 0.000 0.952 NA
#> GSM1182232     1  0.3941      0.941 0.844 0.000 NA
#> GSM1182233     1  0.4555      0.935 0.800 0.000 NA
#> GSM1182234     1  0.0000      0.937 1.000 0.000 NA
#> GSM1182235     2  0.2261      0.932 0.000 0.932 NA
#> GSM1182236     1  0.4504      0.936 0.804 0.000 NA
#> GSM1182237     2  0.0592      0.956 0.000 0.988 NA
#> GSM1182238     2  0.0424      0.953 0.000 0.992 NA
#> GSM1182239     2  0.2625      0.924 0.000 0.916 NA
#> GSM1182240     2  0.0592      0.952 0.000 0.988 NA
#> GSM1182241     2  0.0424      0.953 0.000 0.992 NA
#> GSM1182242     2  0.1860      0.954 0.000 0.948 NA
#> GSM1182243     2  0.2356      0.950 0.000 0.928 NA
#> GSM1182244     2  0.0424      0.955 0.000 0.992 NA
#> GSM1182245     1  0.0237      0.937 0.996 0.000 NA
#> GSM1182246     1  0.0237      0.937 0.996 0.000 NA
#> GSM1182247     2  0.2537      0.947 0.000 0.920 NA
#> GSM1182248     2  0.2537      0.947 0.000 0.920 NA
#> GSM1182249     2  0.1860      0.953 0.000 0.948 NA
#> GSM1182250     2  0.2261      0.950 0.000 0.932 NA
#> GSM1182251     1  0.4504      0.936 0.804 0.000 NA
#> GSM1182252     2  0.2448      0.948 0.000 0.924 NA
#> GSM1182253     2  0.2356      0.949 0.000 0.928 NA
#> GSM1182254     2  0.2537      0.947 0.000 0.920 NA
#> GSM1182255     1  0.0000      0.937 1.000 0.000 NA
#> GSM1182256     1  0.0237      0.937 0.996 0.000 NA
#> GSM1182257     1  0.0892      0.940 0.980 0.000 NA
#> GSM1182258     1  0.0237      0.937 0.996 0.000 NA
#> GSM1182259     1  0.0000      0.937 1.000 0.000 NA
#> GSM1182260     2  0.0747      0.956 0.000 0.984 NA
#> GSM1182261     2  0.2066      0.952 0.000 0.940 NA
#> GSM1182262     2  0.2066      0.952 0.000 0.940 NA
#> GSM1182263     1  0.4178      0.941 0.828 0.000 NA
#> GSM1182264     2  0.0592      0.955 0.000 0.988 NA
#> GSM1182265     2  0.2261      0.950 0.000 0.932 NA
#> GSM1182266     2  0.0892      0.956 0.000 0.980 NA
#> GSM1182267     1  0.0592      0.938 0.988 0.000 NA
#> GSM1182268     1  0.4555      0.935 0.800 0.000 NA
#> GSM1182269     1  0.3619      0.942 0.864 0.000 NA
#> GSM1182270     1  0.4702      0.934 0.788 0.000 NA
#> GSM1182271     1  0.0000      0.937 1.000 0.000 NA
#> GSM1182272     1  0.0237      0.937 0.996 0.000 NA
#> GSM1182273     2  0.2356      0.949 0.000 0.928 NA
#> GSM1182275     2  0.1860      0.955 0.000 0.948 NA
#> GSM1182276     2  0.2625      0.926 0.000 0.916 NA
#> GSM1182277     1  0.0592      0.938 0.988 0.000 NA
#> GSM1182278     1  0.0237      0.937 0.996 0.000 NA
#> GSM1182279     1  0.4504      0.938 0.804 0.000 NA
#> GSM1182280     1  0.4702      0.934 0.788 0.000 NA
#> GSM1182281     1  0.0237      0.937 0.996 0.000 NA
#> GSM1182282     1  0.0237      0.937 0.996 0.000 NA
#> GSM1182283     1  0.0237      0.937 0.996 0.000 NA
#> GSM1182284     1  0.0000      0.937 1.000 0.000 NA
#> GSM1182285     2  0.2356      0.949 0.000 0.928 NA
#> GSM1182286     2  0.0592      0.952 0.000 0.988 NA
#> GSM1182287     2  0.2066      0.952 0.000 0.940 NA
#> GSM1182288     2  0.2066      0.952 0.000 0.940 NA
#> GSM1182289     1  0.4605      0.936 0.796 0.000 NA
#> GSM1182290     1  0.4654      0.933 0.792 0.000 NA
#> GSM1182291     1  0.0237      0.937 0.996 0.000 NA
#> GSM1182274     2  0.2165      0.951 0.000 0.936 NA
#> GSM1182292     2  0.4235      0.863 0.000 0.824 NA
#> GSM1182293     2  0.0237      0.954 0.000 0.996 NA
#> GSM1182294     2  0.0237      0.954 0.000 0.996 NA
#> GSM1182295     2  0.0424      0.953 0.000 0.992 NA
#> GSM1182296     2  0.0892      0.950 0.000 0.980 NA
#> GSM1182298     2  0.2066      0.952 0.000 0.940 NA
#> GSM1182299     2  0.3116      0.911 0.000 0.892 NA
#> GSM1182300     2  0.0424      0.953 0.000 0.992 NA
#> GSM1182301     2  0.1163      0.948 0.000 0.972 NA
#> GSM1182303     2  0.3116      0.912 0.000 0.892 NA
#> GSM1182304     1  0.4654      0.933 0.792 0.000 NA
#> GSM1182305     1  0.2711      0.943 0.912 0.000 NA
#> GSM1182306     1  0.2878      0.943 0.904 0.000 NA
#> GSM1182307     2  0.4555      0.844 0.000 0.800 NA
#> GSM1182309     2  0.0237      0.954 0.000 0.996 NA
#> GSM1182312     2  0.0237      0.954 0.000 0.996 NA
#> GSM1182314     1  0.0237      0.937 0.996 0.000 NA
#> GSM1182316     2  0.0237      0.955 0.000 0.996 NA
#> GSM1182318     2  0.4399      0.855 0.000 0.812 NA
#> GSM1182319     2  0.0424      0.954 0.000 0.992 NA
#> GSM1182320     2  0.0592      0.955 0.000 0.988 NA
#> GSM1182321     2  0.0747      0.956 0.000 0.984 NA
#> GSM1182322     2  0.0424      0.954 0.000 0.992 NA
#> GSM1182324     2  0.2165      0.951 0.000 0.936 NA
#> GSM1182297     2  0.3038      0.913 0.000 0.896 NA
#> GSM1182302     1  0.4452      0.937 0.808 0.000 NA
#> GSM1182308     2  0.2448      0.929 0.000 0.924 NA
#> GSM1182310     2  0.1163      0.956 0.000 0.972 NA
#> GSM1182311     1  0.4504      0.937 0.804 0.000 NA
#> GSM1182313     1  0.0237      0.937 0.996 0.000 NA
#> GSM1182315     2  0.0592      0.952 0.000 0.988 NA
#> GSM1182317     2  0.2711      0.922 0.000 0.912 NA
#> GSM1182323     1  0.4702      0.932 0.788 0.000 NA

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3 p4
#> GSM1182186     1  0.5073     0.8696 0.744 0.000 0.056 NA
#> GSM1182187     1  0.2988     0.8947 0.876 0.000 0.012 NA
#> GSM1182188     1  0.1004     0.8813 0.972 0.000 0.004 NA
#> GSM1182189     1  0.4804     0.8821 0.776 0.000 0.064 NA
#> GSM1182190     1  0.3694     0.8949 0.844 0.000 0.032 NA
#> GSM1182191     1  0.5458     0.8638 0.720 0.000 0.076 NA
#> GSM1182192     1  0.3931     0.8949 0.832 0.000 0.040 NA
#> GSM1182193     1  0.6133     0.8180 0.676 0.000 0.188 NA
#> GSM1182194     2  0.5277    -0.7255 0.000 0.532 0.460 NA
#> GSM1182195     3  0.4989     0.8734 0.000 0.472 0.528 NA
#> GSM1182196     2  0.0336     0.6431 0.000 0.992 0.008 NA
#> GSM1182197     2  0.1474     0.6498 0.000 0.948 0.000 NA
#> GSM1182198     3  0.4907     0.8914 0.000 0.420 0.580 NA
#> GSM1182199     3  0.4972     0.9234 0.000 0.456 0.544 NA
#> GSM1182200     2  0.4998     0.5771 0.000 0.748 0.052 NA
#> GSM1182201     2  0.2670     0.6244 0.000 0.904 0.072 NA
#> GSM1182202     1  0.3402     0.8910 0.832 0.000 0.004 NA
#> GSM1182203     1  0.1118     0.8889 0.964 0.000 0.000 NA
#> GSM1182204     1  0.1209     0.8875 0.964 0.000 0.004 NA
#> GSM1182205     2  0.3764     0.4085 0.000 0.784 0.216 NA
#> GSM1182206     2  0.3052     0.5598 0.000 0.860 0.136 NA
#> GSM1182207     1  0.7601     0.6612 0.472 0.000 0.296 NA
#> GSM1182208     1  0.7900     0.5424 0.368 0.000 0.332 NA
#> GSM1182209     2  0.5097     0.2852 0.000 0.568 0.004 NA
#> GSM1182210     2  0.2469     0.6356 0.000 0.892 0.000 NA
#> GSM1182211     2  0.4746     0.3909 0.000 0.632 0.000 NA
#> GSM1182212     2  0.4872     0.4059 0.000 0.640 0.004 NA
#> GSM1182213     2  0.4522     0.4521 0.000 0.680 0.000 NA
#> GSM1182214     2  0.4679     0.4083 0.000 0.648 0.000 NA
#> GSM1182215     2  0.3583     0.4928 0.000 0.816 0.180 NA
#> GSM1182216     2  0.5159     0.6070 0.000 0.756 0.088 NA
#> GSM1182217     1  0.3257     0.8922 0.844 0.000 0.004 NA
#> GSM1182218     1  0.2125     0.8962 0.920 0.000 0.004 NA
#> GSM1182219     2  0.2530     0.6333 0.000 0.888 0.000 NA
#> GSM1182220     2  0.3870     0.5803 0.000 0.788 0.004 NA
#> GSM1182221     2  0.2313     0.6502 0.000 0.924 0.032 NA
#> GSM1182222     2  0.2610     0.6122 0.000 0.900 0.088 NA
#> GSM1182223     2  0.3161     0.5705 0.000 0.864 0.124 NA
#> GSM1182224     2  0.4746    -0.3224 0.000 0.632 0.368 NA
#> GSM1182225     2  0.3474     0.6409 0.000 0.868 0.068 NA
#> GSM1182226     2  0.2345     0.6029 0.000 0.900 0.100 NA
#> GSM1182227     1  0.0921     0.8831 0.972 0.000 0.000 NA
#> GSM1182228     2  0.0188     0.6434 0.000 0.996 0.004 NA
#> GSM1182229     2  0.3448     0.5132 0.000 0.828 0.168 NA
#> GSM1182230     2  0.3444     0.4972 0.000 0.816 0.184 NA
#> GSM1182231     2  0.2345     0.6001 0.000 0.900 0.100 NA
#> GSM1182232     1  0.4462     0.8848 0.792 0.000 0.044 NA
#> GSM1182233     1  0.5218     0.8662 0.736 0.000 0.064 NA
#> GSM1182234     1  0.2751     0.8965 0.904 0.000 0.040 NA
#> GSM1182235     2  0.3873     0.5574 0.000 0.772 0.000 NA
#> GSM1182236     1  0.3946     0.8884 0.812 0.000 0.020 NA
#> GSM1182237     2  0.1211     0.6324 0.000 0.960 0.040 NA
#> GSM1182238     2  0.2868     0.6231 0.000 0.864 0.000 NA
#> GSM1182239     2  0.3311     0.6020 0.000 0.828 0.000 NA
#> GSM1182240     2  0.3400     0.5965 0.000 0.820 0.000 NA
#> GSM1182241     2  0.0188     0.6452 0.000 0.996 0.000 NA
#> GSM1182242     2  0.2760     0.5716 0.000 0.872 0.128 NA
#> GSM1182243     2  0.3402     0.5221 0.000 0.832 0.164 NA
#> GSM1182244     2  0.2647     0.5577 0.000 0.880 0.120 NA
#> GSM1182245     1  0.3301     0.8950 0.876 0.000 0.048 NA
#> GSM1182246     1  0.1356     0.8794 0.960 0.000 0.008 NA
#> GSM1182247     2  0.4137     0.4344 0.000 0.780 0.208 NA
#> GSM1182248     2  0.4250     0.2301 0.000 0.724 0.276 NA
#> GSM1182249     2  0.2868     0.5700 0.000 0.864 0.136 NA
#> GSM1182250     2  0.3444     0.4884 0.000 0.816 0.184 NA
#> GSM1182251     1  0.5212     0.8687 0.740 0.000 0.068 NA
#> GSM1182252     2  0.3907     0.3763 0.000 0.768 0.232 NA
#> GSM1182253     2  0.4564    -0.0915 0.000 0.672 0.328 NA
#> GSM1182254     2  0.4248     0.3964 0.000 0.768 0.220 NA
#> GSM1182255     1  0.1305     0.8778 0.960 0.000 0.004 NA
#> GSM1182256     1  0.1305     0.8778 0.960 0.000 0.004 NA
#> GSM1182257     1  0.0817     0.8888 0.976 0.000 0.000 NA
#> GSM1182258     1  0.0895     0.8854 0.976 0.000 0.004 NA
#> GSM1182259     1  0.1118     0.8788 0.964 0.000 0.000 NA
#> GSM1182260     2  0.2530     0.5655 0.000 0.888 0.112 NA
#> GSM1182261     2  0.3052     0.5599 0.000 0.860 0.136 NA
#> GSM1182262     2  0.3306     0.5321 0.000 0.840 0.156 NA
#> GSM1182263     1  0.4756     0.8836 0.784 0.000 0.072 NA
#> GSM1182264     2  0.4277    -0.1405 0.000 0.720 0.280 NA
#> GSM1182265     2  0.4406     0.0683 0.000 0.700 0.300 NA
#> GSM1182266     2  0.3074     0.4780 0.000 0.848 0.152 NA
#> GSM1182267     1  0.3885     0.8919 0.844 0.000 0.064 NA
#> GSM1182268     1  0.5212     0.8683 0.740 0.000 0.068 NA
#> GSM1182269     1  0.4937     0.8806 0.764 0.000 0.064 NA
#> GSM1182270     1  0.4524     0.8830 0.768 0.000 0.028 NA
#> GSM1182271     1  0.0921     0.8830 0.972 0.000 0.000 NA
#> GSM1182272     1  0.1118     0.8788 0.964 0.000 0.000 NA
#> GSM1182273     2  0.5158    -0.7756 0.000 0.524 0.472 NA
#> GSM1182275     2  0.3495     0.5565 0.000 0.844 0.140 NA
#> GSM1182276     2  0.4452     0.5277 0.000 0.732 0.008 NA
#> GSM1182277     1  0.1489     0.8929 0.952 0.000 0.004 NA
#> GSM1182278     1  0.1545     0.8887 0.952 0.000 0.008 NA
#> GSM1182279     1  0.5530     0.8599 0.712 0.000 0.076 NA
#> GSM1182280     1  0.6404     0.8180 0.644 0.000 0.136 NA
#> GSM1182281     1  0.1452     0.8807 0.956 0.000 0.008 NA
#> GSM1182282     1  0.3301     0.8930 0.876 0.000 0.048 NA
#> GSM1182283     1  0.3198     0.8972 0.880 0.000 0.040 NA
#> GSM1182284     1  0.0817     0.8826 0.976 0.000 0.000 NA
#> GSM1182285     2  0.4624    -0.1347 0.000 0.660 0.340 NA
#> GSM1182286     2  0.2973     0.6187 0.000 0.856 0.000 NA
#> GSM1182287     2  0.2988     0.5870 0.000 0.876 0.112 NA
#> GSM1182288     2  0.3688     0.4320 0.000 0.792 0.208 NA
#> GSM1182289     1  0.5434     0.8668 0.728 0.000 0.084 NA
#> GSM1182290     1  0.7563     0.6756 0.484 0.000 0.280 NA
#> GSM1182291     1  0.1109     0.8801 0.968 0.000 0.004 NA
#> GSM1182274     2  0.4122     0.3502 0.000 0.760 0.236 NA
#> GSM1182292     2  0.4643     0.4224 0.000 0.656 0.000 NA
#> GSM1182293     2  0.2053     0.6434 0.000 0.924 0.004 NA
#> GSM1182294     2  0.0188     0.6440 0.000 0.996 0.004 NA
#> GSM1182295     2  0.2760     0.6271 0.000 0.872 0.000 NA
#> GSM1182296     2  0.3123     0.6123 0.000 0.844 0.000 NA
#> GSM1182298     3  0.4985     0.9071 0.000 0.468 0.532 NA
#> GSM1182299     2  0.2868     0.6271 0.000 0.864 0.000 NA
#> GSM1182300     2  0.2011     0.6429 0.000 0.920 0.000 NA
#> GSM1182301     2  0.3837     0.5616 0.000 0.776 0.000 NA
#> GSM1182303     2  0.4283     0.5395 0.000 0.740 0.004 NA
#> GSM1182304     1  0.6027     0.8328 0.664 0.000 0.092 NA
#> GSM1182305     1  0.4586     0.8877 0.796 0.000 0.068 NA
#> GSM1182306     1  0.2334     0.8947 0.908 0.000 0.004 NA
#> GSM1182307     2  0.4991     0.3502 0.000 0.608 0.004 NA
#> GSM1182309     2  0.1398     0.6474 0.000 0.956 0.004 NA
#> GSM1182312     2  0.1004     0.6484 0.000 0.972 0.004 NA
#> GSM1182314     1  0.1356     0.8794 0.960 0.000 0.008 NA
#> GSM1182316     2  0.1938     0.6325 0.000 0.936 0.052 NA
#> GSM1182318     2  0.4814     0.4524 0.000 0.676 0.008 NA
#> GSM1182319     2  0.1557     0.6279 0.000 0.944 0.056 NA
#> GSM1182320     2  0.2329     0.6227 0.000 0.916 0.072 NA
#> GSM1182321     2  0.2011     0.6076 0.000 0.920 0.080 NA
#> GSM1182322     2  0.2149     0.6102 0.000 0.912 0.088 NA
#> GSM1182324     2  0.3751     0.4718 0.000 0.800 0.196 NA
#> GSM1182297     2  0.4134     0.5251 0.000 0.740 0.000 NA
#> GSM1182302     1  0.1557     0.8931 0.944 0.000 0.000 NA
#> GSM1182308     2  0.4485     0.5458 0.000 0.740 0.012 NA
#> GSM1182310     2  0.2868     0.5786 0.000 0.864 0.136 NA
#> GSM1182311     1  0.5267     0.8723 0.740 0.000 0.076 NA
#> GSM1182313     1  0.1452     0.8782 0.956 0.000 0.008 NA
#> GSM1182315     2  0.2831     0.6296 0.000 0.876 0.004 NA
#> GSM1182317     2  0.3873     0.5587 0.000 0.772 0.000 NA
#> GSM1182323     1  0.4204     0.8834 0.788 0.000 0.020 NA

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1182186     1  0.4585     0.5877 0.628 0.000 0.000 0.020 0.352
#> GSM1182187     1  0.4021     0.6941 0.764 0.000 0.000 0.036 0.200
#> GSM1182188     1  0.2017     0.7017 0.912 0.000 0.000 0.008 0.080
#> GSM1182189     1  0.4736     0.5006 0.576 0.000 0.000 0.020 0.404
#> GSM1182190     1  0.3878     0.6958 0.748 0.000 0.000 0.016 0.236
#> GSM1182191     1  0.4744     0.5085 0.572 0.000 0.000 0.020 0.408
#> GSM1182192     1  0.3562     0.7137 0.788 0.000 0.000 0.016 0.196
#> GSM1182193     1  0.4812     0.6455 0.672 0.000 0.008 0.032 0.288
#> GSM1182194     3  0.2012     0.6883 0.000 0.020 0.920 0.060 0.000
#> GSM1182195     3  0.1408     0.6717 0.000 0.008 0.948 0.044 0.000
#> GSM1182196     3  0.4298     0.4442 0.000 0.352 0.640 0.008 0.000
#> GSM1182197     3  0.4914     0.5805 0.000 0.280 0.672 0.040 0.008
#> GSM1182198     3  0.2612     0.5802 0.000 0.008 0.868 0.124 0.000
#> GSM1182199     3  0.2574     0.6104 0.000 0.012 0.876 0.112 0.000
#> GSM1182200     3  0.5817     0.4975 0.000 0.292 0.608 0.084 0.016
#> GSM1182201     3  0.5161     0.6968 0.000 0.176 0.716 0.092 0.016
#> GSM1182202     1  0.3849     0.6808 0.752 0.000 0.000 0.016 0.232
#> GSM1182203     1  0.2953     0.7006 0.844 0.000 0.000 0.012 0.144
#> GSM1182204     1  0.3203     0.7002 0.820 0.000 0.000 0.012 0.168
#> GSM1182205     3  0.1557     0.7567 0.000 0.052 0.940 0.008 0.000
#> GSM1182206     3  0.2660     0.7613 0.000 0.128 0.864 0.008 0.000
#> GSM1182207     5  0.4223     0.8003 0.248 0.000 0.000 0.028 0.724
#> GSM1182208     5  0.3601     0.7540 0.128 0.000 0.000 0.052 0.820
#> GSM1182209     2  0.1121     0.4689 0.000 0.956 0.044 0.000 0.000
#> GSM1182210     2  0.4101     0.5689 0.000 0.628 0.372 0.000 0.000
#> GSM1182211     2  0.1430     0.4837 0.000 0.944 0.052 0.004 0.000
#> GSM1182212     2  0.5059     0.3610 0.000 0.548 0.416 0.036 0.000
#> GSM1182213     2  0.3949     0.5836 0.000 0.668 0.332 0.000 0.000
#> GSM1182214     2  0.1410     0.4945 0.000 0.940 0.060 0.000 0.000
#> GSM1182215     3  0.1697     0.7646 0.000 0.060 0.932 0.008 0.000
#> GSM1182216     2  0.4084     0.4789 0.000 0.668 0.328 0.004 0.000
#> GSM1182217     1  0.3942     0.6932 0.748 0.000 0.000 0.020 0.232
#> GSM1182218     1  0.3696     0.7056 0.772 0.000 0.000 0.016 0.212
#> GSM1182219     3  0.4273     0.0871 0.000 0.448 0.552 0.000 0.000
#> GSM1182220     3  0.5083    -0.1555 0.000 0.480 0.492 0.020 0.008
#> GSM1182221     2  0.4040     0.5507 0.000 0.724 0.260 0.016 0.000
#> GSM1182222     3  0.3430     0.6726 0.000 0.220 0.776 0.004 0.000
#> GSM1182223     3  0.4031     0.7529 0.000 0.124 0.804 0.064 0.008
#> GSM1182224     3  0.0404     0.7197 0.000 0.000 0.988 0.012 0.000
#> GSM1182225     3  0.4182     0.3986 0.000 0.352 0.644 0.004 0.000
#> GSM1182226     3  0.4658     0.1689 0.000 0.408 0.576 0.016 0.000
#> GSM1182227     1  0.3366     0.6939 0.828 0.000 0.000 0.032 0.140
#> GSM1182228     3  0.3890     0.6637 0.000 0.252 0.736 0.012 0.000
#> GSM1182229     3  0.2193     0.7709 0.000 0.092 0.900 0.008 0.000
#> GSM1182230     3  0.1704     0.7663 0.000 0.068 0.928 0.004 0.000
#> GSM1182231     3  0.2852     0.7380 0.000 0.172 0.828 0.000 0.000
#> GSM1182232     1  0.4165     0.6492 0.672 0.000 0.000 0.008 0.320
#> GSM1182233     1  0.4565     0.5261 0.580 0.000 0.000 0.012 0.408
#> GSM1182234     1  0.3877     0.6856 0.764 0.000 0.000 0.024 0.212
#> GSM1182235     2  0.3274     0.6374 0.000 0.780 0.220 0.000 0.000
#> GSM1182236     1  0.4127     0.6650 0.680 0.000 0.000 0.008 0.312
#> GSM1182237     3  0.4026     0.6632 0.000 0.244 0.736 0.020 0.000
#> GSM1182238     2  0.3143     0.6131 0.000 0.796 0.204 0.000 0.000
#> GSM1182239     2  0.4262     0.3649 0.000 0.560 0.440 0.000 0.000
#> GSM1182240     2  0.4410     0.3966 0.000 0.556 0.440 0.004 0.000
#> GSM1182241     3  0.4086     0.6147 0.000 0.284 0.704 0.012 0.000
#> GSM1182242     3  0.2712     0.7717 0.000 0.088 0.880 0.032 0.000
#> GSM1182243     3  0.2389     0.7649 0.000 0.116 0.880 0.004 0.000
#> GSM1182244     3  0.3536     0.7409 0.000 0.156 0.812 0.032 0.000
#> GSM1182245     1  0.3656     0.7043 0.784 0.000 0.000 0.020 0.196
#> GSM1182246     1  0.1800     0.6783 0.932 0.000 0.000 0.020 0.048
#> GSM1182247     3  0.3635     0.7144 0.000 0.068 0.836 0.088 0.008
#> GSM1182248     3  0.1469     0.7109 0.000 0.016 0.948 0.036 0.000
#> GSM1182249     3  0.3053     0.7419 0.000 0.164 0.828 0.008 0.000
#> GSM1182250     3  0.2017     0.7705 0.000 0.080 0.912 0.008 0.000
#> GSM1182251     1  0.4674     0.4973 0.568 0.000 0.000 0.016 0.416
#> GSM1182252     3  0.1750     0.7463 0.000 0.036 0.936 0.028 0.000
#> GSM1182253     3  0.0992     0.7308 0.000 0.008 0.968 0.024 0.000
#> GSM1182254     3  0.2359     0.7495 0.000 0.060 0.904 0.036 0.000
#> GSM1182255     1  0.1331     0.6803 0.952 0.000 0.000 0.008 0.040
#> GSM1182256     1  0.0865     0.6759 0.972 0.000 0.000 0.004 0.024
#> GSM1182257     1  0.1626     0.6900 0.940 0.000 0.000 0.016 0.044
#> GSM1182258     1  0.1430     0.6956 0.944 0.000 0.000 0.004 0.052
#> GSM1182259     1  0.1670     0.6619 0.936 0.000 0.000 0.012 0.052
#> GSM1182260     3  0.3355     0.7561 0.000 0.132 0.832 0.036 0.000
#> GSM1182261     3  0.2462     0.7656 0.000 0.112 0.880 0.008 0.000
#> GSM1182262     3  0.1831     0.7682 0.000 0.076 0.920 0.004 0.000
#> GSM1182263     1  0.4585     0.5500 0.628 0.000 0.000 0.020 0.352
#> GSM1182264     3  0.3432     0.7228 0.000 0.132 0.828 0.040 0.000
#> GSM1182265     3  0.2903     0.7602 0.000 0.080 0.872 0.048 0.000
#> GSM1182266     3  0.3307     0.7388 0.000 0.104 0.844 0.052 0.000
#> GSM1182267     1  0.3878     0.6755 0.748 0.000 0.000 0.016 0.236
#> GSM1182268     1  0.4505     0.5598 0.604 0.000 0.000 0.012 0.384
#> GSM1182269     1  0.4849     0.5885 0.608 0.000 0.000 0.032 0.360
#> GSM1182270     1  0.4585     0.6091 0.628 0.000 0.000 0.020 0.352
#> GSM1182271     1  0.1331     0.6833 0.952 0.000 0.000 0.008 0.040
#> GSM1182272     1  0.1670     0.6622 0.936 0.000 0.000 0.012 0.052
#> GSM1182273     3  0.0703     0.7063 0.000 0.000 0.976 0.024 0.000
#> GSM1182275     3  0.3916     0.7574 0.000 0.116 0.816 0.056 0.012
#> GSM1182276     2  0.5232     0.1706 0.000 0.492 0.472 0.028 0.008
#> GSM1182277     1  0.2886     0.7018 0.844 0.000 0.000 0.008 0.148
#> GSM1182278     1  0.2522     0.6986 0.880 0.000 0.000 0.012 0.108
#> GSM1182279     1  0.4821     0.4007 0.516 0.000 0.000 0.020 0.464
#> GSM1182280     1  0.4747     0.3137 0.500 0.000 0.000 0.016 0.484
#> GSM1182281     1  0.2325     0.6884 0.904 0.000 0.000 0.028 0.068
#> GSM1182282     1  0.3343     0.7041 0.812 0.000 0.000 0.016 0.172
#> GSM1182283     1  0.3724     0.7179 0.788 0.000 0.000 0.028 0.184
#> GSM1182284     1  0.2628     0.6869 0.884 0.000 0.000 0.028 0.088
#> GSM1182285     3  0.1310     0.7166 0.000 0.020 0.956 0.024 0.000
#> GSM1182286     2  0.3895     0.6160 0.000 0.680 0.320 0.000 0.000
#> GSM1182287     3  0.3134     0.7654 0.000 0.120 0.848 0.032 0.000
#> GSM1182288     3  0.1522     0.7546 0.000 0.044 0.944 0.012 0.000
#> GSM1182289     1  0.4696     0.4529 0.556 0.000 0.000 0.016 0.428
#> GSM1182290     5  0.4302     0.8303 0.248 0.000 0.000 0.032 0.720
#> GSM1182291     1  0.1670     0.6846 0.936 0.000 0.000 0.012 0.052
#> GSM1182274     3  0.2299     0.7505 0.000 0.052 0.912 0.032 0.004
#> GSM1182292     2  0.3395     0.6282 0.000 0.764 0.236 0.000 0.000
#> GSM1182293     2  0.3671     0.6275 0.000 0.756 0.236 0.008 0.000
#> GSM1182294     2  0.4906     0.2476 0.000 0.496 0.480 0.024 0.000
#> GSM1182295     2  0.3612     0.6397 0.000 0.732 0.268 0.000 0.000
#> GSM1182296     2  0.3837     0.6148 0.000 0.692 0.308 0.000 0.000
#> GSM1182298     3  0.3513     0.4996 0.000 0.020 0.800 0.180 0.000
#> GSM1182299     3  0.5120     0.1044 0.000 0.428 0.540 0.008 0.024
#> GSM1182300     3  0.4306    -0.1526 0.000 0.492 0.508 0.000 0.000
#> GSM1182301     2  0.3895     0.6026 0.000 0.680 0.320 0.000 0.000
#> GSM1182303     3  0.4815     0.0341 0.000 0.456 0.524 0.020 0.000
#> GSM1182304     1  0.4656     0.3352 0.508 0.000 0.000 0.012 0.480
#> GSM1182305     1  0.4465     0.6380 0.672 0.000 0.000 0.024 0.304
#> GSM1182306     1  0.2873     0.7115 0.856 0.000 0.000 0.016 0.128
#> GSM1182307     2  0.1197     0.4769 0.000 0.952 0.048 0.000 0.000
#> GSM1182309     2  0.3688     0.5566 0.000 0.808 0.160 0.024 0.008
#> GSM1182312     2  0.3391     0.5455 0.000 0.800 0.188 0.012 0.000
#> GSM1182314     1  0.1597     0.6917 0.940 0.000 0.000 0.012 0.048
#> GSM1182316     2  0.5263     0.4540 0.000 0.616 0.324 0.056 0.004
#> GSM1182318     2  0.2302     0.5191 0.000 0.904 0.080 0.008 0.008
#> GSM1182319     4  0.6496     0.7536 0.000 0.280 0.232 0.488 0.000
#> GSM1182320     2  0.5030     0.3634 0.000 0.688 0.236 0.072 0.004
#> GSM1182321     3  0.4909     0.6742 0.000 0.164 0.716 0.120 0.000
#> GSM1182322     4  0.6088     0.7874 0.000 0.296 0.156 0.548 0.000
#> GSM1182324     3  0.2932     0.7651 0.000 0.104 0.864 0.032 0.000
#> GSM1182297     2  0.2127     0.5633 0.000 0.892 0.108 0.000 0.000
#> GSM1182302     1  0.2997     0.6997 0.840 0.000 0.000 0.012 0.148
#> GSM1182308     2  0.4309     0.6193 0.000 0.676 0.308 0.016 0.000
#> GSM1182310     4  0.6049     0.7864 0.000 0.192 0.232 0.576 0.000
#> GSM1182311     1  0.4508     0.6120 0.648 0.000 0.000 0.020 0.332
#> GSM1182313     1  0.1485     0.6722 0.948 0.000 0.000 0.020 0.032
#> GSM1182315     2  0.2624     0.5244 0.000 0.872 0.116 0.012 0.000
#> GSM1182317     2  0.1942     0.4944 0.000 0.920 0.068 0.012 0.000
#> GSM1182323     1  0.4213     0.6526 0.680 0.000 0.000 0.012 0.308

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5 p6
#> GSM1182186     1   0.192    0.58001 0.904 0.000 0.000 0.088 0.000 NA
#> GSM1182187     1   0.374    0.21960 0.672 0.000 0.000 0.320 0.000 NA
#> GSM1182188     4   0.386    0.54774 0.468 0.000 0.000 0.532 0.000 NA
#> GSM1182189     1   0.275    0.59233 0.864 0.000 0.000 0.068 0.000 NA
#> GSM1182190     1   0.368    0.52886 0.772 0.000 0.000 0.176 0.000 NA
#> GSM1182191     1   0.137    0.59365 0.944 0.000 0.000 0.044 0.000 NA
#> GSM1182192     1   0.326    0.48816 0.780 0.000 0.000 0.204 0.000 NA
#> GSM1182193     1   0.321    0.55003 0.832 0.000 0.000 0.120 0.008 NA
#> GSM1182194     3   0.314    0.69902 0.000 0.000 0.852 0.024 0.084 NA
#> GSM1182195     3   0.218    0.68999 0.000 0.004 0.904 0.016 0.072 NA
#> GSM1182196     3   0.498   -0.03242 0.000 0.444 0.496 0.000 0.056 NA
#> GSM1182197     3   0.596    0.49496 0.000 0.288 0.580 0.016 0.044 NA
#> GSM1182198     3   0.405    0.59471 0.000 0.008 0.776 0.036 0.160 NA
#> GSM1182199     3   0.344    0.64373 0.000 0.012 0.808 0.020 0.156 NA
#> GSM1182200     3   0.655    0.52188 0.000 0.216 0.584 0.036 0.072 NA
#> GSM1182201     3   0.592    0.66104 0.000 0.136 0.668 0.036 0.064 NA
#> GSM1182202     1   0.374    0.10110 0.648 0.000 0.000 0.348 0.000 NA
#> GSM1182203     1   0.389   -0.11341 0.596 0.000 0.000 0.400 0.000 NA
#> GSM1182204     1   0.401   -0.14745 0.584 0.000 0.000 0.408 0.000 NA
#> GSM1182205     3   0.239    0.74721 0.000 0.052 0.896 0.008 0.044 NA
#> GSM1182206     3   0.313    0.70813 0.000 0.168 0.808 0.000 0.024 NA
#> GSM1182207     1   0.343    0.42263 0.720 0.000 0.000 0.004 0.000 NA
#> GSM1182208     1   0.413    0.28244 0.504 0.000 0.000 0.004 0.004 NA
#> GSM1182209     2   0.211    0.36114 0.000 0.916 0.008 0.052 0.016 NA
#> GSM1182210     2   0.403    0.66124 0.000 0.712 0.256 0.020 0.012 NA
#> GSM1182211     2   0.283    0.48989 0.000 0.880 0.056 0.028 0.032 NA
#> GSM1182212     2   0.582    0.26452 0.000 0.476 0.428 0.032 0.044 NA
#> GSM1182213     2   0.395    0.64203 0.000 0.684 0.296 0.004 0.016 NA
#> GSM1182214     2   0.200    0.57217 0.000 0.908 0.076 0.004 0.012 NA
#> GSM1182215     3   0.343    0.73293 0.000 0.112 0.820 0.008 0.060 NA
#> GSM1182216     2   0.452    0.50710 0.000 0.592 0.376 0.012 0.020 NA
#> GSM1182217     1   0.387   -0.08253 0.604 0.000 0.000 0.392 0.000 NA
#> GSM1182218     1   0.395    0.46097 0.744 0.000 0.000 0.196 0.000 NA
#> GSM1182219     2   0.437    0.31862 0.000 0.540 0.440 0.000 0.016 NA
#> GSM1182220     2   0.490    0.34221 0.000 0.520 0.436 0.004 0.028 NA
#> GSM1182221     2   0.363    0.61363 0.000 0.752 0.224 0.004 0.020 NA
#> GSM1182222     3   0.390    0.39862 0.000 0.336 0.652 0.000 0.012 NA
#> GSM1182223     3   0.337    0.74076 0.000 0.112 0.832 0.008 0.040 NA
#> GSM1182224     3   0.200    0.71197 0.000 0.012 0.912 0.008 0.068 NA
#> GSM1182225     3   0.430   -0.08646 0.000 0.456 0.528 0.004 0.012 NA
#> GSM1182226     2   0.508    0.18395 0.000 0.476 0.460 0.008 0.056 NA
#> GSM1182227     1   0.526    0.29072 0.620 0.000 0.000 0.276 0.024 NA
#> GSM1182228     3   0.398    0.66344 0.000 0.228 0.736 0.008 0.024 NA
#> GSM1182229     3   0.218    0.73481 0.000 0.132 0.868 0.000 0.000 NA
#> GSM1182230     3   0.296    0.74018 0.000 0.120 0.840 0.000 0.040 NA
#> GSM1182231     3   0.351    0.64121 0.000 0.240 0.744 0.000 0.016 NA
#> GSM1182232     1   0.241    0.59568 0.880 0.000 0.000 0.092 0.000 NA
#> GSM1182233     1   0.126    0.59840 0.952 0.000 0.000 0.020 0.000 NA
#> GSM1182234     1   0.495    0.22412 0.616 0.000 0.000 0.284 0.000 NA
#> GSM1182235     2   0.363    0.66698 0.000 0.756 0.212 0.000 0.032 NA
#> GSM1182236     1   0.246    0.59270 0.880 0.000 0.000 0.084 0.000 NA
#> GSM1182237     3   0.525    0.55209 0.000 0.272 0.608 0.008 0.112 NA
#> GSM1182238     2   0.365    0.65798 0.000 0.756 0.216 0.004 0.024 NA
#> GSM1182239     2   0.468    0.51801 0.000 0.600 0.356 0.004 0.036 NA
#> GSM1182240     2   0.485    0.60445 0.000 0.624 0.320 0.020 0.032 NA
#> GSM1182241     3   0.428    0.50862 0.000 0.320 0.644 0.000 0.036 NA
#> GSM1182242     3   0.352    0.74696 0.000 0.072 0.844 0.032 0.032 NA
#> GSM1182243     3   0.186    0.74174 0.000 0.104 0.896 0.000 0.000 NA
#> GSM1182244     3   0.445    0.69904 0.000 0.152 0.724 0.004 0.120 NA
#> GSM1182245     4   0.475    0.58352 0.452 0.000 0.000 0.500 0.000 NA
#> GSM1182246     4   0.343    0.83020 0.304 0.000 0.000 0.696 0.000 NA
#> GSM1182247     3   0.398    0.73405 0.000 0.048 0.812 0.012 0.084 NA
#> GSM1182248     3   0.118    0.74174 0.000 0.024 0.960 0.004 0.004 NA
#> GSM1182249     3   0.408    0.62812 0.000 0.252 0.704 0.000 0.044 NA
#> GSM1182250     3   0.274    0.74630 0.000 0.120 0.852 0.000 0.028 NA
#> GSM1182251     1   0.203    0.60181 0.908 0.000 0.000 0.064 0.000 NA
#> GSM1182252     3   0.235    0.75395 0.000 0.064 0.900 0.004 0.024 NA
#> GSM1182253     3   0.248    0.73736 0.000 0.028 0.896 0.028 0.048 NA
#> GSM1182254     3   0.204    0.74907 0.000 0.068 0.912 0.008 0.004 NA
#> GSM1182255     4   0.355    0.83459 0.332 0.000 0.000 0.668 0.000 NA
#> GSM1182256     4   0.346    0.83637 0.312 0.000 0.000 0.688 0.000 NA
#> GSM1182257     4   0.441    0.81359 0.336 0.000 0.000 0.624 0.000 NA
#> GSM1182258     4   0.353    0.83577 0.328 0.000 0.000 0.672 0.000 NA
#> GSM1182259     4   0.407    0.82807 0.300 0.000 0.000 0.672 0.000 NA
#> GSM1182260     3   0.551    0.68921 0.000 0.156 0.680 0.008 0.088 NA
#> GSM1182261     3   0.306    0.73290 0.000 0.144 0.824 0.000 0.032 NA
#> GSM1182262     3   0.289    0.74585 0.000 0.108 0.852 0.004 0.036 NA
#> GSM1182263     1   0.397    0.51929 0.760 0.000 0.000 0.148 0.000 NA
#> GSM1182264     3   0.572    0.67035 0.000 0.128 0.676 0.016 0.104 NA
#> GSM1182265     3   0.591    0.65028 0.000 0.136 0.632 0.024 0.180 NA
#> GSM1182266     3   0.588    0.64269 0.000 0.108 0.672 0.028 0.076 NA
#> GSM1182267     1   0.502   -0.27203 0.532 0.000 0.000 0.392 0.000 NA
#> GSM1182268     1   0.286    0.58312 0.856 0.000 0.000 0.072 0.000 NA
#> GSM1182269     1   0.380    0.46975 0.748 0.000 0.000 0.208 0.000 NA
#> GSM1182270     1   0.238    0.59344 0.884 0.000 0.000 0.084 0.000 NA
#> GSM1182271     4   0.364    0.83794 0.320 0.000 0.000 0.676 0.000 NA
#> GSM1182272     4   0.390    0.82875 0.296 0.000 0.000 0.684 0.000 NA
#> GSM1182273     3   0.323    0.68976 0.000 0.028 0.860 0.028 0.016 NA
#> GSM1182275     3   0.460    0.72467 0.000 0.112 0.768 0.028 0.064 NA
#> GSM1182276     2   0.575    0.35250 0.000 0.488 0.420 0.028 0.044 NA
#> GSM1182277     1   0.473   -0.35935 0.520 0.000 0.000 0.432 0.000 NA
#> GSM1182278     1   0.460   -0.23018 0.544 0.000 0.000 0.416 0.000 NA
#> GSM1182279     1   0.236    0.57753 0.884 0.000 0.000 0.028 0.000 NA
#> GSM1182280     1   0.235    0.55396 0.880 0.000 0.000 0.020 0.000 NA
#> GSM1182281     4   0.388    0.82472 0.332 0.000 0.000 0.656 0.000 NA
#> GSM1182282     4   0.475    0.58559 0.444 0.000 0.000 0.508 0.000 NA
#> GSM1182283     1   0.483    0.10102 0.608 0.000 0.004 0.324 0.000 NA
#> GSM1182284     4   0.540    0.55330 0.412 0.000 0.000 0.492 0.008 NA
#> GSM1182285     3   0.194    0.72962 0.000 0.012 0.928 0.016 0.036 NA
#> GSM1182286     2   0.373    0.65639 0.000 0.716 0.264 0.000 0.020 NA
#> GSM1182287     3   0.273    0.74068 0.000 0.124 0.856 0.012 0.004 NA
#> GSM1182288     3   0.199    0.74643 0.000 0.040 0.924 0.008 0.020 NA
#> GSM1182289     1   0.404    0.46549 0.744 0.000 0.000 0.180 0.000 NA
#> GSM1182290     1   0.441    0.31384 0.560 0.000 0.000 0.020 0.004 NA
#> GSM1182291     4   0.346    0.83595 0.312 0.000 0.000 0.688 0.000 NA
#> GSM1182274     3   0.506    0.63727 0.000 0.080 0.724 0.048 0.012 NA
#> GSM1182292     2   0.353    0.58943 0.000 0.820 0.124 0.032 0.020 NA
#> GSM1182293     2   0.308    0.60974 0.000 0.844 0.112 0.004 0.036 NA
#> GSM1182294     2   0.473    0.61365 0.000 0.636 0.284 0.000 0.080 NA
#> GSM1182295     2   0.307    0.66985 0.000 0.788 0.204 0.000 0.008 NA
#> GSM1182296     2   0.402    0.65900 0.000 0.748 0.204 0.028 0.020 NA
#> GSM1182298     3   0.421    0.57260 0.000 0.016 0.740 0.028 0.208 NA
#> GSM1182299     3   0.584   -0.00833 0.000 0.432 0.452 0.004 0.024 NA
#> GSM1182300     2   0.412    0.54016 0.000 0.628 0.352 0.000 0.020 NA
#> GSM1182301     2   0.439    0.60200 0.000 0.760 0.160 0.040 0.024 NA
#> GSM1182303     3   0.538   -0.08585 0.000 0.436 0.496 0.020 0.032 NA
#> GSM1182304     1   0.201    0.56785 0.904 0.000 0.000 0.016 0.000 NA
#> GSM1182305     1   0.291    0.57452 0.848 0.000 0.000 0.104 0.000 NA
#> GSM1182306     1   0.370    0.02271 0.624 0.000 0.000 0.376 0.000 NA
#> GSM1182307     2   0.178    0.45683 0.000 0.936 0.020 0.020 0.020 NA
#> GSM1182309     2   0.347    0.55704 0.000 0.816 0.088 0.000 0.092 NA
#> GSM1182312     2   0.335    0.59736 0.000 0.828 0.112 0.004 0.052 NA
#> GSM1182314     4   0.367    0.76844 0.368 0.000 0.000 0.632 0.000 NA
#> GSM1182316     2   0.401    0.54032 0.000 0.768 0.124 0.004 0.104 NA
#> GSM1182318     2   0.271    0.55518 0.000 0.884 0.068 0.008 0.024 NA
#> GSM1182319     5   0.534    0.54169 0.000 0.360 0.116 0.000 0.524 NA
#> GSM1182320     2   0.434    0.41397 0.000 0.764 0.108 0.012 0.108 NA
#> GSM1182321     3   0.666    0.26598 0.000 0.224 0.456 0.048 0.272 NA
#> GSM1182322     5   0.407    0.73343 0.000 0.344 0.008 0.008 0.640 NA
#> GSM1182324     3   0.494    0.64744 0.000 0.172 0.688 0.016 0.124 NA
#> GSM1182297     2   0.278    0.63168 0.000 0.848 0.124 0.000 0.028 NA
#> GSM1182302     1   0.424   -0.31693 0.540 0.000 0.000 0.444 0.000 NA
#> GSM1182308     2   0.396    0.66221 0.000 0.696 0.280 0.000 0.020 NA
#> GSM1182310     5   0.482    0.73014 0.000 0.244 0.084 0.008 0.664 NA
#> GSM1182311     1   0.194    0.59817 0.920 0.000 0.000 0.040 0.004 NA
#> GSM1182313     4   0.395    0.63531 0.432 0.000 0.000 0.564 0.000 NA
#> GSM1182315     2   0.314    0.44645 0.000 0.848 0.056 0.012 0.084 NA
#> GSM1182317     2   0.161    0.45313 0.000 0.940 0.016 0.004 0.036 NA
#> GSM1182323     1   0.230    0.57825 0.872 0.000 0.000 0.120 0.000 NA

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 disease.state(p) gender(p) k
#> CV:NMF 139         7.73e-02     1.000 2
#> CV:NMF 139         7.73e-02     1.000 3
#> CV:NMF 112         3.10e-02     0.784 4
#> CV:NMF 111         5.13e-08     0.148 5
#> CV:NMF 101         1.54e-06     0.274 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 46361 rows and 139 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 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-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 1.000           1.000       1.000         0.4791 0.521   0.521
#> 3 3 1.000           0.972       0.988         0.1533 0.927   0.859
#> 4 4 0.777           0.787       0.897         0.2236 0.840   0.643
#> 5 5 0.716           0.674       0.803         0.0590 0.963   0.873
#> 6 6 0.663           0.678       0.771         0.0376 0.909   0.683

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
#> GSM1182186     1       0          1  1  0
#> GSM1182187     1       0          1  1  0
#> GSM1182188     1       0          1  1  0
#> GSM1182189     1       0          1  1  0
#> GSM1182190     1       0          1  1  0
#> GSM1182191     1       0          1  1  0
#> GSM1182192     1       0          1  1  0
#> GSM1182193     1       0          1  1  0
#> GSM1182194     2       0          1  0  1
#> GSM1182195     2       0          1  0  1
#> GSM1182196     2       0          1  0  1
#> GSM1182197     2       0          1  0  1
#> GSM1182198     2       0          1  0  1
#> GSM1182199     2       0          1  0  1
#> GSM1182200     2       0          1  0  1
#> GSM1182201     2       0          1  0  1
#> GSM1182202     1       0          1  1  0
#> GSM1182203     1       0          1  1  0
#> GSM1182204     1       0          1  1  0
#> GSM1182205     2       0          1  0  1
#> GSM1182206     2       0          1  0  1
#> GSM1182207     1       0          1  1  0
#> GSM1182208     1       0          1  1  0
#> GSM1182209     2       0          1  0  1
#> GSM1182210     2       0          1  0  1
#> GSM1182211     2       0          1  0  1
#> GSM1182212     2       0          1  0  1
#> GSM1182213     2       0          1  0  1
#> GSM1182214     2       0          1  0  1
#> GSM1182215     2       0          1  0  1
#> GSM1182216     2       0          1  0  1
#> GSM1182217     1       0          1  1  0
#> GSM1182218     1       0          1  1  0
#> GSM1182219     2       0          1  0  1
#> GSM1182220     2       0          1  0  1
#> GSM1182221     2       0          1  0  1
#> GSM1182222     2       0          1  0  1
#> GSM1182223     2       0          1  0  1
#> GSM1182224     2       0          1  0  1
#> GSM1182225     2       0          1  0  1
#> GSM1182226     2       0          1  0  1
#> GSM1182227     1       0          1  1  0
#> GSM1182228     2       0          1  0  1
#> GSM1182229     2       0          1  0  1
#> GSM1182230     2       0          1  0  1
#> GSM1182231     2       0          1  0  1
#> GSM1182232     1       0          1  1  0
#> GSM1182233     1       0          1  1  0
#> GSM1182234     1       0          1  1  0
#> GSM1182235     2       0          1  0  1
#> GSM1182236     1       0          1  1  0
#> GSM1182237     2       0          1  0  1
#> GSM1182238     2       0          1  0  1
#> GSM1182239     2       0          1  0  1
#> GSM1182240     2       0          1  0  1
#> GSM1182241     2       0          1  0  1
#> GSM1182242     2       0          1  0  1
#> GSM1182243     2       0          1  0  1
#> GSM1182244     2       0          1  0  1
#> GSM1182245     1       0          1  1  0
#> GSM1182246     1       0          1  1  0
#> GSM1182247     2       0          1  0  1
#> GSM1182248     2       0          1  0  1
#> GSM1182249     2       0          1  0  1
#> GSM1182250     2       0          1  0  1
#> GSM1182251     1       0          1  1  0
#> GSM1182252     2       0          1  0  1
#> GSM1182253     2       0          1  0  1
#> GSM1182254     2       0          1  0  1
#> GSM1182255     1       0          1  1  0
#> GSM1182256     1       0          1  1  0
#> GSM1182257     1       0          1  1  0
#> GSM1182258     1       0          1  1  0
#> GSM1182259     1       0          1  1  0
#> GSM1182260     2       0          1  0  1
#> GSM1182261     2       0          1  0  1
#> GSM1182262     2       0          1  0  1
#> GSM1182263     1       0          1  1  0
#> GSM1182264     2       0          1  0  1
#> GSM1182265     2       0          1  0  1
#> GSM1182266     2       0          1  0  1
#> GSM1182267     1       0          1  1  0
#> GSM1182268     1       0          1  1  0
#> GSM1182269     1       0          1  1  0
#> GSM1182270     1       0          1  1  0
#> GSM1182271     1       0          1  1  0
#> GSM1182272     1       0          1  1  0
#> GSM1182273     2       0          1  0  1
#> GSM1182275     2       0          1  0  1
#> GSM1182276     2       0          1  0  1
#> GSM1182277     1       0          1  1  0
#> GSM1182278     1       0          1  1  0
#> GSM1182279     1       0          1  1  0
#> GSM1182280     1       0          1  1  0
#> GSM1182281     1       0          1  1  0
#> GSM1182282     1       0          1  1  0
#> GSM1182283     1       0          1  1  0
#> GSM1182284     1       0          1  1  0
#> GSM1182285     2       0          1  0  1
#> GSM1182286     2       0          1  0  1
#> GSM1182287     2       0          1  0  1
#> GSM1182288     2       0          1  0  1
#> GSM1182289     1       0          1  1  0
#> GSM1182290     1       0          1  1  0
#> GSM1182291     1       0          1  1  0
#> GSM1182274     2       0          1  0  1
#> GSM1182292     2       0          1  0  1
#> GSM1182293     2       0          1  0  1
#> GSM1182294     2       0          1  0  1
#> GSM1182295     2       0          1  0  1
#> GSM1182296     2       0          1  0  1
#> GSM1182298     2       0          1  0  1
#> GSM1182299     2       0          1  0  1
#> GSM1182300     2       0          1  0  1
#> GSM1182301     2       0          1  0  1
#> GSM1182303     2       0          1  0  1
#> GSM1182304     1       0          1  1  0
#> GSM1182305     1       0          1  1  0
#> GSM1182306     1       0          1  1  0
#> GSM1182307     2       0          1  0  1
#> GSM1182309     2       0          1  0  1
#> GSM1182312     2       0          1  0  1
#> GSM1182314     1       0          1  1  0
#> GSM1182316     2       0          1  0  1
#> GSM1182318     2       0          1  0  1
#> GSM1182319     2       0          1  0  1
#> GSM1182320     2       0          1  0  1
#> GSM1182321     2       0          1  0  1
#> GSM1182322     2       0          1  0  1
#> GSM1182324     2       0          1  0  1
#> GSM1182297     2       0          1  0  1
#> GSM1182302     1       0          1  1  0
#> GSM1182308     2       0          1  0  1
#> GSM1182310     2       0          1  0  1
#> GSM1182311     1       0          1  1  0
#> GSM1182313     1       0          1  1  0
#> GSM1182315     2       0          1  0  1
#> GSM1182317     2       0          1  0  1
#> GSM1182323     1       0          1  1  0

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1 p2    p3
#> GSM1182186     1  0.0000    0.96070 1.000  0 0.000
#> GSM1182187     1  0.5988    0.45649 0.632  0 0.368
#> GSM1182188     3  0.0000    0.97567 0.000  0 1.000
#> GSM1182189     1  0.0237    0.96014 0.996  0 0.004
#> GSM1182190     1  0.0000    0.96070 1.000  0 0.000
#> GSM1182191     1  0.0000    0.96070 1.000  0 0.000
#> GSM1182192     3  0.0000    0.97567 0.000  0 1.000
#> GSM1182193     3  0.0000    0.97567 0.000  0 1.000
#> GSM1182194     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182195     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182196     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182197     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182198     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182199     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182200     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182201     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182202     1  0.0000    0.96070 1.000  0 0.000
#> GSM1182203     1  0.1031    0.95264 0.976  0 0.024
#> GSM1182204     1  0.1031    0.95264 0.976  0 0.024
#> GSM1182205     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182206     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182207     1  0.0237    0.96031 0.996  0 0.004
#> GSM1182208     1  0.0237    0.96031 0.996  0 0.004
#> GSM1182209     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182210     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182211     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182212     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182213     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182214     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182215     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182216     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182217     1  0.0000    0.96070 1.000  0 0.000
#> GSM1182218     1  0.0000    0.96070 1.000  0 0.000
#> GSM1182219     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182220     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182221     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182222     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182223     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182224     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182225     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182226     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182227     3  0.0000    0.97567 0.000  0 1.000
#> GSM1182228     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182229     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182230     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182231     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182232     1  0.2448    0.91510 0.924  0 0.076
#> GSM1182233     1  0.2448    0.91510 0.924  0 0.076
#> GSM1182234     3  0.6295   -0.00815 0.472  0 0.528
#> GSM1182235     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182236     1  0.0000    0.96070 1.000  0 0.000
#> GSM1182237     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182238     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182239     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182240     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182241     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182242     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182243     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182244     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182245     3  0.0000    0.97567 0.000  0 1.000
#> GSM1182246     3  0.0000    0.97567 0.000  0 1.000
#> GSM1182247     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182248     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182249     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182250     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182251     1  0.0237    0.96031 0.996  0 0.004
#> GSM1182252     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182253     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182254     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182255     3  0.0000    0.97567 0.000  0 1.000
#> GSM1182256     3  0.0000    0.97567 0.000  0 1.000
#> GSM1182257     1  0.2066    0.93143 0.940  0 0.060
#> GSM1182258     3  0.0000    0.97567 0.000  0 1.000
#> GSM1182259     3  0.0000    0.97567 0.000  0 1.000
#> GSM1182260     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182261     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182262     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182263     1  0.1753    0.93957 0.952  0 0.048
#> GSM1182264     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182265     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182266     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182267     1  0.5431    0.63731 0.716  0 0.284
#> GSM1182268     1  0.3340    0.87346 0.880  0 0.120
#> GSM1182269     1  0.0000    0.96070 1.000  0 0.000
#> GSM1182270     1  0.0000    0.96070 1.000  0 0.000
#> GSM1182271     3  0.0000    0.97567 0.000  0 1.000
#> GSM1182272     3  0.0000    0.97567 0.000  0 1.000
#> GSM1182273     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182275     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182276     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182277     3  0.0000    0.97567 0.000  0 1.000
#> GSM1182278     3  0.0000    0.97567 0.000  0 1.000
#> GSM1182279     1  0.0000    0.96070 1.000  0 0.000
#> GSM1182280     1  0.0000    0.96070 1.000  0 0.000
#> GSM1182281     3  0.0000    0.97567 0.000  0 1.000
#> GSM1182282     3  0.0000    0.97567 0.000  0 1.000
#> GSM1182283     3  0.0000    0.97567 0.000  0 1.000
#> GSM1182284     3  0.0000    0.97567 0.000  0 1.000
#> GSM1182285     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182286     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182287     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182288     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182289     1  0.0237    0.96031 0.996  0 0.004
#> GSM1182290     1  0.0237    0.96031 0.996  0 0.004
#> GSM1182291     3  0.0000    0.97567 0.000  0 1.000
#> GSM1182274     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182292     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182293     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182294     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182295     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182296     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182298     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182299     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182300     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182301     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182303     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182304     1  0.0000    0.96070 1.000  0 0.000
#> GSM1182305     1  0.1860    0.93719 0.948  0 0.052
#> GSM1182306     1  0.1964    0.93423 0.944  0 0.056
#> GSM1182307     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182309     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182312     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182314     3  0.0000    0.97567 0.000  0 1.000
#> GSM1182316     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182318     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182319     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182320     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182321     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182322     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182324     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182297     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182302     1  0.0000    0.96070 1.000  0 0.000
#> GSM1182308     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182310     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182311     1  0.0000    0.96070 1.000  0 0.000
#> GSM1182313     3  0.0000    0.97567 0.000  0 1.000
#> GSM1182315     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182317     2  0.0000    1.00000 0.000  1 0.000
#> GSM1182323     1  0.0000    0.96070 1.000  0 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1182186     1  0.0000    0.96070 1.000 0.000 0.000 0.000
#> GSM1182187     1  0.4746    0.45649 0.632 0.000 0.000 0.368
#> GSM1182188     4  0.0000    0.97567 0.000 0.000 0.000 1.000
#> GSM1182189     1  0.0188    0.96014 0.996 0.000 0.000 0.004
#> GSM1182190     1  0.0000    0.96070 1.000 0.000 0.000 0.000
#> GSM1182191     1  0.0000    0.96070 1.000 0.000 0.000 0.000
#> GSM1182192     4  0.0000    0.97567 0.000 0.000 0.000 1.000
#> GSM1182193     4  0.0000    0.97567 0.000 0.000 0.000 1.000
#> GSM1182194     3  0.0188    0.49833 0.000 0.004 0.996 0.000
#> GSM1182195     3  0.0000    0.49353 0.000 0.000 1.000 0.000
#> GSM1182196     2  0.2589    0.71769 0.000 0.884 0.116 0.000
#> GSM1182197     2  0.3726    0.50825 0.000 0.788 0.212 0.000
#> GSM1182198     3  0.0000    0.49353 0.000 0.000 1.000 0.000
#> GSM1182199     3  0.0000    0.49353 0.000 0.000 1.000 0.000
#> GSM1182200     2  0.0188    0.87884 0.000 0.996 0.004 0.000
#> GSM1182201     2  0.0188    0.87884 0.000 0.996 0.004 0.000
#> GSM1182202     1  0.0000    0.96070 1.000 0.000 0.000 0.000
#> GSM1182203     1  0.0817    0.95264 0.976 0.000 0.000 0.024
#> GSM1182204     1  0.0817    0.95264 0.976 0.000 0.000 0.024
#> GSM1182205     3  0.4605    0.74522 0.000 0.336 0.664 0.000
#> GSM1182206     3  0.4605    0.74522 0.000 0.336 0.664 0.000
#> GSM1182207     1  0.0188    0.96031 0.996 0.000 0.000 0.004
#> GSM1182208     1  0.0188    0.96031 0.996 0.000 0.000 0.004
#> GSM1182209     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182210     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182211     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182212     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182213     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182214     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182215     3  0.4907    0.72880 0.000 0.420 0.580 0.000
#> GSM1182216     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182217     1  0.0000    0.96070 1.000 0.000 0.000 0.000
#> GSM1182218     1  0.0000    0.96070 1.000 0.000 0.000 0.000
#> GSM1182219     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182220     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182221     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182222     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182223     3  0.4994    0.64669 0.000 0.480 0.520 0.000
#> GSM1182224     3  0.4331    0.72828 0.000 0.288 0.712 0.000
#> GSM1182225     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182226     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182227     4  0.0000    0.97567 0.000 0.000 0.000 1.000
#> GSM1182228     3  0.4985    0.67108 0.000 0.468 0.532 0.000
#> GSM1182229     3  0.4955    0.71026 0.000 0.444 0.556 0.000
#> GSM1182230     3  0.4898    0.73080 0.000 0.416 0.584 0.000
#> GSM1182231     3  0.4907    0.72880 0.000 0.420 0.580 0.000
#> GSM1182232     1  0.1940    0.91510 0.924 0.000 0.000 0.076
#> GSM1182233     1  0.1940    0.91510 0.924 0.000 0.000 0.076
#> GSM1182234     4  0.4989   -0.00815 0.472 0.000 0.000 0.528
#> GSM1182235     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182236     1  0.0000    0.96070 1.000 0.000 0.000 0.000
#> GSM1182237     3  0.4907    0.72880 0.000 0.420 0.580 0.000
#> GSM1182238     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182239     2  0.0469    0.87051 0.000 0.988 0.012 0.000
#> GSM1182240     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182241     2  0.0188    0.87884 0.000 0.996 0.004 0.000
#> GSM1182242     3  0.4948    0.71506 0.000 0.440 0.560 0.000
#> GSM1182243     2  0.4713   -0.03595 0.000 0.640 0.360 0.000
#> GSM1182244     3  0.4331    0.72828 0.000 0.288 0.712 0.000
#> GSM1182245     4  0.0000    0.97567 0.000 0.000 0.000 1.000
#> GSM1182246     4  0.0000    0.97567 0.000 0.000 0.000 1.000
#> GSM1182247     3  0.4933    0.72371 0.000 0.432 0.568 0.000
#> GSM1182248     3  0.4933    0.72371 0.000 0.432 0.568 0.000
#> GSM1182249     2  0.4730   -0.05577 0.000 0.636 0.364 0.000
#> GSM1182250     2  0.4730   -0.05577 0.000 0.636 0.364 0.000
#> GSM1182251     1  0.0188    0.96031 0.996 0.000 0.000 0.004
#> GSM1182252     3  0.4933    0.72371 0.000 0.432 0.568 0.000
#> GSM1182253     3  0.4955    0.70756 0.000 0.444 0.556 0.000
#> GSM1182254     2  0.4989   -0.52115 0.000 0.528 0.472 0.000
#> GSM1182255     4  0.0000    0.97567 0.000 0.000 0.000 1.000
#> GSM1182256     4  0.0000    0.97567 0.000 0.000 0.000 1.000
#> GSM1182257     1  0.1637    0.93143 0.940 0.000 0.000 0.060
#> GSM1182258     4  0.0000    0.97567 0.000 0.000 0.000 1.000
#> GSM1182259     4  0.0000    0.97567 0.000 0.000 0.000 1.000
#> GSM1182260     2  0.4713   -0.02448 0.000 0.640 0.360 0.000
#> GSM1182261     3  0.4907    0.72880 0.000 0.420 0.580 0.000
#> GSM1182262     3  0.4907    0.72880 0.000 0.420 0.580 0.000
#> GSM1182263     1  0.1389    0.93957 0.952 0.000 0.000 0.048
#> GSM1182264     2  0.4713   -0.02448 0.000 0.640 0.360 0.000
#> GSM1182265     2  0.4713   -0.02448 0.000 0.640 0.360 0.000
#> GSM1182266     2  0.4713   -0.02448 0.000 0.640 0.360 0.000
#> GSM1182267     1  0.4304    0.63731 0.716 0.000 0.000 0.284
#> GSM1182268     1  0.2647    0.87346 0.880 0.000 0.000 0.120
#> GSM1182269     1  0.0000    0.96070 1.000 0.000 0.000 0.000
#> GSM1182270     1  0.0000    0.96070 1.000 0.000 0.000 0.000
#> GSM1182271     4  0.0000    0.97567 0.000 0.000 0.000 1.000
#> GSM1182272     4  0.0000    0.97567 0.000 0.000 0.000 1.000
#> GSM1182273     2  0.4713   -0.02448 0.000 0.640 0.360 0.000
#> GSM1182275     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182276     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182277     4  0.0000    0.97567 0.000 0.000 0.000 1.000
#> GSM1182278     4  0.0000    0.97567 0.000 0.000 0.000 1.000
#> GSM1182279     1  0.0000    0.96070 1.000 0.000 0.000 0.000
#> GSM1182280     1  0.0000    0.96070 1.000 0.000 0.000 0.000
#> GSM1182281     4  0.0000    0.97567 0.000 0.000 0.000 1.000
#> GSM1182282     4  0.0000    0.97567 0.000 0.000 0.000 1.000
#> GSM1182283     4  0.0000    0.97567 0.000 0.000 0.000 1.000
#> GSM1182284     4  0.0000    0.97567 0.000 0.000 0.000 1.000
#> GSM1182285     3  0.4356    0.73012 0.000 0.292 0.708 0.000
#> GSM1182286     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182287     3  0.4996    0.63714 0.000 0.484 0.516 0.000
#> GSM1182288     3  0.4941    0.71893 0.000 0.436 0.564 0.000
#> GSM1182289     1  0.0188    0.96031 0.996 0.000 0.000 0.004
#> GSM1182290     1  0.0188    0.96031 0.996 0.000 0.000 0.004
#> GSM1182291     4  0.0000    0.97567 0.000 0.000 0.000 1.000
#> GSM1182274     2  0.4713   -0.02448 0.000 0.640 0.360 0.000
#> GSM1182292     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182293     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182294     2  0.0188    0.87869 0.000 0.996 0.004 0.000
#> GSM1182295     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182296     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182298     3  0.0000    0.49353 0.000 0.000 1.000 0.000
#> GSM1182299     2  0.0336    0.87482 0.000 0.992 0.008 0.000
#> GSM1182300     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182301     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182303     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182304     1  0.0000    0.96070 1.000 0.000 0.000 0.000
#> GSM1182305     1  0.1474    0.93719 0.948 0.000 0.000 0.052
#> GSM1182306     1  0.1557    0.93423 0.944 0.000 0.000 0.056
#> GSM1182307     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182309     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182312     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182314     4  0.0000    0.97567 0.000 0.000 0.000 1.000
#> GSM1182316     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182318     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182319     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182320     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182321     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182322     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182324     2  0.0817    0.85583 0.000 0.976 0.024 0.000
#> GSM1182297     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182302     1  0.0000    0.96070 1.000 0.000 0.000 0.000
#> GSM1182308     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182310     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182311     1  0.0000    0.96070 1.000 0.000 0.000 0.000
#> GSM1182313     4  0.0000    0.97567 0.000 0.000 0.000 1.000
#> GSM1182315     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182317     2  0.0000    0.88225 0.000 1.000 0.000 0.000
#> GSM1182323     1  0.0000    0.96070 1.000 0.000 0.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
#> GSM1182186     5  0.4101      0.440 0.372 0.000 0.000 0.000 0.628
#> GSM1182187     5  0.4570      0.118 0.020 0.000 0.000 0.348 0.632
#> GSM1182188     4  0.0566      0.940 0.012 0.000 0.000 0.984 0.004
#> GSM1182189     1  0.3949      0.756 0.668 0.000 0.000 0.000 0.332
#> GSM1182190     1  0.3949      0.763 0.668 0.000 0.000 0.000 0.332
#> GSM1182191     5  0.4101      0.440 0.372 0.000 0.000 0.000 0.628
#> GSM1182192     4  0.2843      0.919 0.144 0.000 0.000 0.848 0.008
#> GSM1182193     4  0.2843      0.919 0.144 0.000 0.000 0.848 0.008
#> GSM1182194     3  0.2439      0.509 0.120 0.004 0.876 0.000 0.000
#> GSM1182195     3  0.2377      0.498 0.128 0.000 0.872 0.000 0.000
#> GSM1182196     2  0.3460      0.715 0.044 0.828 0.128 0.000 0.000
#> GSM1182197     2  0.3876      0.337 0.000 0.684 0.316 0.000 0.000
#> GSM1182198     3  0.2377      0.498 0.128 0.000 0.872 0.000 0.000
#> GSM1182199     3  0.2377      0.498 0.128 0.000 0.872 0.000 0.000
#> GSM1182200     2  0.1568      0.826 0.036 0.944 0.020 0.000 0.000
#> GSM1182201     2  0.1568      0.826 0.036 0.944 0.020 0.000 0.000
#> GSM1182202     5  0.0703      0.487 0.024 0.000 0.000 0.000 0.976
#> GSM1182203     5  0.0693      0.486 0.008 0.000 0.000 0.012 0.980
#> GSM1182204     5  0.0693      0.486 0.008 0.000 0.000 0.012 0.980
#> GSM1182205     3  0.3366      0.779 0.000 0.232 0.768 0.000 0.000
#> GSM1182206     3  0.3366      0.779 0.000 0.232 0.768 0.000 0.000
#> GSM1182207     5  0.4074      0.443 0.364 0.000 0.000 0.000 0.636
#> GSM1182208     5  0.4074      0.443 0.364 0.000 0.000 0.000 0.636
#> GSM1182209     2  0.1270      0.815 0.052 0.948 0.000 0.000 0.000
#> GSM1182210     2  0.1270      0.815 0.052 0.948 0.000 0.000 0.000
#> GSM1182211     2  0.1270      0.815 0.052 0.948 0.000 0.000 0.000
#> GSM1182212     2  0.1270      0.815 0.052 0.948 0.000 0.000 0.000
#> GSM1182213     2  0.0510      0.834 0.016 0.984 0.000 0.000 0.000
#> GSM1182214     2  0.1270      0.815 0.052 0.948 0.000 0.000 0.000
#> GSM1182215     3  0.3876      0.775 0.000 0.316 0.684 0.000 0.000
#> GSM1182216     2  0.0404      0.839 0.000 0.988 0.012 0.000 0.000
#> GSM1182217     5  0.0963      0.480 0.036 0.000 0.000 0.000 0.964
#> GSM1182218     1  0.3949      0.763 0.668 0.000 0.000 0.000 0.332
#> GSM1182219     2  0.0324      0.838 0.004 0.992 0.004 0.000 0.000
#> GSM1182220     2  0.0324      0.838 0.004 0.992 0.004 0.000 0.000
#> GSM1182221     2  0.0404      0.839 0.000 0.988 0.012 0.000 0.000
#> GSM1182222     2  0.0404      0.839 0.000 0.988 0.012 0.000 0.000
#> GSM1182223     3  0.4114      0.715 0.000 0.376 0.624 0.000 0.000
#> GSM1182224     3  0.2966      0.758 0.000 0.184 0.816 0.000 0.000
#> GSM1182225     2  0.0404      0.839 0.000 0.988 0.012 0.000 0.000
#> GSM1182226     2  0.0404      0.839 0.000 0.988 0.012 0.000 0.000
#> GSM1182227     4  0.2843      0.919 0.144 0.000 0.000 0.848 0.008
#> GSM1182228     3  0.4074      0.734 0.000 0.364 0.636 0.000 0.000
#> GSM1182229     3  0.3983      0.763 0.000 0.340 0.660 0.000 0.000
#> GSM1182230     3  0.3857      0.777 0.000 0.312 0.688 0.000 0.000
#> GSM1182231     3  0.3876      0.775 0.000 0.316 0.684 0.000 0.000
#> GSM1182232     1  0.3707      0.711 0.716 0.000 0.000 0.000 0.284
#> GSM1182233     1  0.3707      0.711 0.716 0.000 0.000 0.000 0.284
#> GSM1182234     1  0.6213      0.148 0.452 0.000 0.000 0.408 0.140
#> GSM1182235     2  0.0404      0.839 0.000 0.988 0.012 0.000 0.000
#> GSM1182236     1  0.3949      0.763 0.668 0.000 0.000 0.000 0.332
#> GSM1182237     3  0.3876      0.775 0.000 0.316 0.684 0.000 0.000
#> GSM1182238     2  0.0404      0.839 0.000 0.988 0.012 0.000 0.000
#> GSM1182239     2  0.0955      0.837 0.004 0.968 0.028 0.000 0.000
#> GSM1182240     2  0.0510      0.834 0.016 0.984 0.000 0.000 0.000
#> GSM1182241     2  0.0671      0.835 0.016 0.980 0.004 0.000 0.000
#> GSM1182242     3  0.3966      0.767 0.000 0.336 0.664 0.000 0.000
#> GSM1182243     2  0.4291     -0.244 0.000 0.536 0.464 0.000 0.000
#> GSM1182244     3  0.2966      0.758 0.000 0.184 0.816 0.000 0.000
#> GSM1182245     4  0.2488      0.925 0.124 0.000 0.000 0.872 0.004
#> GSM1182246     4  0.0000      0.943 0.000 0.000 0.000 1.000 0.000
#> GSM1182247     3  0.3932      0.773 0.000 0.328 0.672 0.000 0.000
#> GSM1182248     3  0.3932      0.773 0.000 0.328 0.672 0.000 0.000
#> GSM1182249     2  0.4294     -0.259 0.000 0.532 0.468 0.000 0.000
#> GSM1182250     2  0.4294     -0.259 0.000 0.532 0.468 0.000 0.000
#> GSM1182251     5  0.4088      0.442 0.368 0.000 0.000 0.000 0.632
#> GSM1182252     3  0.3932      0.773 0.000 0.328 0.672 0.000 0.000
#> GSM1182253     3  0.3983      0.761 0.000 0.340 0.660 0.000 0.000
#> GSM1182254     3  0.4235      0.600 0.000 0.424 0.576 0.000 0.000
#> GSM1182255     4  0.0000      0.943 0.000 0.000 0.000 1.000 0.000
#> GSM1182256     4  0.0000      0.943 0.000 0.000 0.000 1.000 0.000
#> GSM1182257     5  0.1579      0.465 0.024 0.000 0.000 0.032 0.944
#> GSM1182258     4  0.0000      0.943 0.000 0.000 0.000 1.000 0.000
#> GSM1182259     4  0.0000      0.943 0.000 0.000 0.000 1.000 0.000
#> GSM1182260     2  0.4291     -0.235 0.000 0.536 0.464 0.000 0.000
#> GSM1182261     3  0.3876      0.775 0.000 0.316 0.684 0.000 0.000
#> GSM1182262     3  0.3876      0.775 0.000 0.316 0.684 0.000 0.000
#> GSM1182263     5  0.4686      0.384 0.384 0.000 0.000 0.020 0.596
#> GSM1182264     2  0.4291     -0.235 0.000 0.536 0.464 0.000 0.000
#> GSM1182265     2  0.4291     -0.235 0.000 0.536 0.464 0.000 0.000
#> GSM1182266     2  0.4291     -0.235 0.000 0.536 0.464 0.000 0.000
#> GSM1182267     1  0.5597      0.426 0.640 0.000 0.000 0.160 0.200
#> GSM1182268     1  0.3424      0.655 0.760 0.000 0.000 0.000 0.240
#> GSM1182269     1  0.3949      0.763 0.668 0.000 0.000 0.000 0.332
#> GSM1182270     1  0.3949      0.763 0.668 0.000 0.000 0.000 0.332
#> GSM1182271     4  0.0000      0.943 0.000 0.000 0.000 1.000 0.000
#> GSM1182272     4  0.0000      0.943 0.000 0.000 0.000 1.000 0.000
#> GSM1182273     2  0.4291     -0.235 0.000 0.536 0.464 0.000 0.000
#> GSM1182275     2  0.1357      0.819 0.048 0.948 0.004 0.000 0.000
#> GSM1182276     2  0.1357      0.819 0.048 0.948 0.004 0.000 0.000
#> GSM1182277     4  0.2843      0.919 0.144 0.000 0.000 0.848 0.008
#> GSM1182278     4  0.2843      0.919 0.144 0.000 0.000 0.848 0.008
#> GSM1182279     5  0.4101      0.440 0.372 0.000 0.000 0.000 0.628
#> GSM1182280     5  0.4101      0.440 0.372 0.000 0.000 0.000 0.628
#> GSM1182281     4  0.0000      0.943 0.000 0.000 0.000 1.000 0.000
#> GSM1182282     4  0.2488      0.925 0.124 0.000 0.000 0.872 0.004
#> GSM1182283     4  0.2843      0.919 0.144 0.000 0.000 0.848 0.008
#> GSM1182284     4  0.2843      0.919 0.144 0.000 0.000 0.848 0.008
#> GSM1182285     3  0.3003      0.760 0.000 0.188 0.812 0.000 0.000
#> GSM1182286     2  0.0290      0.839 0.000 0.992 0.008 0.000 0.000
#> GSM1182287     3  0.4126      0.708 0.000 0.380 0.620 0.000 0.000
#> GSM1182288     3  0.3949      0.770 0.000 0.332 0.668 0.000 0.000
#> GSM1182289     5  0.4074      0.443 0.364 0.000 0.000 0.000 0.636
#> GSM1182290     5  0.4074      0.443 0.364 0.000 0.000 0.000 0.636
#> GSM1182291     4  0.0000      0.943 0.000 0.000 0.000 1.000 0.000
#> GSM1182274     2  0.4291     -0.235 0.000 0.536 0.464 0.000 0.000
#> GSM1182292     2  0.1270      0.815 0.052 0.948 0.000 0.000 0.000
#> GSM1182293     2  0.0794      0.833 0.000 0.972 0.028 0.000 0.000
#> GSM1182294     2  0.0880      0.832 0.000 0.968 0.032 0.000 0.000
#> GSM1182295     2  0.0290      0.839 0.000 0.992 0.008 0.000 0.000
#> GSM1182296     2  0.1270      0.815 0.052 0.948 0.000 0.000 0.000
#> GSM1182298     3  0.2377      0.498 0.128 0.000 0.872 0.000 0.000
#> GSM1182299     2  0.0992      0.835 0.008 0.968 0.024 0.000 0.000
#> GSM1182300     2  0.0566      0.839 0.004 0.984 0.012 0.000 0.000
#> GSM1182301     2  0.1270      0.815 0.052 0.948 0.000 0.000 0.000
#> GSM1182303     2  0.1270      0.815 0.052 0.948 0.000 0.000 0.000
#> GSM1182304     5  0.4101      0.440 0.372 0.000 0.000 0.000 0.628
#> GSM1182305     5  0.4768      0.380 0.384 0.000 0.000 0.024 0.592
#> GSM1182306     5  0.1493      0.467 0.024 0.000 0.000 0.028 0.948
#> GSM1182307     2  0.1270      0.815 0.052 0.948 0.000 0.000 0.000
#> GSM1182309     2  0.0510      0.838 0.000 0.984 0.016 0.000 0.000
#> GSM1182312     2  0.1121      0.826 0.000 0.956 0.044 0.000 0.000
#> GSM1182314     4  0.0162      0.942 0.004 0.000 0.000 0.996 0.000
#> GSM1182316     2  0.1410      0.812 0.000 0.940 0.060 0.000 0.000
#> GSM1182318     2  0.0510      0.838 0.000 0.984 0.016 0.000 0.000
#> GSM1182319     2  0.1908      0.785 0.000 0.908 0.092 0.000 0.000
#> GSM1182320     2  0.1478      0.809 0.000 0.936 0.064 0.000 0.000
#> GSM1182321     2  0.1908      0.785 0.000 0.908 0.092 0.000 0.000
#> GSM1182322     2  0.1908      0.785 0.000 0.908 0.092 0.000 0.000
#> GSM1182324     2  0.2230      0.757 0.000 0.884 0.116 0.000 0.000
#> GSM1182297     2  0.0290      0.839 0.000 0.992 0.008 0.000 0.000
#> GSM1182302     5  0.0794      0.485 0.028 0.000 0.000 0.000 0.972
#> GSM1182308     2  0.0324      0.838 0.004 0.992 0.004 0.000 0.000
#> GSM1182310     2  0.1908      0.785 0.000 0.908 0.092 0.000 0.000
#> GSM1182311     1  0.3966      0.759 0.664 0.000 0.000 0.000 0.336
#> GSM1182313     4  0.0162      0.942 0.004 0.000 0.000 0.996 0.000
#> GSM1182315     2  0.0510      0.838 0.000 0.984 0.016 0.000 0.000
#> GSM1182317     2  0.1410      0.812 0.000 0.940 0.060 0.000 0.000
#> GSM1182323     1  0.3949      0.763 0.668 0.000 0.000 0.000 0.332

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1182186     5  0.0146     0.6306 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM1182187     1  0.7133    -0.2660 0.416 0.000 0.000 0.100 0.212 0.272
#> GSM1182188     4  0.4096     0.9526 0.008 0.000 0.000 0.508 0.000 0.484
#> GSM1182189     1  0.3838     0.8356 0.552 0.000 0.000 0.000 0.448 0.000
#> GSM1182190     1  0.3828     0.8441 0.560 0.000 0.000 0.000 0.440 0.000
#> GSM1182191     5  0.0146     0.6306 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM1182192     6  0.0146     0.6519 0.000 0.000 0.000 0.000 0.004 0.996
#> GSM1182193     6  0.0146     0.6519 0.000 0.000 0.000 0.000 0.004 0.996
#> GSM1182194     3  0.3766     0.2249 0.012 0.000 0.684 0.304 0.000 0.000
#> GSM1182195     3  0.3888     0.2123 0.016 0.000 0.672 0.312 0.000 0.000
#> GSM1182196     2  0.4261     0.6857 0.008 0.748 0.148 0.096 0.000 0.000
#> GSM1182197     2  0.4709     0.0032 0.004 0.596 0.352 0.048 0.000 0.000
#> GSM1182198     3  0.3888     0.2123 0.016 0.000 0.672 0.312 0.000 0.000
#> GSM1182199     3  0.3888     0.2123 0.016 0.000 0.672 0.312 0.000 0.000
#> GSM1182200     2  0.2849     0.8557 0.008 0.864 0.044 0.084 0.000 0.000
#> GSM1182201     2  0.2849     0.8557 0.008 0.864 0.044 0.084 0.000 0.000
#> GSM1182202     5  0.4276     0.5475 0.416 0.000 0.000 0.020 0.564 0.000
#> GSM1182203     5  0.4482     0.5438 0.416 0.000 0.000 0.032 0.552 0.000
#> GSM1182204     5  0.4482     0.5438 0.416 0.000 0.000 0.032 0.552 0.000
#> GSM1182205     3  0.2871     0.7227 0.000 0.192 0.804 0.004 0.000 0.000
#> GSM1182206     3  0.2871     0.7227 0.000 0.192 0.804 0.004 0.000 0.000
#> GSM1182207     5  0.0146     0.6323 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM1182208     5  0.0146     0.6323 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM1182209     2  0.1901     0.8603 0.008 0.912 0.004 0.076 0.000 0.000
#> GSM1182210     2  0.1901     0.8603 0.008 0.912 0.004 0.076 0.000 0.000
#> GSM1182211     2  0.1845     0.8615 0.008 0.916 0.004 0.072 0.000 0.000
#> GSM1182212     2  0.2261     0.8484 0.008 0.884 0.004 0.104 0.000 0.000
#> GSM1182213     2  0.1411     0.8827 0.000 0.936 0.004 0.060 0.000 0.000
#> GSM1182214     2  0.1701     0.8626 0.008 0.920 0.000 0.072 0.000 0.000
#> GSM1182215     3  0.3555     0.7409 0.000 0.280 0.712 0.008 0.000 0.000
#> GSM1182216     2  0.0891     0.8925 0.000 0.968 0.024 0.008 0.000 0.000
#> GSM1182217     5  0.4318     0.5325 0.448 0.000 0.000 0.020 0.532 0.000
#> GSM1182218     1  0.3828     0.8441 0.560 0.000 0.000 0.000 0.440 0.000
#> GSM1182219     2  0.0820     0.8938 0.000 0.972 0.012 0.016 0.000 0.000
#> GSM1182220     2  0.0820     0.8938 0.000 0.972 0.012 0.016 0.000 0.000
#> GSM1182221     2  0.0891     0.8925 0.000 0.968 0.024 0.008 0.000 0.000
#> GSM1182222     2  0.0891     0.8925 0.000 0.968 0.024 0.008 0.000 0.000
#> GSM1182223     3  0.3758     0.7248 0.000 0.324 0.668 0.008 0.000 0.000
#> GSM1182224     3  0.3129     0.6949 0.004 0.152 0.820 0.024 0.000 0.000
#> GSM1182225     2  0.0891     0.8925 0.000 0.968 0.024 0.008 0.000 0.000
#> GSM1182226     2  0.0891     0.8925 0.000 0.968 0.024 0.008 0.000 0.000
#> GSM1182227     6  0.0146     0.6519 0.000 0.000 0.000 0.000 0.004 0.996
#> GSM1182228     3  0.3619     0.7323 0.000 0.316 0.680 0.004 0.000 0.000
#> GSM1182229     3  0.3508     0.7443 0.000 0.292 0.704 0.004 0.000 0.000
#> GSM1182230     3  0.3534     0.7412 0.000 0.276 0.716 0.008 0.000 0.000
#> GSM1182231     3  0.3555     0.7409 0.000 0.280 0.712 0.008 0.000 0.000
#> GSM1182232     1  0.5117     0.7825 0.480 0.000 0.000 0.004 0.448 0.068
#> GSM1182233     1  0.5117     0.7825 0.480 0.000 0.000 0.004 0.448 0.068
#> GSM1182234     6  0.5285    -0.0606 0.108 0.000 0.000 0.000 0.368 0.524
#> GSM1182235     2  0.0993     0.8931 0.000 0.964 0.024 0.012 0.000 0.000
#> GSM1182236     1  0.3828     0.8441 0.560 0.000 0.000 0.000 0.440 0.000
#> GSM1182237     3  0.3555     0.7409 0.000 0.280 0.712 0.008 0.000 0.000
#> GSM1182238     2  0.0891     0.8925 0.000 0.968 0.024 0.008 0.000 0.000
#> GSM1182239     2  0.1934     0.8838 0.000 0.916 0.044 0.040 0.000 0.000
#> GSM1182240     2  0.1219     0.8858 0.000 0.948 0.004 0.048 0.000 0.000
#> GSM1182241     2  0.1625     0.8827 0.000 0.928 0.012 0.060 0.000 0.000
#> GSM1182242     3  0.3371     0.7447 0.000 0.292 0.708 0.000 0.000 0.000
#> GSM1182243     3  0.4393     0.5066 0.004 0.480 0.500 0.016 0.000 0.000
#> GSM1182244     3  0.2872     0.6986 0.004 0.152 0.832 0.012 0.000 0.000
#> GSM1182245     6  0.0547     0.6262 0.000 0.000 0.000 0.020 0.000 0.980
#> GSM1182246     4  0.3868     0.9775 0.000 0.000 0.000 0.504 0.000 0.496
#> GSM1182247     3  0.3330     0.7466 0.000 0.284 0.716 0.000 0.000 0.000
#> GSM1182248     3  0.3330     0.7466 0.000 0.284 0.716 0.000 0.000 0.000
#> GSM1182249     3  0.4392     0.5158 0.004 0.476 0.504 0.016 0.000 0.000
#> GSM1182250     3  0.4392     0.5158 0.004 0.476 0.504 0.016 0.000 0.000
#> GSM1182251     5  0.0000     0.6316 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182252     3  0.3330     0.7466 0.000 0.284 0.716 0.000 0.000 0.000
#> GSM1182253     3  0.3595     0.7447 0.000 0.288 0.704 0.008 0.000 0.000
#> GSM1182254     3  0.4099     0.6802 0.000 0.372 0.612 0.016 0.000 0.000
#> GSM1182255     4  0.3998     0.9870 0.004 0.000 0.000 0.504 0.000 0.492
#> GSM1182256     4  0.3998     0.9870 0.004 0.000 0.000 0.504 0.000 0.492
#> GSM1182257     5  0.5215     0.5274 0.412 0.000 0.000 0.056 0.516 0.016
#> GSM1182258     4  0.3998     0.9870 0.004 0.000 0.000 0.504 0.000 0.492
#> GSM1182259     6  0.3868    -0.9652 0.000 0.000 0.000 0.496 0.000 0.504
#> GSM1182260     3  0.4313     0.5039 0.004 0.480 0.504 0.012 0.000 0.000
#> GSM1182261     3  0.3555     0.7409 0.000 0.280 0.712 0.008 0.000 0.000
#> GSM1182262     3  0.3555     0.7409 0.000 0.280 0.712 0.008 0.000 0.000
#> GSM1182263     5  0.1515     0.5940 0.008 0.000 0.000 0.020 0.944 0.028
#> GSM1182264     3  0.4313     0.5039 0.004 0.480 0.504 0.012 0.000 0.000
#> GSM1182265     3  0.4313     0.5039 0.004 0.480 0.504 0.012 0.000 0.000
#> GSM1182266     3  0.4313     0.5039 0.004 0.480 0.504 0.012 0.000 0.000
#> GSM1182267     5  0.6182    -0.5498 0.316 0.000 0.000 0.004 0.404 0.276
#> GSM1182268     1  0.5516     0.7473 0.460 0.000 0.000 0.004 0.424 0.112
#> GSM1182269     1  0.3828     0.8441 0.560 0.000 0.000 0.000 0.440 0.000
#> GSM1182270     1  0.3828     0.8441 0.560 0.000 0.000 0.000 0.440 0.000
#> GSM1182271     4  0.3998     0.9870 0.004 0.000 0.000 0.504 0.000 0.492
#> GSM1182272     6  0.3868    -0.9652 0.000 0.000 0.000 0.496 0.000 0.504
#> GSM1182273     3  0.4313     0.5039 0.004 0.480 0.504 0.012 0.000 0.000
#> GSM1182275     2  0.2468     0.8548 0.008 0.880 0.016 0.096 0.000 0.000
#> GSM1182276     2  0.2468     0.8548 0.008 0.880 0.016 0.096 0.000 0.000
#> GSM1182277     6  0.0146     0.6519 0.000 0.000 0.000 0.000 0.004 0.996
#> GSM1182278     6  0.0146     0.6519 0.000 0.000 0.000 0.000 0.004 0.996
#> GSM1182279     5  0.0146     0.6306 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM1182280     5  0.0146     0.6306 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM1182281     6  0.3868    -0.9652 0.000 0.000 0.000 0.496 0.000 0.504
#> GSM1182282     6  0.0547     0.6262 0.000 0.000 0.000 0.020 0.000 0.980
#> GSM1182283     6  0.0146     0.6519 0.000 0.000 0.000 0.000 0.004 0.996
#> GSM1182284     6  0.0146     0.6519 0.000 0.000 0.000 0.000 0.004 0.996
#> GSM1182285     3  0.2988     0.6964 0.000 0.152 0.824 0.024 0.000 0.000
#> GSM1182286     2  0.0717     0.8944 0.000 0.976 0.016 0.008 0.000 0.000
#> GSM1182287     3  0.3774     0.7210 0.000 0.328 0.664 0.008 0.000 0.000
#> GSM1182288     3  0.3351     0.7456 0.000 0.288 0.712 0.000 0.000 0.000
#> GSM1182289     5  0.0146     0.6323 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM1182290     5  0.0146     0.6323 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM1182291     4  0.3998     0.9870 0.004 0.000 0.000 0.504 0.000 0.492
#> GSM1182274     3  0.4313     0.5039 0.004 0.480 0.504 0.012 0.000 0.000
#> GSM1182292     2  0.1728     0.8658 0.008 0.924 0.004 0.064 0.000 0.000
#> GSM1182293     2  0.1320     0.8850 0.000 0.948 0.036 0.016 0.000 0.000
#> GSM1182294     2  0.1594     0.8758 0.000 0.932 0.052 0.016 0.000 0.000
#> GSM1182295     2  0.0508     0.8956 0.000 0.984 0.012 0.004 0.000 0.000
#> GSM1182296     2  0.1728     0.8658 0.008 0.924 0.004 0.064 0.000 0.000
#> GSM1182298     3  0.3888     0.2123 0.016 0.000 0.672 0.312 0.000 0.000
#> GSM1182299     2  0.2585     0.8595 0.004 0.880 0.048 0.068 0.000 0.000
#> GSM1182300     2  0.0806     0.8952 0.000 0.972 0.020 0.008 0.000 0.000
#> GSM1182301     2  0.1845     0.8615 0.008 0.916 0.004 0.072 0.000 0.000
#> GSM1182303     2  0.2261     0.8484 0.008 0.884 0.004 0.104 0.000 0.000
#> GSM1182304     5  0.0146     0.6306 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM1182305     5  0.1478     0.5916 0.004 0.000 0.000 0.020 0.944 0.032
#> GSM1182306     5  0.5169     0.5279 0.416 0.000 0.000 0.052 0.516 0.016
#> GSM1182307     2  0.1701     0.8626 0.008 0.920 0.000 0.072 0.000 0.000
#> GSM1182309     2  0.1151     0.8886 0.000 0.956 0.032 0.012 0.000 0.000
#> GSM1182312     2  0.1745     0.8681 0.000 0.920 0.068 0.012 0.000 0.000
#> GSM1182314     4  0.3868     0.9802 0.000 0.000 0.000 0.508 0.000 0.492
#> GSM1182316     2  0.2006     0.8472 0.000 0.904 0.080 0.016 0.000 0.000
#> GSM1182318     2  0.1074     0.8923 0.000 0.960 0.028 0.012 0.000 0.000
#> GSM1182319     2  0.2887     0.7835 0.000 0.844 0.120 0.036 0.000 0.000
#> GSM1182320     2  0.2384     0.8315 0.000 0.884 0.084 0.032 0.000 0.000
#> GSM1182321     2  0.2887     0.7835 0.000 0.844 0.120 0.036 0.000 0.000
#> GSM1182322     2  0.2887     0.7835 0.000 0.844 0.120 0.036 0.000 0.000
#> GSM1182324     2  0.3062     0.7468 0.000 0.824 0.144 0.032 0.000 0.000
#> GSM1182297     2  0.0909     0.8941 0.000 0.968 0.020 0.012 0.000 0.000
#> GSM1182302     5  0.4289     0.5447 0.424 0.000 0.000 0.020 0.556 0.000
#> GSM1182308     2  0.0820     0.8938 0.000 0.972 0.012 0.016 0.000 0.000
#> GSM1182310     2  0.2887     0.7835 0.000 0.844 0.120 0.036 0.000 0.000
#> GSM1182311     1  0.3966     0.8409 0.552 0.000 0.000 0.004 0.444 0.000
#> GSM1182313     4  0.3868     0.9802 0.000 0.000 0.000 0.508 0.000 0.492
#> GSM1182315     2  0.1049     0.8896 0.000 0.960 0.032 0.008 0.000 0.000
#> GSM1182317     2  0.2006     0.8472 0.000 0.904 0.080 0.016 0.000 0.000
#> GSM1182323     1  0.3828     0.8441 0.560 0.000 0.000 0.000 0.440 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-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 disease.state(p) gender(p) k
#> MAD:hclust 139         7.73e-02     1.000 2
#> MAD:hclust 137         1.27e-01     0.792 3
#> MAD:hclust 122         2.10e-05     0.441 4
#> MAD:hclust 103         1.57e-05     0.227 5
#> MAD:hclust 127         1.73e-05     0.544 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 46361 rows and 139 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 1.000           1.000       1.000         0.4791 0.521   0.521
#> 3 3 0.731           0.941       0.826         0.2945 0.815   0.645
#> 4 4 0.605           0.850       0.761         0.1272 0.924   0.774
#> 5 5 0.714           0.768       0.765         0.0837 0.984   0.941
#> 6 6 0.690           0.659       0.733         0.0505 0.906   0.652

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
#> GSM1182186     1       0          1  1  0
#> GSM1182187     1       0          1  1  0
#> GSM1182188     1       0          1  1  0
#> GSM1182189     1       0          1  1  0
#> GSM1182190     1       0          1  1  0
#> GSM1182191     1       0          1  1  0
#> GSM1182192     1       0          1  1  0
#> GSM1182193     1       0          1  1  0
#> GSM1182194     2       0          1  0  1
#> GSM1182195     2       0          1  0  1
#> GSM1182196     2       0          1  0  1
#> GSM1182197     2       0          1  0  1
#> GSM1182198     2       0          1  0  1
#> GSM1182199     2       0          1  0  1
#> GSM1182200     2       0          1  0  1
#> GSM1182201     2       0          1  0  1
#> GSM1182202     1       0          1  1  0
#> GSM1182203     1       0          1  1  0
#> GSM1182204     1       0          1  1  0
#> GSM1182205     2       0          1  0  1
#> GSM1182206     2       0          1  0  1
#> GSM1182207     1       0          1  1  0
#> GSM1182208     1       0          1  1  0
#> GSM1182209     2       0          1  0  1
#> GSM1182210     2       0          1  0  1
#> GSM1182211     2       0          1  0  1
#> GSM1182212     2       0          1  0  1
#> GSM1182213     2       0          1  0  1
#> GSM1182214     2       0          1  0  1
#> GSM1182215     2       0          1  0  1
#> GSM1182216     2       0          1  0  1
#> GSM1182217     1       0          1  1  0
#> GSM1182218     1       0          1  1  0
#> GSM1182219     2       0          1  0  1
#> GSM1182220     2       0          1  0  1
#> GSM1182221     2       0          1  0  1
#> GSM1182222     2       0          1  0  1
#> GSM1182223     2       0          1  0  1
#> GSM1182224     2       0          1  0  1
#> GSM1182225     2       0          1  0  1
#> GSM1182226     2       0          1  0  1
#> GSM1182227     1       0          1  1  0
#> GSM1182228     2       0          1  0  1
#> GSM1182229     2       0          1  0  1
#> GSM1182230     2       0          1  0  1
#> GSM1182231     2       0          1  0  1
#> GSM1182232     1       0          1  1  0
#> GSM1182233     1       0          1  1  0
#> GSM1182234     1       0          1  1  0
#> GSM1182235     2       0          1  0  1
#> GSM1182236     1       0          1  1  0
#> GSM1182237     2       0          1  0  1
#> GSM1182238     2       0          1  0  1
#> GSM1182239     2       0          1  0  1
#> GSM1182240     2       0          1  0  1
#> GSM1182241     2       0          1  0  1
#> GSM1182242     2       0          1  0  1
#> GSM1182243     2       0          1  0  1
#> GSM1182244     2       0          1  0  1
#> GSM1182245     1       0          1  1  0
#> GSM1182246     1       0          1  1  0
#> GSM1182247     2       0          1  0  1
#> GSM1182248     2       0          1  0  1
#> GSM1182249     2       0          1  0  1
#> GSM1182250     2       0          1  0  1
#> GSM1182251     1       0          1  1  0
#> GSM1182252     2       0          1  0  1
#> GSM1182253     2       0          1  0  1
#> GSM1182254     2       0          1  0  1
#> GSM1182255     1       0          1  1  0
#> GSM1182256     1       0          1  1  0
#> GSM1182257     1       0          1  1  0
#> GSM1182258     1       0          1  1  0
#> GSM1182259     1       0          1  1  0
#> GSM1182260     2       0          1  0  1
#> GSM1182261     2       0          1  0  1
#> GSM1182262     2       0          1  0  1
#> GSM1182263     1       0          1  1  0
#> GSM1182264     2       0          1  0  1
#> GSM1182265     2       0          1  0  1
#> GSM1182266     2       0          1  0  1
#> GSM1182267     1       0          1  1  0
#> GSM1182268     1       0          1  1  0
#> GSM1182269     1       0          1  1  0
#> GSM1182270     1       0          1  1  0
#> GSM1182271     1       0          1  1  0
#> GSM1182272     1       0          1  1  0
#> GSM1182273     2       0          1  0  1
#> GSM1182275     2       0          1  0  1
#> GSM1182276     2       0          1  0  1
#> GSM1182277     1       0          1  1  0
#> GSM1182278     1       0          1  1  0
#> GSM1182279     1       0          1  1  0
#> GSM1182280     1       0          1  1  0
#> GSM1182281     1       0          1  1  0
#> GSM1182282     1       0          1  1  0
#> GSM1182283     1       0          1  1  0
#> GSM1182284     1       0          1  1  0
#> GSM1182285     2       0          1  0  1
#> GSM1182286     2       0          1  0  1
#> GSM1182287     2       0          1  0  1
#> GSM1182288     2       0          1  0  1
#> GSM1182289     1       0          1  1  0
#> GSM1182290     1       0          1  1  0
#> GSM1182291     1       0          1  1  0
#> GSM1182274     2       0          1  0  1
#> GSM1182292     2       0          1  0  1
#> GSM1182293     2       0          1  0  1
#> GSM1182294     2       0          1  0  1
#> GSM1182295     2       0          1  0  1
#> GSM1182296     2       0          1  0  1
#> GSM1182298     2       0          1  0  1
#> GSM1182299     2       0          1  0  1
#> GSM1182300     2       0          1  0  1
#> GSM1182301     2       0          1  0  1
#> GSM1182303     2       0          1  0  1
#> GSM1182304     1       0          1  1  0
#> GSM1182305     1       0          1  1  0
#> GSM1182306     1       0          1  1  0
#> GSM1182307     2       0          1  0  1
#> GSM1182309     2       0          1  0  1
#> GSM1182312     2       0          1  0  1
#> GSM1182314     1       0          1  1  0
#> GSM1182316     2       0          1  0  1
#> GSM1182318     2       0          1  0  1
#> GSM1182319     2       0          1  0  1
#> GSM1182320     2       0          1  0  1
#> GSM1182321     2       0          1  0  1
#> GSM1182322     2       0          1  0  1
#> GSM1182324     2       0          1  0  1
#> GSM1182297     2       0          1  0  1
#> GSM1182302     1       0          1  1  0
#> GSM1182308     2       0          1  0  1
#> GSM1182310     2       0          1  0  1
#> GSM1182311     1       0          1  1  0
#> GSM1182313     1       0          1  1  0
#> GSM1182315     2       0          1  0  1
#> GSM1182317     2       0          1  0  1
#> GSM1182323     1       0          1  1  0

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1182186     1   0.581      0.862 0.664 0.000 0.336
#> GSM1182187     1   0.465      0.861 0.792 0.000 0.208
#> GSM1182188     1   0.207      0.836 0.940 0.000 0.060
#> GSM1182189     1   0.581      0.862 0.664 0.000 0.336
#> GSM1182190     1   0.581      0.862 0.664 0.000 0.336
#> GSM1182191     1   0.581      0.862 0.664 0.000 0.336
#> GSM1182192     1   0.000      0.850 1.000 0.000 0.000
#> GSM1182193     1   0.000      0.850 1.000 0.000 0.000
#> GSM1182194     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182195     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182196     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182197     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182198     3   0.660      0.977 0.012 0.384 0.604
#> GSM1182199     3   0.660      0.977 0.012 0.384 0.604
#> GSM1182200     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182201     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182202     1   0.597      0.859 0.636 0.000 0.364
#> GSM1182203     1   0.514      0.860 0.748 0.000 0.252
#> GSM1182204     1   0.599      0.858 0.632 0.000 0.368
#> GSM1182205     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182206     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182207     1   0.581      0.862 0.664 0.000 0.336
#> GSM1182208     1   0.581      0.862 0.664 0.000 0.336
#> GSM1182209     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182210     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182211     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182212     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182213     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182214     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182215     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182216     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182217     1   0.581      0.862 0.664 0.000 0.336
#> GSM1182218     1   0.581      0.862 0.664 0.000 0.336
#> GSM1182219     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182220     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182221     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182222     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182223     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182224     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182225     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182226     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182227     1   0.000      0.850 1.000 0.000 0.000
#> GSM1182228     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182229     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182230     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182231     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182232     1   0.581      0.862 0.664 0.000 0.336
#> GSM1182233     1   0.581      0.862 0.664 0.000 0.336
#> GSM1182234     1   0.000      0.850 1.000 0.000 0.000
#> GSM1182235     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182236     1   0.581      0.862 0.664 0.000 0.336
#> GSM1182237     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182238     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182239     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182240     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182241     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182242     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182243     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182244     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182245     1   0.000      0.850 1.000 0.000 0.000
#> GSM1182246     1   0.207      0.836 0.940 0.000 0.060
#> GSM1182247     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182248     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182249     3   0.624      0.921 0.000 0.440 0.560
#> GSM1182250     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182251     1   0.581      0.862 0.664 0.000 0.336
#> GSM1182252     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182253     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182254     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182255     1   0.207      0.836 0.940 0.000 0.060
#> GSM1182256     1   0.207      0.836 0.940 0.000 0.060
#> GSM1182257     1   0.207      0.836 0.940 0.000 0.060
#> GSM1182258     1   0.207      0.836 0.940 0.000 0.060
#> GSM1182259     1   0.207      0.836 0.940 0.000 0.060
#> GSM1182260     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182261     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182262     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182263     1   0.518      0.865 0.744 0.000 0.256
#> GSM1182264     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182265     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182266     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182267     1   0.000      0.850 1.000 0.000 0.000
#> GSM1182268     1   0.581      0.862 0.664 0.000 0.336
#> GSM1182269     1   0.581      0.862 0.664 0.000 0.336
#> GSM1182270     1   0.581      0.862 0.664 0.000 0.336
#> GSM1182271     1   0.207      0.836 0.940 0.000 0.060
#> GSM1182272     1   0.207      0.836 0.940 0.000 0.060
#> GSM1182273     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182275     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182276     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182277     1   0.000      0.850 1.000 0.000 0.000
#> GSM1182278     1   0.000      0.850 1.000 0.000 0.000
#> GSM1182279     1   0.581      0.862 0.664 0.000 0.336
#> GSM1182280     1   0.581      0.862 0.664 0.000 0.336
#> GSM1182281     1   0.207      0.836 0.940 0.000 0.060
#> GSM1182282     1   0.000      0.850 1.000 0.000 0.000
#> GSM1182283     1   0.000      0.850 1.000 0.000 0.000
#> GSM1182284     1   0.000      0.850 1.000 0.000 0.000
#> GSM1182285     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182286     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182287     3   0.613      0.991 0.000 0.400 0.600
#> GSM1182288     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182289     1   0.581      0.862 0.664 0.000 0.336
#> GSM1182290     1   0.581      0.862 0.664 0.000 0.336
#> GSM1182291     1   0.207      0.836 0.940 0.000 0.060
#> GSM1182274     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182292     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182293     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182294     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182295     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182296     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182298     3   0.611      0.997 0.000 0.396 0.604
#> GSM1182299     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182300     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182301     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182303     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182304     1   0.581      0.862 0.664 0.000 0.336
#> GSM1182305     1   0.529      0.865 0.732 0.000 0.268
#> GSM1182306     1   0.406      0.854 0.836 0.000 0.164
#> GSM1182307     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182309     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182312     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182314     1   0.207      0.836 0.940 0.000 0.060
#> GSM1182316     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182318     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182319     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182320     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182321     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182322     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182324     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182297     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182302     1   0.597      0.859 0.636 0.000 0.364
#> GSM1182308     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182310     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182311     1   0.581      0.862 0.664 0.000 0.336
#> GSM1182313     1   0.207      0.836 0.940 0.000 0.060
#> GSM1182315     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182317     2   0.000      1.000 0.000 1.000 0.000
#> GSM1182323     1   0.581      0.862 0.664 0.000 0.336

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1182186     1  0.5279    0.92481 0.588 0.000 0.012 0.400
#> GSM1182187     4  0.4539    0.19689 0.272 0.000 0.008 0.720
#> GSM1182188     4  0.0188    0.81197 0.000 0.000 0.004 0.996
#> GSM1182189     1  0.6384    0.91351 0.532 0.000 0.068 0.400
#> GSM1182190     1  0.6384    0.91351 0.532 0.000 0.068 0.400
#> GSM1182191     1  0.5279    0.92481 0.588 0.000 0.012 0.400
#> GSM1182192     4  0.4711    0.76516 0.064 0.000 0.152 0.784
#> GSM1182193     4  0.4711    0.76516 0.064 0.000 0.152 0.784
#> GSM1182194     3  0.5728    0.88368 0.104 0.188 0.708 0.000
#> GSM1182195     3  0.5396    0.86147 0.104 0.156 0.740 0.000
#> GSM1182196     2  0.2988    0.87411 0.112 0.876 0.012 0.000
#> GSM1182197     2  0.4844    0.76192 0.108 0.784 0.108 0.000
#> GSM1182198     3  0.5257    0.85036 0.104 0.144 0.752 0.000
#> GSM1182199     3  0.5257    0.85036 0.104 0.144 0.752 0.000
#> GSM1182200     2  0.2831    0.87333 0.120 0.876 0.004 0.000
#> GSM1182201     3  0.6975    0.70760 0.148 0.292 0.560 0.000
#> GSM1182202     1  0.5070    0.90900 0.580 0.000 0.004 0.416
#> GSM1182203     4  0.4746    0.00362 0.304 0.000 0.008 0.688
#> GSM1182204     1  0.5105    0.88684 0.564 0.000 0.004 0.432
#> GSM1182205     3  0.4163    0.91502 0.020 0.188 0.792 0.000
#> GSM1182206     3  0.3852    0.91658 0.008 0.192 0.800 0.000
#> GSM1182207     1  0.5279    0.92481 0.588 0.000 0.012 0.400
#> GSM1182208     1  0.5279    0.92481 0.588 0.000 0.012 0.400
#> GSM1182209     2  0.2647    0.88065 0.120 0.880 0.000 0.000
#> GSM1182210     2  0.2589    0.88203 0.116 0.884 0.000 0.000
#> GSM1182211     2  0.2647    0.88065 0.120 0.880 0.000 0.000
#> GSM1182212     2  0.2530    0.87858 0.112 0.888 0.000 0.000
#> GSM1182213     2  0.2589    0.87814 0.116 0.884 0.000 0.000
#> GSM1182214     2  0.2589    0.88255 0.116 0.884 0.000 0.000
#> GSM1182215     3  0.3937    0.91719 0.012 0.188 0.800 0.000
#> GSM1182216     2  0.0657    0.89001 0.012 0.984 0.004 0.000
#> GSM1182217     1  0.5279    0.92411 0.588 0.000 0.012 0.400
#> GSM1182218     1  0.6384    0.91351 0.532 0.000 0.068 0.400
#> GSM1182219     2  0.2408    0.88418 0.104 0.896 0.000 0.000
#> GSM1182220     2  0.2704    0.87644 0.124 0.876 0.000 0.000
#> GSM1182221     2  0.2773    0.86605 0.116 0.880 0.004 0.000
#> GSM1182222     2  0.0657    0.89001 0.012 0.984 0.004 0.000
#> GSM1182223     3  0.6578    0.72187 0.108 0.300 0.592 0.000
#> GSM1182224     3  0.5728    0.88368 0.104 0.188 0.708 0.000
#> GSM1182225     2  0.0469    0.89031 0.012 0.988 0.000 0.000
#> GSM1182226     2  0.0779    0.88991 0.016 0.980 0.004 0.000
#> GSM1182227     4  0.4711    0.76516 0.064 0.000 0.152 0.784
#> GSM1182228     3  0.6627    0.72417 0.112 0.300 0.588 0.000
#> GSM1182229     3  0.3810    0.91645 0.008 0.188 0.804 0.000
#> GSM1182230     3  0.3668    0.91652 0.004 0.188 0.808 0.000
#> GSM1182231     2  0.3037    0.81210 0.020 0.880 0.100 0.000
#> GSM1182232     1  0.6384    0.91351 0.532 0.000 0.068 0.400
#> GSM1182233     1  0.6384    0.91351 0.532 0.000 0.068 0.400
#> GSM1182234     4  0.4711    0.76516 0.064 0.000 0.152 0.784
#> GSM1182235     2  0.0657    0.89001 0.012 0.984 0.004 0.000
#> GSM1182236     1  0.6384    0.91351 0.532 0.000 0.068 0.400
#> GSM1182237     3  0.5489    0.82389 0.040 0.296 0.664 0.000
#> GSM1182238     2  0.0657    0.89001 0.012 0.984 0.004 0.000
#> GSM1182239     2  0.1398    0.89129 0.040 0.956 0.004 0.000
#> GSM1182240     2  0.2530    0.87858 0.112 0.888 0.000 0.000
#> GSM1182241     2  0.3351    0.86249 0.148 0.844 0.008 0.000
#> GSM1182242     3  0.4163    0.91675 0.020 0.188 0.792 0.000
#> GSM1182243     3  0.4636    0.91277 0.040 0.188 0.772 0.000
#> GSM1182244     3  0.5728    0.88368 0.104 0.188 0.708 0.000
#> GSM1182245     4  0.4410    0.77287 0.064 0.000 0.128 0.808
#> GSM1182246     4  0.0000    0.81416 0.000 0.000 0.000 1.000
#> GSM1182247     3  0.4054    0.91558 0.016 0.188 0.796 0.000
#> GSM1182248     3  0.4054    0.91558 0.016 0.188 0.796 0.000
#> GSM1182249     3  0.6316    0.74425 0.080 0.324 0.596 0.000
#> GSM1182250     3  0.4636    0.91277 0.040 0.188 0.772 0.000
#> GSM1182251     1  0.5279    0.92481 0.588 0.000 0.012 0.400
#> GSM1182252     3  0.4054    0.91558 0.016 0.188 0.796 0.000
#> GSM1182253     3  0.4054    0.91558 0.016 0.188 0.796 0.000
#> GSM1182254     3  0.4549    0.91349 0.036 0.188 0.776 0.000
#> GSM1182255     4  0.0000    0.81416 0.000 0.000 0.000 1.000
#> GSM1182256     4  0.0000    0.81416 0.000 0.000 0.000 1.000
#> GSM1182257     4  0.0937    0.80829 0.012 0.000 0.012 0.976
#> GSM1182258     4  0.0000    0.81416 0.000 0.000 0.000 1.000
#> GSM1182259     4  0.0000    0.81416 0.000 0.000 0.000 1.000
#> GSM1182260     3  0.4677    0.91149 0.040 0.192 0.768 0.000
#> GSM1182261     3  0.4755    0.90933 0.040 0.200 0.760 0.000
#> GSM1182262     3  0.3852    0.91683 0.008 0.192 0.800 0.000
#> GSM1182263     1  0.5510    0.78525 0.504 0.000 0.016 0.480
#> GSM1182264     3  0.4636    0.91277 0.040 0.188 0.772 0.000
#> GSM1182265     3  0.5318    0.89509 0.072 0.196 0.732 0.000
#> GSM1182266     3  0.4636    0.91277 0.040 0.188 0.772 0.000
#> GSM1182267     4  0.4711    0.76516 0.064 0.000 0.152 0.784
#> GSM1182268     1  0.6384    0.91351 0.532 0.000 0.068 0.400
#> GSM1182269     1  0.6384    0.91351 0.532 0.000 0.068 0.400
#> GSM1182270     1  0.6384    0.91351 0.532 0.000 0.068 0.400
#> GSM1182271     4  0.0188    0.81197 0.000 0.000 0.004 0.996
#> GSM1182272     4  0.0000    0.81416 0.000 0.000 0.000 1.000
#> GSM1182273     3  0.4636    0.91277 0.040 0.188 0.772 0.000
#> GSM1182275     3  0.5410    0.89352 0.080 0.192 0.728 0.000
#> GSM1182276     2  0.2530    0.87858 0.112 0.888 0.000 0.000
#> GSM1182277     4  0.4711    0.76516 0.064 0.000 0.152 0.784
#> GSM1182278     4  0.4711    0.76516 0.064 0.000 0.152 0.784
#> GSM1182279     1  0.5279    0.92481 0.588 0.000 0.012 0.400
#> GSM1182280     1  0.5279    0.92481 0.588 0.000 0.012 0.400
#> GSM1182281     4  0.1118    0.81040 0.000 0.000 0.036 0.964
#> GSM1182282     4  0.4711    0.76516 0.064 0.000 0.152 0.784
#> GSM1182283     4  0.4711    0.76516 0.064 0.000 0.152 0.784
#> GSM1182284     4  0.4663    0.76652 0.064 0.000 0.148 0.788
#> GSM1182285     3  0.5728    0.88368 0.104 0.188 0.708 0.000
#> GSM1182286     2  0.1867    0.88968 0.072 0.928 0.000 0.000
#> GSM1182287     3  0.6949    0.62251 0.124 0.348 0.528 0.000
#> GSM1182288     3  0.4054    0.91558 0.016 0.188 0.796 0.000
#> GSM1182289     1  0.5279    0.92481 0.588 0.000 0.012 0.400
#> GSM1182290     1  0.5279    0.92481 0.588 0.000 0.012 0.400
#> GSM1182291     4  0.0000    0.81416 0.000 0.000 0.000 1.000
#> GSM1182274     3  0.4716    0.90988 0.040 0.196 0.764 0.000
#> GSM1182292     2  0.2647    0.88065 0.120 0.880 0.000 0.000
#> GSM1182293     2  0.2814    0.85302 0.132 0.868 0.000 0.000
#> GSM1182294     2  0.3529    0.83796 0.152 0.836 0.012 0.000
#> GSM1182295     2  0.0817    0.88954 0.024 0.976 0.000 0.000
#> GSM1182296     2  0.2647    0.88065 0.120 0.880 0.000 0.000
#> GSM1182298     3  0.5396    0.86147 0.104 0.156 0.740 0.000
#> GSM1182299     2  0.2466    0.88327 0.096 0.900 0.004 0.000
#> GSM1182300     2  0.2149    0.87734 0.088 0.912 0.000 0.000
#> GSM1182301     2  0.2647    0.88065 0.120 0.880 0.000 0.000
#> GSM1182303     2  0.2530    0.87858 0.112 0.888 0.000 0.000
#> GSM1182304     1  0.5279    0.92481 0.588 0.000 0.012 0.400
#> GSM1182305     1  0.5508    0.79541 0.508 0.000 0.016 0.476
#> GSM1182306     4  0.3591    0.56126 0.168 0.000 0.008 0.824
#> GSM1182307     2  0.2530    0.88316 0.112 0.888 0.000 0.000
#> GSM1182309     2  0.2999    0.85167 0.132 0.864 0.004 0.000
#> GSM1182312     2  0.3157    0.85098 0.144 0.852 0.004 0.000
#> GSM1182314     4  0.0000    0.81416 0.000 0.000 0.000 1.000
#> GSM1182316     2  0.2921    0.84995 0.140 0.860 0.000 0.000
#> GSM1182318     2  0.2216    0.87028 0.092 0.908 0.000 0.000
#> GSM1182319     2  0.3672    0.83063 0.164 0.824 0.012 0.000
#> GSM1182320     2  0.2921    0.84995 0.140 0.860 0.000 0.000
#> GSM1182321     2  0.3672    0.83063 0.164 0.824 0.012 0.000
#> GSM1182322     2  0.3672    0.83063 0.164 0.824 0.012 0.000
#> GSM1182324     2  0.3672    0.83063 0.164 0.824 0.012 0.000
#> GSM1182297     2  0.0707    0.89082 0.020 0.980 0.000 0.000
#> GSM1182302     1  0.5203    0.91029 0.576 0.000 0.008 0.416
#> GSM1182308     2  0.2216    0.88642 0.092 0.908 0.000 0.000
#> GSM1182310     2  0.3672    0.83063 0.164 0.824 0.012 0.000
#> GSM1182311     1  0.6384    0.91351 0.532 0.000 0.068 0.400
#> GSM1182313     4  0.0000    0.81416 0.000 0.000 0.000 1.000
#> GSM1182315     2  0.2408    0.86707 0.104 0.896 0.000 0.000
#> GSM1182317     2  0.2814    0.85302 0.132 0.868 0.000 0.000
#> GSM1182323     1  0.6384    0.91351 0.532 0.000 0.068 0.400

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4 p5
#> GSM1182186     1  0.1082      0.826 0.964 0.000 0.008 0.000 NA
#> GSM1182187     1  0.4993      0.107 0.624 0.000 0.024 0.340 NA
#> GSM1182188     4  0.4190      0.787 0.256 0.000 0.008 0.724 NA
#> GSM1182189     1  0.2886      0.801 0.844 0.000 0.008 0.000 NA
#> GSM1182190     1  0.2886      0.801 0.844 0.000 0.008 0.000 NA
#> GSM1182191     1  0.1082      0.826 0.964 0.000 0.008 0.000 NA
#> GSM1182192     4  0.7150      0.749 0.316 0.000 0.020 0.420 NA
#> GSM1182193     4  0.7150      0.749 0.316 0.000 0.020 0.420 NA
#> GSM1182194     3  0.6393      0.755 0.000 0.060 0.636 0.160 NA
#> GSM1182195     3  0.6109      0.743 0.000 0.040 0.652 0.164 NA
#> GSM1182196     2  0.5611      0.758 0.000 0.700 0.092 0.044 NA
#> GSM1182197     2  0.7015      0.421 0.000 0.528 0.292 0.080 NA
#> GSM1182198     3  0.6072      0.739 0.000 0.036 0.652 0.168 NA
#> GSM1182199     3  0.6072      0.739 0.000 0.036 0.652 0.168 NA
#> GSM1182200     2  0.1507      0.773 0.000 0.952 0.024 0.012 NA
#> GSM1182201     3  0.5307      0.630 0.000 0.316 0.628 0.036 NA
#> GSM1182202     1  0.1893      0.800 0.936 0.000 0.024 0.028 NA
#> GSM1182203     1  0.4839      0.248 0.660 0.000 0.024 0.304 NA
#> GSM1182204     1  0.2060      0.794 0.928 0.000 0.024 0.036 NA
#> GSM1182205     3  0.3054      0.861 0.000 0.060 0.880 0.032 NA
#> GSM1182206     3  0.3758      0.852 0.000 0.060 0.840 0.072 NA
#> GSM1182207     1  0.1082      0.826 0.964 0.000 0.008 0.000 NA
#> GSM1182208     1  0.1082      0.826 0.964 0.000 0.008 0.000 NA
#> GSM1182209     2  0.0510      0.794 0.000 0.984 0.000 0.000 NA
#> GSM1182210     2  0.0510      0.794 0.000 0.984 0.000 0.000 NA
#> GSM1182211     2  0.0510      0.794 0.000 0.984 0.000 0.000 NA
#> GSM1182212     2  0.0566      0.788 0.000 0.984 0.000 0.012 NA
#> GSM1182213     2  0.0290      0.790 0.000 0.992 0.000 0.000 NA
#> GSM1182214     2  0.1485      0.800 0.000 0.948 0.000 0.020 NA
#> GSM1182215     3  0.3432      0.862 0.000 0.060 0.860 0.052 NA
#> GSM1182216     2  0.4791      0.797 0.000 0.740 0.012 0.072 NA
#> GSM1182217     1  0.1725      0.821 0.936 0.000 0.020 0.000 NA
#> GSM1182218     1  0.2886      0.801 0.844 0.000 0.008 0.000 NA
#> GSM1182219     2  0.2230      0.797 0.000 0.912 0.000 0.044 NA
#> GSM1182220     2  0.0771      0.788 0.000 0.976 0.000 0.004 NA
#> GSM1182221     2  0.5107      0.775 0.000 0.596 0.000 0.048 NA
#> GSM1182222     2  0.4684      0.798 0.000 0.744 0.008 0.072 NA
#> GSM1182223     3  0.5177      0.651 0.000 0.292 0.652 0.040 NA
#> GSM1182224     3  0.6393      0.756 0.000 0.060 0.636 0.160 NA
#> GSM1182225     2  0.4372      0.801 0.000 0.756 0.000 0.072 NA
#> GSM1182226     2  0.4895      0.796 0.000 0.728 0.012 0.072 NA
#> GSM1182227     4  0.7150      0.749 0.316 0.000 0.020 0.420 NA
#> GSM1182228     3  0.5115      0.668 0.000 0.280 0.664 0.040 NA
#> GSM1182229     3  0.1731      0.866 0.000 0.060 0.932 0.004 NA
#> GSM1182230     3  0.2790      0.867 0.000 0.060 0.892 0.028 NA
#> GSM1182231     2  0.7218      0.524 0.000 0.524 0.252 0.072 NA
#> GSM1182232     1  0.2886      0.801 0.844 0.000 0.008 0.000 NA
#> GSM1182233     1  0.2886      0.801 0.844 0.000 0.008 0.000 NA
#> GSM1182234     4  0.7150      0.749 0.316 0.000 0.020 0.420 NA
#> GSM1182235     2  0.4755      0.798 0.000 0.744 0.012 0.072 NA
#> GSM1182236     1  0.2886      0.801 0.844 0.000 0.008 0.000 NA
#> GSM1182237     3  0.5646      0.734 0.000 0.064 0.704 0.076 NA
#> GSM1182238     2  0.4791      0.797 0.000 0.740 0.012 0.072 NA
#> GSM1182239     2  0.4583      0.800 0.000 0.760 0.012 0.068 NA
#> GSM1182240     2  0.0451      0.789 0.000 0.988 0.000 0.008 NA
#> GSM1182241     2  0.2351      0.783 0.000 0.916 0.020 0.036 NA
#> GSM1182242     3  0.2199      0.866 0.000 0.060 0.916 0.016 NA
#> GSM1182243     3  0.3034      0.860 0.000 0.060 0.880 0.040 NA
#> GSM1182244     3  0.6393      0.756 0.000 0.060 0.636 0.160 NA
#> GSM1182245     4  0.7049      0.758 0.312 0.000 0.020 0.448 NA
#> GSM1182246     4  0.3534      0.800 0.256 0.000 0.000 0.744 NA
#> GSM1182247     3  0.2590      0.864 0.000 0.060 0.900 0.028 NA
#> GSM1182248     3  0.2590      0.864 0.000 0.060 0.900 0.028 NA
#> GSM1182249     3  0.6043      0.695 0.000 0.092 0.672 0.072 NA
#> GSM1182250     3  0.2967      0.862 0.000 0.060 0.884 0.032 NA
#> GSM1182251     1  0.1082      0.826 0.964 0.000 0.008 0.000 NA
#> GSM1182252     3  0.2778      0.864 0.000 0.060 0.892 0.032 NA
#> GSM1182253     3  0.2502      0.865 0.000 0.060 0.904 0.024 NA
#> GSM1182254     3  0.2590      0.864 0.000 0.060 0.900 0.028 NA
#> GSM1182255     4  0.3534      0.800 0.256 0.000 0.000 0.744 NA
#> GSM1182256     4  0.3534      0.800 0.256 0.000 0.000 0.744 NA
#> GSM1182257     4  0.5200      0.780 0.264 0.000 0.024 0.672 NA
#> GSM1182258     4  0.3534      0.800 0.256 0.000 0.000 0.744 NA
#> GSM1182259     4  0.3534      0.800 0.256 0.000 0.000 0.744 NA
#> GSM1182260     3  0.2967      0.862 0.000 0.060 0.884 0.032 NA
#> GSM1182261     3  0.3960      0.838 0.000 0.060 0.828 0.080 NA
#> GSM1182262     3  0.3414      0.862 0.000 0.060 0.860 0.056 NA
#> GSM1182263     1  0.3272      0.728 0.860 0.000 0.008 0.072 NA
#> GSM1182264     3  0.2199      0.866 0.000 0.060 0.916 0.008 NA
#> GSM1182265     3  0.3818      0.847 0.000 0.060 0.836 0.028 NA
#> GSM1182266     3  0.2074      0.866 0.000 0.060 0.920 0.004 NA
#> GSM1182267     4  0.7150      0.749 0.316 0.000 0.020 0.420 NA
#> GSM1182268     1  0.2886      0.801 0.844 0.000 0.008 0.000 NA
#> GSM1182269     1  0.2886      0.801 0.844 0.000 0.008 0.000 NA
#> GSM1182270     1  0.2886      0.801 0.844 0.000 0.008 0.000 NA
#> GSM1182271     4  0.4190      0.787 0.256 0.000 0.008 0.724 NA
#> GSM1182272     4  0.3534      0.800 0.256 0.000 0.000 0.744 NA
#> GSM1182273     3  0.2074      0.866 0.000 0.060 0.920 0.004 NA
#> GSM1182275     3  0.3265      0.840 0.000 0.128 0.844 0.012 NA
#> GSM1182276     2  0.0566      0.788 0.000 0.984 0.000 0.012 NA
#> GSM1182277     4  0.7150      0.749 0.316 0.000 0.020 0.420 NA
#> GSM1182278     4  0.7150      0.749 0.316 0.000 0.020 0.420 NA
#> GSM1182279     1  0.1082      0.826 0.964 0.000 0.008 0.000 NA
#> GSM1182280     1  0.1082      0.826 0.964 0.000 0.008 0.000 NA
#> GSM1182281     4  0.5059      0.795 0.256 0.000 0.000 0.668 NA
#> GSM1182282     4  0.7150      0.749 0.316 0.000 0.020 0.420 NA
#> GSM1182283     4  0.7150      0.749 0.316 0.000 0.020 0.420 NA
#> GSM1182284     4  0.7099      0.755 0.312 0.000 0.020 0.436 NA
#> GSM1182285     3  0.6358      0.756 0.000 0.060 0.640 0.156 NA
#> GSM1182286     2  0.3410      0.801 0.000 0.840 0.000 0.068 NA
#> GSM1182287     3  0.5194      0.508 0.000 0.412 0.552 0.024 NA
#> GSM1182288     3  0.2590      0.864 0.000 0.060 0.900 0.028 NA
#> GSM1182289     1  0.1082      0.826 0.964 0.000 0.008 0.000 NA
#> GSM1182290     1  0.1082      0.826 0.964 0.000 0.008 0.000 NA
#> GSM1182291     4  0.3534      0.800 0.256 0.000 0.000 0.744 NA
#> GSM1182274     3  0.3138      0.860 0.000 0.060 0.876 0.032 NA
#> GSM1182292     2  0.0898      0.791 0.000 0.972 0.000 0.008 NA
#> GSM1182293     2  0.4287      0.744 0.000 0.540 0.000 0.000 NA
#> GSM1182294     2  0.4549      0.738 0.000 0.528 0.008 0.000 NA
#> GSM1182295     2  0.3534      0.806 0.000 0.744 0.000 0.000 NA
#> GSM1182296     2  0.0798      0.793 0.000 0.976 0.000 0.008 NA
#> GSM1182298     3  0.6109      0.743 0.000 0.040 0.652 0.164 NA
#> GSM1182299     2  0.3627      0.801 0.000 0.840 0.020 0.040 NA
#> GSM1182300     2  0.4074      0.779 0.000 0.636 0.000 0.000 NA
#> GSM1182301     2  0.0992      0.792 0.000 0.968 0.000 0.008 NA
#> GSM1182303     2  0.0566      0.788 0.000 0.984 0.000 0.012 NA
#> GSM1182304     1  0.1082      0.826 0.964 0.000 0.008 0.000 NA
#> GSM1182305     1  0.2872      0.759 0.884 0.000 0.008 0.060 NA
#> GSM1182306     1  0.5256     -0.380 0.492 0.000 0.024 0.472 NA
#> GSM1182307     2  0.0794      0.798 0.000 0.972 0.000 0.000 NA
#> GSM1182309     2  0.4287      0.744 0.000 0.540 0.000 0.000 NA
#> GSM1182312     2  0.5032      0.742 0.000 0.520 0.000 0.032 NA
#> GSM1182314     4  0.3534      0.800 0.256 0.000 0.000 0.744 NA
#> GSM1182316     2  0.4287      0.744 0.000 0.540 0.000 0.000 NA
#> GSM1182318     2  0.4101      0.777 0.000 0.628 0.000 0.000 NA
#> GSM1182319     2  0.4695      0.736 0.000 0.524 0.008 0.004 NA
#> GSM1182320     2  0.4430      0.743 0.000 0.540 0.000 0.004 NA
#> GSM1182321     2  0.4695      0.736 0.000 0.524 0.008 0.004 NA
#> GSM1182322     2  0.4698      0.734 0.000 0.520 0.008 0.004 NA
#> GSM1182324     2  0.4698      0.734 0.000 0.520 0.008 0.004 NA
#> GSM1182297     2  0.4238      0.803 0.000 0.768 0.000 0.068 NA
#> GSM1182302     1  0.2277      0.802 0.920 0.000 0.024 0.028 NA
#> GSM1182308     2  0.1124      0.802 0.000 0.960 0.000 0.004 NA
#> GSM1182310     2  0.4698      0.734 0.000 0.520 0.008 0.004 NA
#> GSM1182311     1  0.2886      0.801 0.844 0.000 0.008 0.000 NA
#> GSM1182313     4  0.3534      0.800 0.256 0.000 0.000 0.744 NA
#> GSM1182315     2  0.4321      0.771 0.000 0.600 0.000 0.004 NA
#> GSM1182317     2  0.4287      0.744 0.000 0.540 0.000 0.000 NA
#> GSM1182323     1  0.2886      0.801 0.844 0.000 0.008 0.000 NA

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1182186     5  0.1124     0.8253 0.036 0.000 0.000 0.000 0.956 0.008
#> GSM1182187     5  0.5271     0.0558 0.040 0.000 0.016 0.348 0.580 0.016
#> GSM1182188     4  0.3192     0.7782 0.004 0.000 0.000 0.776 0.216 0.004
#> GSM1182189     5  0.3384     0.8045 0.120 0.000 0.000 0.000 0.812 0.068
#> GSM1182190     5  0.3426     0.8024 0.124 0.000 0.000 0.000 0.808 0.068
#> GSM1182191     5  0.1124     0.8253 0.036 0.000 0.000 0.000 0.956 0.008
#> GSM1182192     4  0.6849     0.7273 0.044 0.000 0.004 0.420 0.284 0.248
#> GSM1182193     4  0.6849     0.7273 0.044 0.000 0.004 0.420 0.284 0.248
#> GSM1182194     6  0.4124     0.9749 0.000 0.024 0.332 0.000 0.000 0.644
#> GSM1182195     6  0.4185     0.9766 0.000 0.020 0.332 0.004 0.000 0.644
#> GSM1182196     2  0.7103    -0.0248 0.232 0.364 0.344 0.048 0.000 0.012
#> GSM1182197     3  0.6765     0.3613 0.084 0.260 0.544 0.052 0.000 0.060
#> GSM1182198     6  0.4105     0.9716 0.000 0.016 0.332 0.004 0.000 0.648
#> GSM1182199     6  0.4105     0.9716 0.000 0.016 0.332 0.004 0.000 0.648
#> GSM1182200     2  0.2201     0.6098 0.024 0.916 0.036 0.016 0.000 0.008
#> GSM1182201     3  0.4805     0.5499 0.032 0.216 0.704 0.036 0.000 0.012
#> GSM1182202     5  0.2508     0.7998 0.048 0.000 0.016 0.024 0.900 0.012
#> GSM1182203     5  0.5096     0.2013 0.040 0.000 0.016 0.320 0.612 0.012
#> GSM1182204     5  0.2672     0.7884 0.040 0.000 0.016 0.040 0.892 0.012
#> GSM1182205     3  0.3898     0.4323 0.004 0.024 0.748 0.008 0.000 0.216
#> GSM1182206     3  0.4601     0.6075 0.032 0.028 0.772 0.096 0.000 0.072
#> GSM1182207     5  0.0972     0.8273 0.028 0.000 0.000 0.000 0.964 0.008
#> GSM1182208     5  0.0972     0.8273 0.028 0.000 0.000 0.000 0.964 0.008
#> GSM1182209     2  0.0632     0.6410 0.024 0.976 0.000 0.000 0.000 0.000
#> GSM1182210     2  0.0632     0.6410 0.024 0.976 0.000 0.000 0.000 0.000
#> GSM1182211     2  0.0547     0.6432 0.020 0.980 0.000 0.000 0.000 0.000
#> GSM1182212     2  0.0912     0.6445 0.004 0.972 0.004 0.012 0.000 0.008
#> GSM1182213     2  0.0000     0.6488 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182214     2  0.2101     0.6371 0.028 0.912 0.000 0.052 0.000 0.008
#> GSM1182215     3  0.4430     0.6140 0.036 0.024 0.784 0.096 0.000 0.060
#> GSM1182216     2  0.7263     0.2644 0.220 0.504 0.064 0.160 0.000 0.052
#> GSM1182217     5  0.2151     0.8211 0.072 0.000 0.016 0.000 0.904 0.008
#> GSM1182218     5  0.3426     0.8024 0.124 0.000 0.000 0.000 0.808 0.068
#> GSM1182219     2  0.4923     0.5303 0.068 0.728 0.012 0.152 0.000 0.040
#> GSM1182220     2  0.1492     0.6434 0.024 0.940 0.000 0.036 0.000 0.000
#> GSM1182221     1  0.6725     0.3880 0.448 0.344 0.020 0.156 0.000 0.032
#> GSM1182222     2  0.7263     0.2644 0.220 0.504 0.064 0.160 0.000 0.052
#> GSM1182223     3  0.3709     0.5947 0.012 0.184 0.780 0.012 0.000 0.012
#> GSM1182224     6  0.4315     0.9690 0.004 0.024 0.348 0.000 0.000 0.624
#> GSM1182225     2  0.7091     0.2818 0.220 0.520 0.052 0.156 0.000 0.052
#> GSM1182226     2  0.7402     0.1802 0.248 0.472 0.064 0.164 0.000 0.052
#> GSM1182227     4  0.6734     0.7273 0.044 0.000 0.000 0.420 0.284 0.252
#> GSM1182228     3  0.3540     0.6136 0.012 0.164 0.800 0.012 0.000 0.012
#> GSM1182229     3  0.1321     0.6895 0.000 0.024 0.952 0.004 0.000 0.020
#> GSM1182230     3  0.4168     0.6249 0.028 0.024 0.800 0.096 0.000 0.052
#> GSM1182231     3  0.8228    -0.1454 0.156 0.268 0.348 0.172 0.000 0.056
#> GSM1182232     5  0.3384     0.8045 0.120 0.000 0.000 0.000 0.812 0.068
#> GSM1182233     5  0.3384     0.8045 0.120 0.000 0.000 0.000 0.812 0.068
#> GSM1182234     4  0.6898     0.7241 0.048 0.000 0.004 0.416 0.284 0.248
#> GSM1182235     2  0.7247     0.2736 0.216 0.508 0.060 0.160 0.000 0.056
#> GSM1182236     5  0.3384     0.8045 0.120 0.000 0.000 0.000 0.812 0.068
#> GSM1182237     3  0.6567     0.3544 0.164 0.028 0.580 0.172 0.000 0.056
#> GSM1182238     2  0.7263     0.2644 0.220 0.504 0.064 0.160 0.000 0.052
#> GSM1182239     2  0.7089     0.3183 0.196 0.536 0.060 0.152 0.000 0.056
#> GSM1182240     2  0.0582     0.6465 0.004 0.984 0.004 0.004 0.000 0.004
#> GSM1182241     2  0.4056     0.5672 0.040 0.808 0.088 0.048 0.000 0.016
#> GSM1182242     3  0.2728     0.6429 0.004 0.024 0.876 0.012 0.000 0.084
#> GSM1182243     3  0.2265     0.7008 0.028 0.024 0.912 0.032 0.000 0.004
#> GSM1182244     6  0.4554     0.9628 0.004 0.024 0.348 0.008 0.000 0.616
#> GSM1182245     4  0.6838     0.7333 0.048 0.000 0.004 0.436 0.280 0.232
#> GSM1182246     4  0.2912     0.7828 0.000 0.000 0.000 0.784 0.216 0.000
#> GSM1182247     3  0.2990     0.6062 0.004 0.024 0.844 0.004 0.000 0.124
#> GSM1182248     3  0.2990     0.6062 0.004 0.024 0.844 0.004 0.000 0.124
#> GSM1182249     3  0.4924     0.6065 0.132 0.040 0.744 0.044 0.000 0.040
#> GSM1182250     3  0.2620     0.6951 0.048 0.024 0.888 0.040 0.000 0.000
#> GSM1182251     5  0.1124     0.8253 0.036 0.000 0.000 0.000 0.956 0.008
#> GSM1182252     3  0.2990     0.6058 0.004 0.024 0.844 0.004 0.000 0.124
#> GSM1182253     3  0.2826     0.6229 0.000 0.024 0.856 0.008 0.000 0.112
#> GSM1182254     3  0.1966     0.6990 0.024 0.024 0.924 0.028 0.000 0.000
#> GSM1182255     4  0.2912     0.7828 0.000 0.000 0.000 0.784 0.216 0.000
#> GSM1182256     4  0.2912     0.7828 0.000 0.000 0.000 0.784 0.216 0.000
#> GSM1182257     4  0.5140     0.7526 0.040 0.000 0.016 0.680 0.224 0.040
#> GSM1182258     4  0.2912     0.7828 0.000 0.000 0.000 0.784 0.216 0.000
#> GSM1182259     4  0.2912     0.7828 0.000 0.000 0.000 0.784 0.216 0.000
#> GSM1182260     3  0.2550     0.6954 0.048 0.024 0.892 0.036 0.000 0.000
#> GSM1182261     3  0.4491     0.6139 0.044 0.024 0.780 0.100 0.000 0.052
#> GSM1182262     3  0.4287     0.6139 0.028 0.024 0.792 0.096 0.000 0.060
#> GSM1182263     5  0.3325     0.6964 0.036 0.000 0.000 0.092 0.840 0.032
#> GSM1182264     3  0.3249     0.6817 0.044 0.024 0.864 0.028 0.000 0.040
#> GSM1182265     3  0.3452     0.6642 0.116 0.024 0.824 0.036 0.000 0.000
#> GSM1182266     3  0.3103     0.6813 0.040 0.024 0.872 0.024 0.000 0.040
#> GSM1182267     4  0.6784     0.7239 0.048 0.000 0.000 0.416 0.284 0.252
#> GSM1182268     5  0.3482     0.8045 0.116 0.000 0.004 0.000 0.812 0.068
#> GSM1182269     5  0.3384     0.8045 0.120 0.000 0.000 0.000 0.812 0.068
#> GSM1182270     5  0.3384     0.8045 0.120 0.000 0.000 0.000 0.812 0.068
#> GSM1182271     4  0.3192     0.7782 0.004 0.000 0.000 0.776 0.216 0.004
#> GSM1182272     4  0.2912     0.7828 0.000 0.000 0.000 0.784 0.216 0.000
#> GSM1182273     3  0.3171     0.6813 0.044 0.024 0.868 0.024 0.000 0.040
#> GSM1182275     3  0.3803     0.6592 0.032 0.088 0.824 0.036 0.000 0.020
#> GSM1182276     2  0.0798     0.6449 0.004 0.976 0.004 0.012 0.000 0.004
#> GSM1182277     4  0.6734     0.7273 0.044 0.000 0.000 0.420 0.284 0.252
#> GSM1182278     4  0.6734     0.7273 0.044 0.000 0.000 0.420 0.284 0.252
#> GSM1182279     5  0.0972     0.8273 0.028 0.000 0.000 0.000 0.964 0.008
#> GSM1182280     5  0.0972     0.8273 0.028 0.000 0.000 0.000 0.964 0.008
#> GSM1182281     4  0.4838     0.7765 0.028 0.000 0.004 0.696 0.216 0.056
#> GSM1182282     4  0.6886     0.7274 0.048 0.000 0.004 0.420 0.284 0.244
#> GSM1182283     4  0.6734     0.7273 0.044 0.000 0.000 0.420 0.284 0.252
#> GSM1182284     4  0.6713     0.7312 0.044 0.000 0.000 0.428 0.280 0.248
#> GSM1182285     6  0.4315     0.9690 0.004 0.024 0.348 0.000 0.000 0.624
#> GSM1182286     2  0.5739     0.4769 0.108 0.668 0.020 0.152 0.000 0.052
#> GSM1182287     3  0.4882     0.2448 0.012 0.448 0.512 0.016 0.000 0.012
#> GSM1182288     3  0.2848     0.6089 0.000 0.024 0.848 0.004 0.000 0.124
#> GSM1182289     5  0.1124     0.8253 0.036 0.000 0.000 0.000 0.956 0.008
#> GSM1182290     5  0.0972     0.8273 0.028 0.000 0.000 0.000 0.964 0.008
#> GSM1182291     4  0.2912     0.7828 0.000 0.000 0.000 0.784 0.216 0.000
#> GSM1182274     3  0.2550     0.6954 0.048 0.024 0.892 0.036 0.000 0.000
#> GSM1182292     2  0.0837     0.6419 0.020 0.972 0.000 0.004 0.000 0.004
#> GSM1182293     1  0.3499     0.8613 0.680 0.320 0.000 0.000 0.000 0.000
#> GSM1182294     1  0.4116     0.8625 0.684 0.288 0.012 0.016 0.000 0.000
#> GSM1182295     2  0.4184    -0.2363 0.408 0.576 0.000 0.016 0.000 0.000
#> GSM1182296     2  0.0837     0.6419 0.020 0.972 0.000 0.004 0.000 0.004
#> GSM1182298     6  0.4185     0.9766 0.000 0.020 0.332 0.004 0.000 0.644
#> GSM1182299     2  0.5321     0.4824 0.156 0.700 0.080 0.048 0.000 0.016
#> GSM1182300     2  0.4264    -0.5256 0.484 0.500 0.000 0.016 0.000 0.000
#> GSM1182301     2  0.1225     0.6353 0.032 0.956 0.004 0.004 0.000 0.004
#> GSM1182303     2  0.0798     0.6449 0.004 0.976 0.004 0.012 0.000 0.004
#> GSM1182304     5  0.0972     0.8273 0.028 0.000 0.000 0.000 0.964 0.008
#> GSM1182305     5  0.3089     0.7252 0.040 0.000 0.000 0.080 0.856 0.024
#> GSM1182306     4  0.5432     0.3488 0.040 0.000 0.016 0.476 0.452 0.016
#> GSM1182307     2  0.1151     0.6386 0.032 0.956 0.000 0.012 0.000 0.000
#> GSM1182309     1  0.3464     0.8644 0.688 0.312 0.000 0.000 0.000 0.000
#> GSM1182312     1  0.5598     0.6617 0.572 0.288 0.000 0.124 0.000 0.016
#> GSM1182314     4  0.2912     0.7828 0.000 0.000 0.000 0.784 0.216 0.000
#> GSM1182316     1  0.3482     0.8638 0.684 0.316 0.000 0.000 0.000 0.000
#> GSM1182318     1  0.4184     0.5325 0.504 0.484 0.000 0.012 0.000 0.000
#> GSM1182319     1  0.3855     0.8598 0.704 0.276 0.016 0.000 0.000 0.004
#> GSM1182320     1  0.3619     0.8645 0.680 0.316 0.000 0.000 0.000 0.004
#> GSM1182321     1  0.3875     0.8585 0.700 0.280 0.016 0.000 0.000 0.004
#> GSM1182322     1  0.3855     0.8598 0.704 0.276 0.016 0.000 0.000 0.004
#> GSM1182324     1  0.3855     0.8598 0.704 0.276 0.016 0.000 0.000 0.004
#> GSM1182297     2  0.6838     0.2997 0.216 0.540 0.032 0.156 0.000 0.056
#> GSM1182302     5  0.2728     0.8015 0.056 0.000 0.016 0.024 0.888 0.016
#> GSM1182308     2  0.1723     0.6339 0.036 0.928 0.000 0.036 0.000 0.000
#> GSM1182310     1  0.3855     0.8598 0.704 0.276 0.016 0.000 0.000 0.004
#> GSM1182311     5  0.3525     0.8027 0.120 0.000 0.004 0.000 0.808 0.068
#> GSM1182313     4  0.2912     0.7828 0.000 0.000 0.000 0.784 0.216 0.000
#> GSM1182315     1  0.5021     0.6465 0.536 0.408 0.000 0.032 0.000 0.024
#> GSM1182317     1  0.3482     0.8638 0.684 0.316 0.000 0.000 0.000 0.000
#> GSM1182323     5  0.3384     0.8045 0.120 0.000 0.000 0.000 0.812 0.068

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 disease.state(p) gender(p) k
#> MAD:kmeans 139         7.73e-02     1.000 2
#> MAD:kmeans 139         3.55e-07     0.393 3
#> MAD:kmeans 137         1.90e-06     0.419 4
#> MAD:kmeans 135         5.20e-07     0.421 5
#> MAD:kmeans 117         3.51e-11     0.315 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 46361 rows and 139 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 4.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk 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 1.000           0.994       0.997         0.4802 0.521   0.521
#> 3 3 1.000           0.991       0.997         0.3819 0.815   0.645
#> 4 4 1.000           0.960       0.974         0.1117 0.925   0.777
#> 5 5 0.842           0.790       0.860         0.0658 0.924   0.725
#> 6 6 0.809           0.714       0.845         0.0441 0.941   0.735

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

suggest_best_k(res)
#> [1] 4
#> attr(,"optional")
#> [1] 2 3

There is also optional best \(k\) = 2 3 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
#> GSM1182186     1   0.000      1.000 1.000 0.000
#> GSM1182187     1   0.000      1.000 1.000 0.000
#> GSM1182188     1   0.000      1.000 1.000 0.000
#> GSM1182189     1   0.000      1.000 1.000 0.000
#> GSM1182190     1   0.000      1.000 1.000 0.000
#> GSM1182191     1   0.000      1.000 1.000 0.000
#> GSM1182192     1   0.000      1.000 1.000 0.000
#> GSM1182193     1   0.000      1.000 1.000 0.000
#> GSM1182194     2   0.000      0.996 0.000 1.000
#> GSM1182195     2   0.000      0.996 0.000 1.000
#> GSM1182196     2   0.000      0.996 0.000 1.000
#> GSM1182197     2   0.000      0.996 0.000 1.000
#> GSM1182198     2   0.722      0.753 0.200 0.800
#> GSM1182199     2   0.615      0.822 0.152 0.848
#> GSM1182200     2   0.000      0.996 0.000 1.000
#> GSM1182201     2   0.000      0.996 0.000 1.000
#> GSM1182202     1   0.000      1.000 1.000 0.000
#> GSM1182203     1   0.000      1.000 1.000 0.000
#> GSM1182204     1   0.000      1.000 1.000 0.000
#> GSM1182205     2   0.000      0.996 0.000 1.000
#> GSM1182206     2   0.000      0.996 0.000 1.000
#> GSM1182207     1   0.000      1.000 1.000 0.000
#> GSM1182208     1   0.000      1.000 1.000 0.000
#> GSM1182209     2   0.000      0.996 0.000 1.000
#> GSM1182210     2   0.000      0.996 0.000 1.000
#> GSM1182211     2   0.000      0.996 0.000 1.000
#> GSM1182212     2   0.000      0.996 0.000 1.000
#> GSM1182213     2   0.000      0.996 0.000 1.000
#> GSM1182214     2   0.000      0.996 0.000 1.000
#> GSM1182215     2   0.000      0.996 0.000 1.000
#> GSM1182216     2   0.000      0.996 0.000 1.000
#> GSM1182217     1   0.000      1.000 1.000 0.000
#> GSM1182218     1   0.000      1.000 1.000 0.000
#> GSM1182219     2   0.000      0.996 0.000 1.000
#> GSM1182220     2   0.000      0.996 0.000 1.000
#> GSM1182221     2   0.000      0.996 0.000 1.000
#> GSM1182222     2   0.000      0.996 0.000 1.000
#> GSM1182223     2   0.000      0.996 0.000 1.000
#> GSM1182224     2   0.000      0.996 0.000 1.000
#> GSM1182225     2   0.000      0.996 0.000 1.000
#> GSM1182226     2   0.000      0.996 0.000 1.000
#> GSM1182227     1   0.000      1.000 1.000 0.000
#> GSM1182228     2   0.000      0.996 0.000 1.000
#> GSM1182229     2   0.000      0.996 0.000 1.000
#> GSM1182230     2   0.000      0.996 0.000 1.000
#> GSM1182231     2   0.000      0.996 0.000 1.000
#> GSM1182232     1   0.000      1.000 1.000 0.000
#> GSM1182233     1   0.000      1.000 1.000 0.000
#> GSM1182234     1   0.000      1.000 1.000 0.000
#> GSM1182235     2   0.000      0.996 0.000 1.000
#> GSM1182236     1   0.000      1.000 1.000 0.000
#> GSM1182237     2   0.000      0.996 0.000 1.000
#> GSM1182238     2   0.000      0.996 0.000 1.000
#> GSM1182239     2   0.000      0.996 0.000 1.000
#> GSM1182240     2   0.000      0.996 0.000 1.000
#> GSM1182241     2   0.000      0.996 0.000 1.000
#> GSM1182242     2   0.000      0.996 0.000 1.000
#> GSM1182243     2   0.000      0.996 0.000 1.000
#> GSM1182244     2   0.000      0.996 0.000 1.000
#> GSM1182245     1   0.000      1.000 1.000 0.000
#> GSM1182246     1   0.000      1.000 1.000 0.000
#> GSM1182247     2   0.000      0.996 0.000 1.000
#> GSM1182248     2   0.000      0.996 0.000 1.000
#> GSM1182249     2   0.000      0.996 0.000 1.000
#> GSM1182250     2   0.000      0.996 0.000 1.000
#> GSM1182251     1   0.000      1.000 1.000 0.000
#> GSM1182252     2   0.000      0.996 0.000 1.000
#> GSM1182253     2   0.000      0.996 0.000 1.000
#> GSM1182254     2   0.000      0.996 0.000 1.000
#> GSM1182255     1   0.000      1.000 1.000 0.000
#> GSM1182256     1   0.000      1.000 1.000 0.000
#> GSM1182257     1   0.000      1.000 1.000 0.000
#> GSM1182258     1   0.000      1.000 1.000 0.000
#> GSM1182259     1   0.000      1.000 1.000 0.000
#> GSM1182260     2   0.000      0.996 0.000 1.000
#> GSM1182261     2   0.000      0.996 0.000 1.000
#> GSM1182262     2   0.000      0.996 0.000 1.000
#> GSM1182263     1   0.000      1.000 1.000 0.000
#> GSM1182264     2   0.000      0.996 0.000 1.000
#> GSM1182265     2   0.000      0.996 0.000 1.000
#> GSM1182266     2   0.000      0.996 0.000 1.000
#> GSM1182267     1   0.000      1.000 1.000 0.000
#> GSM1182268     1   0.000      1.000 1.000 0.000
#> GSM1182269     1   0.000      1.000 1.000 0.000
#> GSM1182270     1   0.000      1.000 1.000 0.000
#> GSM1182271     1   0.000      1.000 1.000 0.000
#> GSM1182272     1   0.000      1.000 1.000 0.000
#> GSM1182273     2   0.000      0.996 0.000 1.000
#> GSM1182275     2   0.000      0.996 0.000 1.000
#> GSM1182276     2   0.000      0.996 0.000 1.000
#> GSM1182277     1   0.000      1.000 1.000 0.000
#> GSM1182278     1   0.000      1.000 1.000 0.000
#> GSM1182279     1   0.000      1.000 1.000 0.000
#> GSM1182280     1   0.000      1.000 1.000 0.000
#> GSM1182281     1   0.000      1.000 1.000 0.000
#> GSM1182282     1   0.000      1.000 1.000 0.000
#> GSM1182283     1   0.000      1.000 1.000 0.000
#> GSM1182284     1   0.000      1.000 1.000 0.000
#> GSM1182285     2   0.000      0.996 0.000 1.000
#> GSM1182286     2   0.000      0.996 0.000 1.000
#> GSM1182287     2   0.000      0.996 0.000 1.000
#> GSM1182288     2   0.000      0.996 0.000 1.000
#> GSM1182289     1   0.000      1.000 1.000 0.000
#> GSM1182290     1   0.000      1.000 1.000 0.000
#> GSM1182291     1   0.000      1.000 1.000 0.000
#> GSM1182274     2   0.000      0.996 0.000 1.000
#> GSM1182292     2   0.000      0.996 0.000 1.000
#> GSM1182293     2   0.000      0.996 0.000 1.000
#> GSM1182294     2   0.000      0.996 0.000 1.000
#> GSM1182295     2   0.000      0.996 0.000 1.000
#> GSM1182296     2   0.000      0.996 0.000 1.000
#> GSM1182298     2   0.000      0.996 0.000 1.000
#> GSM1182299     2   0.000      0.996 0.000 1.000
#> GSM1182300     2   0.000      0.996 0.000 1.000
#> GSM1182301     2   0.000      0.996 0.000 1.000
#> GSM1182303     2   0.000      0.996 0.000 1.000
#> GSM1182304     1   0.000      1.000 1.000 0.000
#> GSM1182305     1   0.000      1.000 1.000 0.000
#> GSM1182306     1   0.000      1.000 1.000 0.000
#> GSM1182307     2   0.000      0.996 0.000 1.000
#> GSM1182309     2   0.000      0.996 0.000 1.000
#> GSM1182312     2   0.000      0.996 0.000 1.000
#> GSM1182314     1   0.000      1.000 1.000 0.000
#> GSM1182316     2   0.000      0.996 0.000 1.000
#> GSM1182318     2   0.000      0.996 0.000 1.000
#> GSM1182319     2   0.000      0.996 0.000 1.000
#> GSM1182320     2   0.000      0.996 0.000 1.000
#> GSM1182321     2   0.000      0.996 0.000 1.000
#> GSM1182322     2   0.000      0.996 0.000 1.000
#> GSM1182324     2   0.000      0.996 0.000 1.000
#> GSM1182297     2   0.000      0.996 0.000 1.000
#> GSM1182302     1   0.000      1.000 1.000 0.000
#> GSM1182308     2   0.000      0.996 0.000 1.000
#> GSM1182310     2   0.000      0.996 0.000 1.000
#> GSM1182311     1   0.000      1.000 1.000 0.000
#> GSM1182313     1   0.000      1.000 1.000 0.000
#> GSM1182315     2   0.000      0.996 0.000 1.000
#> GSM1182317     2   0.000      0.996 0.000 1.000
#> GSM1182323     1   0.000      1.000 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette p1    p2    p3
#> GSM1182186     1  0.0000      1.000  1 0.000 0.000
#> GSM1182187     1  0.0000      1.000  1 0.000 0.000
#> GSM1182188     1  0.0000      1.000  1 0.000 0.000
#> GSM1182189     1  0.0000      1.000  1 0.000 0.000
#> GSM1182190     1  0.0000      1.000  1 0.000 0.000
#> GSM1182191     1  0.0000      1.000  1 0.000 0.000
#> GSM1182192     1  0.0000      1.000  1 0.000 0.000
#> GSM1182193     1  0.0000      1.000  1 0.000 0.000
#> GSM1182194     3  0.0000      0.987  0 0.000 1.000
#> GSM1182195     3  0.0000      0.987  0 0.000 1.000
#> GSM1182196     2  0.0000      1.000  0 1.000 0.000
#> GSM1182197     2  0.0000      1.000  0 1.000 0.000
#> GSM1182198     3  0.0000      0.987  0 0.000 1.000
#> GSM1182199     3  0.0000      0.987  0 0.000 1.000
#> GSM1182200     2  0.0000      1.000  0 1.000 0.000
#> GSM1182201     3  0.0424      0.980  0 0.008 0.992
#> GSM1182202     1  0.0000      1.000  1 0.000 0.000
#> GSM1182203     1  0.0000      1.000  1 0.000 0.000
#> GSM1182204     1  0.0000      1.000  1 0.000 0.000
#> GSM1182205     3  0.0000      0.987  0 0.000 1.000
#> GSM1182206     3  0.0000      0.987  0 0.000 1.000
#> GSM1182207     1  0.0000      1.000  1 0.000 0.000
#> GSM1182208     1  0.0000      1.000  1 0.000 0.000
#> GSM1182209     2  0.0000      1.000  0 1.000 0.000
#> GSM1182210     2  0.0000      1.000  0 1.000 0.000
#> GSM1182211     2  0.0000      1.000  0 1.000 0.000
#> GSM1182212     2  0.0000      1.000  0 1.000 0.000
#> GSM1182213     2  0.0000      1.000  0 1.000 0.000
#> GSM1182214     2  0.0000      1.000  0 1.000 0.000
#> GSM1182215     3  0.0000      0.987  0 0.000 1.000
#> GSM1182216     2  0.0000      1.000  0 1.000 0.000
#> GSM1182217     1  0.0000      1.000  1 0.000 0.000
#> GSM1182218     1  0.0000      1.000  1 0.000 0.000
#> GSM1182219     2  0.0000      1.000  0 1.000 0.000
#> GSM1182220     2  0.0000      1.000  0 1.000 0.000
#> GSM1182221     2  0.0000      1.000  0 1.000 0.000
#> GSM1182222     2  0.0000      1.000  0 1.000 0.000
#> GSM1182223     3  0.0000      0.987  0 0.000 1.000
#> GSM1182224     3  0.0000      0.987  0 0.000 1.000
#> GSM1182225     2  0.0000      1.000  0 1.000 0.000
#> GSM1182226     2  0.0000      1.000  0 1.000 0.000
#> GSM1182227     1  0.0000      1.000  1 0.000 0.000
#> GSM1182228     3  0.0000      0.987  0 0.000 1.000
#> GSM1182229     3  0.0000      0.987  0 0.000 1.000
#> GSM1182230     3  0.0000      0.987  0 0.000 1.000
#> GSM1182231     2  0.0000      1.000  0 1.000 0.000
#> GSM1182232     1  0.0000      1.000  1 0.000 0.000
#> GSM1182233     1  0.0000      1.000  1 0.000 0.000
#> GSM1182234     1  0.0000      1.000  1 0.000 0.000
#> GSM1182235     2  0.0000      1.000  0 1.000 0.000
#> GSM1182236     1  0.0000      1.000  1 0.000 0.000
#> GSM1182237     3  0.0000      0.987  0 0.000 1.000
#> GSM1182238     2  0.0000      1.000  0 1.000 0.000
#> GSM1182239     2  0.0000      1.000  0 1.000 0.000
#> GSM1182240     2  0.0000      1.000  0 1.000 0.000
#> GSM1182241     2  0.0000      1.000  0 1.000 0.000
#> GSM1182242     3  0.0000      0.987  0 0.000 1.000
#> GSM1182243     3  0.0000      0.987  0 0.000 1.000
#> GSM1182244     3  0.0000      0.987  0 0.000 1.000
#> GSM1182245     1  0.0000      1.000  1 0.000 0.000
#> GSM1182246     1  0.0000      1.000  1 0.000 0.000
#> GSM1182247     3  0.0000      0.987  0 0.000 1.000
#> GSM1182248     3  0.0000      0.987  0 0.000 1.000
#> GSM1182249     3  0.6225      0.241  0 0.432 0.568
#> GSM1182250     3  0.0000      0.987  0 0.000 1.000
#> GSM1182251     1  0.0000      1.000  1 0.000 0.000
#> GSM1182252     3  0.0000      0.987  0 0.000 1.000
#> GSM1182253     3  0.0000      0.987  0 0.000 1.000
#> GSM1182254     3  0.0000      0.987  0 0.000 1.000
#> GSM1182255     1  0.0000      1.000  1 0.000 0.000
#> GSM1182256     1  0.0000      1.000  1 0.000 0.000
#> GSM1182257     1  0.0000      1.000  1 0.000 0.000
#> GSM1182258     1  0.0000      1.000  1 0.000 0.000
#> GSM1182259     1  0.0000      1.000  1 0.000 0.000
#> GSM1182260     3  0.0000      0.987  0 0.000 1.000
#> GSM1182261     3  0.0000      0.987  0 0.000 1.000
#> GSM1182262     3  0.0000      0.987  0 0.000 1.000
#> GSM1182263     1  0.0000      1.000  1 0.000 0.000
#> GSM1182264     3  0.0000      0.987  0 0.000 1.000
#> GSM1182265     3  0.0000      0.987  0 0.000 1.000
#> GSM1182266     3  0.0000      0.987  0 0.000 1.000
#> GSM1182267     1  0.0000      1.000  1 0.000 0.000
#> GSM1182268     1  0.0000      1.000  1 0.000 0.000
#> GSM1182269     1  0.0000      1.000  1 0.000 0.000
#> GSM1182270     1  0.0000      1.000  1 0.000 0.000
#> GSM1182271     1  0.0000      1.000  1 0.000 0.000
#> GSM1182272     1  0.0000      1.000  1 0.000 0.000
#> GSM1182273     3  0.0000      0.987  0 0.000 1.000
#> GSM1182275     3  0.0000      0.987  0 0.000 1.000
#> GSM1182276     2  0.0000      1.000  0 1.000 0.000
#> GSM1182277     1  0.0000      1.000  1 0.000 0.000
#> GSM1182278     1  0.0000      1.000  1 0.000 0.000
#> GSM1182279     1  0.0000      1.000  1 0.000 0.000
#> GSM1182280     1  0.0000      1.000  1 0.000 0.000
#> GSM1182281     1  0.0000      1.000  1 0.000 0.000
#> GSM1182282     1  0.0000      1.000  1 0.000 0.000
#> GSM1182283     1  0.0000      1.000  1 0.000 0.000
#> GSM1182284     1  0.0000      1.000  1 0.000 0.000
#> GSM1182285     3  0.0000      0.987  0 0.000 1.000
#> GSM1182286     2  0.0000      1.000  0 1.000 0.000
#> GSM1182287     3  0.0592      0.977  0 0.012 0.988
#> GSM1182288     3  0.0000      0.987  0 0.000 1.000
#> GSM1182289     1  0.0000      1.000  1 0.000 0.000
#> GSM1182290     1  0.0000      1.000  1 0.000 0.000
#> GSM1182291     1  0.0000      1.000  1 0.000 0.000
#> GSM1182274     3  0.0000      0.987  0 0.000 1.000
#> GSM1182292     2  0.0000      1.000  0 1.000 0.000
#> GSM1182293     2  0.0000      1.000  0 1.000 0.000
#> GSM1182294     2  0.0000      1.000  0 1.000 0.000
#> GSM1182295     2  0.0000      1.000  0 1.000 0.000
#> GSM1182296     2  0.0000      1.000  0 1.000 0.000
#> GSM1182298     3  0.0000      0.987  0 0.000 1.000
#> GSM1182299     2  0.0000      1.000  0 1.000 0.000
#> GSM1182300     2  0.0000      1.000  0 1.000 0.000
#> GSM1182301     2  0.0000      1.000  0 1.000 0.000
#> GSM1182303     2  0.0000      1.000  0 1.000 0.000
#> GSM1182304     1  0.0000      1.000  1 0.000 0.000
#> GSM1182305     1  0.0000      1.000  1 0.000 0.000
#> GSM1182306     1  0.0000      1.000  1 0.000 0.000
#> GSM1182307     2  0.0000      1.000  0 1.000 0.000
#> GSM1182309     2  0.0000      1.000  0 1.000 0.000
#> GSM1182312     2  0.0000      1.000  0 1.000 0.000
#> GSM1182314     1  0.0000      1.000  1 0.000 0.000
#> GSM1182316     2  0.0000      1.000  0 1.000 0.000
#> GSM1182318     2  0.0000      1.000  0 1.000 0.000
#> GSM1182319     2  0.0000      1.000  0 1.000 0.000
#> GSM1182320     2  0.0000      1.000  0 1.000 0.000
#> GSM1182321     2  0.0000      1.000  0 1.000 0.000
#> GSM1182322     2  0.0000      1.000  0 1.000 0.000
#> GSM1182324     2  0.0000      1.000  0 1.000 0.000
#> GSM1182297     2  0.0000      1.000  0 1.000 0.000
#> GSM1182302     1  0.0000      1.000  1 0.000 0.000
#> GSM1182308     2  0.0000      1.000  0 1.000 0.000
#> GSM1182310     2  0.0000      1.000  0 1.000 0.000
#> GSM1182311     1  0.0000      1.000  1 0.000 0.000
#> GSM1182313     1  0.0000      1.000  1 0.000 0.000
#> GSM1182315     2  0.0000      1.000  0 1.000 0.000
#> GSM1182317     2  0.0000      1.000  0 1.000 0.000
#> GSM1182323     1  0.0000      1.000  1 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1182186     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM1182187     1  0.4564      0.549 0.672 0.000 0.000 0.328
#> GSM1182188     4  0.1211      1.000 0.040 0.000 0.000 0.960
#> GSM1182189     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM1182190     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM1182191     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM1182192     4  0.1211      1.000 0.040 0.000 0.000 0.960
#> GSM1182193     4  0.1211      1.000 0.040 0.000 0.000 0.960
#> GSM1182194     3  0.0469      0.976 0.000 0.000 0.988 0.012
#> GSM1182195     3  0.0469      0.976 0.000 0.000 0.988 0.012
#> GSM1182196     2  0.0336      0.991 0.000 0.992 0.000 0.008
#> GSM1182197     2  0.0804      0.983 0.000 0.980 0.012 0.008
#> GSM1182198     3  0.0469      0.976 0.000 0.000 0.988 0.012
#> GSM1182199     3  0.0469      0.976 0.000 0.000 0.988 0.012
#> GSM1182200     2  0.0336      0.991 0.000 0.992 0.000 0.008
#> GSM1182201     3  0.1256      0.953 0.000 0.028 0.964 0.008
#> GSM1182202     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM1182203     1  0.4564      0.549 0.672 0.000 0.000 0.328
#> GSM1182204     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM1182205     3  0.0469      0.976 0.000 0.000 0.988 0.012
#> GSM1182206     3  0.0000      0.979 0.000 0.000 1.000 0.000
#> GSM1182207     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM1182208     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM1182209     2  0.0336      0.991 0.000 0.992 0.000 0.008
#> GSM1182210     2  0.0336      0.991 0.000 0.992 0.000 0.008
#> GSM1182211     2  0.0336      0.991 0.000 0.992 0.000 0.008
#> GSM1182212     2  0.0336      0.991 0.000 0.992 0.000 0.008
#> GSM1182213     2  0.0336      0.991 0.000 0.992 0.000 0.008
#> GSM1182214     2  0.0336      0.991 0.000 0.992 0.000 0.008
#> GSM1182215     3  0.0000      0.979 0.000 0.000 1.000 0.000
#> GSM1182216     2  0.0000      0.991 0.000 1.000 0.000 0.000
#> GSM1182217     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM1182218     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM1182219     2  0.0336      0.991 0.000 0.992 0.000 0.008
#> GSM1182220     2  0.0336      0.991 0.000 0.992 0.000 0.008
#> GSM1182221     2  0.0469      0.988 0.000 0.988 0.000 0.012
#> GSM1182222     2  0.0000      0.991 0.000 1.000 0.000 0.000
#> GSM1182223     3  0.1042      0.960 0.000 0.020 0.972 0.008
#> GSM1182224     3  0.0469      0.976 0.000 0.000 0.988 0.012
#> GSM1182225     2  0.0000      0.991 0.000 1.000 0.000 0.000
#> GSM1182226     2  0.0000      0.991 0.000 1.000 0.000 0.000
#> GSM1182227     4  0.1211      1.000 0.040 0.000 0.000 0.960
#> GSM1182228     3  0.1042      0.960 0.000 0.020 0.972 0.008
#> GSM1182229     3  0.0000      0.979 0.000 0.000 1.000 0.000
#> GSM1182230     3  0.0000      0.979 0.000 0.000 1.000 0.000
#> GSM1182231     2  0.0336      0.988 0.000 0.992 0.008 0.000
#> GSM1182232     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM1182233     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM1182234     4  0.1211      1.000 0.040 0.000 0.000 0.960
#> GSM1182235     2  0.0000      0.991 0.000 1.000 0.000 0.000
#> GSM1182236     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM1182237     3  0.0336      0.975 0.000 0.008 0.992 0.000
#> GSM1182238     2  0.0000      0.991 0.000 1.000 0.000 0.000
#> GSM1182239     2  0.0000      0.991 0.000 1.000 0.000 0.000
#> GSM1182240     2  0.0336      0.991 0.000 0.992 0.000 0.008
#> GSM1182241     2  0.0336      0.991 0.000 0.992 0.000 0.008
#> GSM1182242     3  0.0000      0.979 0.000 0.000 1.000 0.000
#> GSM1182243     3  0.0000      0.979 0.000 0.000 1.000 0.000
#> GSM1182244     3  0.0469      0.976 0.000 0.000 0.988 0.012
#> GSM1182245     4  0.1211      1.000 0.040 0.000 0.000 0.960
#> GSM1182246     4  0.1211      1.000 0.040 0.000 0.000 0.960
#> GSM1182247     3  0.0000      0.979 0.000 0.000 1.000 0.000
#> GSM1182248     3  0.0000      0.979 0.000 0.000 1.000 0.000
#> GSM1182249     3  0.4933      0.235 0.000 0.432 0.568 0.000
#> GSM1182250     3  0.0000      0.979 0.000 0.000 1.000 0.000
#> GSM1182251     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM1182252     3  0.0000      0.979 0.000 0.000 1.000 0.000
#> GSM1182253     3  0.0000      0.979 0.000 0.000 1.000 0.000
#> GSM1182254     3  0.0000      0.979 0.000 0.000 1.000 0.000
#> GSM1182255     4  0.1211      1.000 0.040 0.000 0.000 0.960
#> GSM1182256     4  0.1211      1.000 0.040 0.000 0.000 0.960
#> GSM1182257     4  0.1211      1.000 0.040 0.000 0.000 0.960
#> GSM1182258     4  0.1211      1.000 0.040 0.000 0.000 0.960
#> GSM1182259     4  0.1211      1.000 0.040 0.000 0.000 0.960
#> GSM1182260     3  0.0000      0.979 0.000 0.000 1.000 0.000
#> GSM1182261     3  0.0000      0.979 0.000 0.000 1.000 0.000
#> GSM1182262     3  0.0000      0.979 0.000 0.000 1.000 0.000
#> GSM1182263     1  0.4382      0.607 0.704 0.000 0.000 0.296
#> GSM1182264     3  0.0000      0.979 0.000 0.000 1.000 0.000
#> GSM1182265     3  0.0000      0.979 0.000 0.000 1.000 0.000
#> GSM1182266     3  0.0000      0.979 0.000 0.000 1.000 0.000
#> GSM1182267     4  0.1211      1.000 0.040 0.000 0.000 0.960
#> GSM1182268     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM1182269     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM1182270     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM1182271     4  0.1211      1.000 0.040 0.000 0.000 0.960
#> GSM1182272     4  0.1211      1.000 0.040 0.000 0.000 0.960
#> GSM1182273     3  0.0000      0.979 0.000 0.000 1.000 0.000
#> GSM1182275     3  0.0336      0.975 0.000 0.000 0.992 0.008
#> GSM1182276     2  0.0336      0.991 0.000 0.992 0.000 0.008
#> GSM1182277     4  0.1211      1.000 0.040 0.000 0.000 0.960
#> GSM1182278     4  0.1211      1.000 0.040 0.000 0.000 0.960
#> GSM1182279     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM1182280     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM1182281     4  0.1211      1.000 0.040 0.000 0.000 0.960
#> GSM1182282     4  0.1211      1.000 0.040 0.000 0.000 0.960
#> GSM1182283     4  0.1211      1.000 0.040 0.000 0.000 0.960
#> GSM1182284     4  0.1211      1.000 0.040 0.000 0.000 0.960
#> GSM1182285     3  0.0469      0.976 0.000 0.000 0.988 0.012
#> GSM1182286     2  0.0336      0.991 0.000 0.992 0.000 0.008
#> GSM1182287     3  0.1356      0.949 0.000 0.032 0.960 0.008
#> GSM1182288     3  0.0000      0.979 0.000 0.000 1.000 0.000
#> GSM1182289     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM1182290     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM1182291     4  0.1211      1.000 0.040 0.000 0.000 0.960
#> GSM1182274     3  0.0000      0.979 0.000 0.000 1.000 0.000
#> GSM1182292     2  0.0336      0.991 0.000 0.992 0.000 0.008
#> GSM1182293     2  0.0707      0.986 0.000 0.980 0.000 0.020
#> GSM1182294     2  0.0707      0.986 0.000 0.980 0.000 0.020
#> GSM1182295     2  0.0188      0.990 0.000 0.996 0.000 0.004
#> GSM1182296     2  0.0336      0.991 0.000 0.992 0.000 0.008
#> GSM1182298     3  0.0469      0.976 0.000 0.000 0.988 0.012
#> GSM1182299     2  0.0336      0.991 0.000 0.992 0.000 0.008
#> GSM1182300     2  0.0707      0.986 0.000 0.980 0.000 0.020
#> GSM1182301     2  0.0336      0.991 0.000 0.992 0.000 0.008
#> GSM1182303     2  0.0336      0.991 0.000 0.992 0.000 0.008
#> GSM1182304     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM1182305     1  0.3528      0.757 0.808 0.000 0.000 0.192
#> GSM1182306     1  0.4564      0.549 0.672 0.000 0.000 0.328
#> GSM1182307     2  0.0336      0.991 0.000 0.992 0.000 0.008
#> GSM1182309     2  0.0707      0.986 0.000 0.980 0.000 0.020
#> GSM1182312     2  0.0707      0.986 0.000 0.980 0.000 0.020
#> GSM1182314     4  0.1211      1.000 0.040 0.000 0.000 0.960
#> GSM1182316     2  0.0707      0.986 0.000 0.980 0.000 0.020
#> GSM1182318     2  0.0707      0.986 0.000 0.980 0.000 0.020
#> GSM1182319     2  0.0707      0.986 0.000 0.980 0.000 0.020
#> GSM1182320     2  0.0707      0.986 0.000 0.980 0.000 0.020
#> GSM1182321     2  0.0707      0.986 0.000 0.980 0.000 0.020
#> GSM1182322     2  0.0707      0.986 0.000 0.980 0.000 0.020
#> GSM1182324     2  0.0707      0.986 0.000 0.980 0.000 0.020
#> GSM1182297     2  0.0000      0.991 0.000 1.000 0.000 0.000
#> GSM1182302     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM1182308     2  0.0188      0.991 0.000 0.996 0.000 0.004
#> GSM1182310     2  0.0707      0.986 0.000 0.980 0.000 0.020
#> GSM1182311     1  0.0000      0.946 1.000 0.000 0.000 0.000
#> GSM1182313     4  0.1211      1.000 0.040 0.000 0.000 0.960
#> GSM1182315     2  0.0707      0.986 0.000 0.980 0.000 0.020
#> GSM1182317     2  0.0707      0.986 0.000 0.980 0.000 0.020
#> GSM1182323     1  0.0000      0.946 1.000 0.000 0.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
#> GSM1182186     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000
#> GSM1182187     1  0.4192      0.417 0.596 0.000 0.000 0.404 0.000
#> GSM1182188     4  0.0000      0.990 0.000 0.000 0.000 1.000 0.000
#> GSM1182189     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000
#> GSM1182190     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000
#> GSM1182191     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000
#> GSM1182192     4  0.0703      0.990 0.000 0.000 0.000 0.976 0.024
#> GSM1182193     4  0.0703      0.990 0.000 0.000 0.000 0.976 0.024
#> GSM1182194     3  0.3913      0.772 0.000 0.000 0.676 0.000 0.324
#> GSM1182195     3  0.3913      0.772 0.000 0.000 0.676 0.000 0.324
#> GSM1182196     2  0.2377      0.619 0.000 0.872 0.000 0.000 0.128
#> GSM1182197     2  0.4787      0.371 0.000 0.640 0.324 0.000 0.036
#> GSM1182198     3  0.3913      0.772 0.000 0.000 0.676 0.000 0.324
#> GSM1182199     3  0.3913      0.772 0.000 0.000 0.676 0.000 0.324
#> GSM1182200     2  0.0955      0.687 0.000 0.968 0.028 0.000 0.004
#> GSM1182201     2  0.4808      0.354 0.000 0.620 0.348 0.000 0.032
#> GSM1182202     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000
#> GSM1182203     1  0.4192      0.417 0.596 0.000 0.000 0.404 0.000
#> GSM1182204     1  0.0609      0.926 0.980 0.000 0.000 0.020 0.000
#> GSM1182205     3  0.3913      0.772 0.000 0.000 0.676 0.000 0.324
#> GSM1182206     3  0.1168      0.884 0.000 0.008 0.960 0.000 0.032
#> GSM1182207     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000
#> GSM1182208     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000
#> GSM1182209     2  0.1043      0.699 0.000 0.960 0.000 0.000 0.040
#> GSM1182210     2  0.1270      0.696 0.000 0.948 0.000 0.000 0.052
#> GSM1182211     2  0.1043      0.699 0.000 0.960 0.000 0.000 0.040
#> GSM1182212     2  0.0162      0.705 0.000 0.996 0.000 0.000 0.004
#> GSM1182213     2  0.0000      0.706 0.000 1.000 0.000 0.000 0.000
#> GSM1182214     2  0.1341      0.698 0.000 0.944 0.000 0.000 0.056
#> GSM1182215     3  0.1197      0.883 0.000 0.000 0.952 0.000 0.048
#> GSM1182216     2  0.2852      0.576 0.000 0.828 0.000 0.000 0.172
#> GSM1182217     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000
#> GSM1182218     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000
#> GSM1182219     2  0.1792      0.677 0.000 0.916 0.000 0.000 0.084
#> GSM1182220     2  0.0000      0.706 0.000 1.000 0.000 0.000 0.000
#> GSM1182221     2  0.4283     -0.538 0.000 0.544 0.000 0.000 0.456
#> GSM1182222     2  0.2852      0.576 0.000 0.828 0.000 0.000 0.172
#> GSM1182223     2  0.4455      0.277 0.000 0.588 0.404 0.000 0.008
#> GSM1182224     3  0.3913      0.772 0.000 0.000 0.676 0.000 0.324
#> GSM1182225     2  0.2852      0.576 0.000 0.828 0.000 0.000 0.172
#> GSM1182226     2  0.3242      0.483 0.000 0.784 0.000 0.000 0.216
#> GSM1182227     4  0.0703      0.990 0.000 0.000 0.000 0.976 0.024
#> GSM1182228     2  0.4403      0.325 0.000 0.608 0.384 0.000 0.008
#> GSM1182229     3  0.0000      0.884 0.000 0.000 1.000 0.000 0.000
#> GSM1182230     3  0.1043      0.884 0.000 0.000 0.960 0.000 0.040
#> GSM1182231     2  0.5074      0.491 0.000 0.700 0.132 0.000 0.168
#> GSM1182232     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000
#> GSM1182233     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000
#> GSM1182234     4  0.0703      0.990 0.000 0.000 0.000 0.976 0.024
#> GSM1182235     2  0.2852      0.576 0.000 0.828 0.000 0.000 0.172
#> GSM1182236     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000
#> GSM1182237     3  0.3550      0.757 0.000 0.020 0.796 0.000 0.184
#> GSM1182238     2  0.2929      0.562 0.000 0.820 0.000 0.000 0.180
#> GSM1182239     2  0.2074      0.657 0.000 0.896 0.000 0.000 0.104
#> GSM1182240     2  0.0162      0.706 0.000 0.996 0.000 0.000 0.004
#> GSM1182241     2  0.0290      0.704 0.000 0.992 0.000 0.000 0.008
#> GSM1182242     3  0.0290      0.884 0.000 0.000 0.992 0.000 0.008
#> GSM1182243     3  0.1124      0.879 0.000 0.004 0.960 0.000 0.036
#> GSM1182244     3  0.3913      0.772 0.000 0.000 0.676 0.000 0.324
#> GSM1182245     4  0.0703      0.990 0.000 0.000 0.000 0.976 0.024
#> GSM1182246     4  0.0000      0.990 0.000 0.000 0.000 1.000 0.000
#> GSM1182247     3  0.0162      0.885 0.000 0.000 0.996 0.000 0.004
#> GSM1182248     3  0.0404      0.885 0.000 0.000 0.988 0.000 0.012
#> GSM1182249     3  0.4594      0.599 0.000 0.036 0.680 0.000 0.284
#> GSM1182250     3  0.0880      0.881 0.000 0.000 0.968 0.000 0.032
#> GSM1182251     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000
#> GSM1182252     3  0.0794      0.884 0.000 0.000 0.972 0.000 0.028
#> GSM1182253     3  0.1043      0.883 0.000 0.000 0.960 0.000 0.040
#> GSM1182254     3  0.1041      0.880 0.000 0.004 0.964 0.000 0.032
#> GSM1182255     4  0.0000      0.990 0.000 0.000 0.000 1.000 0.000
#> GSM1182256     4  0.0000      0.990 0.000 0.000 0.000 1.000 0.000
#> GSM1182257     4  0.0000      0.990 0.000 0.000 0.000 1.000 0.000
#> GSM1182258     4  0.0000      0.990 0.000 0.000 0.000 1.000 0.000
#> GSM1182259     4  0.0000      0.990 0.000 0.000 0.000 1.000 0.000
#> GSM1182260     3  0.1124      0.879 0.000 0.004 0.960 0.000 0.036
#> GSM1182261     3  0.1082      0.880 0.000 0.008 0.964 0.000 0.028
#> GSM1182262     3  0.1124      0.884 0.000 0.004 0.960 0.000 0.036
#> GSM1182263     1  0.3774      0.612 0.704 0.000 0.000 0.296 0.000
#> GSM1182264     3  0.0794      0.883 0.000 0.000 0.972 0.000 0.028
#> GSM1182265     3  0.2773      0.794 0.000 0.000 0.836 0.000 0.164
#> GSM1182266     3  0.0880      0.882 0.000 0.000 0.968 0.000 0.032
#> GSM1182267     4  0.0703      0.990 0.000 0.000 0.000 0.976 0.024
#> GSM1182268     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000
#> GSM1182269     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000
#> GSM1182270     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000
#> GSM1182271     4  0.0000      0.990 0.000 0.000 0.000 1.000 0.000
#> GSM1182272     4  0.0000      0.990 0.000 0.000 0.000 1.000 0.000
#> GSM1182273     3  0.0880      0.883 0.000 0.000 0.968 0.000 0.032
#> GSM1182275     3  0.2536      0.793 0.000 0.128 0.868 0.000 0.004
#> GSM1182276     2  0.0290      0.706 0.000 0.992 0.000 0.000 0.008
#> GSM1182277     4  0.0703      0.990 0.000 0.000 0.000 0.976 0.024
#> GSM1182278     4  0.0703      0.990 0.000 0.000 0.000 0.976 0.024
#> GSM1182279     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000
#> GSM1182280     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000
#> GSM1182281     4  0.0703      0.990 0.000 0.000 0.000 0.976 0.024
#> GSM1182282     4  0.0703      0.990 0.000 0.000 0.000 0.976 0.024
#> GSM1182283     4  0.0703      0.990 0.000 0.000 0.000 0.976 0.024
#> GSM1182284     4  0.0703      0.990 0.000 0.000 0.000 0.976 0.024
#> GSM1182285     3  0.3913      0.772 0.000 0.000 0.676 0.000 0.324
#> GSM1182286     2  0.1478      0.692 0.000 0.936 0.000 0.000 0.064
#> GSM1182287     2  0.4380      0.342 0.000 0.616 0.376 0.000 0.008
#> GSM1182288     3  0.0510      0.885 0.000 0.000 0.984 0.000 0.016
#> GSM1182289     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000
#> GSM1182290     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000
#> GSM1182291     4  0.0000      0.990 0.000 0.000 0.000 1.000 0.000
#> GSM1182274     3  0.1124      0.879 0.000 0.004 0.960 0.000 0.036
#> GSM1182292     2  0.0963      0.699 0.000 0.964 0.000 0.000 0.036
#> GSM1182293     5  0.4138      0.978 0.000 0.384 0.000 0.000 0.616
#> GSM1182294     5  0.4126      0.984 0.000 0.380 0.000 0.000 0.620
#> GSM1182295     2  0.3508      0.385 0.000 0.748 0.000 0.000 0.252
#> GSM1182296     2  0.1043      0.699 0.000 0.960 0.000 0.000 0.040
#> GSM1182298     3  0.3913      0.772 0.000 0.000 0.676 0.000 0.324
#> GSM1182299     2  0.0000      0.706 0.000 1.000 0.000 0.000 0.000
#> GSM1182300     2  0.4291     -0.603 0.000 0.536 0.000 0.000 0.464
#> GSM1182301     2  0.1121      0.695 0.000 0.956 0.000 0.000 0.044
#> GSM1182303     2  0.0290      0.706 0.000 0.992 0.000 0.000 0.008
#> GSM1182304     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000
#> GSM1182305     1  0.3039      0.757 0.808 0.000 0.000 0.192 0.000
#> GSM1182306     1  0.4210      0.398 0.588 0.000 0.000 0.412 0.000
#> GSM1182307     2  0.2074      0.653 0.000 0.896 0.000 0.000 0.104
#> GSM1182309     5  0.4126      0.984 0.000 0.380 0.000 0.000 0.620
#> GSM1182312     5  0.4126      0.984 0.000 0.380 0.000 0.000 0.620
#> GSM1182314     4  0.0000      0.990 0.000 0.000 0.000 1.000 0.000
#> GSM1182316     5  0.4126      0.984 0.000 0.380 0.000 0.000 0.620
#> GSM1182318     2  0.4307     -0.704 0.000 0.504 0.000 0.000 0.496
#> GSM1182319     5  0.4126      0.984 0.000 0.380 0.000 0.000 0.620
#> GSM1182320     5  0.4126      0.984 0.000 0.380 0.000 0.000 0.620
#> GSM1182321     5  0.4138      0.978 0.000 0.384 0.000 0.000 0.616
#> GSM1182322     5  0.4126      0.984 0.000 0.380 0.000 0.000 0.620
#> GSM1182324     5  0.4126      0.984 0.000 0.380 0.000 0.000 0.620
#> GSM1182297     2  0.2732      0.585 0.000 0.840 0.000 0.000 0.160
#> GSM1182302     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000
#> GSM1182308     2  0.1792      0.677 0.000 0.916 0.000 0.000 0.084
#> GSM1182310     5  0.4126      0.984 0.000 0.380 0.000 0.000 0.620
#> GSM1182311     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000
#> GSM1182313     4  0.0000      0.990 0.000 0.000 0.000 1.000 0.000
#> GSM1182315     5  0.4291      0.794 0.000 0.464 0.000 0.000 0.536
#> GSM1182317     5  0.4126      0.984 0.000 0.380 0.000 0.000 0.620
#> GSM1182323     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1182186     5  0.0000     0.9128 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182187     5  0.4103     0.2985 0.004 0.000 0.000 0.448 0.544 0.004
#> GSM1182188     4  0.0146     0.9673 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM1182189     5  0.1176     0.9068 0.020 0.000 0.000 0.000 0.956 0.024
#> GSM1182190     5  0.1334     0.9056 0.020 0.000 0.000 0.000 0.948 0.032
#> GSM1182191     5  0.0000     0.9128 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182192     4  0.1633     0.9686 0.024 0.000 0.000 0.932 0.000 0.044
#> GSM1182193     4  0.1633     0.9686 0.024 0.000 0.000 0.932 0.000 0.044
#> GSM1182194     6  0.1501     0.7174 0.000 0.000 0.076 0.000 0.000 0.924
#> GSM1182195     6  0.1501     0.7174 0.000 0.000 0.076 0.000 0.000 0.924
#> GSM1182196     2  0.2489     0.7241 0.128 0.860 0.012 0.000 0.000 0.000
#> GSM1182197     3  0.3695     0.4506 0.024 0.244 0.732 0.000 0.000 0.000
#> GSM1182198     6  0.1501     0.7174 0.000 0.000 0.076 0.000 0.000 0.924
#> GSM1182199     6  0.1501     0.7174 0.000 0.000 0.076 0.000 0.000 0.924
#> GSM1182200     2  0.0909     0.7397 0.020 0.968 0.012 0.000 0.000 0.000
#> GSM1182201     2  0.4453    -0.0198 0.032 0.568 0.400 0.000 0.000 0.000
#> GSM1182202     5  0.0291     0.9119 0.004 0.000 0.000 0.000 0.992 0.004
#> GSM1182203     5  0.4082     0.3405 0.004 0.000 0.000 0.432 0.560 0.004
#> GSM1182204     5  0.1615     0.8744 0.004 0.000 0.000 0.064 0.928 0.004
#> GSM1182205     6  0.2092     0.7037 0.000 0.000 0.124 0.000 0.000 0.876
#> GSM1182206     3  0.3917     0.4734 0.024 0.008 0.728 0.000 0.000 0.240
#> GSM1182207     5  0.0000     0.9128 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182208     5  0.0000     0.9128 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182209     2  0.1327     0.7555 0.064 0.936 0.000 0.000 0.000 0.000
#> GSM1182210     2  0.1444     0.7533 0.072 0.928 0.000 0.000 0.000 0.000
#> GSM1182211     2  0.1327     0.7555 0.064 0.936 0.000 0.000 0.000 0.000
#> GSM1182212     2  0.0291     0.7535 0.004 0.992 0.004 0.000 0.000 0.000
#> GSM1182213     2  0.0363     0.7599 0.012 0.988 0.000 0.000 0.000 0.000
#> GSM1182214     2  0.2282     0.7473 0.088 0.888 0.024 0.000 0.000 0.000
#> GSM1182215     3  0.3799     0.4316 0.020 0.000 0.704 0.000 0.000 0.276
#> GSM1182216     2  0.5643     0.4717 0.216 0.536 0.248 0.000 0.000 0.000
#> GSM1182217     5  0.0291     0.9119 0.004 0.000 0.000 0.000 0.992 0.004
#> GSM1182218     5  0.1334     0.9056 0.020 0.000 0.000 0.000 0.948 0.032
#> GSM1182219     2  0.3921     0.6878 0.116 0.768 0.116 0.000 0.000 0.000
#> GSM1182220     2  0.0806     0.7628 0.020 0.972 0.008 0.000 0.000 0.000
#> GSM1182221     1  0.5089     0.5253 0.620 0.244 0.136 0.000 0.000 0.000
#> GSM1182222     2  0.5643     0.4717 0.216 0.536 0.248 0.000 0.000 0.000
#> GSM1182223     3  0.4859     0.2480 0.016 0.452 0.504 0.000 0.000 0.028
#> GSM1182224     6  0.1610     0.7177 0.000 0.000 0.084 0.000 0.000 0.916
#> GSM1182225     2  0.5351     0.5344 0.200 0.592 0.208 0.000 0.000 0.000
#> GSM1182226     2  0.5737     0.4366 0.236 0.516 0.248 0.000 0.000 0.000
#> GSM1182227     4  0.1633     0.9686 0.024 0.000 0.000 0.932 0.000 0.044
#> GSM1182228     3  0.4490     0.1634 0.016 0.472 0.504 0.000 0.000 0.008
#> GSM1182229     3  0.3368     0.4616 0.012 0.000 0.756 0.000 0.000 0.232
#> GSM1182230     3  0.3922     0.3637 0.016 0.000 0.664 0.000 0.000 0.320
#> GSM1182231     2  0.5779     0.3756 0.180 0.452 0.368 0.000 0.000 0.000
#> GSM1182232     5  0.0603     0.9112 0.004 0.000 0.000 0.000 0.980 0.016
#> GSM1182233     5  0.0717     0.9108 0.008 0.000 0.000 0.000 0.976 0.016
#> GSM1182234     4  0.1633     0.9686 0.024 0.000 0.000 0.932 0.000 0.044
#> GSM1182235     2  0.5561     0.4926 0.204 0.552 0.244 0.000 0.000 0.000
#> GSM1182236     5  0.1334     0.9056 0.020 0.000 0.000 0.000 0.948 0.032
#> GSM1182237     3  0.4853     0.4617 0.152 0.016 0.700 0.000 0.000 0.132
#> GSM1182238     2  0.5643     0.4717 0.216 0.536 0.248 0.000 0.000 0.000
#> GSM1182239     2  0.4459     0.6440 0.132 0.712 0.156 0.000 0.000 0.000
#> GSM1182240     2  0.0363     0.7601 0.012 0.988 0.000 0.000 0.000 0.000
#> GSM1182241     2  0.0291     0.7576 0.004 0.992 0.004 0.000 0.000 0.000
#> GSM1182242     6  0.4493     0.2633 0.016 0.008 0.488 0.000 0.000 0.488
#> GSM1182243     3  0.1219     0.6261 0.004 0.000 0.948 0.000 0.000 0.048
#> GSM1182244     6  0.1910     0.7099 0.000 0.000 0.108 0.000 0.000 0.892
#> GSM1182245     4  0.1480     0.9692 0.020 0.000 0.000 0.940 0.000 0.040
#> GSM1182246     4  0.0000     0.9690 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182247     6  0.4264     0.2850 0.016 0.000 0.488 0.000 0.000 0.496
#> GSM1182248     6  0.4264     0.2926 0.016 0.000 0.484 0.000 0.000 0.500
#> GSM1182249     3  0.2656     0.5739 0.120 0.012 0.860 0.000 0.000 0.008
#> GSM1182250     3  0.1524     0.6241 0.008 0.000 0.932 0.000 0.000 0.060
#> GSM1182251     5  0.0000     0.9128 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182252     6  0.4096     0.2890 0.008 0.000 0.484 0.000 0.000 0.508
#> GSM1182253     6  0.4192     0.3965 0.016 0.000 0.412 0.000 0.000 0.572
#> GSM1182254     3  0.2255     0.6080 0.016 0.004 0.892 0.000 0.000 0.088
#> GSM1182255     4  0.0000     0.9690 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182256     4  0.0000     0.9690 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182257     4  0.0436     0.9627 0.004 0.000 0.000 0.988 0.004 0.004
#> GSM1182258     4  0.0000     0.9690 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182259     4  0.0000     0.9690 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182260     3  0.1549     0.6251 0.020 0.000 0.936 0.000 0.000 0.044
#> GSM1182261     3  0.1074     0.6208 0.012 0.000 0.960 0.000 0.000 0.028
#> GSM1182262     3  0.3608     0.4394 0.012 0.000 0.716 0.000 0.000 0.272
#> GSM1182263     5  0.3351     0.6073 0.000 0.000 0.000 0.288 0.712 0.000
#> GSM1182264     3  0.3756     0.3494 0.020 0.000 0.712 0.000 0.000 0.268
#> GSM1182265     3  0.3572     0.5154 0.204 0.000 0.764 0.000 0.000 0.032
#> GSM1182266     3  0.4094     0.3395 0.032 0.004 0.700 0.000 0.000 0.264
#> GSM1182267     4  0.1633     0.9686 0.024 0.000 0.000 0.932 0.000 0.044
#> GSM1182268     5  0.1092     0.9078 0.020 0.000 0.000 0.000 0.960 0.020
#> GSM1182269     5  0.1334     0.9056 0.020 0.000 0.000 0.000 0.948 0.032
#> GSM1182270     5  0.1334     0.9056 0.020 0.000 0.000 0.000 0.948 0.032
#> GSM1182271     4  0.0146     0.9673 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM1182272     4  0.0000     0.9690 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182273     3  0.3879     0.3038 0.020 0.000 0.688 0.000 0.000 0.292
#> GSM1182275     3  0.6449     0.1032 0.024 0.252 0.440 0.000 0.000 0.284
#> GSM1182276     2  0.0291     0.7535 0.004 0.992 0.004 0.000 0.000 0.000
#> GSM1182277     4  0.1633     0.9686 0.024 0.000 0.000 0.932 0.000 0.044
#> GSM1182278     4  0.1633     0.9686 0.024 0.000 0.000 0.932 0.000 0.044
#> GSM1182279     5  0.0000     0.9128 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182280     5  0.0000     0.9128 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182281     4  0.1564     0.9690 0.024 0.000 0.000 0.936 0.000 0.040
#> GSM1182282     4  0.1633     0.9686 0.024 0.000 0.000 0.932 0.000 0.044
#> GSM1182283     4  0.1633     0.9686 0.024 0.000 0.000 0.932 0.000 0.044
#> GSM1182284     4  0.1633     0.9686 0.024 0.000 0.000 0.932 0.000 0.044
#> GSM1182285     6  0.1610     0.7177 0.000 0.000 0.084 0.000 0.000 0.916
#> GSM1182286     2  0.3787     0.6988 0.120 0.780 0.100 0.000 0.000 0.000
#> GSM1182287     2  0.4090     0.2231 0.016 0.652 0.328 0.000 0.000 0.004
#> GSM1182288     6  0.4260     0.3155 0.016 0.000 0.472 0.000 0.000 0.512
#> GSM1182289     5  0.0000     0.9128 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182290     5  0.0000     0.9128 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182291     4  0.0000     0.9690 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182274     3  0.1682     0.6237 0.020 0.000 0.928 0.000 0.000 0.052
#> GSM1182292     2  0.0547     0.7582 0.020 0.980 0.000 0.000 0.000 0.000
#> GSM1182293     1  0.1910     0.8855 0.892 0.108 0.000 0.000 0.000 0.000
#> GSM1182294     1  0.2446     0.8720 0.864 0.124 0.012 0.000 0.000 0.000
#> GSM1182295     2  0.3833     0.4295 0.344 0.648 0.008 0.000 0.000 0.000
#> GSM1182296     2  0.1387     0.7538 0.068 0.932 0.000 0.000 0.000 0.000
#> GSM1182298     6  0.1501     0.7174 0.000 0.000 0.076 0.000 0.000 0.924
#> GSM1182299     2  0.0717     0.7626 0.016 0.976 0.008 0.000 0.000 0.000
#> GSM1182300     1  0.3838     0.2969 0.552 0.448 0.000 0.000 0.000 0.000
#> GSM1182301     2  0.1267     0.7482 0.060 0.940 0.000 0.000 0.000 0.000
#> GSM1182303     2  0.0291     0.7535 0.004 0.992 0.004 0.000 0.000 0.000
#> GSM1182304     5  0.0000     0.9128 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182305     5  0.2527     0.7741 0.000 0.000 0.000 0.168 0.832 0.000
#> GSM1182306     5  0.4128     0.1602 0.004 0.000 0.000 0.492 0.500 0.004
#> GSM1182307     2  0.2003     0.7303 0.116 0.884 0.000 0.000 0.000 0.000
#> GSM1182309     1  0.1765     0.8868 0.904 0.096 0.000 0.000 0.000 0.000
#> GSM1182312     1  0.2230     0.8700 0.892 0.084 0.024 0.000 0.000 0.000
#> GSM1182314     4  0.0000     0.9690 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182316     1  0.2092     0.8789 0.876 0.124 0.000 0.000 0.000 0.000
#> GSM1182318     1  0.3756     0.5629 0.644 0.352 0.004 0.000 0.000 0.000
#> GSM1182319     1  0.1714     0.8860 0.908 0.092 0.000 0.000 0.000 0.000
#> GSM1182320     1  0.1765     0.8856 0.904 0.096 0.000 0.000 0.000 0.000
#> GSM1182321     1  0.1765     0.8856 0.904 0.096 0.000 0.000 0.000 0.000
#> GSM1182322     1  0.1714     0.8860 0.908 0.092 0.000 0.000 0.000 0.000
#> GSM1182324     1  0.1714     0.8860 0.908 0.092 0.000 0.000 0.000 0.000
#> GSM1182297     2  0.4752     0.6072 0.184 0.676 0.140 0.000 0.000 0.000
#> GSM1182302     5  0.0291     0.9119 0.004 0.000 0.000 0.000 0.992 0.004
#> GSM1182308     2  0.2450     0.7280 0.116 0.868 0.016 0.000 0.000 0.000
#> GSM1182310     1  0.1714     0.8860 0.908 0.092 0.000 0.000 0.000 0.000
#> GSM1182311     5  0.1334     0.9056 0.020 0.000 0.000 0.000 0.948 0.032
#> GSM1182313     4  0.0000     0.9690 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182315     1  0.3710     0.6567 0.696 0.292 0.012 0.000 0.000 0.000
#> GSM1182317     1  0.2003     0.8827 0.884 0.116 0.000 0.000 0.000 0.000
#> GSM1182323     5  0.1334     0.9056 0.020 0.000 0.000 0.000 0.948 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-skmeans-consensus-heatmap-1

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk MAD-skmeans-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk MAD-skmeans-collect-classes

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

test_to_known_factors(res)
#>               n disease.state(p) gender(p) k
#> MAD:skmeans 139         7.73e-02     1.000 2
#> MAD:skmeans 138         4.45e-07     0.409 3
#> MAD:skmeans 138         1.23e-06     0.482 4
#> MAD:skmeans 125         4.48e-11     0.200 5
#> MAD:skmeans 107         5.23e-08     0.561 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 46361 rows and 139 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#>   Subgroups are detected by 'pam' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk MAD-pam-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           0.997       0.999         0.4796 0.521   0.521
#> 3 3 0.713           0.806       0.846         0.2924 0.834   0.681
#> 4 4 0.858           0.885       0.949         0.1699 0.882   0.686
#> 5 5 0.839           0.880       0.929         0.0501 0.961   0.860
#> 6 6 0.784           0.676       0.828         0.0585 0.907   0.643

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
#> GSM1182186     1   0.000      1.000 1.000 0.000
#> GSM1182187     1   0.000      1.000 1.000 0.000
#> GSM1182188     1   0.000      1.000 1.000 0.000
#> GSM1182189     1   0.000      1.000 1.000 0.000
#> GSM1182190     1   0.000      1.000 1.000 0.000
#> GSM1182191     1   0.000      1.000 1.000 0.000
#> GSM1182192     1   0.000      1.000 1.000 0.000
#> GSM1182193     1   0.000      1.000 1.000 0.000
#> GSM1182194     2   0.000      0.998 0.000 1.000
#> GSM1182195     2   0.000      0.998 0.000 1.000
#> GSM1182196     2   0.000      0.998 0.000 1.000
#> GSM1182197     2   0.000      0.998 0.000 1.000
#> GSM1182198     2   0.541      0.860 0.124 0.876
#> GSM1182199     2   0.224      0.962 0.036 0.964
#> GSM1182200     2   0.000      0.998 0.000 1.000
#> GSM1182201     2   0.000      0.998 0.000 1.000
#> GSM1182202     1   0.000      1.000 1.000 0.000
#> GSM1182203     1   0.000      1.000 1.000 0.000
#> GSM1182204     1   0.000      1.000 1.000 0.000
#> GSM1182205     2   0.000      0.998 0.000 1.000
#> GSM1182206     2   0.000      0.998 0.000 1.000
#> GSM1182207     1   0.000      1.000 1.000 0.000
#> GSM1182208     1   0.000      1.000 1.000 0.000
#> GSM1182209     2   0.000      0.998 0.000 1.000
#> GSM1182210     2   0.000      0.998 0.000 1.000
#> GSM1182211     2   0.000      0.998 0.000 1.000
#> GSM1182212     2   0.000      0.998 0.000 1.000
#> GSM1182213     2   0.000      0.998 0.000 1.000
#> GSM1182214     2   0.000      0.998 0.000 1.000
#> GSM1182215     2   0.000      0.998 0.000 1.000
#> GSM1182216     2   0.000      0.998 0.000 1.000
#> GSM1182217     1   0.000      1.000 1.000 0.000
#> GSM1182218     1   0.000      1.000 1.000 0.000
#> GSM1182219     2   0.000      0.998 0.000 1.000
#> GSM1182220     2   0.000      0.998 0.000 1.000
#> GSM1182221     2   0.000      0.998 0.000 1.000
#> GSM1182222     2   0.000      0.998 0.000 1.000
#> GSM1182223     2   0.000      0.998 0.000 1.000
#> GSM1182224     2   0.000      0.998 0.000 1.000
#> GSM1182225     2   0.000      0.998 0.000 1.000
#> GSM1182226     2   0.000      0.998 0.000 1.000
#> GSM1182227     1   0.000      1.000 1.000 0.000
#> GSM1182228     2   0.000      0.998 0.000 1.000
#> GSM1182229     2   0.000      0.998 0.000 1.000
#> GSM1182230     2   0.000      0.998 0.000 1.000
#> GSM1182231     2   0.000      0.998 0.000 1.000
#> GSM1182232     1   0.000      1.000 1.000 0.000
#> GSM1182233     1   0.000      1.000 1.000 0.000
#> GSM1182234     1   0.000      1.000 1.000 0.000
#> GSM1182235     2   0.000      0.998 0.000 1.000
#> GSM1182236     1   0.000      1.000 1.000 0.000
#> GSM1182237     2   0.000      0.998 0.000 1.000
#> GSM1182238     2   0.000      0.998 0.000 1.000
#> GSM1182239     2   0.000      0.998 0.000 1.000
#> GSM1182240     2   0.000      0.998 0.000 1.000
#> GSM1182241     2   0.000      0.998 0.000 1.000
#> GSM1182242     2   0.000      0.998 0.000 1.000
#> GSM1182243     2   0.000      0.998 0.000 1.000
#> GSM1182244     2   0.000      0.998 0.000 1.000
#> GSM1182245     1   0.000      1.000 1.000 0.000
#> GSM1182246     1   0.000      1.000 1.000 0.000
#> GSM1182247     2   0.000      0.998 0.000 1.000
#> GSM1182248     2   0.000      0.998 0.000 1.000
#> GSM1182249     2   0.000      0.998 0.000 1.000
#> GSM1182250     2   0.000      0.998 0.000 1.000
#> GSM1182251     1   0.000      1.000 1.000 0.000
#> GSM1182252     2   0.000      0.998 0.000 1.000
#> GSM1182253     2   0.000      0.998 0.000 1.000
#> GSM1182254     2   0.000      0.998 0.000 1.000
#> GSM1182255     1   0.000      1.000 1.000 0.000
#> GSM1182256     1   0.000      1.000 1.000 0.000
#> GSM1182257     1   0.000      1.000 1.000 0.000
#> GSM1182258     1   0.000      1.000 1.000 0.000
#> GSM1182259     1   0.000      1.000 1.000 0.000
#> GSM1182260     2   0.000      0.998 0.000 1.000
#> GSM1182261     2   0.000      0.998 0.000 1.000
#> GSM1182262     2   0.000      0.998 0.000 1.000
#> GSM1182263     1   0.000      1.000 1.000 0.000
#> GSM1182264     2   0.000      0.998 0.000 1.000
#> GSM1182265     2   0.000      0.998 0.000 1.000
#> GSM1182266     2   0.000      0.998 0.000 1.000
#> GSM1182267     1   0.000      1.000 1.000 0.000
#> GSM1182268     1   0.000      1.000 1.000 0.000
#> GSM1182269     1   0.000      1.000 1.000 0.000
#> GSM1182270     1   0.000      1.000 1.000 0.000
#> GSM1182271     1   0.000      1.000 1.000 0.000
#> GSM1182272     1   0.000      1.000 1.000 0.000
#> GSM1182273     2   0.000      0.998 0.000 1.000
#> GSM1182275     2   0.000      0.998 0.000 1.000
#> GSM1182276     2   0.000      0.998 0.000 1.000
#> GSM1182277     1   0.000      1.000 1.000 0.000
#> GSM1182278     1   0.000      1.000 1.000 0.000
#> GSM1182279     1   0.000      1.000 1.000 0.000
#> GSM1182280     1   0.000      1.000 1.000 0.000
#> GSM1182281     1   0.000      1.000 1.000 0.000
#> GSM1182282     1   0.000      1.000 1.000 0.000
#> GSM1182283     1   0.000      1.000 1.000 0.000
#> GSM1182284     1   0.000      1.000 1.000 0.000
#> GSM1182285     2   0.000      0.998 0.000 1.000
#> GSM1182286     2   0.000      0.998 0.000 1.000
#> GSM1182287     2   0.000      0.998 0.000 1.000
#> GSM1182288     2   0.000      0.998 0.000 1.000
#> GSM1182289     1   0.000      1.000 1.000 0.000
#> GSM1182290     1   0.000      1.000 1.000 0.000
#> GSM1182291     1   0.000      1.000 1.000 0.000
#> GSM1182274     2   0.000      0.998 0.000 1.000
#> GSM1182292     2   0.000      0.998 0.000 1.000
#> GSM1182293     2   0.000      0.998 0.000 1.000
#> GSM1182294     2   0.000      0.998 0.000 1.000
#> GSM1182295     2   0.000      0.998 0.000 1.000
#> GSM1182296     2   0.000      0.998 0.000 1.000
#> GSM1182298     2   0.141      0.979 0.020 0.980
#> GSM1182299     2   0.000      0.998 0.000 1.000
#> GSM1182300     2   0.000      0.998 0.000 1.000
#> GSM1182301     2   0.000      0.998 0.000 1.000
#> GSM1182303     2   0.000      0.998 0.000 1.000
#> GSM1182304     1   0.000      1.000 1.000 0.000
#> GSM1182305     1   0.000      1.000 1.000 0.000
#> GSM1182306     1   0.000      1.000 1.000 0.000
#> GSM1182307     2   0.000      0.998 0.000 1.000
#> GSM1182309     2   0.000      0.998 0.000 1.000
#> GSM1182312     2   0.000      0.998 0.000 1.000
#> GSM1182314     1   0.000      1.000 1.000 0.000
#> GSM1182316     2   0.000      0.998 0.000 1.000
#> GSM1182318     2   0.000      0.998 0.000 1.000
#> GSM1182319     2   0.000      0.998 0.000 1.000
#> GSM1182320     2   0.000      0.998 0.000 1.000
#> GSM1182321     2   0.000      0.998 0.000 1.000
#> GSM1182322     2   0.000      0.998 0.000 1.000
#> GSM1182324     2   0.000      0.998 0.000 1.000
#> GSM1182297     2   0.000      0.998 0.000 1.000
#> GSM1182302     1   0.000      1.000 1.000 0.000
#> GSM1182308     2   0.000      0.998 0.000 1.000
#> GSM1182310     2   0.000      0.998 0.000 1.000
#> GSM1182311     1   0.000      1.000 1.000 0.000
#> GSM1182313     1   0.000      1.000 1.000 0.000
#> GSM1182315     2   0.000      0.998 0.000 1.000
#> GSM1182317     2   0.000      0.998 0.000 1.000
#> GSM1182323     1   0.000      1.000 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1182186     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182187     1  0.5363     0.8281 0.724 0.000 0.276
#> GSM1182188     1  0.5948     0.7956 0.640 0.000 0.360
#> GSM1182189     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182190     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182191     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182192     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182193     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182194     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182195     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182196     2  0.6045    -0.2259 0.000 0.620 0.380
#> GSM1182197     2  0.6244    -0.4620 0.000 0.560 0.440
#> GSM1182198     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182199     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182200     2  0.5497     0.1983 0.000 0.708 0.292
#> GSM1182201     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182202     1  0.5098     0.8379 0.752 0.000 0.248
#> GSM1182203     1  0.5098     0.8379 0.752 0.000 0.248
#> GSM1182204     1  0.5098     0.8379 0.752 0.000 0.248
#> GSM1182205     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182206     2  0.4555     0.5542 0.000 0.800 0.200
#> GSM1182207     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182208     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182209     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182210     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182211     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182212     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182213     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182214     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182215     2  0.4121     0.6370 0.000 0.832 0.168
#> GSM1182216     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182217     1  0.1163     0.9004 0.972 0.000 0.028
#> GSM1182218     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182219     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182220     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182221     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182222     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182223     2  0.2448     0.7770 0.000 0.924 0.076
#> GSM1182224     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182225     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182226     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182227     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182228     2  0.5650     0.2127 0.000 0.688 0.312
#> GSM1182229     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182230     2  0.6095    -0.2001 0.000 0.608 0.392
#> GSM1182231     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182232     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182233     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182234     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182235     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182236     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182237     2  0.1163     0.8327 0.000 0.972 0.028
#> GSM1182238     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182239     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182240     2  0.0237     0.8533 0.000 0.996 0.004
#> GSM1182241     2  0.6180    -0.3777 0.000 0.584 0.416
#> GSM1182242     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182243     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182244     2  0.5678     0.1984 0.000 0.684 0.316
#> GSM1182245     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182246     1  0.5948     0.7956 0.640 0.000 0.360
#> GSM1182247     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182248     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182249     2  0.6260    -0.4885 0.000 0.552 0.448
#> GSM1182250     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182251     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182252     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182253     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182254     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182255     1  0.5948     0.7956 0.640 0.000 0.360
#> GSM1182256     1  0.5948     0.7956 0.640 0.000 0.360
#> GSM1182257     1  0.5948     0.7956 0.640 0.000 0.360
#> GSM1182258     1  0.5948     0.7956 0.640 0.000 0.360
#> GSM1182259     1  0.5948     0.7956 0.640 0.000 0.360
#> GSM1182260     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182261     2  0.1860     0.8080 0.000 0.948 0.052
#> GSM1182262     2  0.4178     0.6168 0.000 0.828 0.172
#> GSM1182263     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182264     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182265     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182266     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182267     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182268     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182269     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182270     1  0.0237     0.9048 0.996 0.000 0.004
#> GSM1182271     1  0.5948     0.7956 0.640 0.000 0.360
#> GSM1182272     1  0.5948     0.7956 0.640 0.000 0.360
#> GSM1182273     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182275     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182276     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182277     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182278     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182279     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182280     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182281     1  0.5948     0.7956 0.640 0.000 0.360
#> GSM1182282     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182283     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182284     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182285     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182286     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182287     2  0.4555     0.5542 0.000 0.800 0.200
#> GSM1182288     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182289     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182290     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182291     1  0.5948     0.7956 0.640 0.000 0.360
#> GSM1182274     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182292     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182293     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182294     2  0.0237     0.8534 0.000 0.996 0.004
#> GSM1182295     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182296     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182298     3  0.5948     0.9958 0.000 0.360 0.640
#> GSM1182299     2  0.5733     0.0456 0.000 0.676 0.324
#> GSM1182300     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182301     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182303     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182304     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182305     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182306     1  0.5948     0.7956 0.640 0.000 0.360
#> GSM1182307     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182309     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182312     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182314     1  0.5948     0.7956 0.640 0.000 0.360
#> GSM1182316     2  0.0747     0.8423 0.000 0.984 0.016
#> GSM1182318     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182319     2  0.3482     0.6934 0.000 0.872 0.128
#> GSM1182320     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182321     3  0.6026     0.9676 0.000 0.376 0.624
#> GSM1182322     2  0.6235    -0.4484 0.000 0.564 0.436
#> GSM1182324     3  0.6140     0.9115 0.000 0.404 0.596
#> GSM1182297     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182302     1  0.5098     0.8379 0.752 0.000 0.248
#> GSM1182308     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182310     2  0.2261     0.7847 0.000 0.932 0.068
#> GSM1182311     1  0.0000     0.9073 1.000 0.000 0.000
#> GSM1182313     1  0.5948     0.7956 0.640 0.000 0.360
#> GSM1182315     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182317     2  0.0000     0.8564 0.000 1.000 0.000
#> GSM1182323     1  0.0000     0.9073 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1182186     1  0.0000      0.942 1.000 0.000 0.000 0.000
#> GSM1182187     1  0.4406      0.593 0.700 0.000 0.000 0.300
#> GSM1182188     4  0.0000      0.935 0.000 0.000 0.000 1.000
#> GSM1182189     1  0.0000      0.942 1.000 0.000 0.000 0.000
#> GSM1182190     1  0.0000      0.942 1.000 0.000 0.000 0.000
#> GSM1182191     1  0.0000      0.942 1.000 0.000 0.000 0.000
#> GSM1182192     1  0.0336      0.941 0.992 0.000 0.000 0.008
#> GSM1182193     1  0.0336      0.941 0.992 0.000 0.000 0.008
#> GSM1182194     3  0.0000      0.931 0.000 0.000 1.000 0.000
#> GSM1182195     3  0.0000      0.931 0.000 0.000 1.000 0.000
#> GSM1182196     3  0.4164      0.685 0.000 0.264 0.736 0.000
#> GSM1182197     3  0.3649      0.750 0.000 0.204 0.796 0.000
#> GSM1182198     3  0.0000      0.931 0.000 0.000 1.000 0.000
#> GSM1182199     3  0.0000      0.931 0.000 0.000 1.000 0.000
#> GSM1182200     3  0.4679      0.532 0.000 0.352 0.648 0.000
#> GSM1182201     3  0.0000      0.931 0.000 0.000 1.000 0.000
#> GSM1182202     1  0.4134      0.657 0.740 0.000 0.000 0.260
#> GSM1182203     1  0.4193      0.651 0.732 0.000 0.000 0.268
#> GSM1182204     1  0.4134      0.657 0.740 0.000 0.000 0.260
#> GSM1182205     3  0.0000      0.931 0.000 0.000 1.000 0.000
#> GSM1182206     2  0.3649      0.758 0.000 0.796 0.204 0.000
#> GSM1182207     1  0.0000      0.942 1.000 0.000 0.000 0.000
#> GSM1182208     1  0.0000      0.942 1.000 0.000 0.000 0.000
#> GSM1182209     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182210     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182211     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182212     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182213     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182214     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182215     2  0.3266      0.809 0.000 0.832 0.168 0.000
#> GSM1182216     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182217     1  0.0921      0.924 0.972 0.000 0.000 0.028
#> GSM1182218     1  0.0000      0.942 1.000 0.000 0.000 0.000
#> GSM1182219     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182220     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182221     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182222     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182223     2  0.2011      0.886 0.000 0.920 0.080 0.000
#> GSM1182224     3  0.0000      0.931 0.000 0.000 1.000 0.000
#> GSM1182225     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182226     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182227     1  0.3486      0.753 0.812 0.000 0.000 0.188
#> GSM1182228     2  0.4477      0.603 0.000 0.688 0.312 0.000
#> GSM1182229     3  0.0000      0.931 0.000 0.000 1.000 0.000
#> GSM1182230     2  0.4843      0.429 0.000 0.604 0.396 0.000
#> GSM1182231     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182232     1  0.0336      0.941 0.992 0.000 0.000 0.008
#> GSM1182233     1  0.0000      0.942 1.000 0.000 0.000 0.000
#> GSM1182234     1  0.0336      0.941 0.992 0.000 0.000 0.008
#> GSM1182235     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182236     1  0.0000      0.942 1.000 0.000 0.000 0.000
#> GSM1182237     2  0.0921      0.925 0.000 0.972 0.028 0.000
#> GSM1182238     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182239     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182240     2  0.2921      0.812 0.000 0.860 0.140 0.000
#> GSM1182241     3  0.3873      0.726 0.000 0.228 0.772 0.000
#> GSM1182242     3  0.0000      0.931 0.000 0.000 1.000 0.000
#> GSM1182243     3  0.0000      0.931 0.000 0.000 1.000 0.000
#> GSM1182244     2  0.4522      0.590 0.000 0.680 0.320 0.000
#> GSM1182245     4  0.4907      0.265 0.420 0.000 0.000 0.580
#> GSM1182246     4  0.0000      0.935 0.000 0.000 0.000 1.000
#> GSM1182247     3  0.0000      0.931 0.000 0.000 1.000 0.000
#> GSM1182248     3  0.0000      0.931 0.000 0.000 1.000 0.000
#> GSM1182249     3  0.3569      0.758 0.000 0.196 0.804 0.000
#> GSM1182250     3  0.0000      0.931 0.000 0.000 1.000 0.000
#> GSM1182251     1  0.0000      0.942 1.000 0.000 0.000 0.000
#> GSM1182252     3  0.0000      0.931 0.000 0.000 1.000 0.000
#> GSM1182253     3  0.0000      0.931 0.000 0.000 1.000 0.000
#> GSM1182254     3  0.0000      0.931 0.000 0.000 1.000 0.000
#> GSM1182255     4  0.0000      0.935 0.000 0.000 0.000 1.000
#> GSM1182256     4  0.0000      0.935 0.000 0.000 0.000 1.000
#> GSM1182257     4  0.3024      0.793 0.148 0.000 0.000 0.852
#> GSM1182258     4  0.0000      0.935 0.000 0.000 0.000 1.000
#> GSM1182259     4  0.0000      0.935 0.000 0.000 0.000 1.000
#> GSM1182260     3  0.0000      0.931 0.000 0.000 1.000 0.000
#> GSM1182261     2  0.1474      0.909 0.000 0.948 0.052 0.000
#> GSM1182262     2  0.3311      0.797 0.000 0.828 0.172 0.000
#> GSM1182263     1  0.0336      0.941 0.992 0.000 0.000 0.008
#> GSM1182264     3  0.0000      0.931 0.000 0.000 1.000 0.000
#> GSM1182265     3  0.0000      0.931 0.000 0.000 1.000 0.000
#> GSM1182266     3  0.0000      0.931 0.000 0.000 1.000 0.000
#> GSM1182267     1  0.0336      0.941 0.992 0.000 0.000 0.008
#> GSM1182268     1  0.0000      0.942 1.000 0.000 0.000 0.000
#> GSM1182269     1  0.0000      0.942 1.000 0.000 0.000 0.000
#> GSM1182270     1  0.0000      0.942 1.000 0.000 0.000 0.000
#> GSM1182271     4  0.0000      0.935 0.000 0.000 0.000 1.000
#> GSM1182272     4  0.0000      0.935 0.000 0.000 0.000 1.000
#> GSM1182273     3  0.0000      0.931 0.000 0.000 1.000 0.000
#> GSM1182275     3  0.0000      0.931 0.000 0.000 1.000 0.000
#> GSM1182276     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182277     1  0.0336      0.941 0.992 0.000 0.000 0.008
#> GSM1182278     1  0.0469      0.939 0.988 0.000 0.000 0.012
#> GSM1182279     1  0.0000      0.942 1.000 0.000 0.000 0.000
#> GSM1182280     1  0.0000      0.942 1.000 0.000 0.000 0.000
#> GSM1182281     4  0.0000      0.935 0.000 0.000 0.000 1.000
#> GSM1182282     1  0.2081      0.877 0.916 0.000 0.000 0.084
#> GSM1182283     1  0.0336      0.941 0.992 0.000 0.000 0.008
#> GSM1182284     1  0.3801      0.704 0.780 0.000 0.000 0.220
#> GSM1182285     3  0.0000      0.931 0.000 0.000 1.000 0.000
#> GSM1182286     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182287     2  0.3649      0.758 0.000 0.796 0.204 0.000
#> GSM1182288     3  0.0000      0.931 0.000 0.000 1.000 0.000
#> GSM1182289     1  0.0336      0.941 0.992 0.000 0.000 0.008
#> GSM1182290     1  0.0000      0.942 1.000 0.000 0.000 0.000
#> GSM1182291     4  0.0000      0.935 0.000 0.000 0.000 1.000
#> GSM1182274     3  0.0188      0.928 0.000 0.004 0.996 0.000
#> GSM1182292     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182293     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182294     2  0.0188      0.939 0.000 0.996 0.004 0.000
#> GSM1182295     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182296     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182298     3  0.0000      0.931 0.000 0.000 1.000 0.000
#> GSM1182299     3  0.4522      0.595 0.000 0.320 0.680 0.000
#> GSM1182300     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182301     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182303     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182304     1  0.0000      0.942 1.000 0.000 0.000 0.000
#> GSM1182305     1  0.0336      0.941 0.992 0.000 0.000 0.008
#> GSM1182306     4  0.4134      0.628 0.260 0.000 0.000 0.740
#> GSM1182307     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182309     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182312     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182314     4  0.0000      0.935 0.000 0.000 0.000 1.000
#> GSM1182316     2  0.4040      0.641 0.000 0.752 0.248 0.000
#> GSM1182318     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182319     2  0.2814      0.833 0.000 0.868 0.132 0.000
#> GSM1182320     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182321     3  0.0592      0.919 0.000 0.016 0.984 0.000
#> GSM1182322     3  0.3688      0.746 0.000 0.208 0.792 0.000
#> GSM1182324     3  0.1389      0.894 0.000 0.048 0.952 0.000
#> GSM1182297     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182302     1  0.4134      0.657 0.740 0.000 0.000 0.260
#> GSM1182308     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182310     2  0.1792      0.893 0.000 0.932 0.068 0.000
#> GSM1182311     1  0.0000      0.942 1.000 0.000 0.000 0.000
#> GSM1182313     4  0.0000      0.935 0.000 0.000 0.000 1.000
#> GSM1182315     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182317     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM1182323     1  0.0000      0.942 1.000 0.000 0.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
#> GSM1182186     5  0.1671      0.885 0.076 0.000 0.000 0.000 0.924
#> GSM1182187     5  0.6063      0.631 0.176 0.000 0.000 0.256 0.568
#> GSM1182188     4  0.0000      0.925 0.000 0.000 0.000 1.000 0.000
#> GSM1182189     1  0.0963      0.974 0.964 0.000 0.000 0.000 0.036
#> GSM1182190     1  0.0963      0.974 0.964 0.000 0.000 0.000 0.036
#> GSM1182191     5  0.1671      0.885 0.076 0.000 0.000 0.000 0.924
#> GSM1182192     1  0.0000      0.969 1.000 0.000 0.000 0.000 0.000
#> GSM1182193     1  0.0000      0.969 1.000 0.000 0.000 0.000 0.000
#> GSM1182194     3  0.0000      0.930 0.000 0.000 1.000 0.000 0.000
#> GSM1182195     3  0.0000      0.930 0.000 0.000 1.000 0.000 0.000
#> GSM1182196     3  0.4465      0.706 0.000 0.212 0.732 0.000 0.056
#> GSM1182197     3  0.3177      0.755 0.000 0.208 0.792 0.000 0.000
#> GSM1182198     3  0.0000      0.930 0.000 0.000 1.000 0.000 0.000
#> GSM1182199     3  0.0000      0.930 0.000 0.000 1.000 0.000 0.000
#> GSM1182200     3  0.4030      0.544 0.000 0.352 0.648 0.000 0.000
#> GSM1182201     3  0.0162      0.927 0.000 0.004 0.996 0.000 0.000
#> GSM1182202     5  0.5336      0.678 0.100 0.000 0.000 0.252 0.648
#> GSM1182203     5  0.6460      0.562 0.248 0.000 0.000 0.252 0.500
#> GSM1182204     5  0.6072      0.632 0.180 0.000 0.000 0.252 0.568
#> GSM1182205     3  0.0000      0.930 0.000 0.000 1.000 0.000 0.000
#> GSM1182206     2  0.3177      0.770 0.000 0.792 0.208 0.000 0.000
#> GSM1182207     5  0.1671      0.885 0.076 0.000 0.000 0.000 0.924
#> GSM1182208     5  0.1671      0.885 0.076 0.000 0.000 0.000 0.924
#> GSM1182209     2  0.0290      0.928 0.000 0.992 0.000 0.000 0.008
#> GSM1182210     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM1182211     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM1182212     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM1182213     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM1182214     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM1182215     2  0.2852      0.818 0.000 0.828 0.172 0.000 0.000
#> GSM1182216     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM1182217     1  0.0963      0.974 0.964 0.000 0.000 0.000 0.036
#> GSM1182218     1  0.0963      0.974 0.964 0.000 0.000 0.000 0.036
#> GSM1182219     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM1182220     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM1182221     2  0.0609      0.925 0.000 0.980 0.000 0.000 0.020
#> GSM1182222     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM1182223     2  0.1608      0.892 0.000 0.928 0.072 0.000 0.000
#> GSM1182224     3  0.0000      0.930 0.000 0.000 1.000 0.000 0.000
#> GSM1182225     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM1182226     2  0.0404      0.927 0.000 0.988 0.000 0.000 0.012
#> GSM1182227     1  0.0703      0.952 0.976 0.000 0.000 0.024 0.000
#> GSM1182228     2  0.3857      0.624 0.000 0.688 0.312 0.000 0.000
#> GSM1182229     3  0.0000      0.930 0.000 0.000 1.000 0.000 0.000
#> GSM1182230     2  0.4171      0.453 0.000 0.604 0.396 0.000 0.000
#> GSM1182231     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM1182232     1  0.0794      0.973 0.972 0.000 0.000 0.000 0.028
#> GSM1182233     1  0.0963      0.974 0.964 0.000 0.000 0.000 0.036
#> GSM1182234     1  0.0000      0.969 1.000 0.000 0.000 0.000 0.000
#> GSM1182235     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM1182236     1  0.0963      0.974 0.964 0.000 0.000 0.000 0.036
#> GSM1182237     2  0.0609      0.923 0.000 0.980 0.020 0.000 0.000
#> GSM1182238     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM1182239     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM1182240     2  0.2516      0.810 0.000 0.860 0.140 0.000 0.000
#> GSM1182241     3  0.3336      0.734 0.000 0.228 0.772 0.000 0.000
#> GSM1182242     3  0.0000      0.930 0.000 0.000 1.000 0.000 0.000
#> GSM1182243     3  0.0000      0.930 0.000 0.000 1.000 0.000 0.000
#> GSM1182244     2  0.3895      0.611 0.000 0.680 0.320 0.000 0.000
#> GSM1182245     4  0.4517      0.223 0.436 0.000 0.000 0.556 0.008
#> GSM1182246     4  0.0000      0.925 0.000 0.000 0.000 1.000 0.000
#> GSM1182247     3  0.0000      0.930 0.000 0.000 1.000 0.000 0.000
#> GSM1182248     3  0.0000      0.930 0.000 0.000 1.000 0.000 0.000
#> GSM1182249     3  0.3586      0.761 0.000 0.188 0.792 0.000 0.020
#> GSM1182250     3  0.0000      0.930 0.000 0.000 1.000 0.000 0.000
#> GSM1182251     5  0.1671      0.885 0.076 0.000 0.000 0.000 0.924
#> GSM1182252     3  0.0000      0.930 0.000 0.000 1.000 0.000 0.000
#> GSM1182253     3  0.0000      0.930 0.000 0.000 1.000 0.000 0.000
#> GSM1182254     3  0.0000      0.930 0.000 0.000 1.000 0.000 0.000
#> GSM1182255     4  0.0000      0.925 0.000 0.000 0.000 1.000 0.000
#> GSM1182256     4  0.0000      0.925 0.000 0.000 0.000 1.000 0.000
#> GSM1182257     4  0.2813      0.741 0.168 0.000 0.000 0.832 0.000
#> GSM1182258     4  0.0000      0.925 0.000 0.000 0.000 1.000 0.000
#> GSM1182259     4  0.0000      0.925 0.000 0.000 0.000 1.000 0.000
#> GSM1182260     3  0.0000      0.930 0.000 0.000 1.000 0.000 0.000
#> GSM1182261     2  0.1121      0.913 0.000 0.956 0.044 0.000 0.000
#> GSM1182262     2  0.2891      0.808 0.000 0.824 0.176 0.000 0.000
#> GSM1182263     5  0.1965      0.878 0.096 0.000 0.000 0.000 0.904
#> GSM1182264     3  0.0000      0.930 0.000 0.000 1.000 0.000 0.000
#> GSM1182265     3  0.0290      0.926 0.000 0.000 0.992 0.000 0.008
#> GSM1182266     3  0.0000      0.930 0.000 0.000 1.000 0.000 0.000
#> GSM1182267     1  0.0000      0.969 1.000 0.000 0.000 0.000 0.000
#> GSM1182268     1  0.0963      0.974 0.964 0.000 0.000 0.000 0.036
#> GSM1182269     1  0.0963      0.974 0.964 0.000 0.000 0.000 0.036
#> GSM1182270     1  0.0963      0.974 0.964 0.000 0.000 0.000 0.036
#> GSM1182271     4  0.0000      0.925 0.000 0.000 0.000 1.000 0.000
#> GSM1182272     4  0.0000      0.925 0.000 0.000 0.000 1.000 0.000
#> GSM1182273     3  0.0000      0.930 0.000 0.000 1.000 0.000 0.000
#> GSM1182275     3  0.0000      0.930 0.000 0.000 1.000 0.000 0.000
#> GSM1182276     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM1182277     1  0.0000      0.969 1.000 0.000 0.000 0.000 0.000
#> GSM1182278     1  0.0000      0.969 1.000 0.000 0.000 0.000 0.000
#> GSM1182279     5  0.1671      0.885 0.076 0.000 0.000 0.000 0.924
#> GSM1182280     5  0.2127      0.869 0.108 0.000 0.000 0.000 0.892
#> GSM1182281     4  0.0000      0.925 0.000 0.000 0.000 1.000 0.000
#> GSM1182282     1  0.1851      0.880 0.912 0.000 0.000 0.088 0.000
#> GSM1182283     1  0.0000      0.969 1.000 0.000 0.000 0.000 0.000
#> GSM1182284     1  0.0290      0.964 0.992 0.000 0.000 0.008 0.000
#> GSM1182285     3  0.0000      0.930 0.000 0.000 1.000 0.000 0.000
#> GSM1182286     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM1182287     2  0.3177      0.770 0.000 0.792 0.208 0.000 0.000
#> GSM1182288     3  0.0000      0.930 0.000 0.000 1.000 0.000 0.000
#> GSM1182289     5  0.1732      0.883 0.080 0.000 0.000 0.000 0.920
#> GSM1182290     5  0.1671      0.885 0.076 0.000 0.000 0.000 0.924
#> GSM1182291     4  0.0000      0.925 0.000 0.000 0.000 1.000 0.000
#> GSM1182274     3  0.0162      0.927 0.000 0.004 0.996 0.000 0.000
#> GSM1182292     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM1182293     2  0.1671      0.904 0.000 0.924 0.000 0.000 0.076
#> GSM1182294     2  0.1205      0.918 0.000 0.956 0.004 0.000 0.040
#> GSM1182295     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM1182296     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM1182298     3  0.0000      0.930 0.000 0.000 1.000 0.000 0.000
#> GSM1182299     3  0.3895      0.607 0.000 0.320 0.680 0.000 0.000
#> GSM1182300     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM1182301     2  0.1608      0.906 0.000 0.928 0.000 0.000 0.072
#> GSM1182303     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM1182304     5  0.1732      0.884 0.080 0.000 0.000 0.000 0.920
#> GSM1182305     5  0.1892      0.882 0.080 0.000 0.000 0.004 0.916
#> GSM1182306     4  0.4226      0.668 0.140 0.000 0.000 0.776 0.084
#> GSM1182307     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM1182309     2  0.1671      0.904 0.000 0.924 0.000 0.000 0.076
#> GSM1182312     2  0.1671      0.904 0.000 0.924 0.000 0.000 0.076
#> GSM1182314     4  0.0000      0.925 0.000 0.000 0.000 1.000 0.000
#> GSM1182316     2  0.5010      0.599 0.000 0.676 0.248 0.000 0.076
#> GSM1182318     2  0.1544      0.908 0.000 0.932 0.000 0.000 0.068
#> GSM1182319     2  0.3980      0.806 0.000 0.796 0.128 0.000 0.076
#> GSM1182320     2  0.1671      0.904 0.000 0.924 0.000 0.000 0.076
#> GSM1182321     3  0.1956      0.877 0.000 0.008 0.916 0.000 0.076
#> GSM1182322     3  0.4069      0.767 0.000 0.136 0.788 0.000 0.076
#> GSM1182324     3  0.2694      0.856 0.000 0.040 0.884 0.000 0.076
#> GSM1182297     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM1182302     5  0.6301      0.597 0.216 0.000 0.000 0.252 0.532
#> GSM1182308     2  0.0000      0.929 0.000 1.000 0.000 0.000 0.000
#> GSM1182310     2  0.3180      0.862 0.000 0.856 0.068 0.000 0.076
#> GSM1182311     1  0.0963      0.974 0.964 0.000 0.000 0.000 0.036
#> GSM1182313     4  0.0000      0.925 0.000 0.000 0.000 1.000 0.000
#> GSM1182315     2  0.0510      0.926 0.000 0.984 0.000 0.000 0.016
#> GSM1182317     2  0.1671      0.904 0.000 0.924 0.000 0.000 0.076
#> GSM1182323     1  0.0963      0.974 0.964 0.000 0.000 0.000 0.036

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1182186     5  0.0000     0.8638 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182187     5  0.5351     0.5898 0.104 0.000 0.000 0.256 0.620 0.020
#> GSM1182188     4  0.0260     0.9166 0.000 0.000 0.000 0.992 0.008 0.000
#> GSM1182189     1  0.2020     0.9508 0.896 0.000 0.000 0.000 0.008 0.096
#> GSM1182190     1  0.2020     0.9508 0.896 0.000 0.000 0.000 0.008 0.096
#> GSM1182191     5  0.0000     0.8638 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182192     1  0.0000     0.9432 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182193     1  0.0000     0.9432 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182194     3  0.0000     0.7484 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1182195     3  0.0260     0.7443 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM1182196     6  0.4866     0.0404 0.000 0.116 0.236 0.000 0.000 0.648
#> GSM1182197     6  0.6111    -0.1019 0.000 0.340 0.296 0.000 0.000 0.364
#> GSM1182198     3  0.0000     0.7484 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1182199     3  0.0000     0.7484 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1182200     2  0.6001    -0.2482 0.000 0.424 0.248 0.000 0.000 0.328
#> GSM1182201     3  0.3789     0.7527 0.000 0.008 0.660 0.000 0.000 0.332
#> GSM1182202     5  0.4640     0.6283 0.032 0.000 0.000 0.256 0.680 0.032
#> GSM1182203     5  0.6151     0.4676 0.216 0.000 0.000 0.256 0.508 0.020
#> GSM1182204     5  0.5904     0.5209 0.172 0.000 0.000 0.256 0.552 0.020
#> GSM1182205     3  0.0547     0.7500 0.000 0.000 0.980 0.000 0.000 0.020
#> GSM1182206     2  0.3923     0.2644 0.000 0.620 0.372 0.000 0.000 0.008
#> GSM1182207     5  0.0260     0.8635 0.000 0.000 0.000 0.000 0.992 0.008
#> GSM1182208     5  0.0260     0.8635 0.000 0.000 0.000 0.000 0.992 0.008
#> GSM1182209     2  0.3515     0.2155 0.000 0.676 0.000 0.000 0.000 0.324
#> GSM1182210     2  0.0000     0.7636 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182211     2  0.2135     0.6494 0.000 0.872 0.000 0.000 0.000 0.128
#> GSM1182212     2  0.0000     0.7636 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182213     2  0.0000     0.7636 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182214     2  0.0000     0.7636 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182215     2  0.4634     0.1899 0.000 0.556 0.400 0.000 0.000 0.044
#> GSM1182216     2  0.0000     0.7636 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182217     1  0.2358     0.9376 0.876 0.000 0.000 0.000 0.016 0.108
#> GSM1182218     1  0.2020     0.9508 0.896 0.000 0.000 0.000 0.008 0.096
#> GSM1182219     2  0.0000     0.7636 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182220     2  0.0000     0.7636 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182221     2  0.2300     0.6386 0.000 0.856 0.000 0.000 0.000 0.144
#> GSM1182222     2  0.0000     0.7636 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182223     2  0.2542     0.6558 0.000 0.876 0.080 0.000 0.000 0.044
#> GSM1182224     3  0.0260     0.7443 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM1182225     2  0.0000     0.7636 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182226     2  0.2416     0.6172 0.000 0.844 0.000 0.000 0.000 0.156
#> GSM1182227     1  0.0458     0.9343 0.984 0.000 0.000 0.016 0.000 0.000
#> GSM1182228     2  0.3872     0.2336 0.000 0.604 0.392 0.000 0.000 0.004
#> GSM1182229     3  0.3531     0.7578 0.000 0.000 0.672 0.000 0.000 0.328
#> GSM1182230     3  0.3998     0.3901 0.000 0.248 0.712 0.000 0.000 0.040
#> GSM1182231     2  0.0632     0.7481 0.000 0.976 0.000 0.000 0.000 0.024
#> GSM1182232     1  0.1531     0.9500 0.928 0.000 0.000 0.000 0.004 0.068
#> GSM1182233     1  0.2020     0.9508 0.896 0.000 0.000 0.000 0.008 0.096
#> GSM1182234     1  0.0000     0.9432 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182235     2  0.0000     0.7636 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182236     1  0.2020     0.9508 0.896 0.000 0.000 0.000 0.008 0.096
#> GSM1182237     2  0.1124     0.7363 0.000 0.956 0.008 0.000 0.000 0.036
#> GSM1182238     2  0.0000     0.7636 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182239     2  0.0000     0.7636 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182240     2  0.2442     0.6166 0.000 0.852 0.004 0.000 0.000 0.144
#> GSM1182241     2  0.6101    -0.2870 0.000 0.372 0.288 0.000 0.000 0.340
#> GSM1182242     3  0.3531     0.7578 0.000 0.000 0.672 0.000 0.000 0.328
#> GSM1182243     3  0.3659     0.7520 0.000 0.000 0.636 0.000 0.000 0.364
#> GSM1182244     3  0.4173     0.3332 0.000 0.268 0.688 0.000 0.000 0.044
#> GSM1182245     4  0.3993     0.1261 0.476 0.000 0.000 0.520 0.004 0.000
#> GSM1182246     4  0.0000     0.9223 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182247     3  0.1141     0.7595 0.000 0.000 0.948 0.000 0.000 0.052
#> GSM1182248     3  0.0146     0.7498 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM1182249     6  0.6083    -0.1167 0.000 0.304 0.300 0.000 0.000 0.396
#> GSM1182250     3  0.3659     0.7520 0.000 0.000 0.636 0.000 0.000 0.364
#> GSM1182251     5  0.0000     0.8638 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182252     3  0.1814     0.7589 0.000 0.000 0.900 0.000 0.000 0.100
#> GSM1182253     3  0.3531     0.7578 0.000 0.000 0.672 0.000 0.000 0.328
#> GSM1182254     3  0.3659     0.7520 0.000 0.000 0.636 0.000 0.000 0.364
#> GSM1182255     4  0.0000     0.9223 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182256     4  0.0000     0.9223 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182257     4  0.2597     0.7457 0.176 0.000 0.000 0.824 0.000 0.000
#> GSM1182258     4  0.0000     0.9223 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182259     4  0.0000     0.9223 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182260     3  0.3659     0.7520 0.000 0.000 0.636 0.000 0.000 0.364
#> GSM1182261     2  0.2197     0.6885 0.000 0.900 0.056 0.000 0.000 0.044
#> GSM1182262     2  0.4186     0.3333 0.000 0.656 0.312 0.000 0.000 0.032
#> GSM1182263     5  0.0865     0.8518 0.036 0.000 0.000 0.000 0.964 0.000
#> GSM1182264     3  0.3659     0.7520 0.000 0.000 0.636 0.000 0.000 0.364
#> GSM1182265     3  0.3804     0.6882 0.000 0.000 0.576 0.000 0.000 0.424
#> GSM1182266     3  0.3647     0.7537 0.000 0.000 0.640 0.000 0.000 0.360
#> GSM1182267     1  0.0000     0.9432 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182268     1  0.2020     0.9508 0.896 0.000 0.000 0.000 0.008 0.096
#> GSM1182269     1  0.2020     0.9508 0.896 0.000 0.000 0.000 0.008 0.096
#> GSM1182270     1  0.2020     0.9508 0.896 0.000 0.000 0.000 0.008 0.096
#> GSM1182271     4  0.0000     0.9223 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182272     4  0.0000     0.9223 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182273     3  0.3647     0.7537 0.000 0.000 0.640 0.000 0.000 0.360
#> GSM1182275     3  0.3547     0.7568 0.000 0.000 0.668 0.000 0.000 0.332
#> GSM1182276     2  0.0000     0.7636 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182277     1  0.0000     0.9432 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182278     1  0.0000     0.9432 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182279     5  0.0146     0.8639 0.000 0.000 0.000 0.000 0.996 0.004
#> GSM1182280     5  0.1434     0.8399 0.048 0.000 0.000 0.000 0.940 0.012
#> GSM1182281     4  0.0146     0.9196 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM1182282     1  0.1663     0.8654 0.912 0.000 0.000 0.088 0.000 0.000
#> GSM1182283     1  0.0000     0.9432 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182284     1  0.0000     0.9432 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182285     3  0.0260     0.7443 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM1182286     2  0.0000     0.7636 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182287     2  0.4389     0.2291 0.000 0.596 0.372 0.000 0.000 0.032
#> GSM1182288     3  0.1327     0.7612 0.000 0.000 0.936 0.000 0.000 0.064
#> GSM1182289     5  0.0146     0.8628 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM1182290     5  0.0260     0.8635 0.000 0.000 0.000 0.000 0.992 0.008
#> GSM1182291     4  0.0000     0.9223 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182274     3  0.3659     0.7520 0.000 0.000 0.636 0.000 0.000 0.364
#> GSM1182292     2  0.0458     0.7547 0.000 0.984 0.000 0.000 0.000 0.016
#> GSM1182293     6  0.3867     0.3307 0.000 0.488 0.000 0.000 0.000 0.512
#> GSM1182294     2  0.3309     0.4279 0.000 0.720 0.000 0.000 0.000 0.280
#> GSM1182295     2  0.0000     0.7636 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182296     2  0.1663     0.6945 0.000 0.912 0.000 0.000 0.000 0.088
#> GSM1182298     3  0.0000     0.7484 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1182299     6  0.5848     0.1455 0.000 0.296 0.224 0.000 0.000 0.480
#> GSM1182300     2  0.0260     0.7592 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM1182301     6  0.3868     0.3231 0.000 0.492 0.000 0.000 0.000 0.508
#> GSM1182303     2  0.0000     0.7636 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182304     5  0.0547     0.8600 0.000 0.000 0.000 0.000 0.980 0.020
#> GSM1182305     5  0.0146     0.8628 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM1182306     4  0.4294     0.6928 0.128 0.000 0.000 0.760 0.092 0.020
#> GSM1182307     2  0.2219     0.6403 0.000 0.864 0.000 0.000 0.000 0.136
#> GSM1182309     6  0.3867     0.3307 0.000 0.488 0.000 0.000 0.000 0.512
#> GSM1182312     6  0.3866     0.3360 0.000 0.484 0.000 0.000 0.000 0.516
#> GSM1182314     4  0.0000     0.9223 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182316     6  0.3766     0.4483 0.000 0.304 0.012 0.000 0.000 0.684
#> GSM1182318     2  0.3868    -0.3502 0.000 0.504 0.000 0.000 0.000 0.496
#> GSM1182319     6  0.3955     0.3647 0.000 0.436 0.004 0.000 0.000 0.560
#> GSM1182320     6  0.3866     0.3360 0.000 0.484 0.000 0.000 0.000 0.516
#> GSM1182321     6  0.2520     0.2256 0.000 0.004 0.152 0.000 0.000 0.844
#> GSM1182322     6  0.3125     0.3809 0.000 0.084 0.080 0.000 0.000 0.836
#> GSM1182324     6  0.2218     0.2647 0.000 0.012 0.104 0.000 0.000 0.884
#> GSM1182297     2  0.0000     0.7636 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182302     5  0.6108     0.5110 0.172 0.000 0.000 0.256 0.540 0.032
#> GSM1182308     2  0.0000     0.7636 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182310     6  0.3833     0.3562 0.000 0.444 0.000 0.000 0.000 0.556
#> GSM1182311     1  0.2020     0.9508 0.896 0.000 0.000 0.000 0.008 0.096
#> GSM1182313     4  0.0000     0.9223 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182315     2  0.3330     0.3375 0.000 0.716 0.000 0.000 0.000 0.284
#> GSM1182317     6  0.3867     0.3307 0.000 0.488 0.000 0.000 0.000 0.512
#> GSM1182323     1  0.2020     0.9508 0.896 0.000 0.000 0.000 0.008 0.096

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk MAD-pam-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk MAD-pam-collect-classes

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

test_to_known_factors(res)
#>           n disease.state(p) gender(p) k
#> MAD:pam 139         0.077250     1.000 2
#> MAD:pam 129         0.000883     0.538 3
#> MAD:pam 137         0.007049     0.650 4
#> MAD:pam 137         0.014093     0.775 5
#> MAD:pam 108         0.155107     0.968 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 46361 rows and 139 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 1.000           1.000       1.000         0.4791 0.521   0.521
#> 3 3 0.751           0.917       0.906         0.3354 0.818   0.650
#> 4 4 0.627           0.598       0.788         0.1263 0.906   0.737
#> 5 5 0.648           0.496       0.738         0.0707 0.831   0.500
#> 6 6 0.688           0.667       0.776         0.0448 0.906   0.635

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
#> GSM1182186     1       0          1  1  0
#> GSM1182187     1       0          1  1  0
#> GSM1182188     1       0          1  1  0
#> GSM1182189     1       0          1  1  0
#> GSM1182190     1       0          1  1  0
#> GSM1182191     1       0          1  1  0
#> GSM1182192     1       0          1  1  0
#> GSM1182193     1       0          1  1  0
#> GSM1182194     2       0          1  0  1
#> GSM1182195     2       0          1  0  1
#> GSM1182196     2       0          1  0  1
#> GSM1182197     2       0          1  0  1
#> GSM1182198     2       0          1  0  1
#> GSM1182199     2       0          1  0  1
#> GSM1182200     2       0          1  0  1
#> GSM1182201     2       0          1  0  1
#> GSM1182202     1       0          1  1  0
#> GSM1182203     1       0          1  1  0
#> GSM1182204     1       0          1  1  0
#> GSM1182205     2       0          1  0  1
#> GSM1182206     2       0          1  0  1
#> GSM1182207     1       0          1  1  0
#> GSM1182208     1       0          1  1  0
#> GSM1182209     2       0          1  0  1
#> GSM1182210     2       0          1  0  1
#> GSM1182211     2       0          1  0  1
#> GSM1182212     2       0          1  0  1
#> GSM1182213     2       0          1  0  1
#> GSM1182214     2       0          1  0  1
#> GSM1182215     2       0          1  0  1
#> GSM1182216     2       0          1  0  1
#> GSM1182217     1       0          1  1  0
#> GSM1182218     1       0          1  1  0
#> GSM1182219     2       0          1  0  1
#> GSM1182220     2       0          1  0  1
#> GSM1182221     2       0          1  0  1
#> GSM1182222     2       0          1  0  1
#> GSM1182223     2       0          1  0  1
#> GSM1182224     2       0          1  0  1
#> GSM1182225     2       0          1  0  1
#> GSM1182226     2       0          1  0  1
#> GSM1182227     1       0          1  1  0
#> GSM1182228     2       0          1  0  1
#> GSM1182229     2       0          1  0  1
#> GSM1182230     2       0          1  0  1
#> GSM1182231     2       0          1  0  1
#> GSM1182232     1       0          1  1  0
#> GSM1182233     1       0          1  1  0
#> GSM1182234     1       0          1  1  0
#> GSM1182235     2       0          1  0  1
#> GSM1182236     1       0          1  1  0
#> GSM1182237     2       0          1  0  1
#> GSM1182238     2       0          1  0  1
#> GSM1182239     2       0          1  0  1
#> GSM1182240     2       0          1  0  1
#> GSM1182241     2       0          1  0  1
#> GSM1182242     2       0          1  0  1
#> GSM1182243     2       0          1  0  1
#> GSM1182244     2       0          1  0  1
#> GSM1182245     1       0          1  1  0
#> GSM1182246     1       0          1  1  0
#> GSM1182247     2       0          1  0  1
#> GSM1182248     2       0          1  0  1
#> GSM1182249     2       0          1  0  1
#> GSM1182250     2       0          1  0  1
#> GSM1182251     1       0          1  1  0
#> GSM1182252     2       0          1  0  1
#> GSM1182253     2       0          1  0  1
#> GSM1182254     2       0          1  0  1
#> GSM1182255     1       0          1  1  0
#> GSM1182256     1       0          1  1  0
#> GSM1182257     1       0          1  1  0
#> GSM1182258     1       0          1  1  0
#> GSM1182259     1       0          1  1  0
#> GSM1182260     2       0          1  0  1
#> GSM1182261     2       0          1  0  1
#> GSM1182262     2       0          1  0  1
#> GSM1182263     1       0          1  1  0
#> GSM1182264     2       0          1  0  1
#> GSM1182265     2       0          1  0  1
#> GSM1182266     2       0          1  0  1
#> GSM1182267     1       0          1  1  0
#> GSM1182268     1       0          1  1  0
#> GSM1182269     1       0          1  1  0
#> GSM1182270     1       0          1  1  0
#> GSM1182271     1       0          1  1  0
#> GSM1182272     1       0          1  1  0
#> GSM1182273     2       0          1  0  1
#> GSM1182275     2       0          1  0  1
#> GSM1182276     2       0          1  0  1
#> GSM1182277     1       0          1  1  0
#> GSM1182278     1       0          1  1  0
#> GSM1182279     1       0          1  1  0
#> GSM1182280     1       0          1  1  0
#> GSM1182281     1       0          1  1  0
#> GSM1182282     1       0          1  1  0
#> GSM1182283     1       0          1  1  0
#> GSM1182284     1       0          1  1  0
#> GSM1182285     2       0          1  0  1
#> GSM1182286     2       0          1  0  1
#> GSM1182287     2       0          1  0  1
#> GSM1182288     2       0          1  0  1
#> GSM1182289     1       0          1  1  0
#> GSM1182290     1       0          1  1  0
#> GSM1182291     1       0          1  1  0
#> GSM1182274     2       0          1  0  1
#> GSM1182292     2       0          1  0  1
#> GSM1182293     2       0          1  0  1
#> GSM1182294     2       0          1  0  1
#> GSM1182295     2       0          1  0  1
#> GSM1182296     2       0          1  0  1
#> GSM1182298     2       0          1  0  1
#> GSM1182299     2       0          1  0  1
#> GSM1182300     2       0          1  0  1
#> GSM1182301     2       0          1  0  1
#> GSM1182303     2       0          1  0  1
#> GSM1182304     1       0          1  1  0
#> GSM1182305     1       0          1  1  0
#> GSM1182306     1       0          1  1  0
#> GSM1182307     2       0          1  0  1
#> GSM1182309     2       0          1  0  1
#> GSM1182312     2       0          1  0  1
#> GSM1182314     1       0          1  1  0
#> GSM1182316     2       0          1  0  1
#> GSM1182318     2       0          1  0  1
#> GSM1182319     2       0          1  0  1
#> GSM1182320     2       0          1  0  1
#> GSM1182321     2       0          1  0  1
#> GSM1182322     2       0          1  0  1
#> GSM1182324     2       0          1  0  1
#> GSM1182297     2       0          1  0  1
#> GSM1182302     1       0          1  1  0
#> GSM1182308     2       0          1  0  1
#> GSM1182310     2       0          1  0  1
#> GSM1182311     1       0          1  1  0
#> GSM1182313     1       0          1  1  0
#> GSM1182315     2       0          1  0  1
#> GSM1182317     2       0          1  0  1
#> GSM1182323     1       0          1  1  0

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1182186     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182187     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182188     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182189     1  0.0000      0.916 1.000 0.000 0.000
#> GSM1182190     1  0.0000      0.916 1.000 0.000 0.000
#> GSM1182191     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182192     1  0.0000      0.916 1.000 0.000 0.000
#> GSM1182193     1  0.0000      0.916 1.000 0.000 0.000
#> GSM1182194     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182195     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182196     2  0.4346      0.960 0.000 0.816 0.184
#> GSM1182197     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182198     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182199     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182200     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182201     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182202     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182203     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182204     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182205     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182206     2  0.5058      0.917 0.000 0.756 0.244
#> GSM1182207     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182208     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182209     3  0.6280     -0.195 0.000 0.460 0.540
#> GSM1182210     3  0.1529      0.927 0.000 0.040 0.960
#> GSM1182211     3  0.1411      0.931 0.000 0.036 0.964
#> GSM1182212     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182213     3  0.1860      0.920 0.000 0.052 0.948
#> GSM1182214     3  0.1411      0.931 0.000 0.036 0.964
#> GSM1182215     2  0.5058      0.917 0.000 0.756 0.244
#> GSM1182216     3  0.0000      0.935 0.000 0.000 1.000
#> GSM1182217     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182218     1  0.0000      0.916 1.000 0.000 0.000
#> GSM1182219     3  0.0000      0.935 0.000 0.000 1.000
#> GSM1182220     3  0.0237      0.936 0.000 0.004 0.996
#> GSM1182221     3  0.0000      0.935 0.000 0.000 1.000
#> GSM1182222     3  0.0747      0.935 0.000 0.016 0.984
#> GSM1182223     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182224     2  0.4291      0.963 0.000 0.820 0.180
#> GSM1182225     3  0.0000      0.935 0.000 0.000 1.000
#> GSM1182226     3  0.0000      0.935 0.000 0.000 1.000
#> GSM1182227     1  0.0000      0.916 1.000 0.000 0.000
#> GSM1182228     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182229     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182230     2  0.5058      0.917 0.000 0.756 0.244
#> GSM1182231     2  0.5058      0.917 0.000 0.756 0.244
#> GSM1182232     1  0.0000      0.916 1.000 0.000 0.000
#> GSM1182233     1  0.0000      0.916 1.000 0.000 0.000
#> GSM1182234     1  0.0000      0.916 1.000 0.000 0.000
#> GSM1182235     3  0.0000      0.935 0.000 0.000 1.000
#> GSM1182236     1  0.0000      0.916 1.000 0.000 0.000
#> GSM1182237     2  0.5058      0.917 0.000 0.756 0.244
#> GSM1182238     3  0.0000      0.935 0.000 0.000 1.000
#> GSM1182239     2  0.6095      0.647 0.000 0.608 0.392
#> GSM1182240     2  0.5988      0.661 0.000 0.632 0.368
#> GSM1182241     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182242     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182243     2  0.4654      0.945 0.000 0.792 0.208
#> GSM1182244     2  0.4887      0.930 0.000 0.772 0.228
#> GSM1182245     1  0.0000      0.916 1.000 0.000 0.000
#> GSM1182246     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182247     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182248     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182249     2  0.5058      0.917 0.000 0.756 0.244
#> GSM1182250     2  0.4452      0.956 0.000 0.808 0.192
#> GSM1182251     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182252     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182253     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182254     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182255     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182256     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182257     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182258     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182259     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182260     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182261     2  0.5058      0.917 0.000 0.756 0.244
#> GSM1182262     2  0.4887      0.930 0.000 0.772 0.228
#> GSM1182263     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182264     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182265     2  0.4346      0.961 0.000 0.816 0.184
#> GSM1182266     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182267     1  0.0000      0.916 1.000 0.000 0.000
#> GSM1182268     1  0.0000      0.916 1.000 0.000 0.000
#> GSM1182269     1  0.0000      0.916 1.000 0.000 0.000
#> GSM1182270     1  0.0000      0.916 1.000 0.000 0.000
#> GSM1182271     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182272     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182273     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182275     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182276     2  0.4346      0.958 0.000 0.816 0.184
#> GSM1182277     1  0.0000      0.916 1.000 0.000 0.000
#> GSM1182278     1  0.0000      0.916 1.000 0.000 0.000
#> GSM1182279     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182280     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182281     1  0.0000      0.916 1.000 0.000 0.000
#> GSM1182282     1  0.0000      0.916 1.000 0.000 0.000
#> GSM1182283     1  0.0000      0.916 1.000 0.000 0.000
#> GSM1182284     1  0.0000      0.916 1.000 0.000 0.000
#> GSM1182285     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182286     3  0.0000      0.935 0.000 0.000 1.000
#> GSM1182287     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182288     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182289     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182290     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182291     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182274     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182292     3  0.3192      0.857 0.000 0.112 0.888
#> GSM1182293     3  0.0000      0.935 0.000 0.000 1.000
#> GSM1182294     3  0.1411      0.931 0.000 0.036 0.964
#> GSM1182295     3  0.0000      0.935 0.000 0.000 1.000
#> GSM1182296     3  0.1643      0.924 0.000 0.044 0.956
#> GSM1182298     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182299     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182300     3  0.0237      0.936 0.000 0.004 0.996
#> GSM1182301     3  0.6168      0.103 0.000 0.412 0.588
#> GSM1182303     2  0.4178      0.966 0.000 0.828 0.172
#> GSM1182304     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182305     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182306     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182307     3  0.1529      0.929 0.000 0.040 0.960
#> GSM1182309     3  0.0237      0.936 0.000 0.004 0.996
#> GSM1182312     3  0.0000      0.935 0.000 0.000 1.000
#> GSM1182314     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182316     3  0.2165      0.905 0.000 0.064 0.936
#> GSM1182318     3  0.1411      0.931 0.000 0.036 0.964
#> GSM1182319     3  0.5138      0.583 0.000 0.252 0.748
#> GSM1182320     3  0.1411      0.931 0.000 0.036 0.964
#> GSM1182321     2  0.5016      0.920 0.000 0.760 0.240
#> GSM1182322     3  0.1411      0.931 0.000 0.036 0.964
#> GSM1182324     2  0.5058      0.917 0.000 0.756 0.244
#> GSM1182297     3  0.0000      0.935 0.000 0.000 1.000
#> GSM1182302     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182308     3  0.0000      0.935 0.000 0.000 1.000
#> GSM1182310     3  0.1411      0.931 0.000 0.036 0.964
#> GSM1182311     1  0.0000      0.916 1.000 0.000 0.000
#> GSM1182313     1  0.4178      0.939 0.828 0.172 0.000
#> GSM1182315     3  0.0237      0.936 0.000 0.004 0.996
#> GSM1182317     3  0.1289      0.932 0.000 0.032 0.968
#> GSM1182323     1  0.0000      0.916 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1182186     4  0.0000     0.6378 0.000 0.000 0.000 1.000
#> GSM1182187     4  0.0188     0.6365 0.004 0.000 0.000 0.996
#> GSM1182188     4  0.4585     0.1913 0.332 0.000 0.000 0.668
#> GSM1182189     4  0.4817     0.1133 0.388 0.000 0.000 0.612
#> GSM1182190     4  0.4817     0.1133 0.388 0.000 0.000 0.612
#> GSM1182191     4  0.0000     0.6378 0.000 0.000 0.000 1.000
#> GSM1182192     1  0.4134     0.9301 0.740 0.000 0.000 0.260
#> GSM1182193     1  0.4134     0.9301 0.740 0.000 0.000 0.260
#> GSM1182194     3  0.2399     0.7834 0.032 0.048 0.920 0.000
#> GSM1182195     3  0.2376     0.7804 0.016 0.068 0.916 0.000
#> GSM1182196     3  0.4382     0.6323 0.000 0.296 0.704 0.000
#> GSM1182197     3  0.3649     0.6914 0.000 0.204 0.796 0.000
#> GSM1182198     3  0.1174     0.7732 0.012 0.020 0.968 0.000
#> GSM1182199     3  0.1174     0.7732 0.012 0.020 0.968 0.000
#> GSM1182200     3  0.4630     0.6954 0.036 0.196 0.768 0.000
#> GSM1182201     3  0.4500     0.7019 0.032 0.192 0.776 0.000
#> GSM1182202     4  0.0000     0.6378 0.000 0.000 0.000 1.000
#> GSM1182203     4  0.0188     0.6365 0.004 0.000 0.000 0.996
#> GSM1182204     4  0.0000     0.6378 0.000 0.000 0.000 1.000
#> GSM1182205     3  0.2546     0.7859 0.028 0.060 0.912 0.000
#> GSM1182206     3  0.5028     0.3762 0.004 0.400 0.596 0.000
#> GSM1182207     4  0.0000     0.6378 0.000 0.000 0.000 1.000
#> GSM1182208     4  0.0000     0.6378 0.000 0.000 0.000 1.000
#> GSM1182209     3  0.7619    -0.1129 0.208 0.356 0.436 0.000
#> GSM1182210     2  0.1302     0.7945 0.000 0.956 0.044 0.000
#> GSM1182211     2  0.2179     0.7909 0.012 0.924 0.064 0.000
#> GSM1182212     3  0.4922     0.6962 0.036 0.228 0.736 0.000
#> GSM1182213     2  0.3498     0.7313 0.008 0.832 0.160 0.000
#> GSM1182214     2  0.1767     0.7944 0.012 0.944 0.044 0.000
#> GSM1182215     3  0.5016     0.3816 0.004 0.396 0.600 0.000
#> GSM1182216     2  0.0000     0.8006 0.000 1.000 0.000 0.000
#> GSM1182217     4  0.0000     0.6378 0.000 0.000 0.000 1.000
#> GSM1182218     4  0.4817     0.1133 0.388 0.000 0.000 0.612
#> GSM1182219     2  0.2589     0.7583 0.000 0.884 0.116 0.000
#> GSM1182220     2  0.3024     0.7274 0.000 0.852 0.148 0.000
#> GSM1182221     2  0.3444     0.7927 0.184 0.816 0.000 0.000
#> GSM1182222     2  0.1978     0.7905 0.004 0.928 0.068 0.000
#> GSM1182223     3  0.2399     0.7819 0.032 0.048 0.920 0.000
#> GSM1182224     3  0.4372     0.6058 0.004 0.268 0.728 0.000
#> GSM1182225     2  0.0000     0.8006 0.000 1.000 0.000 0.000
#> GSM1182226     2  0.3958     0.7988 0.160 0.816 0.024 0.000
#> GSM1182227     1  0.4134     0.9301 0.740 0.000 0.000 0.260
#> GSM1182228     3  0.2644     0.7845 0.032 0.060 0.908 0.000
#> GSM1182229     3  0.2644     0.7825 0.032 0.060 0.908 0.000
#> GSM1182230     3  0.5028     0.3762 0.004 0.400 0.596 0.000
#> GSM1182231     2  0.5080     0.1051 0.004 0.576 0.420 0.000
#> GSM1182232     4  0.4830     0.1069 0.392 0.000 0.000 0.608
#> GSM1182233     4  0.4817     0.1133 0.388 0.000 0.000 0.612
#> GSM1182234     1  0.4134     0.9301 0.740 0.000 0.000 0.260
#> GSM1182235     2  0.0000     0.8006 0.000 1.000 0.000 0.000
#> GSM1182236     4  0.4830     0.1069 0.392 0.000 0.000 0.608
#> GSM1182237     3  0.5028     0.3762 0.004 0.400 0.596 0.000
#> GSM1182238     2  0.0000     0.8006 0.000 1.000 0.000 0.000
#> GSM1182239     3  0.5080     0.3135 0.004 0.420 0.576 0.000
#> GSM1182240     3  0.4567     0.6088 0.008 0.276 0.716 0.000
#> GSM1182241     3  0.3649     0.6914 0.000 0.204 0.796 0.000
#> GSM1182242     3  0.2313     0.7818 0.032 0.044 0.924 0.000
#> GSM1182243     3  0.4632     0.5548 0.004 0.308 0.688 0.000
#> GSM1182244     3  0.4872     0.4554 0.004 0.356 0.640 0.000
#> GSM1182245     1  0.4877     0.6275 0.592 0.000 0.000 0.408
#> GSM1182246     4  0.4679     0.1556 0.352 0.000 0.000 0.648
#> GSM1182247     3  0.2224     0.7803 0.032 0.040 0.928 0.000
#> GSM1182248     3  0.2313     0.7821 0.032 0.044 0.924 0.000
#> GSM1182249     2  0.5112     0.0708 0.004 0.560 0.436 0.000
#> GSM1182250     3  0.3208     0.7441 0.004 0.148 0.848 0.000
#> GSM1182251     4  0.0000     0.6378 0.000 0.000 0.000 1.000
#> GSM1182252     3  0.3280     0.7639 0.016 0.124 0.860 0.000
#> GSM1182253     3  0.2399     0.7834 0.032 0.048 0.920 0.000
#> GSM1182254     3  0.1724     0.7760 0.032 0.020 0.948 0.000
#> GSM1182255     4  0.4679     0.1556 0.352 0.000 0.000 0.648
#> GSM1182256     4  0.4679     0.1556 0.352 0.000 0.000 0.648
#> GSM1182257     4  0.0188     0.6365 0.004 0.000 0.000 0.996
#> GSM1182258     4  0.4679     0.1556 0.352 0.000 0.000 0.648
#> GSM1182259     4  0.4679     0.1556 0.352 0.000 0.000 0.648
#> GSM1182260     3  0.3219     0.7274 0.000 0.164 0.836 0.000
#> GSM1182261     3  0.5028     0.3762 0.004 0.400 0.596 0.000
#> GSM1182262     3  0.5016     0.3860 0.004 0.396 0.600 0.000
#> GSM1182263     4  0.0188     0.6365 0.004 0.000 0.000 0.996
#> GSM1182264     3  0.2021     0.7739 0.012 0.056 0.932 0.000
#> GSM1182265     3  0.4485     0.6754 0.028 0.200 0.772 0.000
#> GSM1182266     3  0.1297     0.7780 0.016 0.020 0.964 0.000
#> GSM1182267     1  0.4134     0.9301 0.740 0.000 0.000 0.260
#> GSM1182268     4  0.4830     0.1069 0.392 0.000 0.000 0.608
#> GSM1182269     4  0.4817     0.1133 0.388 0.000 0.000 0.612
#> GSM1182270     4  0.4817     0.1133 0.388 0.000 0.000 0.612
#> GSM1182271     4  0.4406     0.2459 0.300 0.000 0.000 0.700
#> GSM1182272     4  0.4679     0.1556 0.352 0.000 0.000 0.648
#> GSM1182273     3  0.1042     0.7744 0.008 0.020 0.972 0.000
#> GSM1182275     3  0.2483     0.7840 0.032 0.052 0.916 0.000
#> GSM1182276     3  0.5021     0.6902 0.036 0.240 0.724 0.000
#> GSM1182277     1  0.4134     0.9301 0.740 0.000 0.000 0.260
#> GSM1182278     1  0.4134     0.9301 0.740 0.000 0.000 0.260
#> GSM1182279     4  0.0000     0.6378 0.000 0.000 0.000 1.000
#> GSM1182280     4  0.0000     0.6378 0.000 0.000 0.000 1.000
#> GSM1182281     1  0.4981     0.4589 0.536 0.000 0.000 0.464
#> GSM1182282     1  0.4134     0.9301 0.740 0.000 0.000 0.260
#> GSM1182283     1  0.4134     0.9301 0.740 0.000 0.000 0.260
#> GSM1182284     1  0.4134     0.9301 0.740 0.000 0.000 0.260
#> GSM1182285     3  0.2722     0.7849 0.032 0.064 0.904 0.000
#> GSM1182286     2  0.0000     0.8006 0.000 1.000 0.000 0.000
#> GSM1182287     3  0.2399     0.7819 0.032 0.048 0.920 0.000
#> GSM1182288     3  0.2224     0.7803 0.032 0.040 0.928 0.000
#> GSM1182289     4  0.0000     0.6378 0.000 0.000 0.000 1.000
#> GSM1182290     4  0.0000     0.6378 0.000 0.000 0.000 1.000
#> GSM1182291     4  0.4679     0.1556 0.352 0.000 0.000 0.648
#> GSM1182274     3  0.3047     0.7552 0.012 0.116 0.872 0.000
#> GSM1182292     2  0.4897     0.4027 0.008 0.660 0.332 0.000
#> GSM1182293     2  0.3400     0.7937 0.180 0.820 0.000 0.000
#> GSM1182294     2  0.3806     0.8004 0.156 0.824 0.020 0.000
#> GSM1182295     2  0.0000     0.8006 0.000 1.000 0.000 0.000
#> GSM1182296     2  0.1474     0.7939 0.000 0.948 0.052 0.000
#> GSM1182298     3  0.1938     0.7792 0.012 0.052 0.936 0.000
#> GSM1182299     3  0.3688     0.6883 0.000 0.208 0.792 0.000
#> GSM1182300     2  0.0376     0.8014 0.004 0.992 0.004 0.000
#> GSM1182301     2  0.5846    -0.1193 0.032 0.516 0.452 0.000
#> GSM1182303     3  0.4922     0.6967 0.036 0.228 0.736 0.000
#> GSM1182304     4  0.0000     0.6378 0.000 0.000 0.000 1.000
#> GSM1182305     4  0.0188     0.6365 0.004 0.000 0.000 0.996
#> GSM1182306     4  0.0188     0.6365 0.004 0.000 0.000 0.996
#> GSM1182307     2  0.3128     0.7944 0.040 0.884 0.076 0.000
#> GSM1182309     2  0.4464     0.7841 0.208 0.768 0.024 0.000
#> GSM1182312     2  0.3972     0.7866 0.204 0.788 0.008 0.000
#> GSM1182314     4  0.4679     0.1556 0.352 0.000 0.000 0.648
#> GSM1182316     2  0.7091     0.5948 0.208 0.568 0.224 0.000
#> GSM1182318     2  0.5077     0.7855 0.160 0.760 0.080 0.000
#> GSM1182319     2  0.5620     0.7638 0.208 0.708 0.084 0.000
#> GSM1182320     2  0.5458     0.7675 0.204 0.720 0.076 0.000
#> GSM1182321     2  0.7586     0.1988 0.196 0.416 0.388 0.000
#> GSM1182322     2  0.5494     0.7668 0.208 0.716 0.076 0.000
#> GSM1182324     2  0.7485     0.3805 0.192 0.472 0.336 0.000
#> GSM1182297     2  0.0000     0.8006 0.000 1.000 0.000 0.000
#> GSM1182302     4  0.0000     0.6378 0.000 0.000 0.000 1.000
#> GSM1182308     2  0.0000     0.8006 0.000 1.000 0.000 0.000
#> GSM1182310     2  0.5494     0.7668 0.208 0.716 0.076 0.000
#> GSM1182311     4  0.4830     0.1069 0.392 0.000 0.000 0.608
#> GSM1182313     4  0.4679     0.1556 0.352 0.000 0.000 0.648
#> GSM1182315     2  0.4426     0.7848 0.204 0.772 0.024 0.000
#> GSM1182317     2  0.5494     0.7668 0.208 0.716 0.076 0.000
#> GSM1182323     4  0.4817     0.1133 0.388 0.000 0.000 0.612

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1182186     4  0.0000    0.95507 0.000 0.000 0.000 1.000 0.000
#> GSM1182187     4  0.0000    0.95507 0.000 0.000 0.000 1.000 0.000
#> GSM1182188     1  0.5173    0.29330 0.500 0.000 0.000 0.460 0.040
#> GSM1182189     1  0.4307    0.11632 0.500 0.000 0.000 0.500 0.000
#> GSM1182190     4  0.4307   -0.18390 0.500 0.000 0.000 0.500 0.000
#> GSM1182191     4  0.0000    0.95507 0.000 0.000 0.000 1.000 0.000
#> GSM1182192     1  0.0290    0.54996 0.992 0.000 0.000 0.008 0.000
#> GSM1182193     1  0.0290    0.54996 0.992 0.000 0.000 0.008 0.000
#> GSM1182194     3  0.3039    0.67847 0.000 0.000 0.808 0.000 0.192
#> GSM1182195     3  0.3700    0.66849 0.000 0.008 0.752 0.000 0.240
#> GSM1182196     2  0.6465    0.23722 0.000 0.484 0.308 0.000 0.208
#> GSM1182197     2  0.6791    0.00744 0.000 0.360 0.356 0.000 0.284
#> GSM1182198     3  0.3876    0.64045 0.000 0.000 0.684 0.000 0.316
#> GSM1182199     3  0.3876    0.64045 0.000 0.000 0.684 0.000 0.316
#> GSM1182200     2  0.6777    0.09232 0.000 0.372 0.352 0.000 0.276
#> GSM1182201     3  0.5287    0.60910 0.000 0.092 0.648 0.000 0.260
#> GSM1182202     4  0.0000    0.95507 0.000 0.000 0.000 1.000 0.000
#> GSM1182203     4  0.0000    0.95507 0.000 0.000 0.000 1.000 0.000
#> GSM1182204     4  0.0000    0.95507 0.000 0.000 0.000 1.000 0.000
#> GSM1182205     3  0.1750    0.69891 0.000 0.036 0.936 0.000 0.028
#> GSM1182206     3  0.5024    0.35311 0.000 0.440 0.528 0.000 0.032
#> GSM1182207     4  0.0000    0.95507 0.000 0.000 0.000 1.000 0.000
#> GSM1182208     4  0.0000    0.95507 0.000 0.000 0.000 1.000 0.000
#> GSM1182209     2  0.6369    0.22851 0.000 0.520 0.236 0.000 0.244
#> GSM1182210     2  0.0992    0.53550 0.000 0.968 0.024 0.000 0.008
#> GSM1182211     2  0.2409    0.51347 0.000 0.900 0.068 0.000 0.032
#> GSM1182212     2  0.6729    0.14535 0.000 0.396 0.348 0.000 0.256
#> GSM1182213     2  0.5544    0.33957 0.000 0.648 0.184 0.000 0.168
#> GSM1182214     2  0.0693    0.53416 0.000 0.980 0.012 0.000 0.008
#> GSM1182215     3  0.5096    0.34488 0.000 0.444 0.520 0.000 0.036
#> GSM1182216     2  0.0404    0.52910 0.000 0.988 0.000 0.000 0.012
#> GSM1182217     4  0.0000    0.95507 0.000 0.000 0.000 1.000 0.000
#> GSM1182218     1  0.4307    0.11632 0.500 0.000 0.000 0.500 0.000
#> GSM1182219     2  0.0992    0.53456 0.000 0.968 0.024 0.000 0.008
#> GSM1182220     2  0.1918    0.52117 0.000 0.928 0.036 0.000 0.036
#> GSM1182221     2  0.4074   -0.17480 0.000 0.636 0.000 0.000 0.364
#> GSM1182222     2  0.1211    0.52980 0.000 0.960 0.024 0.000 0.016
#> GSM1182223     3  0.1121    0.69263 0.000 0.044 0.956 0.000 0.000
#> GSM1182224     3  0.4479    0.60086 0.000 0.264 0.700 0.000 0.036
#> GSM1182225     2  0.0000    0.53258 0.000 1.000 0.000 0.000 0.000
#> GSM1182226     2  0.3728    0.16624 0.000 0.748 0.008 0.000 0.244
#> GSM1182227     1  0.0290    0.54996 0.992 0.000 0.000 0.008 0.000
#> GSM1182228     3  0.1818    0.68659 0.000 0.044 0.932 0.000 0.024
#> GSM1182229     3  0.0963    0.69266 0.000 0.036 0.964 0.000 0.000
#> GSM1182230     3  0.5096    0.34488 0.000 0.444 0.520 0.000 0.036
#> GSM1182231     2  0.4937   -0.15033 0.000 0.544 0.428 0.000 0.028
#> GSM1182232     1  0.4307    0.11632 0.500 0.000 0.000 0.500 0.000
#> GSM1182233     1  0.4307    0.11632 0.500 0.000 0.000 0.500 0.000
#> GSM1182234     1  0.0290    0.54996 0.992 0.000 0.000 0.008 0.000
#> GSM1182235     2  0.0290    0.52977 0.000 0.992 0.000 0.000 0.008
#> GSM1182236     1  0.4307    0.11632 0.500 0.000 0.000 0.500 0.000
#> GSM1182237     3  0.4968    0.32770 0.000 0.456 0.516 0.000 0.028
#> GSM1182238     2  0.0609    0.52305 0.000 0.980 0.000 0.000 0.020
#> GSM1182239     2  0.6265    0.25880 0.000 0.540 0.240 0.000 0.220
#> GSM1182240     2  0.6593    0.23700 0.000 0.464 0.284 0.000 0.252
#> GSM1182241     2  0.6690    0.18114 0.000 0.432 0.300 0.000 0.268
#> GSM1182242     3  0.0963    0.69266 0.000 0.036 0.964 0.000 0.000
#> GSM1182243     3  0.4338    0.58685 0.000 0.280 0.696 0.000 0.024
#> GSM1182244     3  0.4419    0.55479 0.000 0.312 0.668 0.000 0.020
#> GSM1182245     1  0.2516    0.50818 0.860 0.000 0.000 0.140 0.000
#> GSM1182246     1  0.5173    0.29330 0.500 0.000 0.000 0.460 0.040
#> GSM1182247     3  0.0963    0.69266 0.000 0.036 0.964 0.000 0.000
#> GSM1182248     3  0.0963    0.69266 0.000 0.036 0.964 0.000 0.000
#> GSM1182249     3  0.6229    0.44724 0.000 0.268 0.540 0.000 0.192
#> GSM1182250     3  0.5274    0.63352 0.000 0.132 0.676 0.000 0.192
#> GSM1182251     4  0.0000    0.95507 0.000 0.000 0.000 1.000 0.000
#> GSM1182252     3  0.1697    0.69534 0.000 0.060 0.932 0.000 0.008
#> GSM1182253     3  0.3409    0.69699 0.000 0.032 0.824 0.000 0.144
#> GSM1182254     3  0.4150    0.67321 0.000 0.036 0.748 0.000 0.216
#> GSM1182255     1  0.5173    0.29330 0.500 0.000 0.000 0.460 0.040
#> GSM1182256     1  0.5173    0.29330 0.500 0.000 0.000 0.460 0.040
#> GSM1182257     4  0.0000    0.95507 0.000 0.000 0.000 1.000 0.000
#> GSM1182258     1  0.5173    0.29330 0.500 0.000 0.000 0.460 0.040
#> GSM1182259     1  0.5173    0.29330 0.500 0.000 0.000 0.460 0.040
#> GSM1182260     3  0.5203    0.64089 0.000 0.080 0.648 0.000 0.272
#> GSM1182261     3  0.4961    0.34317 0.000 0.448 0.524 0.000 0.028
#> GSM1182262     3  0.4966    0.41906 0.000 0.404 0.564 0.000 0.032
#> GSM1182263     4  0.0609    0.92545 0.020 0.000 0.000 0.980 0.000
#> GSM1182264     3  0.4025    0.65171 0.000 0.008 0.700 0.000 0.292
#> GSM1182265     3  0.5538    0.57996 0.000 0.088 0.588 0.000 0.324
#> GSM1182266     3  0.4404    0.66829 0.000 0.032 0.704 0.000 0.264
#> GSM1182267     1  0.0290    0.54996 0.992 0.000 0.000 0.008 0.000
#> GSM1182268     1  0.4307    0.11632 0.500 0.000 0.000 0.500 0.000
#> GSM1182269     1  0.4307    0.11632 0.500 0.000 0.000 0.500 0.000
#> GSM1182270     1  0.4307    0.11632 0.500 0.000 0.000 0.500 0.000
#> GSM1182271     1  0.5112    0.28670 0.496 0.000 0.000 0.468 0.036
#> GSM1182272     1  0.5173    0.29330 0.500 0.000 0.000 0.460 0.040
#> GSM1182273     3  0.3730    0.65462 0.000 0.000 0.712 0.000 0.288
#> GSM1182275     3  0.3922    0.68646 0.000 0.040 0.780 0.000 0.180
#> GSM1182276     3  0.5529   -0.13944 0.000 0.420 0.512 0.000 0.068
#> GSM1182277     1  0.0290    0.54996 0.992 0.000 0.000 0.008 0.000
#> GSM1182278     1  0.0290    0.54996 0.992 0.000 0.000 0.008 0.000
#> GSM1182279     4  0.0000    0.95507 0.000 0.000 0.000 1.000 0.000
#> GSM1182280     4  0.0000    0.95507 0.000 0.000 0.000 1.000 0.000
#> GSM1182281     1  0.4398    0.44616 0.720 0.000 0.000 0.240 0.040
#> GSM1182282     1  0.0290    0.54996 0.992 0.000 0.000 0.008 0.000
#> GSM1182283     1  0.0290    0.54996 0.992 0.000 0.000 0.008 0.000
#> GSM1182284     1  0.0290    0.54996 0.992 0.000 0.000 0.008 0.000
#> GSM1182285     3  0.1364    0.69455 0.000 0.036 0.952 0.000 0.012
#> GSM1182286     2  0.0404    0.53482 0.000 0.988 0.012 0.000 0.000
#> GSM1182287     3  0.1626    0.68776 0.000 0.044 0.940 0.000 0.016
#> GSM1182288     3  0.0963    0.69266 0.000 0.036 0.964 0.000 0.000
#> GSM1182289     4  0.0000    0.95507 0.000 0.000 0.000 1.000 0.000
#> GSM1182290     4  0.0000    0.95507 0.000 0.000 0.000 1.000 0.000
#> GSM1182291     1  0.5173    0.29330 0.500 0.000 0.000 0.460 0.040
#> GSM1182274     3  0.5342    0.63520 0.000 0.076 0.612 0.000 0.312
#> GSM1182292     2  0.5902    0.30182 0.000 0.600 0.192 0.000 0.208
#> GSM1182293     2  0.4126   -0.22022 0.000 0.620 0.000 0.000 0.380
#> GSM1182294     2  0.4655   -0.11067 0.000 0.644 0.028 0.000 0.328
#> GSM1182295     2  0.0290    0.53091 0.000 0.992 0.000 0.000 0.008
#> GSM1182296     2  0.0955    0.53583 0.000 0.968 0.028 0.000 0.004
#> GSM1182298     3  0.4339    0.64669 0.000 0.020 0.684 0.000 0.296
#> GSM1182299     2  0.6610    0.22559 0.000 0.460 0.280 0.000 0.260
#> GSM1182300     2  0.0566    0.53026 0.000 0.984 0.004 0.000 0.012
#> GSM1182301     2  0.6422    0.26394 0.000 0.488 0.316 0.000 0.196
#> GSM1182303     3  0.5499   -0.08549 0.000 0.400 0.532 0.000 0.068
#> GSM1182304     4  0.0000    0.95507 0.000 0.000 0.000 1.000 0.000
#> GSM1182305     4  0.0404    0.94336 0.000 0.000 0.000 0.988 0.012
#> GSM1182306     4  0.0510    0.93887 0.000 0.000 0.000 0.984 0.016
#> GSM1182307     2  0.3297    0.48146 0.000 0.848 0.084 0.000 0.068
#> GSM1182309     5  0.4774    0.49642 0.000 0.424 0.020 0.000 0.556
#> GSM1182312     5  0.4306    0.39580 0.000 0.492 0.000 0.000 0.508
#> GSM1182314     1  0.5173    0.29330 0.500 0.000 0.000 0.460 0.040
#> GSM1182316     5  0.4994    0.67346 0.000 0.208 0.096 0.000 0.696
#> GSM1182318     2  0.5357    0.10451 0.000 0.588 0.068 0.000 0.344
#> GSM1182319     5  0.4276    0.76360 0.000 0.244 0.032 0.000 0.724
#> GSM1182320     5  0.4114    0.75883 0.000 0.244 0.024 0.000 0.732
#> GSM1182321     5  0.6195    0.50316 0.000 0.208 0.240 0.000 0.552
#> GSM1182322     5  0.4167    0.76177 0.000 0.252 0.024 0.000 0.724
#> GSM1182324     5  0.6309    0.46299 0.000 0.208 0.264 0.000 0.528
#> GSM1182297     2  0.0404    0.52910 0.000 0.988 0.000 0.000 0.012
#> GSM1182302     4  0.0000    0.95507 0.000 0.000 0.000 1.000 0.000
#> GSM1182308     2  0.0290    0.53230 0.000 0.992 0.000 0.000 0.008
#> GSM1182310     5  0.4276    0.76360 0.000 0.244 0.032 0.000 0.724
#> GSM1182311     1  0.4307    0.11632 0.500 0.000 0.000 0.500 0.000
#> GSM1182313     1  0.5176    0.28793 0.492 0.000 0.000 0.468 0.040
#> GSM1182315     2  0.4689   -0.27948 0.000 0.560 0.016 0.000 0.424
#> GSM1182317     5  0.4167    0.76177 0.000 0.252 0.024 0.000 0.724
#> GSM1182323     1  0.4307    0.11632 0.500 0.000 0.000 0.500 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
#> GSM1182186     5  0.0146    0.82414 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM1182187     5  0.0935    0.80185 0.004 0.000 0.000 0.032 0.964 0.000
#> GSM1182188     4  0.5211    0.73142 0.108 0.000 0.000 0.612 0.272 0.008
#> GSM1182189     5  0.3578    0.68315 0.000 0.000 0.000 0.340 0.660 0.000
#> GSM1182190     5  0.3578    0.68315 0.000 0.000 0.000 0.340 0.660 0.000
#> GSM1182191     5  0.0146    0.82414 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM1182192     4  0.0632    0.75902 0.000 0.000 0.000 0.976 0.024 0.000
#> GSM1182193     4  0.0632    0.75902 0.000 0.000 0.000 0.976 0.024 0.000
#> GSM1182194     3  0.3126    0.67880 0.000 0.000 0.752 0.000 0.000 0.248
#> GSM1182195     3  0.3489    0.62912 0.004 0.000 0.708 0.000 0.000 0.288
#> GSM1182196     2  0.5727   -0.15713 0.032 0.452 0.440 0.000 0.000 0.076
#> GSM1182197     6  0.6352    0.70541 0.020 0.240 0.288 0.000 0.000 0.452
#> GSM1182198     3  0.3534    0.62021 0.008 0.000 0.716 0.000 0.000 0.276
#> GSM1182199     3  0.3534    0.62021 0.008 0.000 0.716 0.000 0.000 0.276
#> GSM1182200     6  0.5848    0.82191 0.004 0.212 0.272 0.000 0.000 0.512
#> GSM1182201     3  0.5114   -0.45863 0.004 0.068 0.488 0.000 0.000 0.440
#> GSM1182202     5  0.0000    0.82525 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182203     5  0.0146    0.82414 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM1182204     5  0.0146    0.82414 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM1182205     3  0.2094    0.72030 0.000 0.020 0.900 0.000 0.000 0.080
#> GSM1182206     3  0.4639    0.67029 0.012 0.188 0.708 0.000 0.000 0.092
#> GSM1182207     5  0.0000    0.82525 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182208     5  0.0000    0.82525 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182209     2  0.6139    0.27834 0.080 0.596 0.168 0.000 0.000 0.156
#> GSM1182210     2  0.1708    0.71078 0.040 0.932 0.024 0.000 0.000 0.004
#> GSM1182211     2  0.3269    0.63882 0.020 0.832 0.028 0.000 0.000 0.120
#> GSM1182212     6  0.5848    0.82191 0.004 0.212 0.272 0.000 0.000 0.512
#> GSM1182213     2  0.4074    0.56251 0.020 0.756 0.040 0.000 0.000 0.184
#> GSM1182214     2  0.1615    0.70190 0.004 0.928 0.004 0.000 0.000 0.064
#> GSM1182215     3  0.5469    0.64610 0.052 0.144 0.664 0.000 0.000 0.140
#> GSM1182216     2  0.1327    0.71600 0.064 0.936 0.000 0.000 0.000 0.000
#> GSM1182217     5  0.0000    0.82525 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182218     5  0.3578    0.68315 0.000 0.000 0.000 0.340 0.660 0.000
#> GSM1182219     2  0.2823    0.71494 0.044 0.872 0.016 0.000 0.000 0.068
#> GSM1182220     2  0.2631    0.67514 0.004 0.876 0.044 0.000 0.000 0.076
#> GSM1182221     1  0.3684    0.67406 0.664 0.332 0.000 0.000 0.000 0.004
#> GSM1182222     2  0.3458    0.63880 0.068 0.820 0.104 0.000 0.000 0.008
#> GSM1182223     3  0.3595    0.49281 0.000 0.008 0.704 0.000 0.000 0.288
#> GSM1182224     3  0.4815    0.69132 0.040 0.140 0.724 0.000 0.000 0.096
#> GSM1182225     2  0.1007    0.72267 0.044 0.956 0.000 0.000 0.000 0.000
#> GSM1182226     1  0.3653    0.71253 0.692 0.300 0.000 0.000 0.000 0.008
#> GSM1182227     4  0.0632    0.75902 0.000 0.000 0.000 0.976 0.024 0.000
#> GSM1182228     3  0.4518    0.26500 0.000 0.044 0.604 0.000 0.000 0.352
#> GSM1182229     3  0.2302    0.70235 0.000 0.008 0.872 0.000 0.000 0.120
#> GSM1182230     3  0.5099    0.66692 0.048 0.148 0.700 0.000 0.000 0.104
#> GSM1182231     3  0.4704    0.55968 0.000 0.300 0.628 0.000 0.000 0.072
#> GSM1182232     5  0.3592    0.68007 0.000 0.000 0.000 0.344 0.656 0.000
#> GSM1182233     5  0.3578    0.68315 0.000 0.000 0.000 0.340 0.660 0.000
#> GSM1182234     4  0.0632    0.75902 0.000 0.000 0.000 0.976 0.024 0.000
#> GSM1182235     2  0.1007    0.72267 0.044 0.956 0.000 0.000 0.000 0.000
#> GSM1182236     5  0.3578    0.68315 0.000 0.000 0.000 0.340 0.660 0.000
#> GSM1182237     3  0.5568    0.63883 0.052 0.156 0.652 0.000 0.000 0.140
#> GSM1182238     2  0.2048    0.66560 0.120 0.880 0.000 0.000 0.000 0.000
#> GSM1182239     2  0.6692    0.16729 0.088 0.512 0.184 0.000 0.000 0.216
#> GSM1182240     2  0.5819   -0.21094 0.004 0.520 0.264 0.000 0.000 0.212
#> GSM1182241     6  0.6444    0.56606 0.016 0.356 0.268 0.000 0.000 0.360
#> GSM1182242     3  0.2346    0.70006 0.000 0.008 0.868 0.000 0.000 0.124
#> GSM1182243     3  0.4081    0.69787 0.016 0.152 0.768 0.000 0.000 0.064
#> GSM1182244     3  0.5064    0.68201 0.048 0.144 0.704 0.000 0.000 0.104
#> GSM1182245     4  0.2664    0.76783 0.016 0.000 0.000 0.848 0.136 0.000
#> GSM1182246     4  0.5027    0.77264 0.108 0.000 0.000 0.660 0.220 0.012
#> GSM1182247     3  0.2302    0.70235 0.000 0.008 0.872 0.000 0.000 0.120
#> GSM1182248     3  0.2212    0.70653 0.000 0.008 0.880 0.000 0.000 0.112
#> GSM1182249     3  0.4358    0.68410 0.056 0.100 0.772 0.000 0.000 0.072
#> GSM1182250     3  0.3835    0.70328 0.048 0.068 0.812 0.000 0.000 0.072
#> GSM1182251     5  0.0000    0.82525 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182252     3  0.2875    0.72980 0.000 0.052 0.852 0.000 0.000 0.096
#> GSM1182253     3  0.1297    0.72088 0.000 0.012 0.948 0.000 0.000 0.040
#> GSM1182254     3  0.1909    0.71104 0.004 0.024 0.920 0.000 0.000 0.052
#> GSM1182255     4  0.5027    0.77264 0.108 0.000 0.000 0.660 0.220 0.012
#> GSM1182256     4  0.5027    0.77264 0.108 0.000 0.000 0.660 0.220 0.012
#> GSM1182257     5  0.1700    0.75557 0.004 0.000 0.000 0.080 0.916 0.000
#> GSM1182258     4  0.5027    0.77264 0.108 0.000 0.000 0.660 0.220 0.012
#> GSM1182259     4  0.5052    0.77195 0.108 0.000 0.000 0.656 0.224 0.012
#> GSM1182260     3  0.3271    0.71831 0.020 0.060 0.844 0.000 0.000 0.076
#> GSM1182261     3  0.5543    0.63689 0.048 0.160 0.652 0.000 0.000 0.140
#> GSM1182262     3  0.4811    0.68052 0.044 0.148 0.724 0.000 0.000 0.084
#> GSM1182263     5  0.1858    0.74067 0.004 0.000 0.000 0.092 0.904 0.000
#> GSM1182264     3  0.2489    0.71666 0.012 0.000 0.860 0.000 0.000 0.128
#> GSM1182265     3  0.3940    0.70683 0.048 0.068 0.804 0.000 0.000 0.080
#> GSM1182266     3  0.1841    0.72520 0.008 0.008 0.920 0.000 0.000 0.064
#> GSM1182267     4  0.0632    0.75902 0.000 0.000 0.000 0.976 0.024 0.000
#> GSM1182268     5  0.3578    0.68315 0.000 0.000 0.000 0.340 0.660 0.000
#> GSM1182269     5  0.3578    0.68315 0.000 0.000 0.000 0.340 0.660 0.000
#> GSM1182270     5  0.3578    0.68315 0.000 0.000 0.000 0.340 0.660 0.000
#> GSM1182271     4  0.5317    0.70459 0.104 0.000 0.000 0.580 0.308 0.008
#> GSM1182272     4  0.5027    0.77264 0.108 0.000 0.000 0.660 0.220 0.012
#> GSM1182273     3  0.2346    0.71884 0.008 0.000 0.868 0.000 0.000 0.124
#> GSM1182275     3  0.1672    0.70943 0.004 0.016 0.932 0.000 0.000 0.048
#> GSM1182276     6  0.5539    0.77680 0.000 0.244 0.200 0.000 0.000 0.556
#> GSM1182277     4  0.0632    0.75902 0.000 0.000 0.000 0.976 0.024 0.000
#> GSM1182278     4  0.0632    0.75902 0.000 0.000 0.000 0.976 0.024 0.000
#> GSM1182279     5  0.0000    0.82525 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182280     5  0.0000    0.82525 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182281     4  0.4689    0.77911 0.108 0.000 0.000 0.700 0.184 0.008
#> GSM1182282     4  0.0632    0.75902 0.000 0.000 0.000 0.976 0.024 0.000
#> GSM1182283     4  0.0632    0.75902 0.000 0.000 0.000 0.976 0.024 0.000
#> GSM1182284     4  0.0632    0.75902 0.000 0.000 0.000 0.976 0.024 0.000
#> GSM1182285     3  0.2805    0.70123 0.000 0.012 0.828 0.000 0.000 0.160
#> GSM1182286     2  0.1152    0.72235 0.044 0.952 0.004 0.000 0.000 0.000
#> GSM1182287     3  0.4362    0.19154 0.000 0.028 0.584 0.000 0.000 0.388
#> GSM1182288     3  0.2302    0.70235 0.000 0.008 0.872 0.000 0.000 0.120
#> GSM1182289     5  0.0146    0.82414 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM1182290     5  0.0000    0.82525 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182291     4  0.5027    0.77264 0.108 0.000 0.000 0.660 0.220 0.012
#> GSM1182274     3  0.2986    0.72419 0.012 0.032 0.852 0.000 0.000 0.104
#> GSM1182292     2  0.5281    0.31342 0.016 0.648 0.176 0.000 0.000 0.160
#> GSM1182293     1  0.3923    0.52680 0.580 0.416 0.000 0.000 0.000 0.004
#> GSM1182294     1  0.3476    0.75335 0.732 0.260 0.004 0.000 0.000 0.004
#> GSM1182295     2  0.1007    0.72267 0.044 0.956 0.000 0.000 0.000 0.000
#> GSM1182296     2  0.1426    0.72058 0.028 0.948 0.008 0.000 0.000 0.016
#> GSM1182298     3  0.3426    0.62245 0.004 0.000 0.720 0.000 0.000 0.276
#> GSM1182299     2  0.6569   -0.40653 0.032 0.432 0.248 0.000 0.000 0.288
#> GSM1182300     2  0.1858    0.70496 0.092 0.904 0.000 0.000 0.000 0.004
#> GSM1182301     2  0.5470    0.00492 0.004 0.584 0.244 0.000 0.000 0.168
#> GSM1182303     6  0.5421    0.78332 0.000 0.212 0.208 0.000 0.000 0.580
#> GSM1182304     5  0.0146    0.82414 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM1182305     5  0.2532    0.74280 0.052 0.000 0.000 0.060 0.884 0.004
#> GSM1182306     5  0.1219    0.80037 0.048 0.000 0.000 0.004 0.948 0.000
#> GSM1182307     2  0.3434    0.66327 0.064 0.836 0.028 0.000 0.000 0.072
#> GSM1182309     1  0.2402    0.81475 0.856 0.140 0.004 0.000 0.000 0.000
#> GSM1182312     1  0.2562    0.80601 0.828 0.172 0.000 0.000 0.000 0.000
#> GSM1182314     4  0.5027    0.77264 0.108 0.000 0.000 0.660 0.220 0.012
#> GSM1182316     1  0.3500    0.78865 0.816 0.120 0.052 0.000 0.000 0.012
#> GSM1182318     2  0.5867    0.45716 0.228 0.584 0.032 0.000 0.000 0.156
#> GSM1182319     1  0.2234    0.81486 0.872 0.124 0.004 0.000 0.000 0.000
#> GSM1182320     1  0.2234    0.81486 0.872 0.124 0.004 0.000 0.000 0.000
#> GSM1182321     1  0.6110    0.28366 0.492 0.080 0.364 0.000 0.000 0.064
#> GSM1182322     1  0.2234    0.81486 0.872 0.124 0.004 0.000 0.000 0.000
#> GSM1182324     1  0.6123    0.25809 0.484 0.080 0.372 0.000 0.000 0.064
#> GSM1182297     2  0.1588    0.71552 0.072 0.924 0.000 0.000 0.000 0.004
#> GSM1182302     5  0.0000    0.82525 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182308     2  0.1152    0.72235 0.044 0.952 0.004 0.000 0.000 0.000
#> GSM1182310     1  0.2234    0.81486 0.872 0.124 0.004 0.000 0.000 0.000
#> GSM1182311     5  0.3578    0.68315 0.000 0.000 0.000 0.340 0.660 0.000
#> GSM1182313     4  0.5093    0.76375 0.108 0.000 0.000 0.636 0.248 0.008
#> GSM1182315     1  0.3405    0.70151 0.724 0.272 0.004 0.000 0.000 0.000
#> GSM1182317     1  0.2320    0.81453 0.864 0.132 0.004 0.000 0.000 0.000
#> GSM1182323     5  0.3578    0.68315 0.000 0.000 0.000 0.340 0.660 0.000

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk MAD-mclust-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk MAD-mclust-collect-classes

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

test_to_known_factors(res)
#>              n disease.state(p) gender(p) k
#> MAD:mclust 139         7.73e-02    1.0000 2
#> MAD:mclust 137         5.66e-07    0.0787 3
#> MAD:mclust 101         6.79e-06    0.1232 4
#> MAD:mclust  84         1.90e-07    0.1267 5
#> MAD:mclust 125         7.87e-08    0.2613 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 46361 rows and 139 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 1.000           1.000       1.000         0.4791 0.521   0.521
#> 3 3 1.000           0.960       0.980         0.0487 0.984   0.969
#> 4 4 0.617           0.693       0.821         0.2400 0.918   0.840
#> 5 5 0.622           0.655       0.825         0.1571 0.786   0.530
#> 6 6 0.543           0.483       0.664         0.0326 0.876   0.597

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
#> GSM1182186     1       0          1  1  0
#> GSM1182187     1       0          1  1  0
#> GSM1182188     1       0          1  1  0
#> GSM1182189     1       0          1  1  0
#> GSM1182190     1       0          1  1  0
#> GSM1182191     1       0          1  1  0
#> GSM1182192     1       0          1  1  0
#> GSM1182193     1       0          1  1  0
#> GSM1182194     2       0          1  0  1
#> GSM1182195     2       0          1  0  1
#> GSM1182196     2       0          1  0  1
#> GSM1182197     2       0          1  0  1
#> GSM1182198     2       0          1  0  1
#> GSM1182199     2       0          1  0  1
#> GSM1182200     2       0          1  0  1
#> GSM1182201     2       0          1  0  1
#> GSM1182202     1       0          1  1  0
#> GSM1182203     1       0          1  1  0
#> GSM1182204     1       0          1  1  0
#> GSM1182205     2       0          1  0  1
#> GSM1182206     2       0          1  0  1
#> GSM1182207     1       0          1  1  0
#> GSM1182208     1       0          1  1  0
#> GSM1182209     2       0          1  0  1
#> GSM1182210     2       0          1  0  1
#> GSM1182211     2       0          1  0  1
#> GSM1182212     2       0          1  0  1
#> GSM1182213     2       0          1  0  1
#> GSM1182214     2       0          1  0  1
#> GSM1182215     2       0          1  0  1
#> GSM1182216     2       0          1  0  1
#> GSM1182217     1       0          1  1  0
#> GSM1182218     1       0          1  1  0
#> GSM1182219     2       0          1  0  1
#> GSM1182220     2       0          1  0  1
#> GSM1182221     2       0          1  0  1
#> GSM1182222     2       0          1  0  1
#> GSM1182223     2       0          1  0  1
#> GSM1182224     2       0          1  0  1
#> GSM1182225     2       0          1  0  1
#> GSM1182226     2       0          1  0  1
#> GSM1182227     1       0          1  1  0
#> GSM1182228     2       0          1  0  1
#> GSM1182229     2       0          1  0  1
#> GSM1182230     2       0          1  0  1
#> GSM1182231     2       0          1  0  1
#> GSM1182232     1       0          1  1  0
#> GSM1182233     1       0          1  1  0
#> GSM1182234     1       0          1  1  0
#> GSM1182235     2       0          1  0  1
#> GSM1182236     1       0          1  1  0
#> GSM1182237     2       0          1  0  1
#> GSM1182238     2       0          1  0  1
#> GSM1182239     2       0          1  0  1
#> GSM1182240     2       0          1  0  1
#> GSM1182241     2       0          1  0  1
#> GSM1182242     2       0          1  0  1
#> GSM1182243     2       0          1  0  1
#> GSM1182244     2       0          1  0  1
#> GSM1182245     1       0          1  1  0
#> GSM1182246     1       0          1  1  0
#> GSM1182247     2       0          1  0  1
#> GSM1182248     2       0          1  0  1
#> GSM1182249     2       0          1  0  1
#> GSM1182250     2       0          1  0  1
#> GSM1182251     1       0          1  1  0
#> GSM1182252     2       0          1  0  1
#> GSM1182253     2       0          1  0  1
#> GSM1182254     2       0          1  0  1
#> GSM1182255     1       0          1  1  0
#> GSM1182256     1       0          1  1  0
#> GSM1182257     1       0          1  1  0
#> GSM1182258     1       0          1  1  0
#> GSM1182259     1       0          1  1  0
#> GSM1182260     2       0          1  0  1
#> GSM1182261     2       0          1  0  1
#> GSM1182262     2       0          1  0  1
#> GSM1182263     1       0          1  1  0
#> GSM1182264     2       0          1  0  1
#> GSM1182265     2       0          1  0  1
#> GSM1182266     2       0          1  0  1
#> GSM1182267     1       0          1  1  0
#> GSM1182268     1       0          1  1  0
#> GSM1182269     1       0          1  1  0
#> GSM1182270     1       0          1  1  0
#> GSM1182271     1       0          1  1  0
#> GSM1182272     1       0          1  1  0
#> GSM1182273     2       0          1  0  1
#> GSM1182275     2       0          1  0  1
#> GSM1182276     2       0          1  0  1
#> GSM1182277     1       0          1  1  0
#> GSM1182278     1       0          1  1  0
#> GSM1182279     1       0          1  1  0
#> GSM1182280     1       0          1  1  0
#> GSM1182281     1       0          1  1  0
#> GSM1182282     1       0          1  1  0
#> GSM1182283     1       0          1  1  0
#> GSM1182284     1       0          1  1  0
#> GSM1182285     2       0          1  0  1
#> GSM1182286     2       0          1  0  1
#> GSM1182287     2       0          1  0  1
#> GSM1182288     2       0          1  0  1
#> GSM1182289     1       0          1  1  0
#> GSM1182290     1       0          1  1  0
#> GSM1182291     1       0          1  1  0
#> GSM1182274     2       0          1  0  1
#> GSM1182292     2       0          1  0  1
#> GSM1182293     2       0          1  0  1
#> GSM1182294     2       0          1  0  1
#> GSM1182295     2       0          1  0  1
#> GSM1182296     2       0          1  0  1
#> GSM1182298     2       0          1  0  1
#> GSM1182299     2       0          1  0  1
#> GSM1182300     2       0          1  0  1
#> GSM1182301     2       0          1  0  1
#> GSM1182303     2       0          1  0  1
#> GSM1182304     1       0          1  1  0
#> GSM1182305     1       0          1  1  0
#> GSM1182306     1       0          1  1  0
#> GSM1182307     2       0          1  0  1
#> GSM1182309     2       0          1  0  1
#> GSM1182312     2       0          1  0  1
#> GSM1182314     1       0          1  1  0
#> GSM1182316     2       0          1  0  1
#> GSM1182318     2       0          1  0  1
#> GSM1182319     2       0          1  0  1
#> GSM1182320     2       0          1  0  1
#> GSM1182321     2       0          1  0  1
#> GSM1182322     2       0          1  0  1
#> GSM1182324     2       0          1  0  1
#> GSM1182297     2       0          1  0  1
#> GSM1182302     1       0          1  1  0
#> GSM1182308     2       0          1  0  1
#> GSM1182310     2       0          1  0  1
#> GSM1182311     1       0          1  1  0
#> GSM1182313     1       0          1  1  0
#> GSM1182315     2       0          1  0  1
#> GSM1182317     2       0          1  0  1
#> GSM1182323     1       0          1  1  0

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1182186     1  0.0592      0.972 0.988 0.000 0.012
#> GSM1182187     1  0.0000      0.977 1.000 0.000 0.000
#> GSM1182188     1  0.0000      0.977 1.000 0.000 0.000
#> GSM1182189     1  0.1529      0.941 0.960 0.000 0.040
#> GSM1182190     3  0.5327      0.833 0.272 0.000 0.728
#> GSM1182191     1  0.0424      0.975 0.992 0.000 0.008
#> GSM1182192     1  0.0424      0.971 0.992 0.000 0.008
#> GSM1182193     1  0.0424      0.971 0.992 0.000 0.008
#> GSM1182194     2  0.0424      0.984 0.000 0.992 0.008
#> GSM1182195     2  0.0424      0.984 0.000 0.992 0.008
#> GSM1182196     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182197     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182198     2  0.0661      0.981 0.004 0.988 0.008
#> GSM1182199     2  0.0424      0.984 0.000 0.992 0.008
#> GSM1182200     2  0.0424      0.986 0.000 0.992 0.008
#> GSM1182201     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182202     1  0.3116      0.834 0.892 0.000 0.108
#> GSM1182203     1  0.0237      0.977 0.996 0.000 0.004
#> GSM1182204     1  0.0424      0.975 0.992 0.000 0.008
#> GSM1182205     2  0.0424      0.984 0.000 0.992 0.008
#> GSM1182206     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182207     1  0.0237      0.977 0.996 0.000 0.004
#> GSM1182208     1  0.0237      0.977 0.996 0.000 0.004
#> GSM1182209     2  0.6299      0.203 0.000 0.524 0.476
#> GSM1182210     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182211     2  0.1163      0.972 0.000 0.972 0.028
#> GSM1182212     2  0.4121      0.817 0.000 0.832 0.168
#> GSM1182213     2  0.0892      0.978 0.000 0.980 0.020
#> GSM1182214     2  0.0592      0.984 0.000 0.988 0.012
#> GSM1182215     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182216     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182217     1  0.0424      0.975 0.992 0.000 0.008
#> GSM1182218     3  0.6111      0.693 0.396 0.000 0.604
#> GSM1182219     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182220     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182221     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182222     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182223     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182224     2  0.0424      0.984 0.000 0.992 0.008
#> GSM1182225     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182226     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182227     1  0.0424      0.971 0.992 0.000 0.008
#> GSM1182228     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182229     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182230     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182231     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182232     1  0.0237      0.977 0.996 0.000 0.004
#> GSM1182233     1  0.0237      0.977 0.996 0.000 0.004
#> GSM1182234     1  0.0000      0.977 1.000 0.000 0.000
#> GSM1182235     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182236     1  0.0592      0.972 0.988 0.000 0.012
#> GSM1182237     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182238     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182239     2  0.0424      0.986 0.000 0.992 0.008
#> GSM1182240     2  0.0424      0.986 0.000 0.992 0.008
#> GSM1182241     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182242     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182243     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182244     2  0.0424      0.984 0.000 0.992 0.008
#> GSM1182245     1  0.0237      0.975 0.996 0.000 0.004
#> GSM1182246     1  0.0000      0.977 1.000 0.000 0.000
#> GSM1182247     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182248     2  0.0424      0.984 0.000 0.992 0.008
#> GSM1182249     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182250     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182251     1  0.0237      0.977 0.996 0.000 0.004
#> GSM1182252     2  0.0424      0.984 0.000 0.992 0.008
#> GSM1182253     2  0.0424      0.984 0.000 0.992 0.008
#> GSM1182254     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182255     1  0.0000      0.977 1.000 0.000 0.000
#> GSM1182256     1  0.0000      0.977 1.000 0.000 0.000
#> GSM1182257     1  0.0000      0.977 1.000 0.000 0.000
#> GSM1182258     1  0.0000      0.977 1.000 0.000 0.000
#> GSM1182259     1  0.0000      0.977 1.000 0.000 0.000
#> GSM1182260     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182261     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182262     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182263     1  0.0000      0.977 1.000 0.000 0.000
#> GSM1182264     2  0.0424      0.984 0.000 0.992 0.008
#> GSM1182265     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182266     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182267     1  0.0000      0.977 1.000 0.000 0.000
#> GSM1182268     1  0.0424      0.975 0.992 0.000 0.008
#> GSM1182269     1  0.1031      0.960 0.976 0.000 0.024
#> GSM1182270     3  0.4062      0.787 0.164 0.000 0.836
#> GSM1182271     1  0.0000      0.977 1.000 0.000 0.000
#> GSM1182272     1  0.0000      0.977 1.000 0.000 0.000
#> GSM1182273     2  0.0237      0.986 0.000 0.996 0.004
#> GSM1182275     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182276     2  0.0424      0.986 0.000 0.992 0.008
#> GSM1182277     1  0.0000      0.977 1.000 0.000 0.000
#> GSM1182278     1  0.0000      0.977 1.000 0.000 0.000
#> GSM1182279     1  0.0424      0.975 0.992 0.000 0.008
#> GSM1182280     1  0.0424      0.975 0.992 0.000 0.008
#> GSM1182281     1  0.0424      0.971 0.992 0.000 0.008
#> GSM1182282     1  0.0000      0.977 1.000 0.000 0.000
#> GSM1182283     1  0.0424      0.971 0.992 0.000 0.008
#> GSM1182284     1  0.0424      0.971 0.992 0.000 0.008
#> GSM1182285     2  0.0424      0.984 0.000 0.992 0.008
#> GSM1182286     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182287     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182288     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182289     1  0.0237      0.977 0.996 0.000 0.004
#> GSM1182290     1  0.0237      0.977 0.996 0.000 0.004
#> GSM1182291     1  0.0000      0.977 1.000 0.000 0.000
#> GSM1182274     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182292     2  0.1964      0.946 0.000 0.944 0.056
#> GSM1182293     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182294     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182295     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182296     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182298     2  0.0424      0.984 0.000 0.992 0.008
#> GSM1182299     2  0.1031      0.975 0.000 0.976 0.024
#> GSM1182300     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182301     2  0.0424      0.986 0.000 0.992 0.008
#> GSM1182303     2  0.0424      0.986 0.000 0.992 0.008
#> GSM1182304     1  0.1643      0.936 0.956 0.000 0.044
#> GSM1182305     1  0.0000      0.977 1.000 0.000 0.000
#> GSM1182306     1  0.0237      0.977 0.996 0.000 0.004
#> GSM1182307     2  0.1031      0.975 0.000 0.976 0.024
#> GSM1182309     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182312     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182314     1  0.0000      0.977 1.000 0.000 0.000
#> GSM1182316     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182318     2  0.1753      0.954 0.000 0.952 0.048
#> GSM1182319     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182320     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182321     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182322     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182324     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182297     2  0.0424      0.986 0.000 0.992 0.008
#> GSM1182302     1  0.1031      0.960 0.976 0.000 0.024
#> GSM1182308     2  0.0424      0.986 0.000 0.992 0.008
#> GSM1182310     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182311     1  0.1031      0.960 0.976 0.000 0.024
#> GSM1182313     1  0.0000      0.977 1.000 0.000 0.000
#> GSM1182315     2  0.0424      0.986 0.000 0.992 0.008
#> GSM1182317     2  0.0424      0.986 0.000 0.992 0.008
#> GSM1182323     1  0.6140     -0.184 0.596 0.000 0.404

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1182186     4  0.6027     0.7522 0.088 0.000 0.252 0.660
#> GSM1182187     4  0.2814     0.7976 0.000 0.000 0.132 0.868
#> GSM1182188     4  0.0000     0.7878 0.000 0.000 0.000 1.000
#> GSM1182189     4  0.6466     0.7209 0.104 0.000 0.288 0.608
#> GSM1182190     1  0.4050     0.1527 0.820 0.000 0.144 0.036
#> GSM1182191     4  0.6214     0.7396 0.092 0.000 0.272 0.636
#> GSM1182192     4  0.1867     0.7683 0.000 0.000 0.072 0.928
#> GSM1182193     4  0.2593     0.7499 0.000 0.004 0.104 0.892
#> GSM1182194     2  0.2530     0.7604 0.000 0.888 0.112 0.000
#> GSM1182195     2  0.2704     0.7616 0.000 0.876 0.124 0.000
#> GSM1182196     2  0.1722     0.8157 0.048 0.944 0.008 0.000
#> GSM1182197     2  0.0657     0.8142 0.004 0.984 0.012 0.000
#> GSM1182198     2  0.2868     0.7577 0.000 0.864 0.136 0.000
#> GSM1182199     2  0.2868     0.7582 0.000 0.864 0.136 0.000
#> GSM1182200     2  0.1406     0.8155 0.016 0.960 0.024 0.000
#> GSM1182201     2  0.1118     0.8088 0.000 0.964 0.036 0.000
#> GSM1182202     4  0.5880     0.7595 0.088 0.000 0.232 0.680
#> GSM1182203     4  0.3402     0.7944 0.004 0.000 0.164 0.832
#> GSM1182204     4  0.4538     0.7817 0.024 0.000 0.216 0.760
#> GSM1182205     2  0.1557     0.8048 0.000 0.944 0.056 0.000
#> GSM1182206     2  0.0188     0.8151 0.000 0.996 0.004 0.000
#> GSM1182207     4  0.6340     0.7299 0.096 0.000 0.284 0.620
#> GSM1182208     4  0.6340     0.7299 0.096 0.000 0.284 0.620
#> GSM1182209     1  0.4018     0.2046 0.772 0.224 0.004 0.000
#> GSM1182210     2  0.4399     0.7411 0.224 0.760 0.016 0.000
#> GSM1182211     2  0.4817     0.5156 0.388 0.612 0.000 0.000
#> GSM1182212     2  0.4019     0.7719 0.196 0.792 0.012 0.000
#> GSM1182213     2  0.4250     0.7067 0.276 0.724 0.000 0.000
#> GSM1182214     2  0.4655     0.6538 0.312 0.684 0.004 0.000
#> GSM1182215     2  0.1767     0.8125 0.012 0.944 0.044 0.000
#> GSM1182216     2  0.4741     0.7302 0.228 0.744 0.028 0.000
#> GSM1182217     4  0.4004     0.7927 0.024 0.000 0.164 0.812
#> GSM1182218     1  0.3439     0.1359 0.868 0.000 0.048 0.084
#> GSM1182219     2  0.3311     0.7799 0.172 0.828 0.000 0.000
#> GSM1182220     2  0.3486     0.7704 0.188 0.812 0.000 0.000
#> GSM1182221     2  0.5067     0.7265 0.216 0.736 0.048 0.000
#> GSM1182222     2  0.3969     0.7716 0.180 0.804 0.016 0.000
#> GSM1182223     2  0.0707     0.8118 0.000 0.980 0.020 0.000
#> GSM1182224     2  0.2469     0.7762 0.000 0.892 0.108 0.000
#> GSM1182225     2  0.3791     0.7637 0.200 0.796 0.004 0.000
#> GSM1182226     2  0.4920     0.7447 0.192 0.756 0.052 0.000
#> GSM1182227     3  0.4877     0.3769 0.000 0.000 0.592 0.408
#> GSM1182228     2  0.0707     0.8118 0.000 0.980 0.020 0.000
#> GSM1182229     2  0.0707     0.8118 0.000 0.980 0.020 0.000
#> GSM1182230     2  0.1398     0.8131 0.004 0.956 0.040 0.000
#> GSM1182231     2  0.1109     0.8168 0.028 0.968 0.004 0.000
#> GSM1182232     4  0.4849     0.7902 0.064 0.000 0.164 0.772
#> GSM1182233     4  0.6112     0.7507 0.096 0.000 0.248 0.656
#> GSM1182234     4  0.1389     0.7749 0.000 0.000 0.048 0.952
#> GSM1182235     2  0.4228     0.7385 0.232 0.760 0.008 0.000
#> GSM1182236     4  0.6080     0.6638 0.236 0.000 0.100 0.664
#> GSM1182237     2  0.2319     0.8112 0.036 0.924 0.040 0.000
#> GSM1182238     2  0.4922     0.7256 0.228 0.736 0.036 0.000
#> GSM1182239     2  0.3172     0.7887 0.160 0.840 0.000 0.000
#> GSM1182240     2  0.3751     0.7728 0.196 0.800 0.004 0.000
#> GSM1182241     2  0.0672     0.8154 0.008 0.984 0.008 0.000
#> GSM1182242     2  0.1716     0.7957 0.000 0.936 0.064 0.000
#> GSM1182243     2  0.0592     0.8126 0.000 0.984 0.016 0.000
#> GSM1182244     2  0.2149     0.7974 0.000 0.912 0.088 0.000
#> GSM1182245     4  0.2589     0.7725 0.000 0.000 0.116 0.884
#> GSM1182246     4  0.0000     0.7878 0.000 0.000 0.000 1.000
#> GSM1182247     2  0.1792     0.7935 0.000 0.932 0.068 0.000
#> GSM1182248     2  0.2149     0.7806 0.000 0.912 0.088 0.000
#> GSM1182249     2  0.1936     0.8144 0.028 0.940 0.032 0.000
#> GSM1182250     2  0.1474     0.8067 0.000 0.948 0.052 0.000
#> GSM1182251     4  0.5979     0.7466 0.076 0.000 0.272 0.652
#> GSM1182252     2  0.1940     0.7885 0.000 0.924 0.076 0.000
#> GSM1182253     2  0.2408     0.7678 0.000 0.896 0.104 0.000
#> GSM1182254     2  0.1474     0.8013 0.000 0.948 0.052 0.000
#> GSM1182255     4  0.0000     0.7878 0.000 0.000 0.000 1.000
#> GSM1182256     4  0.0000     0.7878 0.000 0.000 0.000 1.000
#> GSM1182257     4  0.0000     0.7878 0.000 0.000 0.000 1.000
#> GSM1182258     4  0.0000     0.7878 0.000 0.000 0.000 1.000
#> GSM1182259     4  0.0000     0.7878 0.000 0.000 0.000 1.000
#> GSM1182260     2  0.1792     0.7931 0.000 0.932 0.068 0.000
#> GSM1182261     2  0.0524     0.8160 0.004 0.988 0.008 0.000
#> GSM1182262     2  0.0707     0.8120 0.000 0.980 0.020 0.000
#> GSM1182263     4  0.4671     0.7828 0.028 0.000 0.220 0.752
#> GSM1182264     2  0.2469     0.7637 0.000 0.892 0.108 0.000
#> GSM1182265     2  0.2466     0.7917 0.004 0.900 0.096 0.000
#> GSM1182266     2  0.2081     0.7835 0.000 0.916 0.084 0.000
#> GSM1182267     4  0.2714     0.7738 0.004 0.000 0.112 0.884
#> GSM1182268     4  0.7031     0.6750 0.200 0.000 0.224 0.576
#> GSM1182269     4  0.6415     0.7234 0.100 0.000 0.288 0.612
#> GSM1182270     1  0.7372    -0.0689 0.524 0.000 0.236 0.240
#> GSM1182271     4  0.0188     0.7891 0.000 0.000 0.004 0.996
#> GSM1182272     4  0.0000     0.7878 0.000 0.000 0.000 1.000
#> GSM1182273     2  0.2530     0.7604 0.000 0.888 0.112 0.000
#> GSM1182275     2  0.1022     0.8090 0.000 0.968 0.032 0.000
#> GSM1182276     2  0.3672     0.7853 0.164 0.824 0.012 0.000
#> GSM1182277     4  0.4222     0.4325 0.000 0.000 0.272 0.728
#> GSM1182278     4  0.1389     0.7740 0.000 0.000 0.048 0.952
#> GSM1182279     4  0.6164     0.7443 0.092 0.000 0.264 0.644
#> GSM1182280     4  0.6140     0.7488 0.096 0.000 0.252 0.652
#> GSM1182281     4  0.0000     0.7878 0.000 0.000 0.000 1.000
#> GSM1182282     4  0.1389     0.7753 0.000 0.000 0.048 0.952
#> GSM1182283     4  0.2011     0.7637 0.000 0.000 0.080 0.920
#> GSM1182284     3  0.4999     0.2052 0.000 0.000 0.508 0.492
#> GSM1182285     2  0.2281     0.7739 0.000 0.904 0.096 0.000
#> GSM1182286     2  0.4049     0.7543 0.212 0.780 0.008 0.000
#> GSM1182287     2  0.0895     0.8133 0.004 0.976 0.020 0.000
#> GSM1182288     2  0.1637     0.7978 0.000 0.940 0.060 0.000
#> GSM1182289     4  0.5785     0.7510 0.064 0.000 0.272 0.664
#> GSM1182290     4  0.6340     0.7299 0.096 0.000 0.284 0.620
#> GSM1182291     4  0.0000     0.7878 0.000 0.000 0.000 1.000
#> GSM1182274     2  0.2530     0.7640 0.000 0.888 0.112 0.000
#> GSM1182292     2  0.4477     0.6601 0.312 0.688 0.000 0.000
#> GSM1182293     2  0.4922     0.7240 0.228 0.736 0.036 0.000
#> GSM1182294     2  0.4916     0.7482 0.184 0.760 0.056 0.000
#> GSM1182295     2  0.4158     0.7456 0.224 0.768 0.008 0.000
#> GSM1182296     2  0.3873     0.7485 0.228 0.772 0.000 0.000
#> GSM1182298     2  0.4304     0.5585 0.000 0.716 0.284 0.000
#> GSM1182299     2  0.2704     0.8030 0.124 0.876 0.000 0.000
#> GSM1182300     2  0.3852     0.7676 0.192 0.800 0.008 0.000
#> GSM1182301     2  0.4088     0.7486 0.232 0.764 0.004 0.000
#> GSM1182303     2  0.3479     0.7928 0.148 0.840 0.012 0.000
#> GSM1182304     4  0.6572     0.7215 0.120 0.000 0.272 0.608
#> GSM1182305     4  0.0817     0.7940 0.000 0.000 0.024 0.976
#> GSM1182306     4  0.2011     0.7983 0.000 0.000 0.080 0.920
#> GSM1182307     1  0.4989    -0.1037 0.528 0.472 0.000 0.000
#> GSM1182309     2  0.6157     0.6324 0.232 0.660 0.108 0.000
#> GSM1182312     2  0.5599     0.6887 0.228 0.700 0.072 0.000
#> GSM1182314     4  0.0000     0.7878 0.000 0.000 0.000 1.000
#> GSM1182316     2  0.5458     0.6910 0.236 0.704 0.060 0.000
#> GSM1182318     1  0.4994    -0.1425 0.520 0.480 0.000 0.000
#> GSM1182319     2  0.6934     0.4160 0.164 0.580 0.256 0.000
#> GSM1182320     2  0.6262     0.5699 0.280 0.628 0.092 0.000
#> GSM1182321     2  0.3497     0.7990 0.104 0.860 0.036 0.000
#> GSM1182322     3  0.6883     0.1929 0.212 0.192 0.596 0.000
#> GSM1182324     2  0.3013     0.8064 0.080 0.888 0.032 0.000
#> GSM1182297     2  0.4428     0.7017 0.276 0.720 0.004 0.000
#> GSM1182302     4  0.4957     0.7800 0.048 0.000 0.204 0.748
#> GSM1182308     2  0.4072     0.7255 0.252 0.748 0.000 0.000
#> GSM1182310     3  0.6886     0.1925 0.204 0.200 0.596 0.000
#> GSM1182311     1  0.5799    -0.0781 0.668 0.000 0.068 0.264
#> GSM1182313     4  0.0000     0.7878 0.000 0.000 0.000 1.000
#> GSM1182315     1  0.6568     0.0931 0.512 0.408 0.080 0.000
#> GSM1182317     1  0.5508     0.1955 0.692 0.252 0.056 0.000
#> GSM1182323     1  0.6031     0.0910 0.676 0.000 0.216 0.108

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1182186     1  0.3816     0.6179 0.696 0.000 0.000 0.304 0.000
#> GSM1182187     4  0.0609     0.8542 0.020 0.000 0.000 0.980 0.000
#> GSM1182188     4  0.0000     0.8566 0.000 0.000 0.000 1.000 0.000
#> GSM1182189     1  0.0794     0.8382 0.972 0.000 0.000 0.028 0.000
#> GSM1182190     2  0.4059     0.1189 0.292 0.700 0.000 0.004 0.004
#> GSM1182191     1  0.2230     0.8415 0.884 0.000 0.000 0.116 0.000
#> GSM1182192     4  0.3089     0.7974 0.012 0.016 0.060 0.884 0.028
#> GSM1182193     5  0.6182     0.3384 0.004 0.016 0.088 0.336 0.556
#> GSM1182194     3  0.0693     0.7718 0.000 0.012 0.980 0.000 0.008
#> GSM1182195     3  0.1670     0.7544 0.000 0.012 0.936 0.000 0.052
#> GSM1182196     3  0.3210     0.7353 0.000 0.212 0.788 0.000 0.000
#> GSM1182197     3  0.3234     0.7839 0.008 0.144 0.836 0.000 0.012
#> GSM1182198     3  0.2835     0.6923 0.004 0.016 0.868 0.000 0.112
#> GSM1182199     3  0.2818     0.6772 0.000 0.012 0.856 0.000 0.132
#> GSM1182200     3  0.3053     0.7912 0.008 0.128 0.852 0.000 0.012
#> GSM1182201     3  0.1869     0.7927 0.016 0.036 0.936 0.000 0.012
#> GSM1182202     4  0.3003     0.7391 0.188 0.000 0.000 0.812 0.000
#> GSM1182203     4  0.1270     0.8442 0.052 0.000 0.000 0.948 0.000
#> GSM1182204     4  0.1608     0.8353 0.072 0.000 0.000 0.928 0.000
#> GSM1182205     3  0.0898     0.7919 0.000 0.020 0.972 0.000 0.008
#> GSM1182206     3  0.3093     0.7684 0.000 0.168 0.824 0.000 0.008
#> GSM1182207     1  0.1408     0.8446 0.948 0.008 0.000 0.044 0.000
#> GSM1182208     1  0.0865     0.8350 0.972 0.004 0.000 0.024 0.000
#> GSM1182209     2  0.0880     0.6094 0.000 0.968 0.032 0.000 0.000
#> GSM1182210     2  0.4283     0.1995 0.000 0.544 0.456 0.000 0.000
#> GSM1182211     2  0.1851     0.6633 0.000 0.912 0.088 0.000 0.000
#> GSM1182212     3  0.3942     0.6726 0.000 0.260 0.728 0.000 0.012
#> GSM1182213     2  0.4302     0.1166 0.000 0.520 0.480 0.000 0.000
#> GSM1182214     2  0.1608     0.6533 0.000 0.928 0.072 0.000 0.000
#> GSM1182215     3  0.3705     0.7810 0.000 0.120 0.816 0.000 0.064
#> GSM1182216     2  0.2773     0.6779 0.000 0.836 0.164 0.000 0.000
#> GSM1182217     4  0.2424     0.7981 0.132 0.000 0.000 0.868 0.000
#> GSM1182218     2  0.4377     0.1466 0.248 0.720 0.000 0.028 0.004
#> GSM1182219     3  0.3949     0.5539 0.000 0.332 0.668 0.000 0.000
#> GSM1182220     3  0.4030     0.5025 0.000 0.352 0.648 0.000 0.000
#> GSM1182221     2  0.3388     0.6769 0.000 0.792 0.200 0.000 0.008
#> GSM1182222     3  0.4088     0.4675 0.000 0.368 0.632 0.000 0.000
#> GSM1182223     3  0.2416     0.7962 0.000 0.100 0.888 0.000 0.012
#> GSM1182224     3  0.0880     0.7766 0.000 0.000 0.968 0.000 0.032
#> GSM1182225     3  0.4302     0.0381 0.000 0.480 0.520 0.000 0.000
#> GSM1182226     2  0.4508     0.5221 0.000 0.648 0.332 0.000 0.020
#> GSM1182227     5  0.1410     0.6736 0.000 0.000 0.000 0.060 0.940
#> GSM1182228     3  0.2416     0.7962 0.000 0.100 0.888 0.000 0.012
#> GSM1182229     3  0.1894     0.7985 0.000 0.072 0.920 0.000 0.008
#> GSM1182230     3  0.3229     0.7858 0.000 0.128 0.840 0.000 0.032
#> GSM1182231     3  0.3519     0.7275 0.000 0.216 0.776 0.000 0.008
#> GSM1182232     4  0.4415     0.3560 0.388 0.000 0.000 0.604 0.008
#> GSM1182233     1  0.2852     0.7902 0.828 0.000 0.000 0.172 0.000
#> GSM1182234     4  0.4675     0.7535 0.108 0.012 0.016 0.784 0.080
#> GSM1182235     2  0.3895     0.5509 0.000 0.680 0.320 0.000 0.000
#> GSM1182236     4  0.6104     0.3903 0.296 0.140 0.000 0.560 0.004
#> GSM1182237     3  0.4100     0.7376 0.000 0.192 0.764 0.000 0.044
#> GSM1182238     2  0.2471     0.6751 0.000 0.864 0.136 0.000 0.000
#> GSM1182239     3  0.3983     0.5380 0.000 0.340 0.660 0.000 0.000
#> GSM1182240     3  0.3949     0.5516 0.000 0.332 0.668 0.000 0.000
#> GSM1182241     3  0.2848     0.7761 0.000 0.156 0.840 0.000 0.004
#> GSM1182242     3  0.0981     0.7842 0.008 0.008 0.972 0.000 0.012
#> GSM1182243     3  0.2230     0.7943 0.000 0.116 0.884 0.000 0.000
#> GSM1182244     3  0.1997     0.7946 0.000 0.040 0.924 0.000 0.036
#> GSM1182245     4  0.3340     0.7841 0.044 0.016 0.056 0.872 0.012
#> GSM1182246     4  0.0162     0.8569 0.000 0.000 0.000 0.996 0.004
#> GSM1182247     3  0.0566     0.7851 0.000 0.004 0.984 0.000 0.012
#> GSM1182248     3  0.0854     0.7771 0.008 0.004 0.976 0.000 0.012
#> GSM1182249     3  0.3438     0.7611 0.000 0.172 0.808 0.000 0.020
#> GSM1182250     3  0.1809     0.7994 0.000 0.060 0.928 0.000 0.012
#> GSM1182251     1  0.3003     0.8001 0.812 0.000 0.000 0.188 0.000
#> GSM1182252     3  0.0404     0.7888 0.000 0.012 0.988 0.000 0.000
#> GSM1182253     3  0.1200     0.7692 0.008 0.012 0.964 0.000 0.016
#> GSM1182254     3  0.1012     0.7912 0.000 0.020 0.968 0.000 0.012
#> GSM1182255     4  0.0000     0.8566 0.000 0.000 0.000 1.000 0.000
#> GSM1182256     4  0.0162     0.8569 0.000 0.000 0.000 0.996 0.004
#> GSM1182257     4  0.0000     0.8566 0.000 0.000 0.000 1.000 0.000
#> GSM1182258     4  0.0162     0.8569 0.000 0.000 0.000 0.996 0.004
#> GSM1182259     4  0.0162     0.8569 0.000 0.000 0.000 0.996 0.004
#> GSM1182260     3  0.1314     0.7852 0.016 0.012 0.960 0.000 0.012
#> GSM1182261     3  0.3284     0.7778 0.000 0.148 0.828 0.000 0.024
#> GSM1182262     3  0.2464     0.7975 0.000 0.096 0.888 0.000 0.016
#> GSM1182263     1  0.3109     0.7791 0.800 0.000 0.000 0.200 0.000
#> GSM1182264     3  0.2140     0.7439 0.040 0.012 0.924 0.000 0.024
#> GSM1182265     3  0.3694     0.7298 0.020 0.024 0.824 0.000 0.132
#> GSM1182266     3  0.1701     0.7564 0.028 0.012 0.944 0.000 0.016
#> GSM1182267     1  0.5686     0.5078 0.624 0.008 0.012 0.060 0.296
#> GSM1182268     1  0.1386     0.8236 0.952 0.032 0.000 0.016 0.000
#> GSM1182269     1  0.1205     0.8405 0.956 0.004 0.000 0.040 0.000
#> GSM1182270     4  0.5965     0.1988 0.392 0.112 0.000 0.496 0.000
#> GSM1182271     4  0.0000     0.8566 0.000 0.000 0.000 1.000 0.000
#> GSM1182272     4  0.0162     0.8569 0.000 0.000 0.000 0.996 0.004
#> GSM1182273     3  0.1787     0.7483 0.032 0.012 0.940 0.000 0.016
#> GSM1182275     3  0.1809     0.7981 0.000 0.060 0.928 0.000 0.012
#> GSM1182276     3  0.3884     0.6327 0.000 0.288 0.708 0.000 0.004
#> GSM1182277     5  0.4297     0.5834 0.036 0.000 0.008 0.200 0.756
#> GSM1182278     4  0.4181     0.4806 0.000 0.004 0.004 0.676 0.316
#> GSM1182279     1  0.1792     0.8488 0.916 0.000 0.000 0.084 0.000
#> GSM1182280     1  0.1792     0.8481 0.916 0.000 0.000 0.084 0.000
#> GSM1182281     4  0.1043     0.8396 0.000 0.000 0.000 0.960 0.040
#> GSM1182282     4  0.5026     0.6822 0.196 0.016 0.016 0.732 0.040
#> GSM1182283     4  0.6002     0.1330 0.008 0.012 0.060 0.524 0.396
#> GSM1182284     5  0.1851     0.6750 0.000 0.000 0.000 0.088 0.912
#> GSM1182285     3  0.0451     0.7792 0.000 0.004 0.988 0.000 0.008
#> GSM1182286     2  0.4262     0.2645 0.000 0.560 0.440 0.000 0.000
#> GSM1182287     3  0.2771     0.7888 0.000 0.128 0.860 0.000 0.012
#> GSM1182288     3  0.0798     0.7902 0.000 0.016 0.976 0.000 0.008
#> GSM1182289     1  0.2813     0.8009 0.832 0.000 0.000 0.168 0.000
#> GSM1182290     1  0.1282     0.8430 0.952 0.004 0.000 0.044 0.000
#> GSM1182291     4  0.0162     0.8569 0.000 0.000 0.000 0.996 0.004
#> GSM1182274     3  0.2312     0.7402 0.060 0.016 0.912 0.000 0.012
#> GSM1182292     2  0.4171     0.3694 0.000 0.604 0.396 0.000 0.000
#> GSM1182293     2  0.3424     0.6444 0.000 0.760 0.240 0.000 0.000
#> GSM1182294     2  0.4980     0.0483 0.000 0.488 0.484 0.000 0.028
#> GSM1182295     2  0.4201     0.3641 0.000 0.592 0.408 0.000 0.000
#> GSM1182296     2  0.4305     0.0510 0.000 0.512 0.488 0.000 0.000
#> GSM1182298     3  0.4527     0.1989 0.000 0.012 0.596 0.000 0.392
#> GSM1182299     3  0.4793     0.6728 0.056 0.236 0.704 0.000 0.004
#> GSM1182300     3  0.4359     0.3204 0.000 0.412 0.584 0.000 0.004
#> GSM1182301     3  0.4235     0.2979 0.000 0.424 0.576 0.000 0.000
#> GSM1182303     3  0.3582     0.7181 0.000 0.224 0.768 0.000 0.008
#> GSM1182304     1  0.1697     0.8464 0.932 0.008 0.000 0.060 0.000
#> GSM1182305     4  0.1908     0.8250 0.092 0.000 0.000 0.908 0.000
#> GSM1182306     4  0.0609     0.8542 0.020 0.000 0.000 0.980 0.000
#> GSM1182307     2  0.1544     0.6510 0.000 0.932 0.068 0.000 0.000
#> GSM1182309     2  0.2012     0.6413 0.000 0.920 0.060 0.000 0.020
#> GSM1182312     2  0.2110     0.6494 0.000 0.912 0.072 0.000 0.016
#> GSM1182314     4  0.0162     0.8569 0.000 0.000 0.000 0.996 0.004
#> GSM1182316     2  0.4374     0.5981 0.000 0.700 0.272 0.000 0.028
#> GSM1182318     2  0.1341     0.6404 0.000 0.944 0.056 0.000 0.000
#> GSM1182319     5  0.6234     0.0262 0.000 0.304 0.172 0.000 0.524
#> GSM1182320     2  0.2505     0.6599 0.000 0.888 0.092 0.000 0.020
#> GSM1182321     3  0.4987     0.6501 0.000 0.236 0.684 0.000 0.080
#> GSM1182322     5  0.2891     0.6390 0.000 0.176 0.000 0.000 0.824
#> GSM1182324     3  0.4237     0.7271 0.000 0.200 0.752 0.000 0.048
#> GSM1182297     2  0.2179     0.6729 0.000 0.888 0.112 0.000 0.000
#> GSM1182302     4  0.2377     0.8004 0.128 0.000 0.000 0.872 0.000
#> GSM1182308     2  0.3774     0.5886 0.000 0.704 0.296 0.000 0.000
#> GSM1182310     5  0.2286     0.6674 0.000 0.108 0.004 0.000 0.888
#> GSM1182311     1  0.7025    -0.0324 0.376 0.288 0.000 0.008 0.328
#> GSM1182313     4  0.0162     0.8569 0.000 0.000 0.000 0.996 0.004
#> GSM1182315     2  0.1549     0.6168 0.000 0.944 0.040 0.000 0.016
#> GSM1182317     2  0.0865     0.5978 0.000 0.972 0.024 0.000 0.004
#> GSM1182323     2  0.5786    -0.2917 0.380 0.524 0.000 0.096 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
#> GSM1182186     5  0.4396    0.09342 0.000 0.000 0.000 0.456 0.520 0.024
#> GSM1182187     4  0.0993    0.80958 0.000 0.000 0.000 0.964 0.024 0.012
#> GSM1182188     4  0.0146    0.81843 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM1182189     5  0.0777    0.76488 0.000 0.000 0.004 0.000 0.972 0.024
#> GSM1182190     6  0.5819    0.65085 0.000 0.368 0.000 0.000 0.188 0.444
#> GSM1182191     5  0.2170    0.77239 0.000 0.000 0.000 0.100 0.888 0.012
#> GSM1182192     4  0.7185    0.31569 0.080 0.000 0.164 0.552 0.080 0.124
#> GSM1182193     1  0.7583    0.42273 0.472 0.000 0.120 0.248 0.080 0.080
#> GSM1182194     3  0.2065    0.49942 0.004 0.032 0.912 0.000 0.000 0.052
#> GSM1182195     3  0.3126    0.46125 0.044 0.028 0.856 0.000 0.000 0.072
#> GSM1182196     2  0.4322    0.03899 0.000 0.528 0.452 0.000 0.000 0.020
#> GSM1182197     3  0.5457    0.20270 0.000 0.444 0.448 0.000 0.004 0.104
#> GSM1182198     3  0.4082    0.30681 0.068 0.012 0.764 0.000 0.000 0.156
#> GSM1182199     3  0.4222    0.36318 0.120 0.016 0.764 0.000 0.000 0.100
#> GSM1182200     3  0.4269    0.50465 0.000 0.316 0.648 0.000 0.000 0.036
#> GSM1182201     3  0.4443    0.55832 0.000 0.232 0.696 0.000 0.004 0.068
#> GSM1182202     4  0.2867    0.73435 0.000 0.000 0.000 0.848 0.112 0.040
#> GSM1182203     4  0.1151    0.80781 0.000 0.000 0.000 0.956 0.032 0.012
#> GSM1182204     4  0.1225    0.80622 0.000 0.000 0.000 0.952 0.036 0.012
#> GSM1182205     3  0.2821    0.54893 0.004 0.096 0.860 0.000 0.000 0.040
#> GSM1182206     3  0.4498    0.33105 0.004 0.428 0.544 0.000 0.000 0.024
#> GSM1182207     5  0.1700    0.77748 0.000 0.000 0.000 0.024 0.928 0.048
#> GSM1182208     5  0.1644    0.75578 0.000 0.000 0.000 0.004 0.920 0.076
#> GSM1182209     2  0.3940   -0.26692 0.000 0.652 0.008 0.000 0.004 0.336
#> GSM1182210     2  0.4769    0.52295 0.000 0.656 0.240 0.000 0.000 0.104
#> GSM1182211     2  0.3377    0.28805 0.000 0.784 0.028 0.000 0.000 0.188
#> GSM1182212     2  0.4705    0.01391 0.000 0.484 0.472 0.000 0.000 0.044
#> GSM1182213     2  0.4783    0.48196 0.000 0.616 0.308 0.000 0.000 0.076
#> GSM1182214     2  0.3123    0.58772 0.000 0.824 0.136 0.000 0.000 0.040
#> GSM1182215     3  0.5972    0.38164 0.092 0.360 0.504 0.000 0.000 0.044
#> GSM1182216     2  0.4949    0.51244 0.008 0.664 0.216 0.000 0.000 0.112
#> GSM1182217     4  0.2383    0.75847 0.000 0.000 0.000 0.880 0.096 0.024
#> GSM1182218     6  0.6170    0.62414 0.000 0.396 0.000 0.032 0.132 0.440
#> GSM1182219     2  0.4150    0.25623 0.000 0.592 0.392 0.000 0.000 0.016
#> GSM1182220     2  0.4276    0.22606 0.000 0.564 0.416 0.000 0.000 0.020
#> GSM1182221     2  0.3424    0.57024 0.000 0.772 0.204 0.000 0.000 0.024
#> GSM1182222     2  0.4386    0.35721 0.004 0.620 0.348 0.000 0.000 0.028
#> GSM1182223     3  0.3584    0.52514 0.000 0.308 0.688 0.000 0.000 0.004
#> GSM1182224     3  0.4545    0.56139 0.068 0.148 0.744 0.000 0.000 0.040
#> GSM1182225     2  0.4594    0.37792 0.000 0.608 0.340 0.000 0.000 0.052
#> GSM1182226     2  0.5573    0.47011 0.052 0.624 0.240 0.000 0.000 0.084
#> GSM1182227     1  0.2708    0.54501 0.884 0.004 0.004 0.072 0.012 0.024
#> GSM1182228     3  0.3725    0.52096 0.000 0.316 0.676 0.000 0.000 0.008
#> GSM1182229     3  0.4110    0.45304 0.000 0.376 0.608 0.000 0.000 0.016
#> GSM1182230     3  0.4825    0.32189 0.012 0.432 0.524 0.000 0.000 0.032
#> GSM1182231     3  0.4664    0.16941 0.004 0.476 0.488 0.000 0.000 0.032
#> GSM1182232     4  0.4950    0.20412 0.032 0.000 0.000 0.540 0.408 0.020
#> GSM1182233     5  0.3220    0.73126 0.000 0.000 0.016 0.088 0.844 0.052
#> GSM1182234     4  0.7900    0.03084 0.208 0.000 0.072 0.448 0.156 0.116
#> GSM1182235     2  0.4325    0.51672 0.000 0.692 0.244 0.000 0.000 0.064
#> GSM1182236     6  0.7965    0.40118 0.028 0.132 0.000 0.292 0.224 0.324
#> GSM1182237     2  0.5861   -0.16364 0.068 0.448 0.436 0.000 0.000 0.048
#> GSM1182238     2  0.4867    0.52612 0.016 0.684 0.208 0.000 0.000 0.092
#> GSM1182239     2  0.4580    0.36315 0.000 0.612 0.336 0.000 0.000 0.052
#> GSM1182240     2  0.4453    0.38522 0.000 0.624 0.332 0.000 0.000 0.044
#> GSM1182241     3  0.3993    0.39057 0.000 0.400 0.592 0.000 0.000 0.008
#> GSM1182242     3  0.2956    0.56518 0.000 0.120 0.840 0.000 0.000 0.040
#> GSM1182243     3  0.4109    0.38039 0.000 0.412 0.576 0.000 0.000 0.012
#> GSM1182244     3  0.5304    0.53097 0.060 0.280 0.620 0.000 0.000 0.040
#> GSM1182245     4  0.7167    0.14389 0.020 0.000 0.212 0.468 0.068 0.232
#> GSM1182246     4  0.0000    0.81900 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182247     3  0.3133    0.57916 0.000 0.212 0.780 0.000 0.000 0.008
#> GSM1182248     3  0.2968    0.58214 0.000 0.168 0.816 0.000 0.000 0.016
#> GSM1182249     3  0.4722    0.19071 0.012 0.476 0.488 0.000 0.000 0.024
#> GSM1182250     3  0.4922    0.40916 0.020 0.392 0.556 0.000 0.000 0.032
#> GSM1182251     5  0.2593    0.73770 0.000 0.000 0.000 0.148 0.844 0.008
#> GSM1182252     3  0.3974    0.54427 0.000 0.296 0.680 0.000 0.000 0.024
#> GSM1182253     3  0.2696    0.50137 0.004 0.048 0.872 0.000 0.000 0.076
#> GSM1182254     3  0.4062    0.52646 0.000 0.316 0.660 0.000 0.000 0.024
#> GSM1182255     4  0.0146    0.81772 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM1182256     4  0.0000    0.81900 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182257     4  0.0000    0.81900 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182258     4  0.0000    0.81900 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182259     4  0.0000    0.81900 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182260     3  0.5425    0.43757 0.008 0.364 0.548 0.000 0.012 0.068
#> GSM1182261     3  0.5754    0.29463 0.044 0.412 0.480 0.000 0.000 0.064
#> GSM1182262     3  0.5019    0.45536 0.020 0.356 0.580 0.000 0.000 0.044
#> GSM1182263     5  0.2911    0.73926 0.000 0.000 0.000 0.144 0.832 0.024
#> GSM1182264     3  0.6121    0.50749 0.028 0.248 0.592 0.000 0.032 0.100
#> GSM1182265     3  0.7180    0.19509 0.200 0.360 0.364 0.000 0.012 0.064
#> GSM1182266     3  0.4496    0.55673 0.004 0.176 0.728 0.000 0.008 0.084
#> GSM1182267     5  0.5911    0.16313 0.412 0.000 0.012 0.036 0.480 0.060
#> GSM1182268     5  0.2263    0.74892 0.016 0.000 0.000 0.000 0.884 0.100
#> GSM1182269     5  0.5220    0.45927 0.000 0.000 0.052 0.044 0.632 0.272
#> GSM1182270     6  0.7238    0.66982 0.000 0.204 0.004 0.100 0.276 0.416
#> GSM1182271     4  0.0000    0.81900 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182272     4  0.0000    0.81900 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182273     3  0.4968    0.54599 0.016 0.164 0.712 0.000 0.016 0.092
#> GSM1182275     3  0.3552    0.48634 0.000 0.116 0.800 0.000 0.000 0.084
#> GSM1182276     2  0.5074    0.07825 0.000 0.472 0.452 0.000 0.000 0.076
#> GSM1182277     1  0.3766    0.55009 0.764 0.000 0.012 0.204 0.008 0.012
#> GSM1182278     4  0.4488   -0.10065 0.468 0.000 0.016 0.508 0.000 0.008
#> GSM1182279     5  0.1333    0.78466 0.000 0.000 0.000 0.048 0.944 0.008
#> GSM1182280     5  0.1564    0.77851 0.000 0.000 0.000 0.040 0.936 0.024
#> GSM1182281     4  0.2669    0.73178 0.024 0.000 0.004 0.864 0.000 0.108
#> GSM1182282     4  0.8090   -0.03435 0.084 0.000 0.088 0.396 0.232 0.200
#> GSM1182283     1  0.5054    0.27460 0.544 0.000 0.016 0.400 0.036 0.004
#> GSM1182284     1  0.2196    0.56211 0.884 0.000 0.004 0.108 0.000 0.004
#> GSM1182285     3  0.2772    0.55014 0.004 0.092 0.864 0.000 0.000 0.040
#> GSM1182286     2  0.3956    0.51969 0.000 0.704 0.264 0.000 0.000 0.032
#> GSM1182287     3  0.4065    0.52225 0.000 0.300 0.672 0.000 0.000 0.028
#> GSM1182288     3  0.2956    0.56114 0.000 0.120 0.840 0.000 0.000 0.040
#> GSM1182289     5  0.2954    0.76279 0.000 0.000 0.000 0.108 0.844 0.048
#> GSM1182290     5  0.1950    0.77161 0.000 0.000 0.000 0.024 0.912 0.064
#> GSM1182291     4  0.0000    0.81900 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182274     3  0.7239    0.31082 0.024 0.312 0.436 0.000 0.076 0.152
#> GSM1182292     2  0.5165    0.38717 0.000 0.616 0.156 0.000 0.000 0.228
#> GSM1182293     2  0.3134    0.58687 0.000 0.820 0.144 0.000 0.000 0.036
#> GSM1182294     2  0.3678    0.55483 0.008 0.748 0.228 0.000 0.000 0.016
#> GSM1182295     2  0.3221    0.58726 0.000 0.792 0.188 0.000 0.000 0.020
#> GSM1182296     2  0.4734    0.51780 0.000 0.672 0.208 0.000 0.000 0.120
#> GSM1182298     3  0.4667    0.30320 0.164 0.020 0.720 0.000 0.000 0.096
#> GSM1182299     2  0.5473    0.10664 0.000 0.520 0.392 0.000 0.036 0.052
#> GSM1182300     2  0.3582    0.53422 0.000 0.732 0.252 0.000 0.000 0.016
#> GSM1182301     2  0.5565    0.34287 0.000 0.552 0.208 0.000 0.000 0.240
#> GSM1182303     3  0.4523    0.10725 0.000 0.452 0.516 0.000 0.000 0.032
#> GSM1182304     5  0.1745    0.76221 0.000 0.000 0.000 0.020 0.924 0.056
#> GSM1182305     4  0.3269    0.67489 0.000 0.000 0.000 0.792 0.184 0.024
#> GSM1182306     4  0.1434    0.80035 0.000 0.000 0.000 0.940 0.048 0.012
#> GSM1182307     2  0.2623    0.38987 0.000 0.852 0.016 0.000 0.000 0.132
#> GSM1182309     2  0.2924    0.57257 0.024 0.864 0.084 0.000 0.000 0.028
#> GSM1182312     2  0.2673    0.59143 0.004 0.852 0.132 0.000 0.000 0.012
#> GSM1182314     4  0.0000    0.81900 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182316     2  0.4233    0.57790 0.024 0.768 0.148 0.000 0.004 0.056
#> GSM1182318     2  0.2278    0.59242 0.000 0.868 0.128 0.000 0.000 0.004
#> GSM1182319     2  0.6521    0.07826 0.316 0.488 0.088 0.000 0.000 0.108
#> GSM1182320     2  0.3928    0.41184 0.008 0.764 0.052 0.000 0.000 0.176
#> GSM1182321     3  0.5875    0.03075 0.024 0.376 0.488 0.000 0.000 0.112
#> GSM1182322     1  0.4536    0.15301 0.560 0.408 0.004 0.000 0.000 0.028
#> GSM1182324     2  0.4867   -0.00266 0.020 0.504 0.452 0.000 0.000 0.024
#> GSM1182297     2  0.4305    0.54438 0.000 0.708 0.216 0.000 0.000 0.076
#> GSM1182302     4  0.1895    0.78186 0.000 0.000 0.000 0.912 0.072 0.016
#> GSM1182308     2  0.3766    0.58087 0.000 0.748 0.212 0.000 0.000 0.040
#> GSM1182310     1  0.3874    0.37006 0.732 0.228 0.000 0.000 0.000 0.040
#> GSM1182311     1  0.6908   -0.08584 0.396 0.072 0.000 0.008 0.384 0.140
#> GSM1182313     4  0.0146    0.81843 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM1182315     2  0.2471    0.53324 0.020 0.896 0.040 0.000 0.000 0.044
#> GSM1182317     2  0.1858    0.50234 0.000 0.912 0.012 0.000 0.000 0.076
#> GSM1182323     6  0.6741    0.66429 0.000 0.228 0.000 0.048 0.300 0.424

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk MAD-NMF-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk MAD-NMF-collect-classes

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

test_to_known_factors(res)
#>           n disease.state(p) gender(p) k
#> MAD:NMF 139         7.73e-02    1.0000 2
#> MAD:NMF 137         7.12e-02    0.8683 3
#> MAD:NMF 123         2.44e-01    1.0000 4
#> MAD:NMF 116         4.88e-05    0.0337 5
#> MAD:NMF  80         7.16e-05    0.1638 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 46361 rows and 139 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.47910 0.521   0.521
#> 3 3 0.967           0.974       0.987        0.14848 0.928   0.861
#> 4 4 1.000           0.978       0.991        0.04205 0.979   0.954
#> 5 5 0.997           0.967       0.985        0.01213 0.991   0.978
#> 6 6 0.986           0.948       0.977        0.00601 0.999   0.998

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
#> GSM1182186     1       0          1  1  0
#> GSM1182187     1       0          1  1  0
#> GSM1182188     1       0          1  1  0
#> GSM1182189     1       0          1  1  0
#> GSM1182190     1       0          1  1  0
#> GSM1182191     1       0          1  1  0
#> GSM1182192     1       0          1  1  0
#> GSM1182193     1       0          1  1  0
#> GSM1182194     2       0          1  0  1
#> GSM1182195     2       0          1  0  1
#> GSM1182196     2       0          1  0  1
#> GSM1182197     2       0          1  0  1
#> GSM1182198     2       0          1  0  1
#> GSM1182199     2       0          1  0  1
#> GSM1182200     2       0          1  0  1
#> GSM1182201     2       0          1  0  1
#> GSM1182202     1       0          1  1  0
#> GSM1182203     1       0          1  1  0
#> GSM1182204     1       0          1  1  0
#> GSM1182205     2       0          1  0  1
#> GSM1182206     2       0          1  0  1
#> GSM1182207     1       0          1  1  0
#> GSM1182208     1       0          1  1  0
#> GSM1182209     2       0          1  0  1
#> GSM1182210     2       0          1  0  1
#> GSM1182211     2       0          1  0  1
#> GSM1182212     2       0          1  0  1
#> GSM1182213     2       0          1  0  1
#> GSM1182214     2       0          1  0  1
#> GSM1182215     2       0          1  0  1
#> GSM1182216     2       0          1  0  1
#> GSM1182217     1       0          1  1  0
#> GSM1182218     1       0          1  1  0
#> GSM1182219     2       0          1  0  1
#> GSM1182220     2       0          1  0  1
#> GSM1182221     2       0          1  0  1
#> GSM1182222     2       0          1  0  1
#> GSM1182223     2       0          1  0  1
#> GSM1182224     2       0          1  0  1
#> GSM1182225     2       0          1  0  1
#> GSM1182226     2       0          1  0  1
#> GSM1182227     1       0          1  1  0
#> GSM1182228     2       0          1  0  1
#> GSM1182229     2       0          1  0  1
#> GSM1182230     2       0          1  0  1
#> GSM1182231     2       0          1  0  1
#> GSM1182232     1       0          1  1  0
#> GSM1182233     1       0          1  1  0
#> GSM1182234     1       0          1  1  0
#> GSM1182235     2       0          1  0  1
#> GSM1182236     1       0          1  1  0
#> GSM1182237     2       0          1  0  1
#> GSM1182238     2       0          1  0  1
#> GSM1182239     2       0          1  0  1
#> GSM1182240     2       0          1  0  1
#> GSM1182241     2       0          1  0  1
#> GSM1182242     2       0          1  0  1
#> GSM1182243     2       0          1  0  1
#> GSM1182244     2       0          1  0  1
#> GSM1182245     1       0          1  1  0
#> GSM1182246     1       0          1  1  0
#> GSM1182247     2       0          1  0  1
#> GSM1182248     2       0          1  0  1
#> GSM1182249     2       0          1  0  1
#> GSM1182250     2       0          1  0  1
#> GSM1182251     1       0          1  1  0
#> GSM1182252     2       0          1  0  1
#> GSM1182253     2       0          1  0  1
#> GSM1182254     2       0          1  0  1
#> GSM1182255     1       0          1  1  0
#> GSM1182256     1       0          1  1  0
#> GSM1182257     1       0          1  1  0
#> GSM1182258     1       0          1  1  0
#> GSM1182259     1       0          1  1  0
#> GSM1182260     2       0          1  0  1
#> GSM1182261     2       0          1  0  1
#> GSM1182262     2       0          1  0  1
#> GSM1182263     1       0          1  1  0
#> GSM1182264     2       0          1  0  1
#> GSM1182265     2       0          1  0  1
#> GSM1182266     2       0          1  0  1
#> GSM1182267     1       0          1  1  0
#> GSM1182268     1       0          1  1  0
#> GSM1182269     1       0          1  1  0
#> GSM1182270     1       0          1  1  0
#> GSM1182271     1       0          1  1  0
#> GSM1182272     1       0          1  1  0
#> GSM1182273     2       0          1  0  1
#> GSM1182275     2       0          1  0  1
#> GSM1182276     2       0          1  0  1
#> GSM1182277     1       0          1  1  0
#> GSM1182278     1       0          1  1  0
#> GSM1182279     1       0          1  1  0
#> GSM1182280     1       0          1  1  0
#> GSM1182281     1       0          1  1  0
#> GSM1182282     1       0          1  1  0
#> GSM1182283     1       0          1  1  0
#> GSM1182284     1       0          1  1  0
#> GSM1182285     2       0          1  0  1
#> GSM1182286     2       0          1  0  1
#> GSM1182287     2       0          1  0  1
#> GSM1182288     2       0          1  0  1
#> GSM1182289     1       0          1  1  0
#> GSM1182290     1       0          1  1  0
#> GSM1182291     1       0          1  1  0
#> GSM1182274     2       0          1  0  1
#> GSM1182292     2       0          1  0  1
#> GSM1182293     2       0          1  0  1
#> GSM1182294     2       0          1  0  1
#> GSM1182295     2       0          1  0  1
#> GSM1182296     2       0          1  0  1
#> GSM1182298     2       0          1  0  1
#> GSM1182299     2       0          1  0  1
#> GSM1182300     2       0          1  0  1
#> GSM1182301     2       0          1  0  1
#> GSM1182303     2       0          1  0  1
#> GSM1182304     1       0          1  1  0
#> GSM1182305     1       0          1  1  0
#> GSM1182306     1       0          1  1  0
#> GSM1182307     2       0          1  0  1
#> GSM1182309     2       0          1  0  1
#> GSM1182312     2       0          1  0  1
#> GSM1182314     1       0          1  1  0
#> GSM1182316     2       0          1  0  1
#> GSM1182318     2       0          1  0  1
#> GSM1182319     2       0          1  0  1
#> GSM1182320     2       0          1  0  1
#> GSM1182321     2       0          1  0  1
#> GSM1182322     2       0          1  0  1
#> GSM1182324     2       0          1  0  1
#> GSM1182297     2       0          1  0  1
#> GSM1182302     1       0          1  1  0
#> GSM1182308     2       0          1  0  1
#> GSM1182310     2       0          1  0  1
#> GSM1182311     1       0          1  1  0
#> GSM1182313     1       0          1  1  0
#> GSM1182315     2       0          1  0  1
#> GSM1182317     2       0          1  0  1
#> GSM1182323     1       0          1  1  0

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1 p2    p3
#> GSM1182186     3   0.556      0.586 0.300  0 0.700
#> GSM1182187     3   0.000      0.951 0.000  0 1.000
#> GSM1182188     3   0.000      0.951 0.000  0 1.000
#> GSM1182189     1   0.000      0.970 1.000  0 0.000
#> GSM1182190     1   0.000      0.970 1.000  0 0.000
#> GSM1182191     3   0.556      0.586 0.300  0 0.700
#> GSM1182192     1   0.000      0.970 1.000  0 0.000
#> GSM1182193     1   0.000      0.970 1.000  0 0.000
#> GSM1182194     2   0.000      1.000 0.000  1 0.000
#> GSM1182195     2   0.000      1.000 0.000  1 0.000
#> GSM1182196     2   0.000      1.000 0.000  1 0.000
#> GSM1182197     2   0.000      1.000 0.000  1 0.000
#> GSM1182198     2   0.000      1.000 0.000  1 0.000
#> GSM1182199     2   0.000      1.000 0.000  1 0.000
#> GSM1182200     2   0.000      1.000 0.000  1 0.000
#> GSM1182201     2   0.000      1.000 0.000  1 0.000
#> GSM1182202     3   0.000      0.951 0.000  0 1.000
#> GSM1182203     3   0.000      0.951 0.000  0 1.000
#> GSM1182204     3   0.000      0.951 0.000  0 1.000
#> GSM1182205     2   0.000      1.000 0.000  1 0.000
#> GSM1182206     2   0.000      1.000 0.000  1 0.000
#> GSM1182207     1   0.000      0.970 1.000  0 0.000
#> GSM1182208     1   0.000      0.970 1.000  0 0.000
#> GSM1182209     2   0.000      1.000 0.000  1 0.000
#> GSM1182210     2   0.000      1.000 0.000  1 0.000
#> GSM1182211     2   0.000      1.000 0.000  1 0.000
#> GSM1182212     2   0.000      1.000 0.000  1 0.000
#> GSM1182213     2   0.000      1.000 0.000  1 0.000
#> GSM1182214     2   0.000      1.000 0.000  1 0.000
#> GSM1182215     2   0.000      1.000 0.000  1 0.000
#> GSM1182216     2   0.000      1.000 0.000  1 0.000
#> GSM1182217     3   0.556      0.586 0.300  0 0.700
#> GSM1182218     1   0.000      0.970 1.000  0 0.000
#> GSM1182219     2   0.000      1.000 0.000  1 0.000
#> GSM1182220     2   0.000      1.000 0.000  1 0.000
#> GSM1182221     2   0.000      1.000 0.000  1 0.000
#> GSM1182222     2   0.000      1.000 0.000  1 0.000
#> GSM1182223     2   0.000      1.000 0.000  1 0.000
#> GSM1182224     2   0.000      1.000 0.000  1 0.000
#> GSM1182225     2   0.000      1.000 0.000  1 0.000
#> GSM1182226     2   0.000      1.000 0.000  1 0.000
#> GSM1182227     1   0.000      0.970 1.000  0 0.000
#> GSM1182228     2   0.000      1.000 0.000  1 0.000
#> GSM1182229     2   0.000      1.000 0.000  1 0.000
#> GSM1182230     2   0.000      1.000 0.000  1 0.000
#> GSM1182231     2   0.000      1.000 0.000  1 0.000
#> GSM1182232     1   0.000      0.970 1.000  0 0.000
#> GSM1182233     1   0.000      0.970 1.000  0 0.000
#> GSM1182234     1   0.000      0.970 1.000  0 0.000
#> GSM1182235     2   0.000      1.000 0.000  1 0.000
#> GSM1182236     1   0.000      0.970 1.000  0 0.000
#> GSM1182237     2   0.000      1.000 0.000  1 0.000
#> GSM1182238     2   0.000      1.000 0.000  1 0.000
#> GSM1182239     2   0.000      1.000 0.000  1 0.000
#> GSM1182240     2   0.000      1.000 0.000  1 0.000
#> GSM1182241     2   0.000      1.000 0.000  1 0.000
#> GSM1182242     2   0.000      1.000 0.000  1 0.000
#> GSM1182243     2   0.000      1.000 0.000  1 0.000
#> GSM1182244     2   0.000      1.000 0.000  1 0.000
#> GSM1182245     1   0.000      0.970 1.000  0 0.000
#> GSM1182246     3   0.000      0.951 0.000  0 1.000
#> GSM1182247     2   0.000      1.000 0.000  1 0.000
#> GSM1182248     2   0.000      1.000 0.000  1 0.000
#> GSM1182249     2   0.000      1.000 0.000  1 0.000
#> GSM1182250     2   0.000      1.000 0.000  1 0.000
#> GSM1182251     1   0.312      0.898 0.892  0 0.108
#> GSM1182252     2   0.000      1.000 0.000  1 0.000
#> GSM1182253     2   0.000      1.000 0.000  1 0.000
#> GSM1182254     2   0.000      1.000 0.000  1 0.000
#> GSM1182255     3   0.000      0.951 0.000  0 1.000
#> GSM1182256     3   0.000      0.951 0.000  0 1.000
#> GSM1182257     3   0.000      0.951 0.000  0 1.000
#> GSM1182258     3   0.000      0.951 0.000  0 1.000
#> GSM1182259     3   0.000      0.951 0.000  0 1.000
#> GSM1182260     2   0.000      1.000 0.000  1 0.000
#> GSM1182261     2   0.000      1.000 0.000  1 0.000
#> GSM1182262     2   0.000      1.000 0.000  1 0.000
#> GSM1182263     1   0.312      0.898 0.892  0 0.108
#> GSM1182264     2   0.000      1.000 0.000  1 0.000
#> GSM1182265     2   0.000      1.000 0.000  1 0.000
#> GSM1182266     2   0.000      1.000 0.000  1 0.000
#> GSM1182267     1   0.000      0.970 1.000  0 0.000
#> GSM1182268     1   0.000      0.970 1.000  0 0.000
#> GSM1182269     1   0.000      0.970 1.000  0 0.000
#> GSM1182270     1   0.000      0.970 1.000  0 0.000
#> GSM1182271     3   0.000      0.951 0.000  0 1.000
#> GSM1182272     3   0.000      0.951 0.000  0 1.000
#> GSM1182273     2   0.000      1.000 0.000  1 0.000
#> GSM1182275     2   0.000      1.000 0.000  1 0.000
#> GSM1182276     2   0.000      1.000 0.000  1 0.000
#> GSM1182277     1   0.000      0.970 1.000  0 0.000
#> GSM1182278     1   0.000      0.970 1.000  0 0.000
#> GSM1182279     1   0.312      0.898 0.892  0 0.108
#> GSM1182280     1   0.312      0.898 0.892  0 0.108
#> GSM1182281     1   0.312      0.898 0.892  0 0.108
#> GSM1182282     1   0.000      0.970 1.000  0 0.000
#> GSM1182283     1   0.000      0.970 1.000  0 0.000
#> GSM1182284     1   0.000      0.970 1.000  0 0.000
#> GSM1182285     2   0.000      1.000 0.000  1 0.000
#> GSM1182286     2   0.000      1.000 0.000  1 0.000
#> GSM1182287     2   0.000      1.000 0.000  1 0.000
#> GSM1182288     2   0.000      1.000 0.000  1 0.000
#> GSM1182289     1   0.312      0.898 0.892  0 0.108
#> GSM1182290     1   0.000      0.970 1.000  0 0.000
#> GSM1182291     3   0.000      0.951 0.000  0 1.000
#> GSM1182274     2   0.000      1.000 0.000  1 0.000
#> GSM1182292     2   0.000      1.000 0.000  1 0.000
#> GSM1182293     2   0.000      1.000 0.000  1 0.000
#> GSM1182294     2   0.000      1.000 0.000  1 0.000
#> GSM1182295     2   0.000      1.000 0.000  1 0.000
#> GSM1182296     2   0.000      1.000 0.000  1 0.000
#> GSM1182298     2   0.000      1.000 0.000  1 0.000
#> GSM1182299     2   0.000      1.000 0.000  1 0.000
#> GSM1182300     2   0.000      1.000 0.000  1 0.000
#> GSM1182301     2   0.000      1.000 0.000  1 0.000
#> GSM1182303     2   0.000      1.000 0.000  1 0.000
#> GSM1182304     1   0.312      0.898 0.892  0 0.108
#> GSM1182305     1   0.319      0.894 0.888  0 0.112
#> GSM1182306     3   0.000      0.951 0.000  0 1.000
#> GSM1182307     2   0.000      1.000 0.000  1 0.000
#> GSM1182309     2   0.000      1.000 0.000  1 0.000
#> GSM1182312     2   0.000      1.000 0.000  1 0.000
#> GSM1182314     3   0.000      0.951 0.000  0 1.000
#> GSM1182316     2   0.000      1.000 0.000  1 0.000
#> GSM1182318     2   0.000      1.000 0.000  1 0.000
#> GSM1182319     2   0.000      1.000 0.000  1 0.000
#> GSM1182320     2   0.000      1.000 0.000  1 0.000
#> GSM1182321     2   0.000      1.000 0.000  1 0.000
#> GSM1182322     2   0.000      1.000 0.000  1 0.000
#> GSM1182324     2   0.000      1.000 0.000  1 0.000
#> GSM1182297     2   0.000      1.000 0.000  1 0.000
#> GSM1182302     3   0.000      0.951 0.000  0 1.000
#> GSM1182308     2   0.000      1.000 0.000  1 0.000
#> GSM1182310     2   0.000      1.000 0.000  1 0.000
#> GSM1182311     1   0.000      0.970 1.000  0 0.000
#> GSM1182313     3   0.000      0.951 0.000  0 1.000
#> GSM1182315     2   0.000      1.000 0.000  1 0.000
#> GSM1182317     2   0.000      1.000 0.000  1 0.000
#> GSM1182323     1   0.000      0.970 1.000  0 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1 p2    p3    p4
#> GSM1182186     4  0.4888      0.376 0.000  0 0.412 0.588
#> GSM1182187     4  0.0469      0.927 0.000  0 0.012 0.988
#> GSM1182188     4  0.0000      0.934 0.000  0 0.000 1.000
#> GSM1182189     1  0.0000      1.000 1.000  0 0.000 0.000
#> GSM1182190     1  0.0000      1.000 1.000  0 0.000 0.000
#> GSM1182191     4  0.4888      0.376 0.000  0 0.412 0.588
#> GSM1182192     1  0.0000      1.000 1.000  0 0.000 0.000
#> GSM1182193     1  0.0000      1.000 1.000  0 0.000 0.000
#> GSM1182194     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182195     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182196     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182197     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182198     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182199     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182200     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182201     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182202     4  0.0000      0.934 0.000  0 0.000 1.000
#> GSM1182203     4  0.0000      0.934 0.000  0 0.000 1.000
#> GSM1182204     4  0.0000      0.934 0.000  0 0.000 1.000
#> GSM1182205     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182206     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182207     1  0.0000      1.000 1.000  0 0.000 0.000
#> GSM1182208     1  0.0000      1.000 1.000  0 0.000 0.000
#> GSM1182209     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182210     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182211     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182212     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182213     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182214     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182215     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182216     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182217     4  0.4888      0.376 0.000  0 0.412 0.588
#> GSM1182218     1  0.0000      1.000 1.000  0 0.000 0.000
#> GSM1182219     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182220     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182221     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182222     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182223     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182224     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182225     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182226     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182227     1  0.0000      1.000 1.000  0 0.000 0.000
#> GSM1182228     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182229     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182230     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182231     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182232     1  0.0000      1.000 1.000  0 0.000 0.000
#> GSM1182233     1  0.0000      1.000 1.000  0 0.000 0.000
#> GSM1182234     1  0.0000      1.000 1.000  0 0.000 0.000
#> GSM1182235     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182236     1  0.0000      1.000 1.000  0 0.000 0.000
#> GSM1182237     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182238     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182239     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182240     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182241     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182242     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182243     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182244     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182245     1  0.0000      1.000 1.000  0 0.000 0.000
#> GSM1182246     4  0.0000      0.934 0.000  0 0.000 1.000
#> GSM1182247     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182248     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182249     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182250     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182251     3  0.0188      0.999 0.004  0 0.996 0.000
#> GSM1182252     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182253     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182254     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182255     4  0.0469      0.927 0.000  0 0.012 0.988
#> GSM1182256     4  0.0000      0.934 0.000  0 0.000 1.000
#> GSM1182257     4  0.0000      0.934 0.000  0 0.000 1.000
#> GSM1182258     4  0.0000      0.934 0.000  0 0.000 1.000
#> GSM1182259     4  0.0000      0.934 0.000  0 0.000 1.000
#> GSM1182260     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182261     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182262     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182263     3  0.0188      0.999 0.004  0 0.996 0.000
#> GSM1182264     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182265     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182266     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182267     1  0.0000      1.000 1.000  0 0.000 0.000
#> GSM1182268     1  0.0000      1.000 1.000  0 0.000 0.000
#> GSM1182269     1  0.0000      1.000 1.000  0 0.000 0.000
#> GSM1182270     1  0.0000      1.000 1.000  0 0.000 0.000
#> GSM1182271     4  0.0000      0.934 0.000  0 0.000 1.000
#> GSM1182272     4  0.0000      0.934 0.000  0 0.000 1.000
#> GSM1182273     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182275     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182276     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182277     1  0.0000      1.000 1.000  0 0.000 0.000
#> GSM1182278     1  0.0000      1.000 1.000  0 0.000 0.000
#> GSM1182279     3  0.0188      0.999 0.004  0 0.996 0.000
#> GSM1182280     3  0.0188      0.999 0.004  0 0.996 0.000
#> GSM1182281     3  0.0188      0.999 0.004  0 0.996 0.000
#> GSM1182282     1  0.0000      1.000 1.000  0 0.000 0.000
#> GSM1182283     1  0.0000      1.000 1.000  0 0.000 0.000
#> GSM1182284     1  0.0000      1.000 1.000  0 0.000 0.000
#> GSM1182285     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182286     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182287     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182288     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182289     3  0.0188      0.999 0.004  0 0.996 0.000
#> GSM1182290     1  0.0000      1.000 1.000  0 0.000 0.000
#> GSM1182291     4  0.0000      0.934 0.000  0 0.000 1.000
#> GSM1182274     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182292     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182293     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182294     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182295     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182296     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182298     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182299     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182300     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182301     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182303     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182304     3  0.0188      0.999 0.004  0 0.996 0.000
#> GSM1182305     3  0.0000      0.995 0.000  0 1.000 0.000
#> GSM1182306     4  0.0000      0.934 0.000  0 0.000 1.000
#> GSM1182307     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182309     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182312     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182314     4  0.0000      0.934 0.000  0 0.000 1.000
#> GSM1182316     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182318     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182319     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182320     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182321     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182322     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182324     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182297     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182302     4  0.0000      0.934 0.000  0 0.000 1.000
#> GSM1182308     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182310     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182311     1  0.0000      1.000 1.000  0 0.000 0.000
#> GSM1182313     4  0.0000      0.934 0.000  0 0.000 1.000
#> GSM1182315     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182317     2  0.0000      1.000 0.000  1 0.000 0.000
#> GSM1182323     1  0.0000      1.000 1.000  0 0.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
#> GSM1182186     5  0.0000      0.624  0  0 0.000 0.000 1.000
#> GSM1182187     5  0.4219      0.510  0  0 0.000 0.416 0.584
#> GSM1182188     4  0.0000      0.964  0  0 0.000 1.000 0.000
#> GSM1182189     1  0.0000      1.000  1  0 0.000 0.000 0.000
#> GSM1182190     1  0.0000      1.000  1  0 0.000 0.000 0.000
#> GSM1182191     5  0.0000      0.624  0  0 0.000 0.000 1.000
#> GSM1182192     1  0.0000      1.000  1  0 0.000 0.000 0.000
#> GSM1182193     1  0.0000      1.000  1  0 0.000 0.000 0.000
#> GSM1182194     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182195     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182196     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182197     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182198     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182199     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182200     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182201     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182202     4  0.0000      0.964  0  0 0.000 1.000 0.000
#> GSM1182203     4  0.3003      0.694  0  0 0.000 0.812 0.188
#> GSM1182204     5  0.4278      0.429  0  0 0.000 0.452 0.548
#> GSM1182205     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182206     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182207     1  0.0000      1.000  1  0 0.000 0.000 0.000
#> GSM1182208     1  0.0000      1.000  1  0 0.000 0.000 0.000
#> GSM1182209     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182210     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182211     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182212     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182213     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182214     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182215     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182216     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182217     5  0.0000      0.624  0  0 0.000 0.000 1.000
#> GSM1182218     1  0.0000      1.000  1  0 0.000 0.000 0.000
#> GSM1182219     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182220     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182221     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182222     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182223     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182224     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182225     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182226     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182227     1  0.0000      1.000  1  0 0.000 0.000 0.000
#> GSM1182228     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182229     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182230     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182231     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182232     1  0.0000      1.000  1  0 0.000 0.000 0.000
#> GSM1182233     1  0.0000      1.000  1  0 0.000 0.000 0.000
#> GSM1182234     1  0.0000      1.000  1  0 0.000 0.000 0.000
#> GSM1182235     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182236     1  0.0000      1.000  1  0 0.000 0.000 0.000
#> GSM1182237     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182238     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182239     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182240     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182241     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182242     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182243     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182244     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182245     1  0.0000      1.000  1  0 0.000 0.000 0.000
#> GSM1182246     4  0.0000      0.964  0  0 0.000 1.000 0.000
#> GSM1182247     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182248     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182249     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182250     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182251     3  0.0162      0.942  0  0 0.996 0.000 0.004
#> GSM1182252     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182253     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182254     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182255     5  0.4219      0.510  0  0 0.000 0.416 0.584
#> GSM1182256     4  0.0000      0.964  0  0 0.000 1.000 0.000
#> GSM1182257     4  0.0000      0.964  0  0 0.000 1.000 0.000
#> GSM1182258     4  0.0000      0.964  0  0 0.000 1.000 0.000
#> GSM1182259     4  0.0000      0.964  0  0 0.000 1.000 0.000
#> GSM1182260     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182261     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182262     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182263     3  0.0000      0.945  0  0 1.000 0.000 0.000
#> GSM1182264     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182265     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182266     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182267     1  0.0000      1.000  1  0 0.000 0.000 0.000
#> GSM1182268     1  0.0000      1.000  1  0 0.000 0.000 0.000
#> GSM1182269     1  0.0000      1.000  1  0 0.000 0.000 0.000
#> GSM1182270     1  0.0000      1.000  1  0 0.000 0.000 0.000
#> GSM1182271     4  0.0000      0.964  0  0 0.000 1.000 0.000
#> GSM1182272     4  0.2891      0.718  0  0 0.000 0.824 0.176
#> GSM1182273     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182275     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182276     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182277     1  0.0000      1.000  1  0 0.000 0.000 0.000
#> GSM1182278     1  0.0000      1.000  1  0 0.000 0.000 0.000
#> GSM1182279     3  0.0000      0.945  0  0 1.000 0.000 0.000
#> GSM1182280     3  0.0000      0.945  0  0 1.000 0.000 0.000
#> GSM1182281     3  0.0000      0.945  0  0 1.000 0.000 0.000
#> GSM1182282     1  0.0000      1.000  1  0 0.000 0.000 0.000
#> GSM1182283     1  0.0000      1.000  1  0 0.000 0.000 0.000
#> GSM1182284     1  0.0000      1.000  1  0 0.000 0.000 0.000
#> GSM1182285     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182286     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182287     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182288     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182289     3  0.0000      0.945  0  0 1.000 0.000 0.000
#> GSM1182290     1  0.0000      1.000  1  0 0.000 0.000 0.000
#> GSM1182291     4  0.0000      0.964  0  0 0.000 1.000 0.000
#> GSM1182274     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182292     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182293     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182294     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182295     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182296     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182298     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182299     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182300     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182301     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182303     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182304     3  0.0000      0.945  0  0 1.000 0.000 0.000
#> GSM1182305     3  0.4210      0.483  0  0 0.588 0.000 0.412
#> GSM1182306     4  0.0000      0.964  0  0 0.000 1.000 0.000
#> GSM1182307     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182309     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182312     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182314     4  0.0000      0.964  0  0 0.000 1.000 0.000
#> GSM1182316     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182318     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182319     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182320     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182321     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182322     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182324     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182297     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182302     4  0.0000      0.964  0  0 0.000 1.000 0.000
#> GSM1182308     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182310     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182311     1  0.0000      1.000  1  0 0.000 0.000 0.000
#> GSM1182313     4  0.0000      0.964  0  0 0.000 1.000 0.000
#> GSM1182315     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182317     2  0.0000      1.000  0  1 0.000 0.000 0.000
#> GSM1182323     1  0.0000      1.000  1  0 0.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1182186     6  0.3515      0.361 0.000 0.000 0.324 0.000 0.000 0.676
#> GSM1182187     6  0.3620      0.571 0.000 0.000 0.000 0.352 0.000 0.648
#> GSM1182188     4  0.0146      0.942 0.000 0.000 0.004 0.996 0.000 0.000
#> GSM1182189     1  0.0146      0.996 0.996 0.000 0.004 0.000 0.000 0.000
#> GSM1182190     1  0.0000      1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182191     6  0.3515      0.361 0.000 0.000 0.324 0.000 0.000 0.676
#> GSM1182192     1  0.0000      1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182193     1  0.0146      0.996 0.996 0.000 0.004 0.000 0.000 0.000
#> GSM1182194     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182195     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182196     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182197     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182198     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182199     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182200     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182201     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182202     4  0.1204      0.908 0.000 0.000 0.000 0.944 0.000 0.056
#> GSM1182203     4  0.3151      0.619 0.000 0.000 0.000 0.748 0.000 0.252
#> GSM1182204     6  0.3727      0.500 0.000 0.000 0.000 0.388 0.000 0.612
#> GSM1182205     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182206     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182207     1  0.0000      1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182208     1  0.0146      0.996 0.996 0.000 0.004 0.000 0.000 0.000
#> GSM1182209     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182210     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182211     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182212     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182213     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182214     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182215     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182216     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182217     6  0.3515      0.361 0.000 0.000 0.324 0.000 0.000 0.676
#> GSM1182218     1  0.0000      1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182219     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182220     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182221     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182222     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182223     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182224     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182225     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182226     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182227     1  0.0000      1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182228     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182229     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182230     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182231     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182232     1  0.0000      1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182233     1  0.0000      1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182234     1  0.0000      1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182235     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182236     1  0.0000      1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182237     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182238     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182239     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182240     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182241     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182242     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182243     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182244     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182245     1  0.0000      1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182246     4  0.0000      0.942 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182247     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182248     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182249     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182250     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182251     5  0.2697      0.883 0.000 0.000 0.188 0.000 0.812 0.000
#> GSM1182252     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182253     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182254     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182255     6  0.3620      0.571 0.000 0.000 0.000 0.352 0.000 0.648
#> GSM1182256     4  0.1204      0.908 0.000 0.000 0.000 0.944 0.000 0.056
#> GSM1182257     4  0.0363      0.938 0.000 0.000 0.000 0.988 0.000 0.012
#> GSM1182258     4  0.0146      0.942 0.000 0.000 0.004 0.996 0.000 0.000
#> GSM1182259     4  0.0146      0.942 0.000 0.000 0.004 0.996 0.000 0.000
#> GSM1182260     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182261     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182262     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182263     5  0.0000      0.873 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182264     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182265     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182266     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182267     1  0.0000      1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182268     1  0.0000      1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182269     1  0.0000      1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182270     1  0.0000      1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182271     4  0.0146      0.942 0.000 0.000 0.004 0.996 0.000 0.000
#> GSM1182272     4  0.3076      0.644 0.000 0.000 0.000 0.760 0.000 0.240
#> GSM1182273     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182275     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182276     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182277     1  0.0000      1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182278     1  0.0000      1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182279     5  0.2491      0.899 0.000 0.000 0.164 0.000 0.836 0.000
#> GSM1182280     5  0.0000      0.873 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182281     5  0.2491      0.899 0.000 0.000 0.164 0.000 0.836 0.000
#> GSM1182282     1  0.0000      1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182283     1  0.0000      1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182284     1  0.0000      1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182285     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182286     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182287     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182288     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182289     5  0.2491      0.899 0.000 0.000 0.164 0.000 0.836 0.000
#> GSM1182290     1  0.0000      1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182291     4  0.0000      0.942 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182274     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182292     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182293     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182294     2  0.3337      0.649 0.000 0.736 0.004 0.000 0.000 0.260
#> GSM1182295     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182296     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182298     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182299     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182300     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182301     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182303     2  0.0146      0.993 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM1182304     5  0.0000      0.873 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182305     3  0.0405      0.000 0.000 0.000 0.988 0.000 0.004 0.008
#> GSM1182306     4  0.0146      0.942 0.000 0.000 0.004 0.996 0.000 0.000
#> GSM1182307     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182309     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182312     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182314     4  0.0000      0.942 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182316     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182318     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182319     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182320     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182321     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182322     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182324     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182297     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182302     4  0.0363      0.938 0.000 0.000 0.000 0.988 0.000 0.012
#> GSM1182308     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182310     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182311     1  0.0000      1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182313     4  0.0146      0.942 0.000 0.000 0.004 0.996 0.000 0.000
#> GSM1182315     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182317     2  0.0000      0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1182323     1  0.0000      1.000 1.000 0.000 0.000 0.000 0.000 0.000

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk ATC-hclust-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk ATC-hclust-collect-classes

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

test_to_known_factors(res)
#>              n disease.state(p) gender(p) k
#> ATC:hclust 139           0.0773     1.000 2
#> ATC:hclust 139           0.1209     0.888 3
#> ATC:hclust 136           0.1818     0.793 4
#> ATC:hclust 137           0.1374     0.777 5
#> ATC:hclust 134           0.2033     0.826 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 46361 rows and 139 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           1.000       1.000         0.4791 0.521   0.521
#> 3 3 0.619           0.826       0.785         0.2814 1.000   1.000
#> 4 4 0.558           0.487       0.533         0.1322 0.740   0.503
#> 5 5 0.544           0.569       0.652         0.0732 0.797   0.397
#> 6 6 0.608           0.538       0.692         0.0610 0.919   0.660

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
#> GSM1182186     1       0          1  1  0
#> GSM1182187     1       0          1  1  0
#> GSM1182188     1       0          1  1  0
#> GSM1182189     1       0          1  1  0
#> GSM1182190     1       0          1  1  0
#> GSM1182191     1       0          1  1  0
#> GSM1182192     1       0          1  1  0
#> GSM1182193     1       0          1  1  0
#> GSM1182194     2       0          1  0  1
#> GSM1182195     2       0          1  0  1
#> GSM1182196     2       0          1  0  1
#> GSM1182197     2       0          1  0  1
#> GSM1182198     2       0          1  0  1
#> GSM1182199     2       0          1  0  1
#> GSM1182200     2       0          1  0  1
#> GSM1182201     2       0          1  0  1
#> GSM1182202     1       0          1  1  0
#> GSM1182203     1       0          1  1  0
#> GSM1182204     1       0          1  1  0
#> GSM1182205     2       0          1  0  1
#> GSM1182206     2       0          1  0  1
#> GSM1182207     1       0          1  1  0
#> GSM1182208     1       0          1  1  0
#> GSM1182209     2       0          1  0  1
#> GSM1182210     2       0          1  0  1
#> GSM1182211     2       0          1  0  1
#> GSM1182212     2       0          1  0  1
#> GSM1182213     2       0          1  0  1
#> GSM1182214     2       0          1  0  1
#> GSM1182215     2       0          1  0  1
#> GSM1182216     2       0          1  0  1
#> GSM1182217     1       0          1  1  0
#> GSM1182218     1       0          1  1  0
#> GSM1182219     2       0          1  0  1
#> GSM1182220     2       0          1  0  1
#> GSM1182221     2       0          1  0  1
#> GSM1182222     2       0          1  0  1
#> GSM1182223     2       0          1  0  1
#> GSM1182224     2       0          1  0  1
#> GSM1182225     2       0          1  0  1
#> GSM1182226     2       0          1  0  1
#> GSM1182227     1       0          1  1  0
#> GSM1182228     2       0          1  0  1
#> GSM1182229     2       0          1  0  1
#> GSM1182230     2       0          1  0  1
#> GSM1182231     2       0          1  0  1
#> GSM1182232     1       0          1  1  0
#> GSM1182233     1       0          1  1  0
#> GSM1182234     1       0          1  1  0
#> GSM1182235     2       0          1  0  1
#> GSM1182236     1       0          1  1  0
#> GSM1182237     2       0          1  0  1
#> GSM1182238     2       0          1  0  1
#> GSM1182239     2       0          1  0  1
#> GSM1182240     2       0          1  0  1
#> GSM1182241     2       0          1  0  1
#> GSM1182242     2       0          1  0  1
#> GSM1182243     2       0          1  0  1
#> GSM1182244     2       0          1  0  1
#> GSM1182245     1       0          1  1  0
#> GSM1182246     1       0          1  1  0
#> GSM1182247     2       0          1  0  1
#> GSM1182248     2       0          1  0  1
#> GSM1182249     2       0          1  0  1
#> GSM1182250     2       0          1  0  1
#> GSM1182251     1       0          1  1  0
#> GSM1182252     2       0          1  0  1
#> GSM1182253     2       0          1  0  1
#> GSM1182254     2       0          1  0  1
#> GSM1182255     1       0          1  1  0
#> GSM1182256     1       0          1  1  0
#> GSM1182257     1       0          1  1  0
#> GSM1182258     1       0          1  1  0
#> GSM1182259     1       0          1  1  0
#> GSM1182260     2       0          1  0  1
#> GSM1182261     2       0          1  0  1
#> GSM1182262     2       0          1  0  1
#> GSM1182263     1       0          1  1  0
#> GSM1182264     2       0          1  0  1
#> GSM1182265     2       0          1  0  1
#> GSM1182266     2       0          1  0  1
#> GSM1182267     1       0          1  1  0
#> GSM1182268     1       0          1  1  0
#> GSM1182269     1       0          1  1  0
#> GSM1182270     1       0          1  1  0
#> GSM1182271     1       0          1  1  0
#> GSM1182272     1       0          1  1  0
#> GSM1182273     2       0          1  0  1
#> GSM1182275     2       0          1  0  1
#> GSM1182276     2       0          1  0  1
#> GSM1182277     1       0          1  1  0
#> GSM1182278     1       0          1  1  0
#> GSM1182279     1       0          1  1  0
#> GSM1182280     1       0          1  1  0
#> GSM1182281     1       0          1  1  0
#> GSM1182282     1       0          1  1  0
#> GSM1182283     1       0          1  1  0
#> GSM1182284     1       0          1  1  0
#> GSM1182285     2       0          1  0  1
#> GSM1182286     2       0          1  0  1
#> GSM1182287     2       0          1  0  1
#> GSM1182288     2       0          1  0  1
#> GSM1182289     1       0          1  1  0
#> GSM1182290     1       0          1  1  0
#> GSM1182291     1       0          1  1  0
#> GSM1182274     2       0          1  0  1
#> GSM1182292     2       0          1  0  1
#> GSM1182293     2       0          1  0  1
#> GSM1182294     2       0          1  0  1
#> GSM1182295     2       0          1  0  1
#> GSM1182296     2       0          1  0  1
#> GSM1182298     2       0          1  0  1
#> GSM1182299     2       0          1  0  1
#> GSM1182300     2       0          1  0  1
#> GSM1182301     2       0          1  0  1
#> GSM1182303     2       0          1  0  1
#> GSM1182304     1       0          1  1  0
#> GSM1182305     1       0          1  1  0
#> GSM1182306     1       0          1  1  0
#> GSM1182307     2       0          1  0  1
#> GSM1182309     2       0          1  0  1
#> GSM1182312     2       0          1  0  1
#> GSM1182314     1       0          1  1  0
#> GSM1182316     2       0          1  0  1
#> GSM1182318     2       0          1  0  1
#> GSM1182319     2       0          1  0  1
#> GSM1182320     2       0          1  0  1
#> GSM1182321     2       0          1  0  1
#> GSM1182322     2       0          1  0  1
#> GSM1182324     2       0          1  0  1
#> GSM1182297     2       0          1  0  1
#> GSM1182302     1       0          1  1  0
#> GSM1182308     2       0          1  0  1
#> GSM1182310     2       0          1  0  1
#> GSM1182311     1       0          1  1  0
#> GSM1182313     1       0          1  1  0
#> GSM1182315     2       0          1  0  1
#> GSM1182317     2       0          1  0  1
#> GSM1182323     1       0          1  1  0

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2 p3
#> GSM1182186     1  0.0000      0.815 1.000 0.000 NA
#> GSM1182187     1  0.0000      0.815 1.000 0.000 NA
#> GSM1182188     1  0.0000      0.815 1.000 0.000 NA
#> GSM1182189     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182190     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182191     1  0.0000      0.815 1.000 0.000 NA
#> GSM1182192     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182193     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182194     2  0.4654      0.794 0.000 0.792 NA
#> GSM1182195     2  0.4121      0.791 0.000 0.832 NA
#> GSM1182196     2  0.4121      0.807 0.000 0.832 NA
#> GSM1182197     2  0.6079      0.807 0.000 0.612 NA
#> GSM1182198     2  0.6126      0.805 0.000 0.600 NA
#> GSM1182199     2  0.4605      0.796 0.000 0.796 NA
#> GSM1182200     2  0.5882      0.808 0.000 0.652 NA
#> GSM1182201     2  0.5835      0.809 0.000 0.660 NA
#> GSM1182202     1  0.0000      0.815 1.000 0.000 NA
#> GSM1182203     1  0.0000      0.815 1.000 0.000 NA
#> GSM1182204     1  0.0000      0.815 1.000 0.000 NA
#> GSM1182205     2  0.4062      0.790 0.000 0.836 NA
#> GSM1182206     2  0.3752      0.791 0.000 0.856 NA
#> GSM1182207     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182208     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182209     2  0.5968      0.808 0.000 0.636 NA
#> GSM1182210     2  0.4842      0.832 0.000 0.776 NA
#> GSM1182211     2  0.4931      0.834 0.000 0.768 NA
#> GSM1182212     2  0.5138      0.826 0.000 0.748 NA
#> GSM1182213     2  0.5254      0.823 0.000 0.736 NA
#> GSM1182214     2  0.5216      0.824 0.000 0.740 NA
#> GSM1182215     2  0.3619      0.798 0.000 0.864 NA
#> GSM1182216     2  0.5431      0.819 0.000 0.716 NA
#> GSM1182217     1  0.0000      0.815 1.000 0.000 NA
#> GSM1182218     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182219     2  0.3116      0.806 0.000 0.892 NA
#> GSM1182220     2  0.2796      0.826 0.000 0.908 NA
#> GSM1182221     2  0.3267      0.841 0.000 0.884 NA
#> GSM1182222     2  0.0592      0.829 0.000 0.988 NA
#> GSM1182223     2  0.3619      0.794 0.000 0.864 NA
#> GSM1182224     2  0.3816      0.790 0.000 0.852 NA
#> GSM1182225     2  0.4931      0.830 0.000 0.768 NA
#> GSM1182226     2  0.4750      0.833 0.000 0.784 NA
#> GSM1182227     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182228     2  0.5465      0.821 0.000 0.712 NA
#> GSM1182229     2  0.4002      0.801 0.000 0.840 NA
#> GSM1182230     2  0.3752      0.793 0.000 0.856 NA
#> GSM1182231     2  0.3192      0.843 0.000 0.888 NA
#> GSM1182232     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182233     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182234     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182235     2  0.2959      0.840 0.000 0.900 NA
#> GSM1182236     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182237     2  0.4002      0.824 0.000 0.840 NA
#> GSM1182238     2  0.5216      0.824 0.000 0.740 NA
#> GSM1182239     2  0.5905      0.808 0.000 0.648 NA
#> GSM1182240     2  0.5882      0.808 0.000 0.652 NA
#> GSM1182241     2  0.6154      0.797 0.000 0.592 NA
#> GSM1182242     2  0.5835      0.811 0.000 0.660 NA
#> GSM1182243     2  0.4452      0.809 0.000 0.808 NA
#> GSM1182244     2  0.4504      0.792 0.000 0.804 NA
#> GSM1182245     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182246     1  0.0000      0.815 1.000 0.000 NA
#> GSM1182247     2  0.3879      0.791 0.000 0.848 NA
#> GSM1182248     2  0.4399      0.793 0.000 0.812 NA
#> GSM1182249     2  0.5178      0.840 0.000 0.744 NA
#> GSM1182250     2  0.5785      0.820 0.000 0.668 NA
#> GSM1182251     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182252     2  0.3941      0.791 0.000 0.844 NA
#> GSM1182253     2  0.4002      0.791 0.000 0.840 NA
#> GSM1182254     2  0.5882      0.821 0.000 0.652 NA
#> GSM1182255     1  0.0000      0.815 1.000 0.000 NA
#> GSM1182256     1  0.0000      0.815 1.000 0.000 NA
#> GSM1182257     1  0.0000      0.815 1.000 0.000 NA
#> GSM1182258     1  0.0000      0.815 1.000 0.000 NA
#> GSM1182259     1  0.0000      0.815 1.000 0.000 NA
#> GSM1182260     2  0.6008      0.808 0.000 0.628 NA
#> GSM1182261     2  0.3619      0.805 0.000 0.864 NA
#> GSM1182262     2  0.4178      0.804 0.000 0.828 NA
#> GSM1182263     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182264     2  0.6008      0.811 0.000 0.628 NA
#> GSM1182265     2  0.5988      0.812 0.000 0.632 NA
#> GSM1182266     2  0.6079      0.809 0.000 0.612 NA
#> GSM1182267     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182268     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182269     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182270     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182271     1  0.0000      0.815 1.000 0.000 NA
#> GSM1182272     1  0.0000      0.815 1.000 0.000 NA
#> GSM1182273     2  0.5905      0.814 0.000 0.648 NA
#> GSM1182275     2  0.6140      0.812 0.000 0.596 NA
#> GSM1182276     2  0.3038      0.838 0.000 0.896 NA
#> GSM1182277     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182278     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182279     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182280     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182281     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182282     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182283     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182284     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182285     2  0.4002      0.791 0.000 0.840 NA
#> GSM1182286     2  0.4555      0.839 0.000 0.800 NA
#> GSM1182287     2  0.5098      0.810 0.000 0.752 NA
#> GSM1182288     2  0.4452      0.807 0.000 0.808 NA
#> GSM1182289     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182290     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182291     1  0.0000      0.815 1.000 0.000 NA
#> GSM1182274     2  0.5968      0.809 0.000 0.636 NA
#> GSM1182292     2  0.6154      0.792 0.000 0.592 NA
#> GSM1182293     2  0.4178      0.805 0.000 0.828 NA
#> GSM1182294     2  0.4399      0.800 0.000 0.812 NA
#> GSM1182295     2  0.5016      0.827 0.000 0.760 NA
#> GSM1182296     2  0.5216      0.823 0.000 0.740 NA
#> GSM1182298     2  0.4399      0.793 0.000 0.812 NA
#> GSM1182299     2  0.6280      0.778 0.000 0.540 NA
#> GSM1182300     2  0.4452      0.812 0.000 0.808 NA
#> GSM1182301     2  0.6126      0.800 0.000 0.600 NA
#> GSM1182303     2  0.4235      0.799 0.000 0.824 NA
#> GSM1182304     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182305     1  0.0000      0.815 1.000 0.000 NA
#> GSM1182306     1  0.0000      0.815 1.000 0.000 NA
#> GSM1182307     2  0.5327      0.822 0.000 0.728 NA
#> GSM1182309     2  0.4291      0.807 0.000 0.820 NA
#> GSM1182312     2  0.2448      0.839 0.000 0.924 NA
#> GSM1182314     1  0.0000      0.815 1.000 0.000 NA
#> GSM1182316     2  0.6260      0.782 0.000 0.552 NA
#> GSM1182318     2  0.6280      0.777 0.000 0.540 NA
#> GSM1182319     2  0.4555      0.799 0.000 0.800 NA
#> GSM1182320     2  0.5560      0.814 0.000 0.700 NA
#> GSM1182321     2  0.4750      0.795 0.000 0.784 NA
#> GSM1182322     2  0.6140      0.802 0.000 0.596 NA
#> GSM1182324     2  0.4654      0.805 0.000 0.792 NA
#> GSM1182297     2  0.5859      0.819 0.000 0.656 NA
#> GSM1182302     1  0.0000      0.815 1.000 0.000 NA
#> GSM1182308     2  0.3686      0.809 0.000 0.860 NA
#> GSM1182310     2  0.4235      0.805 0.000 0.824 NA
#> GSM1182311     1  0.6008      0.878 0.628 0.000 NA
#> GSM1182313     1  0.0000      0.815 1.000 0.000 NA
#> GSM1182315     2  0.5363      0.826 0.000 0.724 NA
#> GSM1182317     2  0.5835      0.807 0.000 0.660 NA
#> GSM1182323     1  0.6008      0.878 0.628 0.000 NA

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1182186     4   0.228     0.6985 0.000 0.000 0.096 0.904
#> GSM1182187     4   0.000     0.7655 0.000 0.000 0.000 1.000
#> GSM1182188     4   0.000     0.7655 0.000 0.000 0.000 1.000
#> GSM1182189     1   0.500     0.8930 0.508 0.000 0.000 0.492
#> GSM1182190     1   0.500     0.8930 0.508 0.000 0.000 0.492
#> GSM1182191     4   0.276     0.6702 0.000 0.000 0.128 0.872
#> GSM1182192     1   0.500     0.8930 0.508 0.000 0.000 0.492
#> GSM1182193     1   0.500     0.8930 0.508 0.000 0.000 0.492
#> GSM1182194     2   0.293     0.5305 0.056 0.896 0.048 0.000
#> GSM1182195     2   0.230     0.5423 0.048 0.924 0.028 0.000
#> GSM1182196     2   0.747     0.2377 0.352 0.464 0.184 0.000
#> GSM1182197     3   0.580     0.6690 0.068 0.264 0.668 0.000
#> GSM1182198     2   0.615     0.2151 0.084 0.636 0.280 0.000
#> GSM1182199     2   0.307     0.5245 0.044 0.888 0.068 0.000
#> GSM1182200     3   0.462     0.6723 0.008 0.284 0.708 0.000
#> GSM1182201     3   0.453     0.6698 0.004 0.292 0.704 0.000
#> GSM1182202     4   0.000     0.7655 0.000 0.000 0.000 1.000
#> GSM1182203     4   0.000     0.7655 0.000 0.000 0.000 1.000
#> GSM1182204     4   0.000     0.7655 0.000 0.000 0.000 1.000
#> GSM1182205     2   0.211     0.5444 0.044 0.932 0.024 0.000
#> GSM1182206     2   0.106     0.5519 0.012 0.972 0.016 0.000
#> GSM1182207     1   0.500     0.8930 0.508 0.000 0.000 0.492
#> GSM1182208     1   0.500     0.8930 0.508 0.000 0.000 0.492
#> GSM1182209     3   0.602     0.6529 0.084 0.260 0.656 0.000
#> GSM1182210     2   0.663    -0.3094 0.084 0.500 0.416 0.000
#> GSM1182211     3   0.670     0.4423 0.088 0.428 0.484 0.000
#> GSM1182212     3   0.665     0.4476 0.084 0.436 0.480 0.000
#> GSM1182213     3   0.646     0.5071 0.072 0.408 0.520 0.000
#> GSM1182214     3   0.653     0.4785 0.076 0.416 0.508 0.000
#> GSM1182215     2   0.222     0.5407 0.032 0.928 0.040 0.000
#> GSM1182216     3   0.653     0.5245 0.080 0.388 0.532 0.000
#> GSM1182217     4   0.228     0.6985 0.000 0.000 0.096 0.904
#> GSM1182218     1   0.500     0.8930 0.508 0.000 0.000 0.492
#> GSM1182219     2   0.355     0.5152 0.064 0.864 0.072 0.000
#> GSM1182220     2   0.430     0.4911 0.064 0.816 0.120 0.000
#> GSM1182221     2   0.631    -0.0328 0.072 0.576 0.352 0.000
#> GSM1182222     2   0.522     0.3620 0.064 0.736 0.200 0.000
#> GSM1182223     2   0.161     0.5478 0.016 0.952 0.032 0.000
#> GSM1182224     2   0.130     0.5519 0.020 0.964 0.016 0.000
#> GSM1182225     2   0.666    -0.3880 0.084 0.476 0.440 0.000
#> GSM1182226     2   0.653    -0.3504 0.076 0.504 0.420 0.000
#> GSM1182227     1   0.500     0.8930 0.508 0.000 0.000 0.492
#> GSM1182228     3   0.667     0.5041 0.088 0.404 0.508 0.000
#> GSM1182229     2   0.266     0.5278 0.036 0.908 0.056 0.000
#> GSM1182230     2   0.158     0.5549 0.036 0.952 0.012 0.000
#> GSM1182231     2   0.634     0.0546 0.084 0.600 0.316 0.000
#> GSM1182232     1   0.500     0.8930 0.508 0.000 0.000 0.492
#> GSM1182233     1   0.500     0.8930 0.508 0.000 0.000 0.492
#> GSM1182234     1   0.500     0.8930 0.508 0.000 0.000 0.492
#> GSM1182235     2   0.642    -0.0586 0.084 0.580 0.336 0.000
#> GSM1182236     1   0.500     0.8930 0.508 0.000 0.000 0.492
#> GSM1182237     2   0.471     0.4573 0.072 0.788 0.140 0.000
#> GSM1182238     3   0.665     0.4572 0.084 0.428 0.488 0.000
#> GSM1182239     3   0.469     0.6791 0.012 0.276 0.712 0.000
#> GSM1182240     3   0.440     0.6797 0.004 0.272 0.724 0.000
#> GSM1182241     3   0.543     0.6650 0.064 0.224 0.712 0.000
#> GSM1182242     2   0.522     0.3281 0.056 0.728 0.216 0.000
#> GSM1182243     2   0.373     0.5270 0.044 0.848 0.108 0.000
#> GSM1182244     2   0.309     0.5458 0.060 0.888 0.052 0.000
#> GSM1182245     1   0.500     0.8930 0.508 0.000 0.000 0.492
#> GSM1182246     4   0.000     0.7655 0.000 0.000 0.000 1.000
#> GSM1182247     2   0.141     0.5516 0.024 0.960 0.016 0.000
#> GSM1182248     2   0.213     0.5442 0.036 0.932 0.032 0.000
#> GSM1182249     2   0.586    -0.4528 0.032 0.488 0.480 0.000
#> GSM1182250     3   0.551     0.6569 0.032 0.332 0.636 0.000
#> GSM1182251     4   0.738    -0.4517 0.328 0.000 0.180 0.492
#> GSM1182252     2   0.152     0.5498 0.024 0.956 0.020 0.000
#> GSM1182253     2   0.158     0.5487 0.036 0.952 0.012 0.000
#> GSM1182254     3   0.595     0.6551 0.064 0.300 0.636 0.000
#> GSM1182255     4   0.000     0.7655 0.000 0.000 0.000 1.000
#> GSM1182256     4   0.000     0.7655 0.000 0.000 0.000 1.000
#> GSM1182257     4   0.000     0.7655 0.000 0.000 0.000 1.000
#> GSM1182258     4   0.000     0.7655 0.000 0.000 0.000 1.000
#> GSM1182259     4   0.000     0.7655 0.000 0.000 0.000 1.000
#> GSM1182260     3   0.703     0.5202 0.180 0.248 0.572 0.000
#> GSM1182261     2   0.365     0.5341 0.092 0.856 0.052 0.000
#> GSM1182262     2   0.267     0.5369 0.024 0.904 0.072 0.000
#> GSM1182263     4   0.738    -0.4517 0.328 0.000 0.180 0.492
#> GSM1182264     3   0.577     0.6747 0.060 0.280 0.660 0.000
#> GSM1182265     3   0.562     0.6756 0.048 0.292 0.660 0.000
#> GSM1182266     3   0.562     0.6702 0.064 0.248 0.688 0.000
#> GSM1182267     1   0.500     0.8930 0.508 0.000 0.000 0.492
#> GSM1182268     1   0.500     0.8930 0.508 0.000 0.000 0.492
#> GSM1182269     1   0.500     0.8930 0.508 0.000 0.000 0.492
#> GSM1182270     1   0.500     0.8930 0.508 0.000 0.000 0.492
#> GSM1182271     4   0.000     0.7655 0.000 0.000 0.000 1.000
#> GSM1182272     4   0.000     0.7655 0.000 0.000 0.000 1.000
#> GSM1182273     3   0.584     0.6645 0.064 0.280 0.656 0.000
#> GSM1182275     3   0.633     0.3962 0.060 0.452 0.488 0.000
#> GSM1182276     2   0.624     0.1481 0.092 0.632 0.276 0.000
#> GSM1182277     1   0.500     0.8930 0.508 0.000 0.000 0.492
#> GSM1182278     1   0.500     0.8930 0.508 0.000 0.000 0.492
#> GSM1182279     4   0.738    -0.4517 0.328 0.000 0.180 0.492
#> GSM1182280     4   0.730    -0.4983 0.344 0.000 0.164 0.492
#> GSM1182281     4   0.738    -0.4517 0.328 0.000 0.180 0.492
#> GSM1182282     1   0.500     0.8930 0.508 0.000 0.000 0.492
#> GSM1182283     1   0.500     0.8930 0.508 0.000 0.000 0.492
#> GSM1182284     1   0.500     0.8930 0.508 0.000 0.000 0.492
#> GSM1182285     2   0.221     0.5455 0.044 0.928 0.028 0.000
#> GSM1182286     2   0.674    -0.3390 0.092 0.480 0.428 0.000
#> GSM1182287     2   0.497     0.4420 0.076 0.768 0.156 0.000
#> GSM1182288     2   0.354     0.5144 0.060 0.864 0.076 0.000
#> GSM1182289     4   0.738    -0.4517 0.328 0.000 0.180 0.492
#> GSM1182290     1   0.500     0.8930 0.508 0.000 0.000 0.492
#> GSM1182291     4   0.000     0.7655 0.000 0.000 0.000 1.000
#> GSM1182274     3   0.550     0.6779 0.048 0.272 0.680 0.000
#> GSM1182292     3   0.693     0.5225 0.184 0.228 0.588 0.000
#> GSM1182293     2   0.749     0.2293 0.364 0.452 0.184 0.000
#> GSM1182294     2   0.740     0.2345 0.380 0.452 0.168 0.000
#> GSM1182295     2   0.787     0.0249 0.352 0.372 0.276 0.000
#> GSM1182296     2   0.787     0.0176 0.336 0.380 0.284 0.000
#> GSM1182298     2   0.249     0.5438 0.048 0.916 0.036 0.000
#> GSM1182299     3   0.550     0.6280 0.088 0.188 0.724 0.000
#> GSM1182300     2   0.763     0.1879 0.364 0.428 0.208 0.000
#> GSM1182301     3   0.778     0.2444 0.336 0.252 0.412 0.000
#> GSM1182303     2   0.680     0.3278 0.356 0.536 0.108 0.000
#> GSM1182304     4   0.738    -0.4517 0.328 0.000 0.180 0.492
#> GSM1182305     4   0.340     0.6153 0.000 0.000 0.180 0.820
#> GSM1182306     4   0.000     0.7655 0.000 0.000 0.000 1.000
#> GSM1182307     3   0.663     0.4801 0.084 0.412 0.504 0.000
#> GSM1182309     2   0.751     0.2224 0.360 0.452 0.188 0.000
#> GSM1182312     2   0.628     0.0888 0.084 0.612 0.304 0.000
#> GSM1182314     4   0.000     0.7655 0.000 0.000 0.000 1.000
#> GSM1182316     3   0.715     0.4353 0.264 0.184 0.552 0.000
#> GSM1182318     3   0.730     0.4051 0.288 0.188 0.524 0.000
#> GSM1182319     2   0.736     0.2549 0.368 0.468 0.164 0.000
#> GSM1182320     1   0.791    -0.6600 0.352 0.348 0.300 0.000
#> GSM1182321     2   0.726     0.2724 0.368 0.480 0.152 0.000
#> GSM1182322     3   0.734     0.4804 0.220 0.252 0.528 0.000
#> GSM1182324     2   0.765     0.1891 0.360 0.428 0.212 0.000
#> GSM1182297     3   0.650     0.5906 0.092 0.328 0.580 0.000
#> GSM1182302     4   0.000     0.7655 0.000 0.000 0.000 1.000
#> GSM1182308     2   0.736     0.2585 0.368 0.468 0.164 0.000
#> GSM1182310     2   0.753     0.2162 0.372 0.440 0.188 0.000
#> GSM1182311     1   0.500     0.8930 0.508 0.000 0.000 0.492
#> GSM1182313     4   0.000     0.7655 0.000 0.000 0.000 1.000
#> GSM1182315     2   0.791    -0.0987 0.344 0.356 0.300 0.000
#> GSM1182317     3   0.787     0.2026 0.348 0.276 0.376 0.000
#> GSM1182323     1   0.500     0.8930 0.508 0.000 0.000 0.492

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1182186     1  0.7182    -0.7168 0.416 0.000 0.056 0.400 0.128
#> GSM1182187     4  0.5188     0.9441 0.416 0.000 0.044 0.540 0.000
#> GSM1182188     4  0.4219     0.9932 0.416 0.000 0.000 0.584 0.000
#> GSM1182189     1  0.0794     0.8071 0.972 0.000 0.028 0.000 0.000
#> GSM1182190     1  0.0162     0.8111 0.996 0.000 0.004 0.000 0.000
#> GSM1182191     1  0.7417    -0.6454 0.416 0.000 0.056 0.360 0.168
#> GSM1182192     1  0.0609     0.8083 0.980 0.000 0.020 0.000 0.000
#> GSM1182193     1  0.0703     0.8073 0.976 0.000 0.024 0.000 0.000
#> GSM1182194     3  0.4044     0.7108 0.000 0.120 0.800 0.076 0.004
#> GSM1182195     3  0.3722     0.7215 0.000 0.104 0.828 0.060 0.008
#> GSM1182196     2  0.3801     0.4930 0.000 0.808 0.152 0.012 0.028
#> GSM1182197     2  0.7768    -0.0605 0.000 0.380 0.064 0.240 0.316
#> GSM1182198     3  0.6907     0.4229 0.000 0.228 0.564 0.148 0.060
#> GSM1182199     3  0.3961     0.7169 0.000 0.108 0.812 0.072 0.008
#> GSM1182200     5  0.7923     0.2116 0.000 0.296 0.092 0.212 0.400
#> GSM1182201     5  0.8190     0.2159 0.000 0.296 0.124 0.216 0.364
#> GSM1182202     4  0.4219     0.9932 0.416 0.000 0.000 0.584 0.000
#> GSM1182203     4  0.4219     0.9932 0.416 0.000 0.000 0.584 0.000
#> GSM1182204     4  0.4219     0.9932 0.416 0.000 0.000 0.584 0.000
#> GSM1182205     3  0.3007     0.7428 0.000 0.104 0.864 0.028 0.004
#> GSM1182206     3  0.4149     0.7335 0.000 0.124 0.792 0.004 0.080
#> GSM1182207     1  0.0703     0.8085 0.976 0.000 0.024 0.000 0.000
#> GSM1182208     1  0.0703     0.8085 0.976 0.000 0.024 0.000 0.000
#> GSM1182209     5  0.6359     0.5609 0.000 0.288 0.056 0.072 0.584
#> GSM1182210     5  0.6521     0.6600 0.000 0.244 0.216 0.008 0.532
#> GSM1182211     5  0.6216     0.6982 0.000 0.280 0.136 0.012 0.572
#> GSM1182212     5  0.5618     0.7247 0.000 0.224 0.144 0.000 0.632
#> GSM1182213     5  0.5650     0.7171 0.000 0.224 0.120 0.008 0.648
#> GSM1182214     5  0.5743     0.7224 0.000 0.232 0.124 0.008 0.636
#> GSM1182215     3  0.5367     0.6729 0.000 0.124 0.696 0.012 0.168
#> GSM1182216     5  0.5608     0.7143 0.000 0.224 0.116 0.008 0.652
#> GSM1182217     1  0.7182    -0.7168 0.416 0.000 0.056 0.400 0.128
#> GSM1182218     1  0.0162     0.8111 0.996 0.000 0.004 0.000 0.000
#> GSM1182219     3  0.6302     0.4685 0.000 0.144 0.560 0.012 0.284
#> GSM1182220     3  0.6649     0.3390 0.000 0.164 0.508 0.016 0.312
#> GSM1182221     5  0.6740     0.5242 0.000 0.216 0.272 0.012 0.500
#> GSM1182222     3  0.6768     0.0797 0.000 0.180 0.448 0.012 0.360
#> GSM1182223     3  0.4912     0.7072 0.000 0.128 0.736 0.008 0.128
#> GSM1182224     3  0.3243     0.7494 0.000 0.116 0.848 0.004 0.032
#> GSM1182225     5  0.6293     0.6885 0.000 0.240 0.200 0.004 0.556
#> GSM1182226     5  0.6246     0.7011 0.000 0.236 0.196 0.004 0.564
#> GSM1182227     1  0.0000     0.8112 1.000 0.000 0.000 0.000 0.000
#> GSM1182228     5  0.6662     0.6908 0.000 0.220 0.132 0.056 0.592
#> GSM1182229     3  0.5705     0.6195 0.000 0.128 0.644 0.008 0.220
#> GSM1182230     3  0.3780     0.7450 0.000 0.132 0.808 0.000 0.060
#> GSM1182231     5  0.7035     0.4137 0.000 0.204 0.344 0.020 0.432
#> GSM1182232     1  0.0000     0.8112 1.000 0.000 0.000 0.000 0.000
#> GSM1182233     1  0.0162     0.8111 0.996 0.000 0.004 0.000 0.000
#> GSM1182234     1  0.0609     0.8083 0.980 0.000 0.020 0.000 0.000
#> GSM1182235     5  0.6712     0.5122 0.000 0.216 0.292 0.008 0.484
#> GSM1182236     1  0.0000     0.8112 1.000 0.000 0.000 0.000 0.000
#> GSM1182237     3  0.6380     0.4179 0.000 0.136 0.528 0.012 0.324
#> GSM1182238     5  0.5898     0.7233 0.000 0.232 0.140 0.008 0.620
#> GSM1182239     5  0.7807     0.1582 0.000 0.320 0.076 0.212 0.392
#> GSM1182240     5  0.7732     0.1885 0.000 0.316 0.068 0.216 0.400
#> GSM1182241     2  0.7380     0.0136 0.000 0.404 0.032 0.256 0.308
#> GSM1182242     3  0.6300     0.5616 0.000 0.152 0.644 0.056 0.148
#> GSM1182243     3  0.6067     0.6698 0.000 0.172 0.668 0.080 0.080
#> GSM1182244     3  0.4703     0.6986 0.000 0.212 0.732 0.024 0.032
#> GSM1182245     1  0.0162     0.8110 0.996 0.000 0.004 0.000 0.000
#> GSM1182246     4  0.4219     0.9932 0.416 0.000 0.000 0.584 0.000
#> GSM1182247     3  0.3497     0.7509 0.000 0.108 0.840 0.008 0.044
#> GSM1182248     3  0.3218     0.7476 0.000 0.108 0.856 0.020 0.016
#> GSM1182249     3  0.8355    -0.3609 0.000 0.296 0.340 0.160 0.204
#> GSM1182250     2  0.8385    -0.2173 0.000 0.316 0.152 0.228 0.304
#> GSM1182251     1  0.3838     0.5648 0.716 0.000 0.004 0.000 0.280
#> GSM1182252     3  0.2886     0.7497 0.000 0.116 0.864 0.004 0.016
#> GSM1182253     3  0.2733     0.7475 0.000 0.112 0.872 0.012 0.004
#> GSM1182254     2  0.8191    -0.0409 0.000 0.372 0.120 0.260 0.248
#> GSM1182255     4  0.5188     0.9441 0.416 0.000 0.044 0.540 0.000
#> GSM1182256     4  0.4219     0.9932 0.416 0.000 0.000 0.584 0.000
#> GSM1182257     4  0.4219     0.9932 0.416 0.000 0.000 0.584 0.000
#> GSM1182258     4  0.4219     0.9932 0.416 0.000 0.000 0.584 0.000
#> GSM1182259     4  0.4219     0.9932 0.416 0.000 0.000 0.584 0.000
#> GSM1182260     2  0.7155     0.2607 0.000 0.520 0.056 0.252 0.172
#> GSM1182261     3  0.5641     0.6773 0.000 0.220 0.656 0.012 0.112
#> GSM1182262     3  0.5736     0.6862 0.000 0.144 0.676 0.024 0.156
#> GSM1182263     1  0.3934     0.5657 0.716 0.000 0.008 0.000 0.276
#> GSM1182264     2  0.8122    -0.1103 0.000 0.340 0.100 0.252 0.308
#> GSM1182265     2  0.8175    -0.1226 0.000 0.344 0.112 0.236 0.308
#> GSM1182266     2  0.7854    -0.0188 0.000 0.380 0.072 0.248 0.300
#> GSM1182267     1  0.0290     0.8109 0.992 0.000 0.008 0.000 0.000
#> GSM1182268     1  0.0510     0.8100 0.984 0.000 0.016 0.000 0.000
#> GSM1182269     1  0.0703     0.8083 0.976 0.000 0.024 0.000 0.000
#> GSM1182270     1  0.0162     0.8111 0.996 0.000 0.004 0.000 0.000
#> GSM1182271     4  0.4219     0.9932 0.416 0.000 0.000 0.584 0.000
#> GSM1182272     4  0.4219     0.9932 0.416 0.000 0.000 0.584 0.000
#> GSM1182273     2  0.8194    -0.0718 0.000 0.348 0.112 0.256 0.284
#> GSM1182275     5  0.7471     0.5681 0.000 0.208 0.264 0.060 0.468
#> GSM1182276     5  0.6721     0.3994 0.000 0.192 0.348 0.008 0.452
#> GSM1182277     1  0.0000     0.8112 1.000 0.000 0.000 0.000 0.000
#> GSM1182278     1  0.0000     0.8112 1.000 0.000 0.000 0.000 0.000
#> GSM1182279     1  0.3838     0.5648 0.716 0.000 0.004 0.000 0.280
#> GSM1182280     1  0.3715     0.5875 0.736 0.000 0.004 0.000 0.260
#> GSM1182281     1  0.3838     0.5648 0.716 0.000 0.004 0.000 0.280
#> GSM1182282     1  0.0000     0.8112 1.000 0.000 0.000 0.000 0.000
#> GSM1182283     1  0.0404     0.8105 0.988 0.000 0.012 0.000 0.000
#> GSM1182284     1  0.0000     0.8112 1.000 0.000 0.000 0.000 0.000
#> GSM1182285     3  0.3478     0.7414 0.000 0.096 0.848 0.040 0.016
#> GSM1182286     5  0.6662     0.7031 0.000 0.240 0.164 0.032 0.564
#> GSM1182287     3  0.7142     0.0892 0.000 0.140 0.444 0.048 0.368
#> GSM1182288     3  0.4841     0.7092 0.000 0.120 0.748 0.012 0.120
#> GSM1182289     1  0.3838     0.5648 0.716 0.000 0.004 0.000 0.280
#> GSM1182290     1  0.0404     0.8099 0.988 0.000 0.012 0.000 0.000
#> GSM1182291     4  0.4219     0.9932 0.416 0.000 0.000 0.584 0.000
#> GSM1182274     2  0.7783    -0.0825 0.000 0.360 0.064 0.240 0.336
#> GSM1182292     2  0.5844     0.2402 0.000 0.612 0.008 0.116 0.264
#> GSM1182293     2  0.4446     0.4810 0.000 0.776 0.156 0.028 0.040
#> GSM1182294     2  0.4938     0.4651 0.000 0.740 0.168 0.068 0.024
#> GSM1182295     2  0.4536     0.4997 0.000 0.784 0.100 0.024 0.092
#> GSM1182296     2  0.4892     0.4755 0.000 0.752 0.108 0.020 0.120
#> GSM1182298     3  0.3409     0.7286 0.000 0.112 0.836 0.052 0.000
#> GSM1182299     2  0.6988     0.0959 0.000 0.436 0.012 0.260 0.292
#> GSM1182300     2  0.4037     0.4999 0.000 0.800 0.148 0.020 0.032
#> GSM1182301     2  0.4521     0.4774 0.000 0.784 0.024 0.080 0.112
#> GSM1182303     2  0.5263     0.3968 0.000 0.704 0.208 0.036 0.052
#> GSM1182304     1  0.3934     0.5657 0.716 0.000 0.008 0.000 0.276
#> GSM1182305     1  0.7041    -0.5037 0.416 0.000 0.012 0.300 0.272
#> GSM1182306     4  0.4219     0.9932 0.416 0.000 0.000 0.584 0.000
#> GSM1182307     5  0.6048     0.7012 0.000 0.236 0.108 0.028 0.628
#> GSM1182309     2  0.4110     0.4899 0.000 0.792 0.152 0.012 0.044
#> GSM1182312     5  0.6962     0.4616 0.000 0.208 0.336 0.016 0.440
#> GSM1182314     4  0.4219     0.9932 0.416 0.000 0.000 0.584 0.000
#> GSM1182316     2  0.5670     0.3995 0.000 0.660 0.020 0.224 0.096
#> GSM1182318     2  0.4176     0.4579 0.000 0.792 0.004 0.108 0.096
#> GSM1182319     2  0.3318     0.4706 0.000 0.808 0.180 0.012 0.000
#> GSM1182320     2  0.3126     0.5280 0.000 0.868 0.088 0.028 0.016
#> GSM1182321     2  0.3697     0.4721 0.000 0.796 0.180 0.016 0.008
#> GSM1182322     2  0.5964     0.3865 0.000 0.668 0.040 0.152 0.140
#> GSM1182324     2  0.3201     0.5161 0.000 0.844 0.132 0.008 0.016
#> GSM1182297     5  0.6102     0.6271 0.000 0.296 0.064 0.044 0.596
#> GSM1182302     4  0.4219     0.9932 0.416 0.000 0.000 0.584 0.000
#> GSM1182308     2  0.4665     0.4679 0.000 0.756 0.168 0.020 0.056
#> GSM1182310     2  0.3544     0.4895 0.000 0.812 0.164 0.016 0.008
#> GSM1182311     1  0.0510     0.8100 0.984 0.000 0.016 0.000 0.000
#> GSM1182313     4  0.4219     0.9932 0.416 0.000 0.000 0.584 0.000
#> GSM1182315     2  0.3604     0.4808 0.000 0.836 0.056 0.008 0.100
#> GSM1182317     2  0.3378     0.5087 0.000 0.864 0.032 0.048 0.056
#> GSM1182323     1  0.0162     0.8111 0.996 0.000 0.004 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
#> GSM1182186     4  0.5663     0.6727 0.440 0.004 0.020 0.460 0.000 0.076
#> GSM1182187     4  0.4958     0.9021 0.252 0.004 0.020 0.664 0.000 0.060
#> GSM1182188     4  0.3151     0.9590 0.252 0.000 0.000 0.748 0.000 0.000
#> GSM1182189     1  0.4815     0.8183 0.552 0.004 0.000 0.000 0.396 0.048
#> GSM1182190     1  0.3838     0.8245 0.552 0.000 0.000 0.000 0.448 0.000
#> GSM1182191     1  0.5653    -0.6416 0.480 0.004 0.020 0.420 0.000 0.076
#> GSM1182192     1  0.4861     0.8184 0.552 0.004 0.000 0.000 0.392 0.052
#> GSM1182193     1  0.4861     0.8184 0.552 0.004 0.000 0.000 0.392 0.052
#> GSM1182194     3  0.4961     0.6593 0.000 0.076 0.748 0.096 0.056 0.024
#> GSM1182195     3  0.4907     0.6641 0.000 0.052 0.752 0.092 0.080 0.024
#> GSM1182196     6  0.4005     0.8713 0.000 0.072 0.108 0.012 0.012 0.796
#> GSM1182197     2  0.3350     0.4808 0.000 0.852 0.024 0.020 0.028 0.076
#> GSM1182198     3  0.6592     0.5160 0.000 0.220 0.580 0.096 0.056 0.048
#> GSM1182199     3  0.4902     0.6647 0.000 0.076 0.752 0.088 0.064 0.020
#> GSM1182200     2  0.1938     0.4512 0.000 0.920 0.040 0.004 0.036 0.000
#> GSM1182201     2  0.2853     0.4472 0.000 0.868 0.056 0.004 0.068 0.004
#> GSM1182202     4  0.3151     0.9590 0.252 0.000 0.000 0.748 0.000 0.000
#> GSM1182203     4  0.3290     0.9574 0.252 0.000 0.004 0.744 0.000 0.000
#> GSM1182204     4  0.3290     0.9574 0.252 0.000 0.004 0.744 0.000 0.000
#> GSM1182205     3  0.3036     0.7103 0.000 0.060 0.872 0.016 0.028 0.024
#> GSM1182206     3  0.3207     0.6931 0.000 0.060 0.860 0.008 0.044 0.028
#> GSM1182207     1  0.4905     0.8168 0.552 0.000 0.004 0.000 0.388 0.056
#> GSM1182208     1  0.5029     0.8152 0.552 0.004 0.004 0.000 0.384 0.056
#> GSM1182209     2  0.5397    -0.0866 0.000 0.584 0.032 0.016 0.336 0.032
#> GSM1182210     5  0.6840     0.7376 0.000 0.352 0.216 0.004 0.384 0.044
#> GSM1182211     5  0.7032     0.6529 0.000 0.372 0.164 0.008 0.384 0.072
#> GSM1182212     2  0.6308    -0.5906 0.000 0.432 0.156 0.000 0.380 0.032
#> GSM1182213     2  0.6373    -0.4707 0.000 0.476 0.120 0.016 0.360 0.028
#> GSM1182214     2  0.6538    -0.5323 0.000 0.452 0.124 0.016 0.372 0.036
#> GSM1182215     3  0.4302     0.6055 0.000 0.068 0.780 0.016 0.116 0.020
#> GSM1182216     2  0.6492    -0.5333 0.000 0.460 0.148 0.016 0.352 0.024
#> GSM1182217     4  0.5663     0.6727 0.440 0.004 0.020 0.460 0.000 0.076
#> GSM1182218     1  0.3838     0.8245 0.552 0.000 0.000 0.000 0.448 0.000
#> GSM1182219     3  0.5968     0.2405 0.000 0.084 0.612 0.016 0.236 0.052
#> GSM1182220     3  0.6550    -0.0135 0.000 0.160 0.532 0.012 0.248 0.048
#> GSM1182221     2  0.7106    -0.7630 0.000 0.340 0.284 0.008 0.320 0.048
#> GSM1182222     3  0.6937    -0.3949 0.000 0.184 0.480 0.016 0.264 0.056
#> GSM1182223     3  0.3889     0.6521 0.000 0.052 0.816 0.012 0.088 0.032
#> GSM1182224     3  0.2007     0.7172 0.000 0.040 0.924 0.008 0.012 0.016
#> GSM1182225     2  0.6951    -0.7281 0.000 0.384 0.204 0.016 0.360 0.036
#> GSM1182226     2  0.7032    -0.7379 0.000 0.380 0.208 0.020 0.356 0.036
#> GSM1182227     1  0.3966     0.8244 0.552 0.000 0.000 0.000 0.444 0.004
#> GSM1182228     2  0.6411    -0.3913 0.000 0.472 0.092 0.040 0.376 0.020
#> GSM1182229     3  0.5226     0.5012 0.000 0.092 0.708 0.028 0.148 0.024
#> GSM1182230     3  0.3248     0.7123 0.000 0.048 0.856 0.004 0.036 0.056
#> GSM1182231     5  0.6862     0.7362 0.000 0.328 0.296 0.000 0.332 0.044
#> GSM1182232     1  0.3838     0.8245 0.552 0.000 0.000 0.000 0.448 0.000
#> GSM1182233     1  0.4224     0.8245 0.552 0.000 0.000 0.000 0.432 0.016
#> GSM1182234     1  0.4861     0.8184 0.552 0.004 0.000 0.000 0.392 0.052
#> GSM1182235     5  0.7206     0.7896 0.000 0.316 0.280 0.016 0.344 0.044
#> GSM1182236     1  0.3838     0.8245 0.552 0.000 0.000 0.000 0.448 0.000
#> GSM1182237     3  0.6518     0.0111 0.000 0.172 0.536 0.020 0.240 0.032
#> GSM1182238     2  0.6571    -0.5360 0.000 0.456 0.140 0.016 0.356 0.032
#> GSM1182239     2  0.2402     0.4596 0.000 0.896 0.032 0.000 0.060 0.012
#> GSM1182240     2  0.1933     0.4497 0.000 0.920 0.032 0.004 0.044 0.000
#> GSM1182241     2  0.2571     0.4843 0.000 0.892 0.004 0.020 0.024 0.060
#> GSM1182242     3  0.5778     0.5557 0.000 0.188 0.644 0.060 0.100 0.008
#> GSM1182243     3  0.5090     0.6093 0.000 0.216 0.684 0.008 0.040 0.052
#> GSM1182244     3  0.4372     0.6830 0.000 0.056 0.776 0.016 0.028 0.124
#> GSM1182245     1  0.3966     0.8244 0.552 0.000 0.000 0.000 0.444 0.004
#> GSM1182246     4  0.3151     0.9590 0.252 0.000 0.000 0.748 0.000 0.000
#> GSM1182247     3  0.2469     0.7139 0.000 0.048 0.900 0.008 0.032 0.012
#> GSM1182248     3  0.1931     0.7156 0.000 0.068 0.916 0.004 0.008 0.004
#> GSM1182249     2  0.4879     0.1692 0.000 0.608 0.340 0.008 0.028 0.016
#> GSM1182250     2  0.3376     0.4560 0.000 0.844 0.088 0.008 0.024 0.036
#> GSM1182251     1  0.0000     0.4807 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182252     3  0.1738     0.7169 0.000 0.052 0.928 0.000 0.004 0.016
#> GSM1182253     3  0.2495     0.7176 0.000 0.052 0.896 0.004 0.012 0.036
#> GSM1182254     2  0.3970     0.4679 0.000 0.820 0.064 0.024 0.044 0.048
#> GSM1182255     4  0.4958     0.9021 0.252 0.004 0.020 0.664 0.000 0.060
#> GSM1182256     4  0.3151     0.9590 0.252 0.000 0.000 0.748 0.000 0.000
#> GSM1182257     4  0.3151     0.9590 0.252 0.000 0.000 0.748 0.000 0.000
#> GSM1182258     4  0.3151     0.9590 0.252 0.000 0.000 0.748 0.000 0.000
#> GSM1182259     4  0.3151     0.9590 0.252 0.000 0.000 0.748 0.000 0.000
#> GSM1182260     2  0.5114     0.3144 0.000 0.696 0.048 0.012 0.048 0.196
#> GSM1182261     3  0.5666     0.5646 0.000 0.052 0.656 0.024 0.060 0.208
#> GSM1182262     3  0.5017     0.6516 0.000 0.116 0.736 0.016 0.076 0.056
#> GSM1182263     1  0.0363     0.4830 0.988 0.000 0.000 0.000 0.000 0.012
#> GSM1182264     2  0.3060     0.4807 0.000 0.868 0.040 0.004 0.040 0.048
#> GSM1182265     2  0.3286     0.4719 0.000 0.848 0.068 0.000 0.040 0.044
#> GSM1182266     2  0.2937     0.4823 0.000 0.876 0.032 0.012 0.020 0.060
#> GSM1182267     1  0.4294     0.8243 0.552 0.000 0.000 0.000 0.428 0.020
#> GSM1182268     1  0.4766     0.8191 0.552 0.004 0.000 0.000 0.400 0.044
#> GSM1182269     1  0.4815     0.8183 0.552 0.004 0.000 0.000 0.396 0.048
#> GSM1182270     1  0.3838     0.8245 0.552 0.000 0.000 0.000 0.448 0.000
#> GSM1182271     4  0.3151     0.9590 0.252 0.000 0.000 0.748 0.000 0.000
#> GSM1182272     4  0.3290     0.9574 0.252 0.000 0.004 0.744 0.000 0.000
#> GSM1182273     2  0.3566     0.4757 0.000 0.844 0.052 0.020 0.032 0.052
#> GSM1182275     2  0.6379    -0.3965 0.000 0.460 0.232 0.016 0.288 0.004
#> GSM1182276     5  0.7101     0.7751 0.000 0.272 0.320 0.016 0.356 0.036
#> GSM1182277     1  0.3966     0.8244 0.552 0.000 0.000 0.000 0.444 0.004
#> GSM1182278     1  0.3966     0.8244 0.552 0.000 0.000 0.000 0.444 0.004
#> GSM1182279     1  0.0000     0.4807 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182280     1  0.0909     0.5030 0.968 0.000 0.000 0.000 0.020 0.012
#> GSM1182281     1  0.0000     0.4807 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182282     1  0.3966     0.8244 0.552 0.000 0.000 0.000 0.444 0.004
#> GSM1182283     1  0.4423     0.8236 0.552 0.000 0.000 0.000 0.420 0.028
#> GSM1182284     1  0.3966     0.8244 0.552 0.000 0.000 0.000 0.444 0.004
#> GSM1182285     3  0.3430     0.7042 0.000 0.048 0.852 0.040 0.044 0.016
#> GSM1182286     2  0.7124    -0.6052 0.000 0.392 0.128 0.032 0.388 0.060
#> GSM1182287     3  0.6776    -0.2833 0.000 0.176 0.420 0.032 0.356 0.016
#> GSM1182288     3  0.4320     0.6187 0.000 0.108 0.760 0.012 0.116 0.004
#> GSM1182289     1  0.0000     0.4807 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182290     1  0.4350     0.8218 0.552 0.000 0.004 0.000 0.428 0.016
#> GSM1182291     4  0.3151     0.9590 0.252 0.000 0.000 0.748 0.000 0.000
#> GSM1182274     2  0.2039     0.4841 0.000 0.916 0.020 0.000 0.012 0.052
#> GSM1182292     2  0.5845     0.0200 0.000 0.504 0.016 0.016 0.080 0.384
#> GSM1182293     6  0.4896     0.8637 0.000 0.100 0.092 0.032 0.028 0.748
#> GSM1182294     6  0.5134     0.8347 0.000 0.068 0.088 0.084 0.024 0.736
#> GSM1182295     6  0.5446     0.8298 0.000 0.160 0.060 0.028 0.056 0.696
#> GSM1182296     6  0.5460     0.8120 0.000 0.168 0.072 0.020 0.052 0.688
#> GSM1182298     3  0.4621     0.6826 0.000 0.056 0.776 0.088 0.048 0.032
#> GSM1182299     2  0.2114     0.4801 0.000 0.904 0.000 0.008 0.012 0.076
#> GSM1182300     6  0.4445     0.8736 0.000 0.104 0.084 0.012 0.028 0.772
#> GSM1182301     6  0.5440     0.6963 0.000 0.280 0.008 0.048 0.044 0.620
#> GSM1182303     6  0.5108     0.8103 0.000 0.088 0.140 0.028 0.024 0.720
#> GSM1182304     1  0.0363     0.4830 0.988 0.000 0.000 0.000 0.000 0.012
#> GSM1182305     1  0.3972    -0.4118 0.680 0.000 0.004 0.300 0.000 0.016
#> GSM1182306     4  0.3151     0.9590 0.252 0.000 0.000 0.748 0.000 0.000
#> GSM1182307     2  0.6341    -0.4793 0.000 0.480 0.128 0.012 0.352 0.028
#> GSM1182309     6  0.4023     0.8744 0.000 0.092 0.096 0.012 0.008 0.792
#> GSM1182312     5  0.7365     0.7861 0.000 0.296 0.280 0.024 0.352 0.048
#> GSM1182314     4  0.3151     0.9590 0.252 0.000 0.000 0.748 0.000 0.000
#> GSM1182316     2  0.5817    -0.1150 0.000 0.548 0.024 0.032 0.048 0.348
#> GSM1182318     6  0.5328     0.5204 0.000 0.376 0.008 0.032 0.032 0.552
#> GSM1182319     6  0.3597     0.8650 0.000 0.076 0.104 0.004 0.004 0.812
#> GSM1182320     6  0.4813     0.8515 0.000 0.144 0.080 0.016 0.024 0.736
#> GSM1182321     6  0.3447     0.8610 0.000 0.064 0.108 0.000 0.008 0.820
#> GSM1182322     2  0.5516    -0.2163 0.000 0.524 0.032 0.012 0.036 0.396
#> GSM1182324     6  0.4286     0.8664 0.000 0.108 0.088 0.008 0.020 0.776
#> GSM1182297     2  0.6051    -0.3040 0.000 0.512 0.052 0.016 0.368 0.052
#> GSM1182302     4  0.3151     0.9590 0.252 0.000 0.000 0.748 0.000 0.000
#> GSM1182308     6  0.4909     0.8499 0.000 0.092 0.108 0.024 0.032 0.744
#> GSM1182310     6  0.4004     0.8734 0.000 0.092 0.096 0.004 0.016 0.792
#> GSM1182311     1  0.4641     0.8199 0.552 0.000 0.000 0.000 0.404 0.044
#> GSM1182313     4  0.3151     0.9590 0.252 0.000 0.000 0.748 0.000 0.000
#> GSM1182315     6  0.5044     0.8253 0.000 0.156 0.080 0.012 0.036 0.716
#> GSM1182317     6  0.5184     0.7672 0.000 0.228 0.044 0.028 0.024 0.676
#> GSM1182323     1  0.3838     0.8245 0.552 0.000 0.000 0.000 0.448 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-kmeans-consensus-heatmap-1

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk ATC-kmeans-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk ATC-kmeans-collect-classes

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

test_to_known_factors(res)
#>              n disease.state(p) gender(p) k
#> ATC:kmeans 139         7.73e-02     1.000 2
#> ATC:kmeans 139         7.73e-02     1.000 3
#> ATC:kmeans  90         2.65e-01     0.547 4
#> ATC:kmeans  92         2.47e-04     0.222 5
#> ATC:kmeans  93         6.97e-11     0.133 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 46361 rows and 139 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 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-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           1.000       1.000         0.4791 0.521   0.521
#> 3 3 1.000           0.986       0.977         0.1637 0.926   0.857
#> 4 4 0.665           0.889       0.850         0.1691 1.000   1.000
#> 5 5 0.629           0.599       0.768         0.0780 0.834   0.629
#> 6 6 0.616           0.581       0.748         0.0488 0.840   0.544

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
#> GSM1182186     1       0          1  1  0
#> GSM1182187     1       0          1  1  0
#> GSM1182188     1       0          1  1  0
#> GSM1182189     1       0          1  1  0
#> GSM1182190     1       0          1  1  0
#> GSM1182191     1       0          1  1  0
#> GSM1182192     1       0          1  1  0
#> GSM1182193     1       0          1  1  0
#> GSM1182194     2       0          1  0  1
#> GSM1182195     2       0          1  0  1
#> GSM1182196     2       0          1  0  1
#> GSM1182197     2       0          1  0  1
#> GSM1182198     2       0          1  0  1
#> GSM1182199     2       0          1  0  1
#> GSM1182200     2       0          1  0  1
#> GSM1182201     2       0          1  0  1
#> GSM1182202     1       0          1  1  0
#> GSM1182203     1       0          1  1  0
#> GSM1182204     1       0          1  1  0
#> GSM1182205     2       0          1  0  1
#> GSM1182206     2       0          1  0  1
#> GSM1182207     1       0          1  1  0
#> GSM1182208     1       0          1  1  0
#> GSM1182209     2       0          1  0  1
#> GSM1182210     2       0          1  0  1
#> GSM1182211     2       0          1  0  1
#> GSM1182212     2       0          1  0  1
#> GSM1182213     2       0          1  0  1
#> GSM1182214     2       0          1  0  1
#> GSM1182215     2       0          1  0  1
#> GSM1182216     2       0          1  0  1
#> GSM1182217     1       0          1  1  0
#> GSM1182218     1       0          1  1  0
#> GSM1182219     2       0          1  0  1
#> GSM1182220     2       0          1  0  1
#> GSM1182221     2       0          1  0  1
#> GSM1182222     2       0          1  0  1
#> GSM1182223     2       0          1  0  1
#> GSM1182224     2       0          1  0  1
#> GSM1182225     2       0          1  0  1
#> GSM1182226     2       0          1  0  1
#> GSM1182227     1       0          1  1  0
#> GSM1182228     2       0          1  0  1
#> GSM1182229     2       0          1  0  1
#> GSM1182230     2       0          1  0  1
#> GSM1182231     2       0          1  0  1
#> GSM1182232     1       0          1  1  0
#> GSM1182233     1       0          1  1  0
#> GSM1182234     1       0          1  1  0
#> GSM1182235     2       0          1  0  1
#> GSM1182236     1       0          1  1  0
#> GSM1182237     2       0          1  0  1
#> GSM1182238     2       0          1  0  1
#> GSM1182239     2       0          1  0  1
#> GSM1182240     2       0          1  0  1
#> GSM1182241     2       0          1  0  1
#> GSM1182242     2       0          1  0  1
#> GSM1182243     2       0          1  0  1
#> GSM1182244     2       0          1  0  1
#> GSM1182245     1       0          1  1  0
#> GSM1182246     1       0          1  1  0
#> GSM1182247     2       0          1  0  1
#> GSM1182248     2       0          1  0  1
#> GSM1182249     2       0          1  0  1
#> GSM1182250     2       0          1  0  1
#> GSM1182251     1       0          1  1  0
#> GSM1182252     2       0          1  0  1
#> GSM1182253     2       0          1  0  1
#> GSM1182254     2       0          1  0  1
#> GSM1182255     1       0          1  1  0
#> GSM1182256     1       0          1  1  0
#> GSM1182257     1       0          1  1  0
#> GSM1182258     1       0          1  1  0
#> GSM1182259     1       0          1  1  0
#> GSM1182260     2       0          1  0  1
#> GSM1182261     2       0          1  0  1
#> GSM1182262     2       0          1  0  1
#> GSM1182263     1       0          1  1  0
#> GSM1182264     2       0          1  0  1
#> GSM1182265     2       0          1  0  1
#> GSM1182266     2       0          1  0  1
#> GSM1182267     1       0          1  1  0
#> GSM1182268     1       0          1  1  0
#> GSM1182269     1       0          1  1  0
#> GSM1182270     1       0          1  1  0
#> GSM1182271     1       0          1  1  0
#> GSM1182272     1       0          1  1  0
#> GSM1182273     2       0          1  0  1
#> GSM1182275     2       0          1  0  1
#> GSM1182276     2       0          1  0  1
#> GSM1182277     1       0          1  1  0
#> GSM1182278     1       0          1  1  0
#> GSM1182279     1       0          1  1  0
#> GSM1182280     1       0          1  1  0
#> GSM1182281     1       0          1  1  0
#> GSM1182282     1       0          1  1  0
#> GSM1182283     1       0          1  1  0
#> GSM1182284     1       0          1  1  0
#> GSM1182285     2       0          1  0  1
#> GSM1182286     2       0          1  0  1
#> GSM1182287     2       0          1  0  1
#> GSM1182288     2       0          1  0  1
#> GSM1182289     1       0          1  1  0
#> GSM1182290     1       0          1  1  0
#> GSM1182291     1       0          1  1  0
#> GSM1182274     2       0          1  0  1
#> GSM1182292     2       0          1  0  1
#> GSM1182293     2       0          1  0  1
#> GSM1182294     2       0          1  0  1
#> GSM1182295     2       0          1  0  1
#> GSM1182296     2       0          1  0  1
#> GSM1182298     2       0          1  0  1
#> GSM1182299     2       0          1  0  1
#> GSM1182300     2       0          1  0  1
#> GSM1182301     2       0          1  0  1
#> GSM1182303     2       0          1  0  1
#> GSM1182304     1       0          1  1  0
#> GSM1182305     1       0          1  1  0
#> GSM1182306     1       0          1  1  0
#> GSM1182307     2       0          1  0  1
#> GSM1182309     2       0          1  0  1
#> GSM1182312     2       0          1  0  1
#> GSM1182314     1       0          1  1  0
#> GSM1182316     2       0          1  0  1
#> GSM1182318     2       0          1  0  1
#> GSM1182319     2       0          1  0  1
#> GSM1182320     2       0          1  0  1
#> GSM1182321     2       0          1  0  1
#> GSM1182322     2       0          1  0  1
#> GSM1182324     2       0          1  0  1
#> GSM1182297     2       0          1  0  1
#> GSM1182302     1       0          1  1  0
#> GSM1182308     2       0          1  0  1
#> GSM1182310     2       0          1  0  1
#> GSM1182311     1       0          1  1  0
#> GSM1182313     1       0          1  1  0
#> GSM1182315     2       0          1  0  1
#> GSM1182317     2       0          1  0  1
#> GSM1182323     1       0          1  1  0

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1182186     3  0.1964      0.988 0.056 0.000 0.944
#> GSM1182187     3  0.1964      0.988 0.056 0.000 0.944
#> GSM1182188     3  0.1964      0.988 0.056 0.000 0.944
#> GSM1182189     1  0.0237      0.996 0.996 0.000 0.004
#> GSM1182190     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1182191     3  0.1964      0.988 0.056 0.000 0.944
#> GSM1182192     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1182193     1  0.0237      0.996 0.996 0.000 0.004
#> GSM1182194     2  0.1529      0.977 0.000 0.960 0.040
#> GSM1182195     2  0.1529      0.977 0.000 0.960 0.040
#> GSM1182196     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182197     2  0.0592      0.986 0.000 0.988 0.012
#> GSM1182198     2  0.1643      0.978 0.000 0.956 0.044
#> GSM1182199     2  0.1529      0.977 0.000 0.960 0.040
#> GSM1182200     2  0.0892      0.987 0.000 0.980 0.020
#> GSM1182201     2  0.0892      0.986 0.000 0.980 0.020
#> GSM1182202     3  0.1964      0.988 0.056 0.000 0.944
#> GSM1182203     3  0.1964      0.988 0.056 0.000 0.944
#> GSM1182204     3  0.1964      0.988 0.056 0.000 0.944
#> GSM1182205     2  0.1529      0.977 0.000 0.960 0.040
#> GSM1182206     2  0.1163      0.982 0.000 0.972 0.028
#> GSM1182207     1  0.0237      0.996 0.996 0.000 0.004
#> GSM1182208     1  0.0237      0.996 0.996 0.000 0.004
#> GSM1182209     2  0.0592      0.986 0.000 0.988 0.012
#> GSM1182210     2  0.0592      0.986 0.000 0.988 0.012
#> GSM1182211     2  0.0592      0.986 0.000 0.988 0.012
#> GSM1182212     2  0.0747      0.986 0.000 0.984 0.016
#> GSM1182213     2  0.0592      0.986 0.000 0.988 0.012
#> GSM1182214     2  0.0592      0.986 0.000 0.988 0.012
#> GSM1182215     2  0.1163      0.982 0.000 0.972 0.028
#> GSM1182216     2  0.0592      0.986 0.000 0.988 0.012
#> GSM1182217     3  0.1964      0.988 0.056 0.000 0.944
#> GSM1182218     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1182219     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182220     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182221     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182222     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182223     2  0.0892      0.985 0.000 0.980 0.020
#> GSM1182224     2  0.1411      0.978 0.000 0.964 0.036
#> GSM1182225     2  0.0592      0.986 0.000 0.988 0.012
#> GSM1182226     2  0.0424      0.987 0.000 0.992 0.008
#> GSM1182227     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1182228     2  0.0592      0.987 0.000 0.988 0.012
#> GSM1182229     2  0.1289      0.980 0.000 0.968 0.032
#> GSM1182230     2  0.1529      0.977 0.000 0.960 0.040
#> GSM1182231     2  0.0592      0.988 0.000 0.988 0.012
#> GSM1182232     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1182233     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1182234     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1182235     2  0.0592      0.987 0.000 0.988 0.012
#> GSM1182236     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1182237     2  0.0424      0.987 0.000 0.992 0.008
#> GSM1182238     2  0.0592      0.986 0.000 0.988 0.012
#> GSM1182239     2  0.0592      0.986 0.000 0.988 0.012
#> GSM1182240     2  0.0592      0.986 0.000 0.988 0.012
#> GSM1182241     2  0.0747      0.986 0.000 0.984 0.016
#> GSM1182242     2  0.1753      0.978 0.000 0.952 0.048
#> GSM1182243     2  0.1163      0.984 0.000 0.972 0.028
#> GSM1182244     2  0.1289      0.979 0.000 0.968 0.032
#> GSM1182245     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1182246     3  0.1964      0.988 0.056 0.000 0.944
#> GSM1182247     2  0.1529      0.977 0.000 0.960 0.040
#> GSM1182248     2  0.1643      0.978 0.000 0.956 0.044
#> GSM1182249     2  0.0892      0.987 0.000 0.980 0.020
#> GSM1182250     2  0.1163      0.986 0.000 0.972 0.028
#> GSM1182251     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1182252     2  0.1529      0.977 0.000 0.960 0.040
#> GSM1182253     2  0.1529      0.977 0.000 0.960 0.040
#> GSM1182254     2  0.1163      0.986 0.000 0.972 0.028
#> GSM1182255     3  0.1964      0.988 0.056 0.000 0.944
#> GSM1182256     3  0.1964      0.988 0.056 0.000 0.944
#> GSM1182257     3  0.1964      0.988 0.056 0.000 0.944
#> GSM1182258     3  0.1964      0.988 0.056 0.000 0.944
#> GSM1182259     3  0.1964      0.988 0.056 0.000 0.944
#> GSM1182260     2  0.0892      0.987 0.000 0.980 0.020
#> GSM1182261     2  0.0747      0.986 0.000 0.984 0.016
#> GSM1182262     2  0.1163      0.981 0.000 0.972 0.028
#> GSM1182263     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1182264     2  0.1163      0.985 0.000 0.972 0.028
#> GSM1182265     2  0.1031      0.986 0.000 0.976 0.024
#> GSM1182266     2  0.0892      0.986 0.000 0.980 0.020
#> GSM1182267     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1182268     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1182269     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1182270     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1182271     3  0.1964      0.988 0.056 0.000 0.944
#> GSM1182272     3  0.1964      0.988 0.056 0.000 0.944
#> GSM1182273     2  0.0892      0.986 0.000 0.980 0.020
#> GSM1182275     2  0.1411      0.984 0.000 0.964 0.036
#> GSM1182276     2  0.0592      0.987 0.000 0.988 0.012
#> GSM1182277     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1182278     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1182279     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1182280     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1182281     3  0.1964      0.988 0.056 0.000 0.944
#> GSM1182282     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1182283     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1182284     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1182285     2  0.1529      0.977 0.000 0.960 0.040
#> GSM1182286     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182287     2  0.1529      0.979 0.000 0.960 0.040
#> GSM1182288     2  0.1753      0.978 0.000 0.952 0.048
#> GSM1182289     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1182290     1  0.0237      0.996 0.996 0.000 0.004
#> GSM1182291     3  0.1964      0.988 0.056 0.000 0.944
#> GSM1182274     2  0.0892      0.986 0.000 0.980 0.020
#> GSM1182292     2  0.0424      0.987 0.000 0.992 0.008
#> GSM1182293     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182294     2  0.0592      0.986 0.000 0.988 0.012
#> GSM1182295     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182296     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182298     2  0.1529      0.977 0.000 0.960 0.040
#> GSM1182299     2  0.0592      0.986 0.000 0.988 0.012
#> GSM1182300     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182301     2  0.0592      0.986 0.000 0.988 0.012
#> GSM1182303     2  0.0424      0.987 0.000 0.992 0.008
#> GSM1182304     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1182305     3  0.5591      0.644 0.304 0.000 0.696
#> GSM1182306     3  0.1964      0.988 0.056 0.000 0.944
#> GSM1182307     2  0.0592      0.986 0.000 0.988 0.012
#> GSM1182309     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182312     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182314     3  0.1964      0.988 0.056 0.000 0.944
#> GSM1182316     2  0.0747      0.987 0.000 0.984 0.016
#> GSM1182318     2  0.0424      0.987 0.000 0.992 0.008
#> GSM1182319     2  0.0424      0.987 0.000 0.992 0.008
#> GSM1182320     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182321     2  0.0892      0.984 0.000 0.980 0.020
#> GSM1182322     2  0.0747      0.986 0.000 0.984 0.016
#> GSM1182324     2  0.0592      0.987 0.000 0.988 0.012
#> GSM1182297     2  0.0424      0.987 0.000 0.992 0.008
#> GSM1182302     3  0.1964      0.988 0.056 0.000 0.944
#> GSM1182308     2  0.0237      0.987 0.000 0.996 0.004
#> GSM1182310     2  0.0424      0.987 0.000 0.992 0.008
#> GSM1182311     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1182313     3  0.1964      0.988 0.056 0.000 0.944
#> GSM1182315     2  0.0000      0.987 0.000 1.000 0.000
#> GSM1182317     2  0.0592      0.987 0.000 0.988 0.012
#> GSM1182323     1  0.0000      0.999 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2 p3    p4
#> GSM1182186     4  0.0000      0.990 0.000 0.000 NA 1.000
#> GSM1182187     4  0.0000      0.990 0.000 0.000 NA 1.000
#> GSM1182188     4  0.0000      0.990 0.000 0.000 NA 1.000
#> GSM1182189     1  0.0188      0.980 0.996 0.000 NA 0.000
#> GSM1182190     1  0.0000      0.982 1.000 0.000 NA 0.000
#> GSM1182191     4  0.0000      0.990 0.000 0.000 NA 1.000
#> GSM1182192     1  0.0000      0.982 1.000 0.000 NA 0.000
#> GSM1182193     1  0.0188      0.980 0.996 0.000 NA 0.000
#> GSM1182194     2  0.4585      0.801 0.000 0.668 NA 0.000
#> GSM1182195     2  0.4661      0.794 0.000 0.652 NA 0.000
#> GSM1182196     2  0.3726      0.848 0.000 0.788 NA 0.000
#> GSM1182197     2  0.3400      0.832 0.000 0.820 NA 0.000
#> GSM1182198     2  0.4713      0.810 0.000 0.640 NA 0.000
#> GSM1182199     2  0.4661      0.800 0.000 0.652 NA 0.000
#> GSM1182200     2  0.3444      0.823 0.000 0.816 NA 0.000
#> GSM1182201     2  0.3610      0.833 0.000 0.800 NA 0.000
#> GSM1182202     4  0.0000      0.990 0.000 0.000 NA 1.000
#> GSM1182203     4  0.0000      0.990 0.000 0.000 NA 1.000
#> GSM1182204     4  0.0000      0.990 0.000 0.000 NA 1.000
#> GSM1182205     2  0.4564      0.801 0.000 0.672 NA 0.000
#> GSM1182206     2  0.4277      0.822 0.000 0.720 NA 0.000
#> GSM1182207     1  0.1716      0.958 0.936 0.000 NA 0.000
#> GSM1182208     1  0.4356      0.766 0.708 0.000 NA 0.000
#> GSM1182209     2  0.3219      0.828 0.000 0.836 NA 0.000
#> GSM1182210     2  0.1940      0.861 0.000 0.924 NA 0.000
#> GSM1182211     2  0.2814      0.845 0.000 0.868 NA 0.000
#> GSM1182212     2  0.2408      0.845 0.000 0.896 NA 0.000
#> GSM1182213     2  0.2868      0.840 0.000 0.864 NA 0.000
#> GSM1182214     2  0.2760      0.840 0.000 0.872 NA 0.000
#> GSM1182215     2  0.4134      0.835 0.000 0.740 NA 0.000
#> GSM1182216     2  0.3074      0.830 0.000 0.848 NA 0.000
#> GSM1182217     4  0.0000      0.990 0.000 0.000 NA 1.000
#> GSM1182218     1  0.0000      0.982 1.000 0.000 NA 0.000
#> GSM1182219     2  0.3688      0.845 0.000 0.792 NA 0.000
#> GSM1182220     2  0.3074      0.857 0.000 0.848 NA 0.000
#> GSM1182221     2  0.2011      0.865 0.000 0.920 NA 0.000
#> GSM1182222     2  0.3024      0.857 0.000 0.852 NA 0.000
#> GSM1182223     2  0.4222      0.829 0.000 0.728 NA 0.000
#> GSM1182224     2  0.4564      0.799 0.000 0.672 NA 0.000
#> GSM1182225     2  0.2530      0.850 0.000 0.888 NA 0.000
#> GSM1182226     2  0.2704      0.851 0.000 0.876 NA 0.000
#> GSM1182227     1  0.0000      0.982 1.000 0.000 NA 0.000
#> GSM1182228     2  0.3123      0.860 0.000 0.844 NA 0.000
#> GSM1182229     2  0.4134      0.835 0.000 0.740 NA 0.000
#> GSM1182230     2  0.4522      0.805 0.000 0.680 NA 0.000
#> GSM1182231     2  0.2760      0.866 0.000 0.872 NA 0.000
#> GSM1182232     1  0.0000      0.982 1.000 0.000 NA 0.000
#> GSM1182233     1  0.0000      0.982 1.000 0.000 NA 0.000
#> GSM1182234     1  0.0000      0.982 1.000 0.000 NA 0.000
#> GSM1182235     2  0.1867      0.861 0.000 0.928 NA 0.000
#> GSM1182236     1  0.0000      0.982 1.000 0.000 NA 0.000
#> GSM1182237     2  0.3266      0.861 0.000 0.832 NA 0.000
#> GSM1182238     2  0.2647      0.842 0.000 0.880 NA 0.000
#> GSM1182239     2  0.3219      0.823 0.000 0.836 NA 0.000
#> GSM1182240     2  0.3356      0.822 0.000 0.824 NA 0.000
#> GSM1182241     2  0.3400      0.823 0.000 0.820 NA 0.000
#> GSM1182242     2  0.4406      0.830 0.000 0.700 NA 0.000
#> GSM1182243     2  0.4134      0.848 0.000 0.740 NA 0.000
#> GSM1182244     2  0.4643      0.795 0.000 0.656 NA 0.000
#> GSM1182245     1  0.0000      0.982 1.000 0.000 NA 0.000
#> GSM1182246     4  0.0000      0.990 0.000 0.000 NA 1.000
#> GSM1182247     2  0.4304      0.817 0.000 0.716 NA 0.000
#> GSM1182248     2  0.4500      0.813 0.000 0.684 NA 0.000
#> GSM1182249     2  0.3219      0.867 0.000 0.836 NA 0.000
#> GSM1182250     2  0.3688      0.857 0.000 0.792 NA 0.000
#> GSM1182251     1  0.1474      0.963 0.948 0.000 NA 0.000
#> GSM1182252     2  0.4382      0.815 0.000 0.704 NA 0.000
#> GSM1182253     2  0.4522      0.811 0.000 0.680 NA 0.000
#> GSM1182254     2  0.3528      0.860 0.000 0.808 NA 0.000
#> GSM1182255     4  0.0000      0.990 0.000 0.000 NA 1.000
#> GSM1182256     4  0.0000      0.990 0.000 0.000 NA 1.000
#> GSM1182257     4  0.0000      0.990 0.000 0.000 NA 1.000
#> GSM1182258     4  0.0000      0.990 0.000 0.000 NA 1.000
#> GSM1182259     4  0.0000      0.990 0.000 0.000 NA 1.000
#> GSM1182260     2  0.4164      0.861 0.000 0.736 NA 0.000
#> GSM1182261     2  0.4103      0.845 0.000 0.744 NA 0.000
#> GSM1182262     2  0.4304      0.827 0.000 0.716 NA 0.000
#> GSM1182263     1  0.1474      0.963 0.948 0.000 NA 0.000
#> GSM1182264     2  0.4164      0.824 0.000 0.736 NA 0.000
#> GSM1182265     2  0.3907      0.835 0.000 0.768 NA 0.000
#> GSM1182266     2  0.3764      0.830 0.000 0.784 NA 0.000
#> GSM1182267     1  0.0000      0.982 1.000 0.000 NA 0.000
#> GSM1182268     1  0.0000      0.982 1.000 0.000 NA 0.000
#> GSM1182269     1  0.0000      0.982 1.000 0.000 NA 0.000
#> GSM1182270     1  0.0000      0.982 1.000 0.000 NA 0.000
#> GSM1182271     4  0.0000      0.990 0.000 0.000 NA 1.000
#> GSM1182272     4  0.0000      0.990 0.000 0.000 NA 1.000
#> GSM1182273     2  0.3764      0.826 0.000 0.784 NA 0.000
#> GSM1182275     2  0.3975      0.848 0.000 0.760 NA 0.000
#> GSM1182276     2  0.2149      0.866 0.000 0.912 NA 0.000
#> GSM1182277     1  0.0000      0.982 1.000 0.000 NA 0.000
#> GSM1182278     1  0.0000      0.982 1.000 0.000 NA 0.000
#> GSM1182279     1  0.1474      0.963 0.948 0.000 NA 0.000
#> GSM1182280     1  0.1474      0.963 0.948 0.000 NA 0.000
#> GSM1182281     4  0.0000      0.990 0.000 0.000 NA 1.000
#> GSM1182282     1  0.0000      0.982 1.000 0.000 NA 0.000
#> GSM1182283     1  0.0000      0.982 1.000 0.000 NA 0.000
#> GSM1182284     1  0.0000      0.982 1.000 0.000 NA 0.000
#> GSM1182285     2  0.4522      0.802 0.000 0.680 NA 0.000
#> GSM1182286     2  0.2081      0.867 0.000 0.916 NA 0.000
#> GSM1182287     2  0.3528      0.856 0.000 0.808 NA 0.000
#> GSM1182288     2  0.4193      0.826 0.000 0.732 NA 0.000
#> GSM1182289     1  0.1474      0.963 0.948 0.000 NA 0.000
#> GSM1182290     1  0.1557      0.962 0.944 0.000 NA 0.000
#> GSM1182291     4  0.0000      0.990 0.000 0.000 NA 1.000
#> GSM1182274     2  0.3688      0.822 0.000 0.792 NA 0.000
#> GSM1182292     2  0.3074      0.842 0.000 0.848 NA 0.000
#> GSM1182293     2  0.3610      0.847 0.000 0.800 NA 0.000
#> GSM1182294     2  0.4843      0.741 0.000 0.604 NA 0.000
#> GSM1182295     2  0.2868      0.858 0.000 0.864 NA 0.000
#> GSM1182296     2  0.3266      0.856 0.000 0.832 NA 0.000
#> GSM1182298     2  0.4605      0.798 0.000 0.664 NA 0.000
#> GSM1182299     2  0.3528      0.822 0.000 0.808 NA 0.000
#> GSM1182300     2  0.3726      0.849 0.000 0.788 NA 0.000
#> GSM1182301     2  0.3074      0.855 0.000 0.848 NA 0.000
#> GSM1182303     2  0.3837      0.842 0.000 0.776 NA 0.000
#> GSM1182304     1  0.1474      0.963 0.948 0.000 NA 0.000
#> GSM1182305     4  0.4801      0.716 0.188 0.000 NA 0.764
#> GSM1182306     4  0.0000      0.990 0.000 0.000 NA 1.000
#> GSM1182307     2  0.2647      0.840 0.000 0.880 NA 0.000
#> GSM1182309     2  0.3801      0.843 0.000 0.780 NA 0.000
#> GSM1182312     2  0.2814      0.862 0.000 0.868 NA 0.000
#> GSM1182314     4  0.0000      0.990 0.000 0.000 NA 1.000
#> GSM1182316     2  0.3569      0.828 0.000 0.804 NA 0.000
#> GSM1182318     2  0.3400      0.842 0.000 0.820 NA 0.000
#> GSM1182319     2  0.4382      0.827 0.000 0.704 NA 0.000
#> GSM1182320     2  0.3569      0.851 0.000 0.804 NA 0.000
#> GSM1182321     2  0.4564      0.818 0.000 0.672 NA 0.000
#> GSM1182322     2  0.3400      0.842 0.000 0.820 NA 0.000
#> GSM1182324     2  0.3907      0.851 0.000 0.768 NA 0.000
#> GSM1182297     2  0.2647      0.853 0.000 0.880 NA 0.000
#> GSM1182302     4  0.0000      0.990 0.000 0.000 NA 1.000
#> GSM1182308     2  0.3649      0.845 0.000 0.796 NA 0.000
#> GSM1182310     2  0.3942      0.841 0.000 0.764 NA 0.000
#> GSM1182311     1  0.0000      0.982 1.000 0.000 NA 0.000
#> GSM1182313     4  0.0000      0.990 0.000 0.000 NA 1.000
#> GSM1182315     2  0.3311      0.851 0.000 0.828 NA 0.000
#> GSM1182317     2  0.3024      0.855 0.000 0.852 NA 0.000
#> GSM1182323     1  0.0000      0.982 1.000 0.000 NA 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
#> GSM1182186     4  0.0000     0.9815 0.000 0.000 0.000 1.000 0.000
#> GSM1182187     4  0.0000     0.9815 0.000 0.000 0.000 1.000 0.000
#> GSM1182188     4  0.0000     0.9815 0.000 0.000 0.000 1.000 0.000
#> GSM1182189     1  0.0324     0.9439 0.992 0.004 0.000 0.000 0.004
#> GSM1182190     1  0.0000     0.9455 1.000 0.000 0.000 0.000 0.000
#> GSM1182191     4  0.0404     0.9714 0.000 0.012 0.000 0.988 0.000
#> GSM1182192     1  0.0162     0.9453 0.996 0.000 0.000 0.000 0.004
#> GSM1182193     1  0.0451     0.9434 0.988 0.004 0.000 0.000 0.008
#> GSM1182194     3  0.3622     0.3346 0.000 0.136 0.816 0.000 0.048
#> GSM1182195     3  0.3216     0.3400 0.000 0.108 0.848 0.000 0.044
#> GSM1182196     3  0.4681     0.4607 0.000 0.252 0.696 0.000 0.052
#> GSM1182197     2  0.4798     0.7133 0.000 0.580 0.396 0.000 0.024
#> GSM1182198     3  0.4758     0.2522 0.000 0.276 0.676 0.000 0.048
#> GSM1182199     3  0.3639     0.3433 0.000 0.144 0.812 0.000 0.044
#> GSM1182200     2  0.4387     0.7199 0.000 0.640 0.348 0.000 0.012
#> GSM1182201     2  0.4718     0.6816 0.000 0.540 0.444 0.000 0.016
#> GSM1182202     4  0.0000     0.9815 0.000 0.000 0.000 1.000 0.000
#> GSM1182203     4  0.0000     0.9815 0.000 0.000 0.000 1.000 0.000
#> GSM1182204     4  0.0000     0.9815 0.000 0.000 0.000 1.000 0.000
#> GSM1182205     3  0.2795     0.4111 0.000 0.100 0.872 0.000 0.028
#> GSM1182206     3  0.2331     0.5483 0.000 0.080 0.900 0.000 0.020
#> GSM1182207     1  0.3749     0.8645 0.816 0.080 0.000 0.000 0.104
#> GSM1182208     1  0.4787     0.5535 0.548 0.020 0.000 0.000 0.432
#> GSM1182209     2  0.4088     0.7402 0.000 0.632 0.368 0.000 0.000
#> GSM1182210     3  0.4437    -0.3805 0.000 0.464 0.532 0.000 0.004
#> GSM1182211     2  0.4415     0.6599 0.000 0.552 0.444 0.000 0.004
#> GSM1182212     2  0.4420     0.6980 0.000 0.548 0.448 0.000 0.004
#> GSM1182213     2  0.4249     0.7145 0.000 0.568 0.432 0.000 0.000
#> GSM1182214     2  0.4410     0.6726 0.000 0.556 0.440 0.000 0.004
#> GSM1182215     3  0.3224     0.5149 0.000 0.160 0.824 0.000 0.016
#> GSM1182216     2  0.4331     0.7319 0.000 0.596 0.400 0.000 0.004
#> GSM1182217     4  0.0000     0.9815 0.000 0.000 0.000 1.000 0.000
#> GSM1182218     1  0.0000     0.9455 1.000 0.000 0.000 0.000 0.000
#> GSM1182219     3  0.3421     0.5035 0.000 0.204 0.788 0.000 0.008
#> GSM1182220     3  0.3890     0.4343 0.000 0.252 0.736 0.000 0.012
#> GSM1182221     3  0.4138    -0.0163 0.000 0.384 0.616 0.000 0.000
#> GSM1182222     3  0.4026     0.4003 0.000 0.244 0.736 0.000 0.020
#> GSM1182223     3  0.2660     0.5316 0.000 0.128 0.864 0.000 0.008
#> GSM1182224     3  0.2491     0.4237 0.000 0.068 0.896 0.000 0.036
#> GSM1182225     3  0.4306    -0.5498 0.000 0.492 0.508 0.000 0.000
#> GSM1182226     2  0.4448     0.6455 0.000 0.516 0.480 0.000 0.004
#> GSM1182227     1  0.0162     0.9453 0.996 0.000 0.000 0.000 0.004
#> GSM1182228     3  0.4546    -0.4929 0.000 0.460 0.532 0.000 0.008
#> GSM1182229     3  0.3013     0.4893 0.000 0.160 0.832 0.000 0.008
#> GSM1182230     3  0.2069     0.5325 0.000 0.076 0.912 0.000 0.012
#> GSM1182231     3  0.3861     0.3587 0.000 0.264 0.728 0.000 0.008
#> GSM1182232     1  0.0000     0.9455 1.000 0.000 0.000 0.000 0.000
#> GSM1182233     1  0.0162     0.9451 0.996 0.004 0.000 0.000 0.000
#> GSM1182234     1  0.0162     0.9453 0.996 0.000 0.000 0.000 0.004
#> GSM1182235     3  0.4262    -0.3357 0.000 0.440 0.560 0.000 0.000
#> GSM1182236     1  0.0000     0.9455 1.000 0.000 0.000 0.000 0.000
#> GSM1182237     3  0.3837     0.2210 0.000 0.308 0.692 0.000 0.000
#> GSM1182238     2  0.4249     0.6935 0.000 0.568 0.432 0.000 0.000
#> GSM1182239     2  0.4151     0.7361 0.000 0.652 0.344 0.000 0.004
#> GSM1182240     2  0.4416     0.7430 0.000 0.632 0.356 0.000 0.012
#> GSM1182241     2  0.4402     0.7468 0.000 0.636 0.352 0.000 0.012
#> GSM1182242     3  0.3934     0.3691 0.000 0.244 0.740 0.000 0.016
#> GSM1182243     3  0.3355     0.4965 0.000 0.184 0.804 0.000 0.012
#> GSM1182244     3  0.3099     0.3672 0.000 0.124 0.848 0.000 0.028
#> GSM1182245     1  0.0162     0.9453 0.996 0.000 0.000 0.000 0.004
#> GSM1182246     4  0.0000     0.9815 0.000 0.000 0.000 1.000 0.000
#> GSM1182247     3  0.1872     0.5340 0.000 0.052 0.928 0.000 0.020
#> GSM1182248     3  0.3141     0.4913 0.000 0.108 0.852 0.000 0.040
#> GSM1182249     3  0.4610    -0.1038 0.000 0.388 0.596 0.000 0.016
#> GSM1182250     3  0.4551    -0.0857 0.000 0.368 0.616 0.000 0.016
#> GSM1182251     1  0.3526     0.8721 0.832 0.096 0.000 0.000 0.072
#> GSM1182252     3  0.3099     0.4990 0.000 0.124 0.848 0.000 0.028
#> GSM1182253     3  0.2124     0.4872 0.000 0.056 0.916 0.000 0.028
#> GSM1182254     3  0.4767    -0.3446 0.000 0.420 0.560 0.000 0.020
#> GSM1182255     4  0.0000     0.9815 0.000 0.000 0.000 1.000 0.000
#> GSM1182256     4  0.0000     0.9815 0.000 0.000 0.000 1.000 0.000
#> GSM1182257     4  0.0000     0.9815 0.000 0.000 0.000 1.000 0.000
#> GSM1182258     4  0.0000     0.9815 0.000 0.000 0.000 1.000 0.000
#> GSM1182259     4  0.0000     0.9815 0.000 0.000 0.000 1.000 0.000
#> GSM1182260     3  0.5077    -0.0705 0.000 0.392 0.568 0.000 0.040
#> GSM1182261     3  0.3639     0.5125 0.000 0.184 0.792 0.000 0.024
#> GSM1182262     3  0.2753     0.5399 0.000 0.136 0.856 0.000 0.008
#> GSM1182263     1  0.3526     0.8721 0.832 0.096 0.000 0.000 0.072
#> GSM1182264     2  0.5059     0.5041 0.000 0.548 0.416 0.000 0.036
#> GSM1182265     2  0.5103     0.5117 0.000 0.512 0.452 0.000 0.036
#> GSM1182266     2  0.5044     0.6243 0.000 0.556 0.408 0.000 0.036
#> GSM1182267     1  0.0162     0.9453 0.996 0.000 0.000 0.000 0.004
#> GSM1182268     1  0.0162     0.9451 0.996 0.004 0.000 0.000 0.000
#> GSM1182269     1  0.0162     0.9451 0.996 0.004 0.000 0.000 0.000
#> GSM1182270     1  0.0000     0.9455 1.000 0.000 0.000 0.000 0.000
#> GSM1182271     4  0.0000     0.9815 0.000 0.000 0.000 1.000 0.000
#> GSM1182272     4  0.0000     0.9815 0.000 0.000 0.000 1.000 0.000
#> GSM1182273     2  0.4746     0.6802 0.000 0.600 0.376 0.000 0.024
#> GSM1182275     3  0.4470    -0.0883 0.000 0.372 0.616 0.000 0.012
#> GSM1182276     3  0.3966     0.1627 0.000 0.336 0.664 0.000 0.000
#> GSM1182277     1  0.0162     0.9453 0.996 0.000 0.000 0.000 0.004
#> GSM1182278     1  0.0162     0.9453 0.996 0.000 0.000 0.000 0.004
#> GSM1182279     1  0.3526     0.8721 0.832 0.096 0.000 0.000 0.072
#> GSM1182280     1  0.3526     0.8721 0.832 0.096 0.000 0.000 0.072
#> GSM1182281     4  0.0000     0.9815 0.000 0.000 0.000 1.000 0.000
#> GSM1182282     1  0.0324     0.9445 0.992 0.004 0.000 0.000 0.004
#> GSM1182283     1  0.0162     0.9453 0.996 0.000 0.000 0.000 0.004
#> GSM1182284     1  0.0324     0.9450 0.992 0.004 0.000 0.000 0.004
#> GSM1182285     3  0.3216     0.3983 0.000 0.108 0.848 0.000 0.044
#> GSM1182286     3  0.4392    -0.0930 0.000 0.380 0.612 0.000 0.008
#> GSM1182287     3  0.3821     0.4317 0.000 0.216 0.764 0.000 0.020
#> GSM1182288     3  0.2969     0.5135 0.000 0.128 0.852 0.000 0.020
#> GSM1182289     1  0.3526     0.8721 0.832 0.096 0.000 0.000 0.072
#> GSM1182290     1  0.3754     0.8631 0.816 0.084 0.000 0.000 0.100
#> GSM1182291     4  0.0000     0.9815 0.000 0.000 0.000 1.000 0.000
#> GSM1182274     2  0.4570     0.7045 0.000 0.632 0.348 0.000 0.020
#> GSM1182292     2  0.4787     0.5730 0.000 0.548 0.432 0.000 0.020
#> GSM1182293     3  0.4735     0.4279 0.000 0.272 0.680 0.000 0.048
#> GSM1182294     5  0.6055     0.0000 0.000 0.120 0.408 0.000 0.472
#> GSM1182295     3  0.4880     0.2449 0.000 0.348 0.616 0.000 0.036
#> GSM1182296     3  0.5019     0.2820 0.000 0.316 0.632 0.000 0.052
#> GSM1182298     3  0.3506     0.3558 0.000 0.132 0.824 0.000 0.044
#> GSM1182299     2  0.4525     0.7398 0.000 0.624 0.360 0.000 0.016
#> GSM1182300     3  0.4946     0.3799 0.000 0.300 0.648 0.000 0.052
#> GSM1182301     3  0.4937    -0.1073 0.000 0.428 0.544 0.000 0.028
#> GSM1182303     3  0.4573     0.4695 0.000 0.256 0.700 0.000 0.044
#> GSM1182304     1  0.3526     0.8721 0.832 0.096 0.000 0.000 0.072
#> GSM1182305     4  0.6232     0.5222 0.212 0.096 0.000 0.636 0.056
#> GSM1182306     4  0.0000     0.9815 0.000 0.000 0.000 1.000 0.000
#> GSM1182307     2  0.4192     0.7207 0.000 0.596 0.404 0.000 0.000
#> GSM1182309     3  0.4890     0.4494 0.000 0.256 0.680 0.000 0.064
#> GSM1182312     3  0.4524     0.2423 0.000 0.336 0.644 0.000 0.020
#> GSM1182314     4  0.0000     0.9815 0.000 0.000 0.000 1.000 0.000
#> GSM1182316     2  0.5213     0.5962 0.000 0.556 0.396 0.000 0.048
#> GSM1182318     2  0.5435     0.5294 0.000 0.512 0.428 0.000 0.060
#> GSM1182319     3  0.4465     0.4263 0.000 0.204 0.736 0.000 0.060
#> GSM1182320     3  0.4990     0.2956 0.000 0.324 0.628 0.000 0.048
#> GSM1182321     3  0.4204     0.4562 0.000 0.196 0.756 0.000 0.048
#> GSM1182322     2  0.5505     0.4935 0.000 0.484 0.452 0.000 0.064
#> GSM1182324     3  0.4735     0.4419 0.000 0.284 0.672 0.000 0.044
#> GSM1182297     2  0.4546     0.6563 0.000 0.532 0.460 0.000 0.008
#> GSM1182302     4  0.0000     0.9815 0.000 0.000 0.000 1.000 0.000
#> GSM1182308     3  0.4602     0.4484 0.000 0.240 0.708 0.000 0.052
#> GSM1182310     3  0.4795     0.4664 0.000 0.224 0.704 0.000 0.072
#> GSM1182311     1  0.0162     0.9449 0.996 0.000 0.000 0.000 0.004
#> GSM1182313     4  0.0000     0.9815 0.000 0.000 0.000 1.000 0.000
#> GSM1182315     3  0.5168     0.1970 0.000 0.356 0.592 0.000 0.052
#> GSM1182317     3  0.4878    -0.1911 0.000 0.440 0.536 0.000 0.024
#> GSM1182323     1  0.0000     0.9455 1.000 0.000 0.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1182186     4  0.0547     0.9587 0.000 0.000 0.000 0.980 0.000 0.020
#> GSM1182187     4  0.0000     0.9737 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182188     4  0.0000     0.9737 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182189     1  0.0806     0.8308 0.972 0.000 0.000 0.000 0.008 0.020
#> GSM1182190     1  0.0260     0.8405 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM1182191     4  0.1075     0.9339 0.000 0.000 0.000 0.952 0.000 0.048
#> GSM1182192     1  0.0820     0.8384 0.972 0.000 0.000 0.000 0.016 0.012
#> GSM1182193     1  0.1176     0.8288 0.956 0.000 0.000 0.000 0.024 0.020
#> GSM1182194     3  0.4340     0.6031 0.000 0.224 0.708 0.000 0.064 0.004
#> GSM1182195     3  0.3992     0.6118 0.000 0.176 0.756 0.000 0.064 0.004
#> GSM1182196     3  0.5229     0.2690 0.000 0.424 0.492 0.000 0.080 0.004
#> GSM1182197     2  0.4494     0.5580 0.000 0.720 0.140 0.000 0.136 0.004
#> GSM1182198     3  0.5131     0.4287 0.000 0.272 0.620 0.000 0.100 0.008
#> GSM1182199     3  0.4650     0.5706 0.000 0.232 0.684 0.000 0.076 0.008
#> GSM1182200     2  0.3063     0.5766 0.000 0.840 0.068 0.000 0.092 0.000
#> GSM1182201     2  0.4046     0.5645 0.000 0.748 0.168 0.000 0.084 0.000
#> GSM1182202     4  0.0000     0.9737 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182203     4  0.0000     0.9737 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182204     4  0.0000     0.9737 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182205     3  0.3987     0.6390 0.000 0.224 0.732 0.000 0.040 0.004
#> GSM1182206     3  0.4034     0.5807 0.000 0.336 0.648 0.000 0.012 0.004
#> GSM1182207     1  0.4294     0.3418 0.692 0.000 0.000 0.000 0.060 0.248
#> GSM1182208     5  0.5759     0.0000 0.392 0.000 0.000 0.000 0.436 0.172
#> GSM1182209     2  0.2325     0.6021 0.000 0.892 0.060 0.000 0.048 0.000
#> GSM1182210     2  0.3626     0.5313 0.000 0.776 0.188 0.000 0.028 0.008
#> GSM1182211     2  0.3050     0.6001 0.000 0.832 0.136 0.000 0.028 0.004
#> GSM1182212     2  0.2586     0.6095 0.000 0.868 0.100 0.000 0.032 0.000
#> GSM1182213     2  0.2451     0.6013 0.000 0.888 0.068 0.000 0.040 0.004
#> GSM1182214     2  0.2365     0.6029 0.000 0.888 0.072 0.000 0.040 0.000
#> GSM1182215     3  0.4689     0.4182 0.000 0.440 0.516 0.000 0.044 0.000
#> GSM1182216     2  0.2563     0.5981 0.000 0.876 0.072 0.000 0.052 0.000
#> GSM1182217     4  0.0146     0.9710 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM1182218     1  0.0146     0.8408 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM1182219     2  0.4874    -0.2562 0.000 0.496 0.456 0.000 0.040 0.008
#> GSM1182220     2  0.4726    -0.1308 0.000 0.536 0.424 0.000 0.032 0.008
#> GSM1182221     2  0.4034     0.4320 0.000 0.692 0.280 0.000 0.024 0.004
#> GSM1182222     2  0.4576     0.0966 0.000 0.592 0.368 0.000 0.036 0.004
#> GSM1182223     3  0.4310     0.5078 0.000 0.396 0.580 0.000 0.024 0.000
#> GSM1182224     3  0.3599     0.6394 0.000 0.220 0.756 0.000 0.020 0.004
#> GSM1182225     2  0.3210     0.5831 0.000 0.812 0.152 0.000 0.036 0.000
#> GSM1182226     2  0.4131     0.5738 0.000 0.744 0.180 0.000 0.072 0.004
#> GSM1182227     1  0.0909     0.8362 0.968 0.000 0.000 0.000 0.020 0.012
#> GSM1182228     2  0.3652     0.5440 0.000 0.768 0.188 0.000 0.044 0.000
#> GSM1182229     3  0.4513     0.3947 0.000 0.440 0.528 0.000 0.032 0.000
#> GSM1182230     3  0.4357     0.6278 0.000 0.304 0.660 0.000 0.020 0.016
#> GSM1182231     2  0.4346     0.2805 0.000 0.632 0.336 0.000 0.028 0.004
#> GSM1182232     1  0.0405     0.8423 0.988 0.000 0.000 0.000 0.008 0.004
#> GSM1182233     1  0.0000     0.8416 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182234     1  0.0820     0.8377 0.972 0.000 0.000 0.000 0.016 0.012
#> GSM1182235     2  0.4102     0.4927 0.000 0.720 0.232 0.000 0.044 0.004
#> GSM1182236     1  0.0146     0.8419 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM1182237     2  0.4531     0.2062 0.000 0.608 0.352 0.000 0.036 0.004
#> GSM1182238     2  0.3054     0.5897 0.000 0.840 0.116 0.000 0.040 0.004
#> GSM1182239     2  0.1970     0.5938 0.000 0.912 0.028 0.000 0.060 0.000
#> GSM1182240     2  0.2197     0.5905 0.000 0.900 0.044 0.000 0.056 0.000
#> GSM1182241     2  0.2966     0.5920 0.000 0.848 0.076 0.000 0.076 0.000
#> GSM1182242     3  0.4698     0.2987 0.000 0.452 0.504 0.000 0.044 0.000
#> GSM1182243     3  0.4681     0.4108 0.000 0.432 0.524 0.000 0.044 0.000
#> GSM1182244     3  0.3730     0.6299 0.000 0.192 0.768 0.000 0.032 0.008
#> GSM1182245     1  0.0909     0.8357 0.968 0.000 0.000 0.000 0.020 0.012
#> GSM1182246     4  0.0000     0.9737 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182247     3  0.4286     0.6103 0.000 0.320 0.648 0.000 0.028 0.004
#> GSM1182248     3  0.3876     0.6218 0.000 0.276 0.700 0.000 0.024 0.000
#> GSM1182249     2  0.4972     0.1062 0.000 0.536 0.392 0.000 0.072 0.000
#> GSM1182250     2  0.4760     0.3476 0.000 0.604 0.328 0.000 0.068 0.000
#> GSM1182251     1  0.3221     0.4942 0.736 0.000 0.000 0.000 0.000 0.264
#> GSM1182252     3  0.4152     0.6210 0.000 0.304 0.664 0.000 0.032 0.000
#> GSM1182253     3  0.3860     0.6400 0.000 0.236 0.728 0.000 0.036 0.000
#> GSM1182254     2  0.5007     0.4055 0.000 0.596 0.320 0.000 0.080 0.004
#> GSM1182255     4  0.0000     0.9737 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182256     4  0.0000     0.9737 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182257     4  0.0000     0.9737 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182258     4  0.0000     0.9737 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182259     4  0.0000     0.9737 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182260     2  0.5508     0.0302 0.000 0.472 0.412 0.000 0.112 0.004
#> GSM1182261     3  0.4933     0.5389 0.000 0.340 0.588 0.000 0.068 0.004
#> GSM1182262     3  0.4370     0.5664 0.000 0.356 0.616 0.000 0.020 0.008
#> GSM1182263     1  0.3244     0.4915 0.732 0.000 0.000 0.000 0.000 0.268
#> GSM1182264     2  0.4845     0.4230 0.000 0.660 0.208 0.000 0.132 0.000
#> GSM1182265     2  0.5034     0.4105 0.000 0.628 0.240 0.000 0.132 0.000
#> GSM1182266     2  0.4774     0.4824 0.000 0.672 0.192 0.000 0.136 0.000
#> GSM1182267     1  0.0820     0.8377 0.972 0.000 0.000 0.000 0.016 0.012
#> GSM1182268     1  0.0458     0.8392 0.984 0.000 0.000 0.000 0.000 0.016
#> GSM1182269     1  0.0363     0.8400 0.988 0.000 0.000 0.000 0.000 0.012
#> GSM1182270     1  0.0260     0.8405 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM1182271     4  0.0000     0.9737 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182272     4  0.0000     0.9737 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182273     2  0.4825     0.4995 0.000 0.668 0.180 0.000 0.152 0.000
#> GSM1182275     2  0.4621     0.3309 0.000 0.632 0.304 0.000 0.064 0.000
#> GSM1182276     2  0.4476     0.3616 0.000 0.640 0.308 0.000 0.052 0.000
#> GSM1182277     1  0.0806     0.8354 0.972 0.000 0.000 0.000 0.020 0.008
#> GSM1182278     1  0.0909     0.8362 0.968 0.000 0.000 0.000 0.020 0.012
#> GSM1182279     1  0.3221     0.4942 0.736 0.000 0.000 0.000 0.000 0.264
#> GSM1182280     1  0.3244     0.4915 0.732 0.000 0.000 0.000 0.000 0.268
#> GSM1182281     4  0.0865     0.9451 0.000 0.000 0.000 0.964 0.000 0.036
#> GSM1182282     1  0.1003     0.8359 0.964 0.000 0.000 0.000 0.020 0.016
#> GSM1182283     1  0.1003     0.8367 0.964 0.000 0.000 0.000 0.020 0.016
#> GSM1182284     1  0.1480     0.8237 0.940 0.000 0.000 0.000 0.020 0.040
#> GSM1182285     3  0.3932     0.6326 0.000 0.248 0.720 0.000 0.028 0.004
#> GSM1182286     2  0.4077     0.5318 0.000 0.724 0.228 0.000 0.044 0.004
#> GSM1182287     2  0.4664    -0.1875 0.000 0.484 0.480 0.000 0.032 0.004
#> GSM1182288     3  0.4443     0.5349 0.000 0.368 0.596 0.000 0.036 0.000
#> GSM1182289     1  0.3221     0.4942 0.736 0.000 0.000 0.000 0.000 0.264
#> GSM1182290     1  0.4059     0.4333 0.720 0.000 0.000 0.000 0.052 0.228
#> GSM1182291     4  0.0000     0.9737 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182274     2  0.3883     0.5211 0.000 0.768 0.088 0.000 0.144 0.000
#> GSM1182292     2  0.3953     0.5429 0.000 0.744 0.196 0.000 0.060 0.000
#> GSM1182293     3  0.5572     0.2346 0.000 0.400 0.500 0.000 0.076 0.024
#> GSM1182294     6  0.6031     0.0000 0.000 0.092 0.220 0.000 0.092 0.596
#> GSM1182295     2  0.4753     0.3307 0.000 0.596 0.348 0.000 0.052 0.004
#> GSM1182296     2  0.5144     0.3213 0.000 0.604 0.304 0.000 0.080 0.012
#> GSM1182298     3  0.4035     0.6097 0.000 0.204 0.740 0.000 0.052 0.004
#> GSM1182299     2  0.3017     0.5746 0.000 0.844 0.072 0.000 0.084 0.000
#> GSM1182300     2  0.5523    -0.0752 0.000 0.484 0.420 0.000 0.076 0.020
#> GSM1182301     2  0.4843     0.4101 0.000 0.616 0.300 0.000 0.084 0.000
#> GSM1182303     3  0.5631     0.2971 0.000 0.372 0.524 0.000 0.068 0.036
#> GSM1182304     1  0.3383     0.4817 0.728 0.000 0.000 0.000 0.004 0.268
#> GSM1182305     4  0.5296     0.2774 0.184 0.000 0.000 0.600 0.000 0.216
#> GSM1182306     4  0.0000     0.9737 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182307     2  0.2641     0.6014 0.000 0.876 0.072 0.000 0.048 0.004
#> GSM1182309     3  0.5453     0.3116 0.000 0.388 0.516 0.000 0.080 0.016
#> GSM1182312     2  0.4831     0.2050 0.000 0.600 0.340 0.000 0.052 0.008
#> GSM1182314     4  0.0000     0.9737 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182316     2  0.4881     0.4808 0.000 0.656 0.208 0.000 0.136 0.000
#> GSM1182318     2  0.4468     0.5162 0.000 0.696 0.212 0.000 0.092 0.000
#> GSM1182319     3  0.5117     0.5005 0.000 0.288 0.620 0.000 0.076 0.016
#> GSM1182320     2  0.5364    -0.0375 0.000 0.488 0.420 0.000 0.084 0.008
#> GSM1182321     3  0.5576     0.5171 0.000 0.272 0.588 0.000 0.120 0.020
#> GSM1182322     2  0.4851     0.5026 0.000 0.672 0.220 0.000 0.100 0.008
#> GSM1182324     3  0.5304     0.4139 0.000 0.388 0.516 0.000 0.092 0.004
#> GSM1182297     2  0.3134     0.5988 0.000 0.820 0.144 0.000 0.036 0.000
#> GSM1182302     4  0.0000     0.9737 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182308     3  0.5397     0.2306 0.000 0.436 0.484 0.000 0.052 0.028
#> GSM1182310     3  0.5516     0.3256 0.000 0.360 0.536 0.000 0.084 0.020
#> GSM1182311     1  0.0458     0.8373 0.984 0.000 0.000 0.000 0.000 0.016
#> GSM1182313     4  0.0000     0.9737 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182315     2  0.4917     0.4434 0.000 0.656 0.256 0.000 0.072 0.016
#> GSM1182317     2  0.4677     0.4558 0.000 0.664 0.264 0.000 0.064 0.008
#> GSM1182323     1  0.0458     0.8391 0.984 0.000 0.000 0.000 0.000 0.016

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk ATC-skmeans-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk ATC-skmeans-collect-classes

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

test_to_known_factors(res)
#>               n disease.state(p) gender(p) k
#> ATC:skmeans 139           0.0773     1.000 2
#> ATC:skmeans 139           0.0843     0.949 3
#> ATC:skmeans 139           0.0843     0.949 4
#> ATC:skmeans  88           0.2204     0.838 5
#> ATC:skmeans  89           0.5862     0.594 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 46361 rows and 139 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 4.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk 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           1.000       1.000         0.4791 0.521   0.521
#> 3 3 1.000           0.990       0.997         0.1519 0.927   0.859
#> 4 4 1.000           0.989       0.996         0.0390 0.976   0.947
#> 5 5 0.829           0.926       0.949         0.0548 0.992   0.981
#> 6 6 0.651           0.538       0.806         0.1487 0.913   0.794

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

suggest_best_k(res)
#> [1] 4
#> attr(,"optional")
#> [1] 2 3

There is also optional best \(k\) = 2 3 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
#> GSM1182186     1       0          1  1  0
#> GSM1182187     1       0          1  1  0
#> GSM1182188     1       0          1  1  0
#> GSM1182189     1       0          1  1  0
#> GSM1182190     1       0          1  1  0
#> GSM1182191     1       0          1  1  0
#> GSM1182192     1       0          1  1  0
#> GSM1182193     1       0          1  1  0
#> GSM1182194     2       0          1  0  1
#> GSM1182195     2       0          1  0  1
#> GSM1182196     2       0          1  0  1
#> GSM1182197     2       0          1  0  1
#> GSM1182198     2       0          1  0  1
#> GSM1182199     2       0          1  0  1
#> GSM1182200     2       0          1  0  1
#> GSM1182201     2       0          1  0  1
#> GSM1182202     1       0          1  1  0
#> GSM1182203     1       0          1  1  0
#> GSM1182204     1       0          1  1  0
#> GSM1182205     2       0          1  0  1
#> GSM1182206     2       0          1  0  1
#> GSM1182207     1       0          1  1  0
#> GSM1182208     1       0          1  1  0
#> GSM1182209     2       0          1  0  1
#> GSM1182210     2       0          1  0  1
#> GSM1182211     2       0          1  0  1
#> GSM1182212     2       0          1  0  1
#> GSM1182213     2       0          1  0  1
#> GSM1182214     2       0          1  0  1
#> GSM1182215     2       0          1  0  1
#> GSM1182216     2       0          1  0  1
#> GSM1182217     1       0          1  1  0
#> GSM1182218     1       0          1  1  0
#> GSM1182219     2       0          1  0  1
#> GSM1182220     2       0          1  0  1
#> GSM1182221     2       0          1  0  1
#> GSM1182222     2       0          1  0  1
#> GSM1182223     2       0          1  0  1
#> GSM1182224     2       0          1  0  1
#> GSM1182225     2       0          1  0  1
#> GSM1182226     2       0          1  0  1
#> GSM1182227     1       0          1  1  0
#> GSM1182228     2       0          1  0  1
#> GSM1182229     2       0          1  0  1
#> GSM1182230     2       0          1  0  1
#> GSM1182231     2       0          1  0  1
#> GSM1182232     1       0          1  1  0
#> GSM1182233     1       0          1  1  0
#> GSM1182234     1       0          1  1  0
#> GSM1182235     2       0          1  0  1
#> GSM1182236     1       0          1  1  0
#> GSM1182237     2       0          1  0  1
#> GSM1182238     2       0          1  0  1
#> GSM1182239     2       0          1  0  1
#> GSM1182240     2       0          1  0  1
#> GSM1182241     2       0          1  0  1
#> GSM1182242     2       0          1  0  1
#> GSM1182243     2       0          1  0  1
#> GSM1182244     2       0          1  0  1
#> GSM1182245     1       0          1  1  0
#> GSM1182246     1       0          1  1  0
#> GSM1182247     2       0          1  0  1
#> GSM1182248     2       0          1  0  1
#> GSM1182249     2       0          1  0  1
#> GSM1182250     2       0          1  0  1
#> GSM1182251     1       0          1  1  0
#> GSM1182252     2       0          1  0  1
#> GSM1182253     2       0          1  0  1
#> GSM1182254     2       0          1  0  1
#> GSM1182255     1       0          1  1  0
#> GSM1182256     1       0          1  1  0
#> GSM1182257     1       0          1  1  0
#> GSM1182258     1       0          1  1  0
#> GSM1182259     1       0          1  1  0
#> GSM1182260     2       0          1  0  1
#> GSM1182261     2       0          1  0  1
#> GSM1182262     2       0          1  0  1
#> GSM1182263     1       0          1  1  0
#> GSM1182264     2       0          1  0  1
#> GSM1182265     2       0          1  0  1
#> GSM1182266     2       0          1  0  1
#> GSM1182267     1       0          1  1  0
#> GSM1182268     1       0          1  1  0
#> GSM1182269     1       0          1  1  0
#> GSM1182270     1       0          1  1  0
#> GSM1182271     1       0          1  1  0
#> GSM1182272     1       0          1  1  0
#> GSM1182273     2       0          1  0  1
#> GSM1182275     2       0          1  0  1
#> GSM1182276     2       0          1  0  1
#> GSM1182277     1       0          1  1  0
#> GSM1182278     1       0          1  1  0
#> GSM1182279     1       0          1  1  0
#> GSM1182280     1       0          1  1  0
#> GSM1182281     1       0          1  1  0
#> GSM1182282     1       0          1  1  0
#> GSM1182283     1       0          1  1  0
#> GSM1182284     1       0          1  1  0
#> GSM1182285     2       0          1  0  1
#> GSM1182286     2       0          1  0  1
#> GSM1182287     2       0          1  0  1
#> GSM1182288     2       0          1  0  1
#> GSM1182289     1       0          1  1  0
#> GSM1182290     1       0          1  1  0
#> GSM1182291     1       0          1  1  0
#> GSM1182274     2       0          1  0  1
#> GSM1182292     2       0          1  0  1
#> GSM1182293     2       0          1  0  1
#> GSM1182294     2       0          1  0  1
#> GSM1182295     2       0          1  0  1
#> GSM1182296     2       0          1  0  1
#> GSM1182298     2       0          1  0  1
#> GSM1182299     2       0          1  0  1
#> GSM1182300     2       0          1  0  1
#> GSM1182301     2       0          1  0  1
#> GSM1182303     2       0          1  0  1
#> GSM1182304     1       0          1  1  0
#> GSM1182305     1       0          1  1  0
#> GSM1182306     1       0          1  1  0
#> GSM1182307     2       0          1  0  1
#> GSM1182309     2       0          1  0  1
#> GSM1182312     2       0          1  0  1
#> GSM1182314     1       0          1  1  0
#> GSM1182316     2       0          1  0  1
#> GSM1182318     2       0          1  0  1
#> GSM1182319     2       0          1  0  1
#> GSM1182320     2       0          1  0  1
#> GSM1182321     2       0          1  0  1
#> GSM1182322     2       0          1  0  1
#> GSM1182324     2       0          1  0  1
#> GSM1182297     2       0          1  0  1
#> GSM1182302     1       0          1  1  0
#> GSM1182308     2       0          1  0  1
#> GSM1182310     2       0          1  0  1
#> GSM1182311     1       0          1  1  0
#> GSM1182313     1       0          1  1  0
#> GSM1182315     2       0          1  0  1
#> GSM1182317     2       0          1  0  1
#> GSM1182323     1       0          1  1  0

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1 p2    p3
#> GSM1182186     3    0.00      0.977 0.000  0 1.000
#> GSM1182187     3    0.00      0.977 0.000  0 1.000
#> GSM1182188     3    0.00      0.977 0.000  0 1.000
#> GSM1182189     1    0.00      1.000 1.000  0 0.000
#> GSM1182190     1    0.00      1.000 1.000  0 0.000
#> GSM1182191     3    0.00      0.977 0.000  0 1.000
#> GSM1182192     1    0.00      1.000 1.000  0 0.000
#> GSM1182193     1    0.00      1.000 1.000  0 0.000
#> GSM1182194     2    0.00      1.000 0.000  1 0.000
#> GSM1182195     2    0.00      1.000 0.000  1 0.000
#> GSM1182196     2    0.00      1.000 0.000  1 0.000
#> GSM1182197     2    0.00      1.000 0.000  1 0.000
#> GSM1182198     2    0.00      1.000 0.000  1 0.000
#> GSM1182199     2    0.00      1.000 0.000  1 0.000
#> GSM1182200     2    0.00      1.000 0.000  1 0.000
#> GSM1182201     2    0.00      1.000 0.000  1 0.000
#> GSM1182202     3    0.00      0.977 0.000  0 1.000
#> GSM1182203     3    0.00      0.977 0.000  0 1.000
#> GSM1182204     3    0.00      0.977 0.000  0 1.000
#> GSM1182205     2    0.00      1.000 0.000  1 0.000
#> GSM1182206     2    0.00      1.000 0.000  1 0.000
#> GSM1182207     1    0.00      1.000 1.000  0 0.000
#> GSM1182208     1    0.00      1.000 1.000  0 0.000
#> GSM1182209     2    0.00      1.000 0.000  1 0.000
#> GSM1182210     2    0.00      1.000 0.000  1 0.000
#> GSM1182211     2    0.00      1.000 0.000  1 0.000
#> GSM1182212     2    0.00      1.000 0.000  1 0.000
#> GSM1182213     2    0.00      1.000 0.000  1 0.000
#> GSM1182214     2    0.00      1.000 0.000  1 0.000
#> GSM1182215     2    0.00      1.000 0.000  1 0.000
#> GSM1182216     2    0.00      1.000 0.000  1 0.000
#> GSM1182217     3    0.00      0.977 0.000  0 1.000
#> GSM1182218     1    0.00      1.000 1.000  0 0.000
#> GSM1182219     2    0.00      1.000 0.000  1 0.000
#> GSM1182220     2    0.00      1.000 0.000  1 0.000
#> GSM1182221     2    0.00      1.000 0.000  1 0.000
#> GSM1182222     2    0.00      1.000 0.000  1 0.000
#> GSM1182223     2    0.00      1.000 0.000  1 0.000
#> GSM1182224     2    0.00      1.000 0.000  1 0.000
#> GSM1182225     2    0.00      1.000 0.000  1 0.000
#> GSM1182226     2    0.00      1.000 0.000  1 0.000
#> GSM1182227     1    0.00      1.000 1.000  0 0.000
#> GSM1182228     2    0.00      1.000 0.000  1 0.000
#> GSM1182229     2    0.00      1.000 0.000  1 0.000
#> GSM1182230     2    0.00      1.000 0.000  1 0.000
#> GSM1182231     2    0.00      1.000 0.000  1 0.000
#> GSM1182232     1    0.00      1.000 1.000  0 0.000
#> GSM1182233     1    0.00      1.000 1.000  0 0.000
#> GSM1182234     1    0.00      1.000 1.000  0 0.000
#> GSM1182235     2    0.00      1.000 0.000  1 0.000
#> GSM1182236     1    0.00      1.000 1.000  0 0.000
#> GSM1182237     2    0.00      1.000 0.000  1 0.000
#> GSM1182238     2    0.00      1.000 0.000  1 0.000
#> GSM1182239     2    0.00      1.000 0.000  1 0.000
#> GSM1182240     2    0.00      1.000 0.000  1 0.000
#> GSM1182241     2    0.00      1.000 0.000  1 0.000
#> GSM1182242     2    0.00      1.000 0.000  1 0.000
#> GSM1182243     2    0.00      1.000 0.000  1 0.000
#> GSM1182244     2    0.00      1.000 0.000  1 0.000
#> GSM1182245     1    0.00      1.000 1.000  0 0.000
#> GSM1182246     3    0.00      0.977 0.000  0 1.000
#> GSM1182247     2    0.00      1.000 0.000  1 0.000
#> GSM1182248     2    0.00      1.000 0.000  1 0.000
#> GSM1182249     2    0.00      1.000 0.000  1 0.000
#> GSM1182250     2    0.00      1.000 0.000  1 0.000
#> GSM1182251     1    0.00      1.000 1.000  0 0.000
#> GSM1182252     2    0.00      1.000 0.000  1 0.000
#> GSM1182253     2    0.00      1.000 0.000  1 0.000
#> GSM1182254     2    0.00      1.000 0.000  1 0.000
#> GSM1182255     3    0.00      0.977 0.000  0 1.000
#> GSM1182256     3    0.00      0.977 0.000  0 1.000
#> GSM1182257     3    0.00      0.977 0.000  0 1.000
#> GSM1182258     3    0.00      0.977 0.000  0 1.000
#> GSM1182259     3    0.00      0.977 0.000  0 1.000
#> GSM1182260     2    0.00      1.000 0.000  1 0.000
#> GSM1182261     2    0.00      1.000 0.000  1 0.000
#> GSM1182262     2    0.00      1.000 0.000  1 0.000
#> GSM1182263     1    0.00      1.000 1.000  0 0.000
#> GSM1182264     2    0.00      1.000 0.000  1 0.000
#> GSM1182265     2    0.00      1.000 0.000  1 0.000
#> GSM1182266     2    0.00      1.000 0.000  1 0.000
#> GSM1182267     1    0.00      1.000 1.000  0 0.000
#> GSM1182268     1    0.00      1.000 1.000  0 0.000
#> GSM1182269     1    0.00      1.000 1.000  0 0.000
#> GSM1182270     1    0.00      1.000 1.000  0 0.000
#> GSM1182271     3    0.00      0.977 0.000  0 1.000
#> GSM1182272     3    0.00      0.977 0.000  0 1.000
#> GSM1182273     2    0.00      1.000 0.000  1 0.000
#> GSM1182275     2    0.00      1.000 0.000  1 0.000
#> GSM1182276     2    0.00      1.000 0.000  1 0.000
#> GSM1182277     1    0.00      1.000 1.000  0 0.000
#> GSM1182278     1    0.00      1.000 1.000  0 0.000
#> GSM1182279     1    0.00      1.000 1.000  0 0.000
#> GSM1182280     1    0.00      1.000 1.000  0 0.000
#> GSM1182281     1    0.00      1.000 1.000  0 0.000
#> GSM1182282     1    0.00      1.000 1.000  0 0.000
#> GSM1182283     1    0.00      1.000 1.000  0 0.000
#> GSM1182284     1    0.00      1.000 1.000  0 0.000
#> GSM1182285     2    0.00      1.000 0.000  1 0.000
#> GSM1182286     2    0.00      1.000 0.000  1 0.000
#> GSM1182287     2    0.00      1.000 0.000  1 0.000
#> GSM1182288     2    0.00      1.000 0.000  1 0.000
#> GSM1182289     1    0.00      1.000 1.000  0 0.000
#> GSM1182290     1    0.00      1.000 1.000  0 0.000
#> GSM1182291     3    0.00      0.977 0.000  0 1.000
#> GSM1182274     2    0.00      1.000 0.000  1 0.000
#> GSM1182292     2    0.00      1.000 0.000  1 0.000
#> GSM1182293     2    0.00      1.000 0.000  1 0.000
#> GSM1182294     2    0.00      1.000 0.000  1 0.000
#> GSM1182295     2    0.00      1.000 0.000  1 0.000
#> GSM1182296     2    0.00      1.000 0.000  1 0.000
#> GSM1182298     2    0.00      1.000 0.000  1 0.000
#> GSM1182299     2    0.00      1.000 0.000  1 0.000
#> GSM1182300     2    0.00      1.000 0.000  1 0.000
#> GSM1182301     2    0.00      1.000 0.000  1 0.000
#> GSM1182303     2    0.00      1.000 0.000  1 0.000
#> GSM1182304     1    0.00      1.000 1.000  0 0.000
#> GSM1182305     3    0.63      0.106 0.472  0 0.528
#> GSM1182306     3    0.00      0.977 0.000  0 1.000
#> GSM1182307     2    0.00      1.000 0.000  1 0.000
#> GSM1182309     2    0.00      1.000 0.000  1 0.000
#> GSM1182312     2    0.00      1.000 0.000  1 0.000
#> GSM1182314     3    0.00      0.977 0.000  0 1.000
#> GSM1182316     2    0.00      1.000 0.000  1 0.000
#> GSM1182318     2    0.00      1.000 0.000  1 0.000
#> GSM1182319     2    0.00      1.000 0.000  1 0.000
#> GSM1182320     2    0.00      1.000 0.000  1 0.000
#> GSM1182321     2    0.00      1.000 0.000  1 0.000
#> GSM1182322     2    0.00      1.000 0.000  1 0.000
#> GSM1182324     2    0.00      1.000 0.000  1 0.000
#> GSM1182297     2    0.00      1.000 0.000  1 0.000
#> GSM1182302     3    0.00      0.977 0.000  0 1.000
#> GSM1182308     2    0.00      1.000 0.000  1 0.000
#> GSM1182310     2    0.00      1.000 0.000  1 0.000
#> GSM1182311     1    0.00      1.000 1.000  0 0.000
#> GSM1182313     3    0.00      0.977 0.000  0 1.000
#> GSM1182315     2    0.00      1.000 0.000  1 0.000
#> GSM1182317     2    0.00      1.000 0.000  1 0.000
#> GSM1182323     1    0.00      1.000 1.000  0 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette p1 p2    p3    p4
#> GSM1182186     4   0.458      0.473  0  0 0.332 0.668
#> GSM1182187     4   0.000      0.981  0  0 0.000 1.000
#> GSM1182188     4   0.000      0.981  0  0 0.000 1.000
#> GSM1182189     1   0.000      1.000  1  0 0.000 0.000
#> GSM1182190     1   0.000      1.000  1  0 0.000 0.000
#> GSM1182191     3   0.410      0.642  0  0 0.744 0.256
#> GSM1182192     1   0.000      1.000  1  0 0.000 0.000
#> GSM1182193     1   0.000      1.000  1  0 0.000 0.000
#> GSM1182194     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182195     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182196     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182197     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182198     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182199     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182200     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182201     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182202     4   0.000      0.981  0  0 0.000 1.000
#> GSM1182203     4   0.000      0.981  0  0 0.000 1.000
#> GSM1182204     4   0.000      0.981  0  0 0.000 1.000
#> GSM1182205     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182206     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182207     1   0.000      1.000  1  0 0.000 0.000
#> GSM1182208     1   0.000      1.000  1  0 0.000 0.000
#> GSM1182209     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182210     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182211     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182212     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182213     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182214     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182215     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182216     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182217     4   0.000      0.981  0  0 0.000 1.000
#> GSM1182218     1   0.000      1.000  1  0 0.000 0.000
#> GSM1182219     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182220     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182221     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182222     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182223     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182224     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182225     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182226     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182227     1   0.000      1.000  1  0 0.000 0.000
#> GSM1182228     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182229     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182230     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182231     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182232     1   0.000      1.000  1  0 0.000 0.000
#> GSM1182233     1   0.000      1.000  1  0 0.000 0.000
#> GSM1182234     1   0.000      1.000  1  0 0.000 0.000
#> GSM1182235     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182236     1   0.000      1.000  1  0 0.000 0.000
#> GSM1182237     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182238     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182239     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182240     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182241     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182242     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182243     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182244     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182245     1   0.000      1.000  1  0 0.000 0.000
#> GSM1182246     4   0.000      0.981  0  0 0.000 1.000
#> GSM1182247     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182248     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182249     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182250     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182251     3   0.000      0.967  0  0 1.000 0.000
#> GSM1182252     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182253     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182254     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182255     4   0.000      0.981  0  0 0.000 1.000
#> GSM1182256     4   0.000      0.981  0  0 0.000 1.000
#> GSM1182257     4   0.000      0.981  0  0 0.000 1.000
#> GSM1182258     4   0.000      0.981  0  0 0.000 1.000
#> GSM1182259     4   0.000      0.981  0  0 0.000 1.000
#> GSM1182260     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182261     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182262     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182263     3   0.000      0.967  0  0 1.000 0.000
#> GSM1182264     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182265     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182266     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182267     1   0.000      1.000  1  0 0.000 0.000
#> GSM1182268     1   0.000      1.000  1  0 0.000 0.000
#> GSM1182269     1   0.000      1.000  1  0 0.000 0.000
#> GSM1182270     1   0.000      1.000  1  0 0.000 0.000
#> GSM1182271     4   0.000      0.981  0  0 0.000 1.000
#> GSM1182272     4   0.000      0.981  0  0 0.000 1.000
#> GSM1182273     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182275     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182276     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182277     1   0.000      1.000  1  0 0.000 0.000
#> GSM1182278     1   0.000      1.000  1  0 0.000 0.000
#> GSM1182279     3   0.000      0.967  0  0 1.000 0.000
#> GSM1182280     3   0.000      0.967  0  0 1.000 0.000
#> GSM1182281     3   0.000      0.967  0  0 1.000 0.000
#> GSM1182282     1   0.000      1.000  1  0 0.000 0.000
#> GSM1182283     1   0.000      1.000  1  0 0.000 0.000
#> GSM1182284     1   0.000      1.000  1  0 0.000 0.000
#> GSM1182285     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182286     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182287     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182288     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182289     3   0.000      0.967  0  0 1.000 0.000
#> GSM1182290     1   0.000      1.000  1  0 0.000 0.000
#> GSM1182291     4   0.000      0.981  0  0 0.000 1.000
#> GSM1182274     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182292     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182293     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182294     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182295     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182296     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182298     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182299     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182300     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182301     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182303     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182304     3   0.000      0.967  0  0 1.000 0.000
#> GSM1182305     3   0.000      0.967  0  0 1.000 0.000
#> GSM1182306     4   0.000      0.981  0  0 0.000 1.000
#> GSM1182307     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182309     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182312     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182314     4   0.000      0.981  0  0 0.000 1.000
#> GSM1182316     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182318     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182319     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182320     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182321     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182322     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182324     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182297     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182302     4   0.000      0.981  0  0 0.000 1.000
#> GSM1182308     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182310     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182311     1   0.000      1.000  1  0 0.000 0.000
#> GSM1182313     4   0.000      0.981  0  0 0.000 1.000
#> GSM1182315     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182317     2   0.000      1.000  0  1 0.000 0.000
#> GSM1182323     1   0.000      1.000  1  0 0.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
#> GSM1182186     5  0.2561      0.599 0.000 0.000 0.144 0.000 0.856
#> GSM1182187     5  0.4210      0.465 0.000 0.000 0.000 0.412 0.588
#> GSM1182188     4  0.0000      0.942 0.000 0.000 0.000 1.000 0.000
#> GSM1182189     1  0.0000      0.998 1.000 0.000 0.000 0.000 0.000
#> GSM1182190     1  0.0000      0.998 1.000 0.000 0.000 0.000 0.000
#> GSM1182191     5  0.2561      0.599 0.000 0.000 0.144 0.000 0.856
#> GSM1182192     1  0.0000      0.998 1.000 0.000 0.000 0.000 0.000
#> GSM1182193     1  0.0000      0.998 1.000 0.000 0.000 0.000 0.000
#> GSM1182194     2  0.0609      0.950 0.000 0.980 0.000 0.000 0.020
#> GSM1182195     2  0.0510      0.950 0.000 0.984 0.000 0.000 0.016
#> GSM1182196     2  0.0794      0.953 0.000 0.972 0.000 0.000 0.028
#> GSM1182197     2  0.2377      0.919 0.000 0.872 0.000 0.000 0.128
#> GSM1182198     2  0.2561      0.920 0.000 0.856 0.000 0.000 0.144
#> GSM1182199     2  0.1544      0.946 0.000 0.932 0.000 0.000 0.068
#> GSM1182200     2  0.2424      0.919 0.000 0.868 0.000 0.000 0.132
#> GSM1182201     2  0.2424      0.919 0.000 0.868 0.000 0.000 0.132
#> GSM1182202     4  0.0000      0.942 0.000 0.000 0.000 1.000 0.000
#> GSM1182203     4  0.0963      0.905 0.000 0.000 0.000 0.964 0.036
#> GSM1182204     4  0.4307     -0.356 0.000 0.000 0.000 0.504 0.496
#> GSM1182205     2  0.0510      0.950 0.000 0.984 0.000 0.000 0.016
#> GSM1182206     2  0.0510      0.950 0.000 0.984 0.000 0.000 0.016
#> GSM1182207     1  0.0000      0.998 1.000 0.000 0.000 0.000 0.000
#> GSM1182208     1  0.0000      0.998 1.000 0.000 0.000 0.000 0.000
#> GSM1182209     2  0.2377      0.919 0.000 0.872 0.000 0.000 0.128
#> GSM1182210     2  0.0000      0.951 0.000 1.000 0.000 0.000 0.000
#> GSM1182211     2  0.0510      0.951 0.000 0.984 0.000 0.000 0.016
#> GSM1182212     2  0.2471      0.920 0.000 0.864 0.000 0.000 0.136
#> GSM1182213     2  0.2329      0.921 0.000 0.876 0.000 0.000 0.124
#> GSM1182214     2  0.0510      0.951 0.000 0.984 0.000 0.000 0.016
#> GSM1182215     2  0.0510      0.950 0.000 0.984 0.000 0.000 0.016
#> GSM1182216     2  0.0290      0.952 0.000 0.992 0.000 0.000 0.008
#> GSM1182217     5  0.2561      0.697 0.000 0.000 0.000 0.144 0.856
#> GSM1182218     1  0.0000      0.998 1.000 0.000 0.000 0.000 0.000
#> GSM1182219     2  0.0510      0.950 0.000 0.984 0.000 0.000 0.016
#> GSM1182220     2  0.0510      0.950 0.000 0.984 0.000 0.000 0.016
#> GSM1182221     2  0.0000      0.951 0.000 1.000 0.000 0.000 0.000
#> GSM1182222     2  0.0510      0.950 0.000 0.984 0.000 0.000 0.016
#> GSM1182223     2  0.0510      0.950 0.000 0.984 0.000 0.000 0.016
#> GSM1182224     2  0.0510      0.950 0.000 0.984 0.000 0.000 0.016
#> GSM1182225     2  0.0000      0.951 0.000 1.000 0.000 0.000 0.000
#> GSM1182226     2  0.0290      0.951 0.000 0.992 0.000 0.000 0.008
#> GSM1182227     1  0.0000      0.998 1.000 0.000 0.000 0.000 0.000
#> GSM1182228     2  0.2329      0.926 0.000 0.876 0.000 0.000 0.124
#> GSM1182229     2  0.0609      0.950 0.000 0.980 0.000 0.000 0.020
#> GSM1182230     2  0.0510      0.950 0.000 0.984 0.000 0.000 0.016
#> GSM1182231     2  0.0510      0.953 0.000 0.984 0.000 0.000 0.016
#> GSM1182232     1  0.0000      0.998 1.000 0.000 0.000 0.000 0.000
#> GSM1182233     1  0.0000      0.998 1.000 0.000 0.000 0.000 0.000
#> GSM1182234     1  0.0000      0.998 1.000 0.000 0.000 0.000 0.000
#> GSM1182235     2  0.0000      0.951 0.000 1.000 0.000 0.000 0.000
#> GSM1182236     1  0.0000      0.998 1.000 0.000 0.000 0.000 0.000
#> GSM1182237     2  0.0000      0.951 0.000 1.000 0.000 0.000 0.000
#> GSM1182238     2  0.0000      0.951 0.000 1.000 0.000 0.000 0.000
#> GSM1182239     2  0.2127      0.929 0.000 0.892 0.000 0.000 0.108
#> GSM1182240     2  0.2377      0.919 0.000 0.872 0.000 0.000 0.128
#> GSM1182241     2  0.2377      0.919 0.000 0.872 0.000 0.000 0.128
#> GSM1182242     2  0.2471      0.923 0.000 0.864 0.000 0.000 0.136
#> GSM1182243     2  0.0609      0.953 0.000 0.980 0.000 0.000 0.020
#> GSM1182244     2  0.0510      0.950 0.000 0.984 0.000 0.000 0.016
#> GSM1182245     1  0.0000      0.998 1.000 0.000 0.000 0.000 0.000
#> GSM1182246     4  0.0000      0.942 0.000 0.000 0.000 1.000 0.000
#> GSM1182247     2  0.0880      0.952 0.000 0.968 0.000 0.000 0.032
#> GSM1182248     2  0.0880      0.952 0.000 0.968 0.000 0.000 0.032
#> GSM1182249     2  0.1608      0.942 0.000 0.928 0.000 0.000 0.072
#> GSM1182250     2  0.2329      0.921 0.000 0.876 0.000 0.000 0.124
#> GSM1182251     3  0.0000      0.965 0.000 0.000 1.000 0.000 0.000
#> GSM1182252     2  0.0703      0.952 0.000 0.976 0.000 0.000 0.024
#> GSM1182253     2  0.2424      0.925 0.000 0.868 0.000 0.000 0.132
#> GSM1182254     2  0.2377      0.919 0.000 0.872 0.000 0.000 0.128
#> GSM1182255     5  0.4161      0.505 0.000 0.000 0.000 0.392 0.608
#> GSM1182256     4  0.0000      0.942 0.000 0.000 0.000 1.000 0.000
#> GSM1182257     4  0.0000      0.942 0.000 0.000 0.000 1.000 0.000
#> GSM1182258     4  0.0000      0.942 0.000 0.000 0.000 1.000 0.000
#> GSM1182259     4  0.0000      0.942 0.000 0.000 0.000 1.000 0.000
#> GSM1182260     2  0.2377      0.919 0.000 0.872 0.000 0.000 0.128
#> GSM1182261     2  0.0510      0.950 0.000 0.984 0.000 0.000 0.016
#> GSM1182262     2  0.0510      0.950 0.000 0.984 0.000 0.000 0.016
#> GSM1182263     3  0.0000      0.965 0.000 0.000 1.000 0.000 0.000
#> GSM1182264     2  0.2377      0.919 0.000 0.872 0.000 0.000 0.128
#> GSM1182265     2  0.2377      0.919 0.000 0.872 0.000 0.000 0.128
#> GSM1182266     2  0.2516      0.920 0.000 0.860 0.000 0.000 0.140
#> GSM1182267     1  0.0000      0.998 1.000 0.000 0.000 0.000 0.000
#> GSM1182268     1  0.0000      0.998 1.000 0.000 0.000 0.000 0.000
#> GSM1182269     1  0.0000      0.998 1.000 0.000 0.000 0.000 0.000
#> GSM1182270     1  0.0000      0.998 1.000 0.000 0.000 0.000 0.000
#> GSM1182271     4  0.0000      0.942 0.000 0.000 0.000 1.000 0.000
#> GSM1182272     4  0.2516      0.765 0.000 0.000 0.000 0.860 0.140
#> GSM1182273     2  0.2424      0.919 0.000 0.868 0.000 0.000 0.132
#> GSM1182275     2  0.2471      0.920 0.000 0.864 0.000 0.000 0.136
#> GSM1182276     2  0.1410      0.948 0.000 0.940 0.000 0.000 0.060
#> GSM1182277     1  0.0000      0.998 1.000 0.000 0.000 0.000 0.000
#> GSM1182278     1  0.0000      0.998 1.000 0.000 0.000 0.000 0.000
#> GSM1182279     3  0.0000      0.965 0.000 0.000 1.000 0.000 0.000
#> GSM1182280     3  0.0000      0.965 0.000 0.000 1.000 0.000 0.000
#> GSM1182281     3  0.0000      0.965 0.000 0.000 1.000 0.000 0.000
#> GSM1182282     1  0.0000      0.998 1.000 0.000 0.000 0.000 0.000
#> GSM1182283     1  0.0000      0.998 1.000 0.000 0.000 0.000 0.000
#> GSM1182284     1  0.0000      0.998 1.000 0.000 0.000 0.000 0.000
#> GSM1182285     2  0.0510      0.950 0.000 0.984 0.000 0.000 0.016
#> GSM1182286     2  0.2280      0.926 0.000 0.880 0.000 0.000 0.120
#> GSM1182287     2  0.0510      0.950 0.000 0.984 0.000 0.000 0.016
#> GSM1182288     2  0.0510      0.950 0.000 0.984 0.000 0.000 0.016
#> GSM1182289     3  0.0000      0.965 0.000 0.000 1.000 0.000 0.000
#> GSM1182290     1  0.1121      0.953 0.956 0.000 0.044 0.000 0.000
#> GSM1182291     4  0.0000      0.942 0.000 0.000 0.000 1.000 0.000
#> GSM1182274     2  0.2377      0.919 0.000 0.872 0.000 0.000 0.128
#> GSM1182292     2  0.2127      0.928 0.000 0.892 0.000 0.000 0.108
#> GSM1182293     2  0.0162      0.952 0.000 0.996 0.000 0.000 0.004
#> GSM1182294     2  0.0404      0.950 0.000 0.988 0.000 0.000 0.012
#> GSM1182295     2  0.0510      0.950 0.000 0.984 0.000 0.000 0.016
#> GSM1182296     2  0.0510      0.950 0.000 0.984 0.000 0.000 0.016
#> GSM1182298     2  0.0794      0.952 0.000 0.972 0.000 0.000 0.028
#> GSM1182299     2  0.2377      0.919 0.000 0.872 0.000 0.000 0.128
#> GSM1182300     2  0.0000      0.951 0.000 1.000 0.000 0.000 0.000
#> GSM1182301     2  0.2329      0.921 0.000 0.876 0.000 0.000 0.124
#> GSM1182303     2  0.0510      0.950 0.000 0.984 0.000 0.000 0.016
#> GSM1182304     3  0.0000      0.965 0.000 0.000 1.000 0.000 0.000
#> GSM1182305     3  0.3480      0.700 0.000 0.000 0.752 0.000 0.248
#> GSM1182306     4  0.0000      0.942 0.000 0.000 0.000 1.000 0.000
#> GSM1182307     2  0.0404      0.952 0.000 0.988 0.000 0.000 0.012
#> GSM1182309     2  0.0404      0.950 0.000 0.988 0.000 0.000 0.012
#> GSM1182312     2  0.0162      0.951 0.000 0.996 0.000 0.000 0.004
#> GSM1182314     4  0.0000      0.942 0.000 0.000 0.000 1.000 0.000
#> GSM1182316     2  0.2377      0.919 0.000 0.872 0.000 0.000 0.128
#> GSM1182318     2  0.2020      0.931 0.000 0.900 0.000 0.000 0.100
#> GSM1182319     2  0.0510      0.952 0.000 0.984 0.000 0.000 0.016
#> GSM1182320     2  0.0290      0.952 0.000 0.992 0.000 0.000 0.008
#> GSM1182321     2  0.0000      0.951 0.000 1.000 0.000 0.000 0.000
#> GSM1182322     2  0.2074      0.930 0.000 0.896 0.000 0.000 0.104
#> GSM1182324     2  0.1851      0.940 0.000 0.912 0.000 0.000 0.088
#> GSM1182297     2  0.0000      0.951 0.000 1.000 0.000 0.000 0.000
#> GSM1182302     4  0.0000      0.942 0.000 0.000 0.000 1.000 0.000
#> GSM1182308     2  0.0404      0.950 0.000 0.988 0.000 0.000 0.012
#> GSM1182310     2  0.0404      0.952 0.000 0.988 0.000 0.000 0.012
#> GSM1182311     1  0.0000      0.998 1.000 0.000 0.000 0.000 0.000
#> GSM1182313     4  0.0000      0.942 0.000 0.000 0.000 1.000 0.000
#> GSM1182315     2  0.0000      0.951 0.000 1.000 0.000 0.000 0.000
#> GSM1182317     2  0.1341      0.945 0.000 0.944 0.000 0.000 0.056
#> GSM1182323     1  0.0000      0.998 1.000 0.000 0.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1182186     6  0.0000     0.7536 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM1182187     4  0.5963     0.1362 0.000 0.000 0.240 0.440 0.000 0.320
#> GSM1182188     4  0.1387     0.7968 0.000 0.000 0.068 0.932 0.000 0.000
#> GSM1182189     1  0.0937     0.9709 0.960 0.000 0.040 0.000 0.000 0.000
#> GSM1182190     1  0.0363     0.9743 0.988 0.000 0.012 0.000 0.000 0.000
#> GSM1182191     6  0.0000     0.7536 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM1182192     1  0.0937     0.9709 0.960 0.000 0.040 0.000 0.000 0.000
#> GSM1182193     1  0.0937     0.9709 0.960 0.000 0.040 0.000 0.000 0.000
#> GSM1182194     2  0.2260     0.5317 0.000 0.860 0.140 0.000 0.000 0.000
#> GSM1182195     2  0.2260     0.5337 0.000 0.860 0.140 0.000 0.000 0.000
#> GSM1182196     2  0.2340     0.5284 0.000 0.852 0.148 0.000 0.000 0.000
#> GSM1182197     2  0.3823    -0.6833 0.000 0.564 0.436 0.000 0.000 0.000
#> GSM1182198     2  0.3847    -0.4529 0.000 0.544 0.456 0.000 0.000 0.000
#> GSM1182199     2  0.2883     0.4822 0.000 0.788 0.212 0.000 0.000 0.000
#> GSM1182200     3  0.3868     0.7530 0.000 0.496 0.504 0.000 0.000 0.000
#> GSM1182201     3  0.3851     0.8284 0.000 0.460 0.540 0.000 0.000 0.000
#> GSM1182202     4  0.2969     0.7455 0.000 0.000 0.224 0.776 0.000 0.000
#> GSM1182203     4  0.3420     0.7261 0.000 0.000 0.240 0.748 0.000 0.012
#> GSM1182204     4  0.5911     0.2101 0.000 0.000 0.240 0.464 0.000 0.296
#> GSM1182205     2  0.2135     0.5634 0.000 0.872 0.128 0.000 0.000 0.000
#> GSM1182206     2  0.1327     0.5838 0.000 0.936 0.064 0.000 0.000 0.000
#> GSM1182207     1  0.0790     0.9726 0.968 0.000 0.032 0.000 0.000 0.000
#> GSM1182208     1  0.0937     0.9709 0.960 0.000 0.040 0.000 0.000 0.000
#> GSM1182209     2  0.3828    -0.5959 0.000 0.560 0.440 0.000 0.000 0.000
#> GSM1182210     2  0.2416     0.5495 0.000 0.844 0.156 0.000 0.000 0.000
#> GSM1182211     2  0.3101     0.3875 0.000 0.756 0.244 0.000 0.000 0.000
#> GSM1182212     2  0.3747    -0.4026 0.000 0.604 0.396 0.000 0.000 0.000
#> GSM1182213     2  0.3774    -0.5007 0.000 0.592 0.408 0.000 0.000 0.000
#> GSM1182214     2  0.3244     0.3661 0.000 0.732 0.268 0.000 0.000 0.000
#> GSM1182215     2  0.1957     0.5876 0.000 0.888 0.112 0.000 0.000 0.000
#> GSM1182216     2  0.2697     0.5236 0.000 0.812 0.188 0.000 0.000 0.000
#> GSM1182217     6  0.0000     0.7536 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM1182218     1  0.0260     0.9736 0.992 0.000 0.008 0.000 0.000 0.000
#> GSM1182219     2  0.1075     0.5886 0.000 0.952 0.048 0.000 0.000 0.000
#> GSM1182220     2  0.1501     0.5853 0.000 0.924 0.076 0.000 0.000 0.000
#> GSM1182221     2  0.2631     0.5104 0.000 0.820 0.180 0.000 0.000 0.000
#> GSM1182222     2  0.2092     0.5603 0.000 0.876 0.124 0.000 0.000 0.000
#> GSM1182223     2  0.1141     0.5693 0.000 0.948 0.052 0.000 0.000 0.000
#> GSM1182224     2  0.1075     0.5724 0.000 0.952 0.048 0.000 0.000 0.000
#> GSM1182225     2  0.2823     0.5379 0.000 0.796 0.204 0.000 0.000 0.000
#> GSM1182226     2  0.3221     0.4430 0.000 0.736 0.264 0.000 0.000 0.000
#> GSM1182227     1  0.0260     0.9736 0.992 0.000 0.008 0.000 0.000 0.000
#> GSM1182228     2  0.3706    -0.1674 0.000 0.620 0.380 0.000 0.000 0.000
#> GSM1182229     2  0.1501     0.5718 0.000 0.924 0.076 0.000 0.000 0.000
#> GSM1182230     2  0.2092     0.5500 0.000 0.876 0.124 0.000 0.000 0.000
#> GSM1182231     2  0.2631     0.5599 0.000 0.820 0.180 0.000 0.000 0.000
#> GSM1182232     1  0.0260     0.9736 0.992 0.000 0.008 0.000 0.000 0.000
#> GSM1182233     1  0.0790     0.9726 0.968 0.000 0.032 0.000 0.000 0.000
#> GSM1182234     1  0.0937     0.9709 0.960 0.000 0.040 0.000 0.000 0.000
#> GSM1182235     2  0.2697     0.5308 0.000 0.812 0.188 0.000 0.000 0.000
#> GSM1182236     1  0.0260     0.9736 0.992 0.000 0.008 0.000 0.000 0.000
#> GSM1182237     2  0.2260     0.5732 0.000 0.860 0.140 0.000 0.000 0.000
#> GSM1182238     2  0.3023     0.4908 0.000 0.768 0.232 0.000 0.000 0.000
#> GSM1182239     2  0.3823    -0.5844 0.000 0.564 0.436 0.000 0.000 0.000
#> GSM1182240     3  0.3868     0.7351 0.000 0.496 0.504 0.000 0.000 0.000
#> GSM1182241     3  0.3851     0.8301 0.000 0.460 0.540 0.000 0.000 0.000
#> GSM1182242     2  0.3747    -0.2578 0.000 0.604 0.396 0.000 0.000 0.000
#> GSM1182243     2  0.3126     0.5102 0.000 0.752 0.248 0.000 0.000 0.000
#> GSM1182244     2  0.1444     0.5782 0.000 0.928 0.072 0.000 0.000 0.000
#> GSM1182245     1  0.0260     0.9736 0.992 0.000 0.008 0.000 0.000 0.000
#> GSM1182246     4  0.1267     0.8052 0.000 0.000 0.060 0.940 0.000 0.000
#> GSM1182247     2  0.2378     0.5653 0.000 0.848 0.152 0.000 0.000 0.000
#> GSM1182248     2  0.2762     0.5270 0.000 0.804 0.196 0.000 0.000 0.000
#> GSM1182249     2  0.3309     0.3307 0.000 0.720 0.280 0.000 0.000 0.000
#> GSM1182250     2  0.3717    -0.4138 0.000 0.616 0.384 0.000 0.000 0.000
#> GSM1182251     5  0.0000     0.9467 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182252     2  0.3371     0.4324 0.000 0.708 0.292 0.000 0.000 0.000
#> GSM1182253     2  0.3482     0.0818 0.000 0.684 0.316 0.000 0.000 0.000
#> GSM1182254     2  0.3843    -0.7257 0.000 0.548 0.452 0.000 0.000 0.000
#> GSM1182255     6  0.5951    -0.1972 0.000 0.000 0.220 0.368 0.000 0.412
#> GSM1182256     4  0.3023     0.7407 0.000 0.000 0.232 0.768 0.000 0.000
#> GSM1182257     4  0.0146     0.8127 0.000 0.000 0.004 0.996 0.000 0.000
#> GSM1182258     4  0.0260     0.8114 0.000 0.000 0.008 0.992 0.000 0.000
#> GSM1182259     4  0.1387     0.7968 0.000 0.000 0.068 0.932 0.000 0.000
#> GSM1182260     3  0.3847     0.7917 0.000 0.456 0.544 0.000 0.000 0.000
#> GSM1182261     2  0.2092     0.5565 0.000 0.876 0.124 0.000 0.000 0.000
#> GSM1182262     2  0.2178     0.5891 0.000 0.868 0.132 0.000 0.000 0.000
#> GSM1182263     5  0.0000     0.9467 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182264     3  0.3833     0.8382 0.000 0.444 0.556 0.000 0.000 0.000
#> GSM1182265     3  0.3860     0.7999 0.000 0.472 0.528 0.000 0.000 0.000
#> GSM1182266     3  0.3857     0.7983 0.000 0.468 0.532 0.000 0.000 0.000
#> GSM1182267     1  0.0146     0.9744 0.996 0.000 0.004 0.000 0.000 0.000
#> GSM1182268     1  0.0937     0.9709 0.960 0.000 0.040 0.000 0.000 0.000
#> GSM1182269     1  0.0937     0.9709 0.960 0.000 0.040 0.000 0.000 0.000
#> GSM1182270     1  0.0146     0.9740 0.996 0.000 0.004 0.000 0.000 0.000
#> GSM1182271     4  0.1387     0.7968 0.000 0.000 0.068 0.932 0.000 0.000
#> GSM1182272     4  0.4075     0.6918 0.000 0.000 0.240 0.712 0.000 0.048
#> GSM1182273     3  0.3866     0.6526 0.000 0.484 0.516 0.000 0.000 0.000
#> GSM1182275     2  0.3862    -0.6976 0.000 0.524 0.476 0.000 0.000 0.000
#> GSM1182276     2  0.3515     0.1601 0.000 0.676 0.324 0.000 0.000 0.000
#> GSM1182277     1  0.0146     0.9740 0.996 0.000 0.004 0.000 0.000 0.000
#> GSM1182278     1  0.0260     0.9736 0.992 0.000 0.008 0.000 0.000 0.000
#> GSM1182279     5  0.0000     0.9467 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182280     5  0.0000     0.9467 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182281     5  0.0000     0.9467 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182282     1  0.0260     0.9736 0.992 0.000 0.008 0.000 0.000 0.000
#> GSM1182283     1  0.0790     0.9726 0.968 0.000 0.032 0.000 0.000 0.000
#> GSM1182284     1  0.0260     0.9736 0.992 0.000 0.008 0.000 0.000 0.000
#> GSM1182285     2  0.2260     0.5377 0.000 0.860 0.140 0.000 0.000 0.000
#> GSM1182286     2  0.3563    -0.1508 0.000 0.664 0.336 0.000 0.000 0.000
#> GSM1182287     2  0.2135     0.5310 0.000 0.872 0.128 0.000 0.000 0.000
#> GSM1182288     2  0.3221     0.3918 0.000 0.736 0.264 0.000 0.000 0.000
#> GSM1182289     5  0.0000     0.9467 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182290     1  0.2593     0.8181 0.844 0.000 0.008 0.000 0.148 0.000
#> GSM1182291     4  0.0000     0.8123 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182274     3  0.3810     0.8125 0.000 0.428 0.572 0.000 0.000 0.000
#> GSM1182292     2  0.3737    -0.4206 0.000 0.608 0.392 0.000 0.000 0.000
#> GSM1182293     2  0.2416     0.5320 0.000 0.844 0.156 0.000 0.000 0.000
#> GSM1182294     2  0.1556     0.5831 0.000 0.920 0.080 0.000 0.000 0.000
#> GSM1182295     2  0.2178     0.5457 0.000 0.868 0.132 0.000 0.000 0.000
#> GSM1182296     2  0.1501     0.5888 0.000 0.924 0.076 0.000 0.000 0.000
#> GSM1182298     2  0.2730     0.5180 0.000 0.808 0.192 0.000 0.000 0.000
#> GSM1182299     3  0.3828     0.8013 0.000 0.440 0.560 0.000 0.000 0.000
#> GSM1182300     2  0.2697     0.5211 0.000 0.812 0.188 0.000 0.000 0.000
#> GSM1182301     2  0.3847    -0.6933 0.000 0.544 0.456 0.000 0.000 0.000
#> GSM1182303     2  0.1141     0.5807 0.000 0.948 0.052 0.000 0.000 0.000
#> GSM1182304     5  0.0000     0.9467 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182305     5  0.3911     0.4780 0.000 0.000 0.008 0.000 0.624 0.368
#> GSM1182306     4  0.1387     0.7968 0.000 0.000 0.068 0.932 0.000 0.000
#> GSM1182307     2  0.2912     0.5045 0.000 0.784 0.216 0.000 0.000 0.000
#> GSM1182309     2  0.1556     0.5934 0.000 0.920 0.080 0.000 0.000 0.000
#> GSM1182312     2  0.2697     0.5044 0.000 0.812 0.188 0.000 0.000 0.000
#> GSM1182314     4  0.0146     0.8127 0.000 0.000 0.004 0.996 0.000 0.000
#> GSM1182316     2  0.3843    -0.6295 0.000 0.548 0.452 0.000 0.000 0.000
#> GSM1182318     2  0.3706    -0.3122 0.000 0.620 0.380 0.000 0.000 0.000
#> GSM1182319     2  0.2912     0.5548 0.000 0.784 0.216 0.000 0.000 0.000
#> GSM1182320     2  0.3175     0.5140 0.000 0.744 0.256 0.000 0.000 0.000
#> GSM1182321     2  0.2697     0.5754 0.000 0.812 0.188 0.000 0.000 0.000
#> GSM1182322     2  0.3765    -0.3276 0.000 0.596 0.404 0.000 0.000 0.000
#> GSM1182324     2  0.3151     0.4029 0.000 0.748 0.252 0.000 0.000 0.000
#> GSM1182297     2  0.2996     0.5425 0.000 0.772 0.228 0.000 0.000 0.000
#> GSM1182302     4  0.2730     0.7614 0.000 0.000 0.192 0.808 0.000 0.000
#> GSM1182308     2  0.1957     0.5885 0.000 0.888 0.112 0.000 0.000 0.000
#> GSM1182310     2  0.3198     0.4733 0.000 0.740 0.260 0.000 0.000 0.000
#> GSM1182311     1  0.0937     0.9709 0.960 0.000 0.040 0.000 0.000 0.000
#> GSM1182313     4  0.1387     0.7968 0.000 0.000 0.068 0.932 0.000 0.000
#> GSM1182315     2  0.2854     0.4761 0.000 0.792 0.208 0.000 0.000 0.000
#> GSM1182317     2  0.3547     0.1675 0.000 0.668 0.332 0.000 0.000 0.000
#> GSM1182323     1  0.0260     0.9736 0.992 0.000 0.008 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-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 disease.state(p) gender(p) k
#> ATC:pam 139           0.0773     1.000 2
#> ATC:pam 138           0.0646     0.899 3
#> ATC:pam 138           0.1724     0.793 4
#> ATC:pam 137           0.1858     0.777 5
#> ATC:pam 104           0.0967     0.818 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 46361 rows and 139 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 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-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.4791 0.521   0.521
#> 3 3 0.591           0.840       0.786         0.2677 1.000   1.000
#> 4 4 0.611           0.469       0.739         0.1278 0.830   0.674
#> 5 5 0.616           0.518       0.720         0.0910 0.784   0.482
#> 6 6 0.659           0.580       0.730         0.0643 0.845   0.491

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
#> GSM1182186     1       0          1  1  0
#> GSM1182187     1       0          1  1  0
#> GSM1182188     1       0          1  1  0
#> GSM1182189     1       0          1  1  0
#> GSM1182190     1       0          1  1  0
#> GSM1182191     1       0          1  1  0
#> GSM1182192     1       0          1  1  0
#> GSM1182193     1       0          1  1  0
#> GSM1182194     2       0          1  0  1
#> GSM1182195     2       0          1  0  1
#> GSM1182196     2       0          1  0  1
#> GSM1182197     2       0          1  0  1
#> GSM1182198     2       0          1  0  1
#> GSM1182199     2       0          1  0  1
#> GSM1182200     2       0          1  0  1
#> GSM1182201     2       0          1  0  1
#> GSM1182202     1       0          1  1  0
#> GSM1182203     1       0          1  1  0
#> GSM1182204     1       0          1  1  0
#> GSM1182205     2       0          1  0  1
#> GSM1182206     2       0          1  0  1
#> GSM1182207     1       0          1  1  0
#> GSM1182208     1       0          1  1  0
#> GSM1182209     2       0          1  0  1
#> GSM1182210     2       0          1  0  1
#> GSM1182211     2       0          1  0  1
#> GSM1182212     2       0          1  0  1
#> GSM1182213     2       0          1  0  1
#> GSM1182214     2       0          1  0  1
#> GSM1182215     2       0          1  0  1
#> GSM1182216     2       0          1  0  1
#> GSM1182217     1       0          1  1  0
#> GSM1182218     1       0          1  1  0
#> GSM1182219     2       0          1  0  1
#> GSM1182220     2       0          1  0  1
#> GSM1182221     2       0          1  0  1
#> GSM1182222     2       0          1  0  1
#> GSM1182223     2       0          1  0  1
#> GSM1182224     2       0          1  0  1
#> GSM1182225     2       0          1  0  1
#> GSM1182226     2       0          1  0  1
#> GSM1182227     1       0          1  1  0
#> GSM1182228     2       0          1  0  1
#> GSM1182229     2       0          1  0  1
#> GSM1182230     2       0          1  0  1
#> GSM1182231     2       0          1  0  1
#> GSM1182232     1       0          1  1  0
#> GSM1182233     1       0          1  1  0
#> GSM1182234     1       0          1  1  0
#> GSM1182235     2       0          1  0  1
#> GSM1182236     1       0          1  1  0
#> GSM1182237     2       0          1  0  1
#> GSM1182238     2       0          1  0  1
#> GSM1182239     2       0          1  0  1
#> GSM1182240     2       0          1  0  1
#> GSM1182241     2       0          1  0  1
#> GSM1182242     2       0          1  0  1
#> GSM1182243     2       0          1  0  1
#> GSM1182244     2       0          1  0  1
#> GSM1182245     1       0          1  1  0
#> GSM1182246     1       0          1  1  0
#> GSM1182247     2       0          1  0  1
#> GSM1182248     2       0          1  0  1
#> GSM1182249     2       0          1  0  1
#> GSM1182250     2       0          1  0  1
#> GSM1182251     1       0          1  1  0
#> GSM1182252     2       0          1  0  1
#> GSM1182253     2       0          1  0  1
#> GSM1182254     2       0          1  0  1
#> GSM1182255     1       0          1  1  0
#> GSM1182256     1       0          1  1  0
#> GSM1182257     1       0          1  1  0
#> GSM1182258     1       0          1  1  0
#> GSM1182259     1       0          1  1  0
#> GSM1182260     2       0          1  0  1
#> GSM1182261     2       0          1  0  1
#> GSM1182262     2       0          1  0  1
#> GSM1182263     1       0          1  1  0
#> GSM1182264     2       0          1  0  1
#> GSM1182265     2       0          1  0  1
#> GSM1182266     2       0          1  0  1
#> GSM1182267     1       0          1  1  0
#> GSM1182268     1       0          1  1  0
#> GSM1182269     1       0          1  1  0
#> GSM1182270     1       0          1  1  0
#> GSM1182271     1       0          1  1  0
#> GSM1182272     1       0          1  1  0
#> GSM1182273     2       0          1  0  1
#> GSM1182275     2       0          1  0  1
#> GSM1182276     2       0          1  0  1
#> GSM1182277     1       0          1  1  0
#> GSM1182278     1       0          1  1  0
#> GSM1182279     1       0          1  1  0
#> GSM1182280     1       0          1  1  0
#> GSM1182281     1       0          1  1  0
#> GSM1182282     1       0          1  1  0
#> GSM1182283     1       0          1  1  0
#> GSM1182284     1       0          1  1  0
#> GSM1182285     2       0          1  0  1
#> GSM1182286     2       0          1  0  1
#> GSM1182287     2       0          1  0  1
#> GSM1182288     2       0          1  0  1
#> GSM1182289     1       0          1  1  0
#> GSM1182290     1       0          1  1  0
#> GSM1182291     1       0          1  1  0
#> GSM1182274     2       0          1  0  1
#> GSM1182292     2       0          1  0  1
#> GSM1182293     2       0          1  0  1
#> GSM1182294     2       0          1  0  1
#> GSM1182295     2       0          1  0  1
#> GSM1182296     2       0          1  0  1
#> GSM1182298     2       0          1  0  1
#> GSM1182299     2       0          1  0  1
#> GSM1182300     2       0          1  0  1
#> GSM1182301     2       0          1  0  1
#> GSM1182303     2       0          1  0  1
#> GSM1182304     1       0          1  1  0
#> GSM1182305     1       0          1  1  0
#> GSM1182306     1       0          1  1  0
#> GSM1182307     2       0          1  0  1
#> GSM1182309     2       0          1  0  1
#> GSM1182312     2       0          1  0  1
#> GSM1182314     1       0          1  1  0
#> GSM1182316     2       0          1  0  1
#> GSM1182318     2       0          1  0  1
#> GSM1182319     2       0          1  0  1
#> GSM1182320     2       0          1  0  1
#> GSM1182321     2       0          1  0  1
#> GSM1182322     2       0          1  0  1
#> GSM1182324     2       0          1  0  1
#> GSM1182297     2       0          1  0  1
#> GSM1182302     1       0          1  1  0
#> GSM1182308     2       0          1  0  1
#> GSM1182310     2       0          1  0  1
#> GSM1182311     1       0          1  1  0
#> GSM1182313     1       0          1  1  0
#> GSM1182315     2       0          1  0  1
#> GSM1182317     2       0          1  0  1
#> GSM1182323     1       0          1  1  0

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1182186     1  0.5397      0.881 0.720 0.000 0.280
#> GSM1182187     1  0.6008      0.868 0.628 0.000 0.372
#> GSM1182188     1  0.6008      0.868 0.628 0.000 0.372
#> GSM1182189     1  0.0000      0.854 1.000 0.000 0.000
#> GSM1182190     1  0.0000      0.854 1.000 0.000 0.000
#> GSM1182191     1  0.5397      0.881 0.720 0.000 0.280
#> GSM1182192     1  0.0000      0.854 1.000 0.000 0.000
#> GSM1182193     1  0.0000      0.854 1.000 0.000 0.000
#> GSM1182194     2  0.2356      0.816 0.000 0.928 0.072
#> GSM1182195     2  0.2261      0.815 0.000 0.932 0.068
#> GSM1182196     2  0.4750      0.837 0.000 0.784 0.216
#> GSM1182197     2  0.6154      0.817 0.000 0.592 0.408
#> GSM1182198     2  0.3816      0.833 0.000 0.852 0.148
#> GSM1182199     2  0.2959      0.817 0.000 0.900 0.100
#> GSM1182200     2  0.6026      0.826 0.000 0.624 0.376
#> GSM1182201     2  0.5465      0.825 0.000 0.712 0.288
#> GSM1182202     1  0.6008      0.868 0.628 0.000 0.372
#> GSM1182203     1  0.6008      0.868 0.628 0.000 0.372
#> GSM1182204     1  0.6008      0.868 0.628 0.000 0.372
#> GSM1182205     2  0.3686      0.785 0.000 0.860 0.140
#> GSM1182206     2  0.3816      0.782 0.000 0.852 0.148
#> GSM1182207     1  0.5138      0.884 0.748 0.000 0.252
#> GSM1182208     1  0.5138      0.884 0.748 0.000 0.252
#> GSM1182209     2  0.6180      0.812 0.000 0.584 0.416
#> GSM1182210     2  0.5905      0.842 0.000 0.648 0.352
#> GSM1182211     2  0.6095      0.830 0.000 0.608 0.392
#> GSM1182212     2  0.6045      0.831 0.000 0.620 0.380
#> GSM1182213     2  0.6126      0.821 0.000 0.600 0.400
#> GSM1182214     2  0.6140      0.828 0.000 0.596 0.404
#> GSM1182215     2  0.2711      0.809 0.000 0.912 0.088
#> GSM1182216     2  0.6154      0.827 0.000 0.592 0.408
#> GSM1182217     1  0.5988      0.869 0.632 0.000 0.368
#> GSM1182218     1  0.0000      0.854 1.000 0.000 0.000
#> GSM1182219     2  0.4235      0.781 0.000 0.824 0.176
#> GSM1182220     2  0.4931      0.796 0.000 0.768 0.232
#> GSM1182221     2  0.5785      0.848 0.000 0.668 0.332
#> GSM1182222     2  0.5529      0.805 0.000 0.704 0.296
#> GSM1182223     2  0.3941      0.776 0.000 0.844 0.156
#> GSM1182224     2  0.3941      0.776 0.000 0.844 0.156
#> GSM1182225     2  0.5988      0.838 0.000 0.632 0.368
#> GSM1182226     2  0.5988      0.832 0.000 0.632 0.368
#> GSM1182227     1  0.0000      0.854 1.000 0.000 0.000
#> GSM1182228     2  0.3816      0.847 0.000 0.852 0.148
#> GSM1182229     2  0.3941      0.776 0.000 0.844 0.156
#> GSM1182230     2  0.2878      0.806 0.000 0.904 0.096
#> GSM1182231     2  0.1529      0.839 0.000 0.960 0.040
#> GSM1182232     1  0.0000      0.854 1.000 0.000 0.000
#> GSM1182233     1  0.0000      0.854 1.000 0.000 0.000
#> GSM1182234     1  0.0000      0.854 1.000 0.000 0.000
#> GSM1182235     2  0.6045      0.823 0.000 0.620 0.380
#> GSM1182236     1  0.0000      0.854 1.000 0.000 0.000
#> GSM1182237     2  0.3038      0.803 0.000 0.896 0.104
#> GSM1182238     2  0.6168      0.827 0.000 0.588 0.412
#> GSM1182239     2  0.6286      0.795 0.000 0.536 0.464
#> GSM1182240     2  0.6192      0.810 0.000 0.580 0.420
#> GSM1182241     2  0.5327      0.814 0.000 0.728 0.272
#> GSM1182242     2  0.2261      0.827 0.000 0.932 0.068
#> GSM1182243     2  0.1753      0.842 0.000 0.952 0.048
#> GSM1182244     2  0.2165      0.819 0.000 0.936 0.064
#> GSM1182245     1  0.0000      0.854 1.000 0.000 0.000
#> GSM1182246     1  0.6008      0.868 0.628 0.000 0.372
#> GSM1182247     2  0.1529      0.825 0.000 0.960 0.040
#> GSM1182248     2  0.0892      0.828 0.000 0.980 0.020
#> GSM1182249     2  0.4399      0.846 0.000 0.812 0.188
#> GSM1182250     2  0.4750      0.843 0.000 0.784 0.216
#> GSM1182251     1  0.5138      0.884 0.748 0.000 0.252
#> GSM1182252     2  0.1411      0.823 0.000 0.964 0.036
#> GSM1182253     2  0.2959      0.804 0.000 0.900 0.100
#> GSM1182254     2  0.6062      0.826 0.000 0.616 0.384
#> GSM1182255     1  0.6008      0.868 0.628 0.000 0.372
#> GSM1182256     1  0.6008      0.868 0.628 0.000 0.372
#> GSM1182257     1  0.6008      0.868 0.628 0.000 0.372
#> GSM1182258     1  0.6008      0.868 0.628 0.000 0.372
#> GSM1182259     1  0.6008      0.868 0.628 0.000 0.372
#> GSM1182260     2  0.5926      0.832 0.000 0.644 0.356
#> GSM1182261     2  0.3412      0.843 0.000 0.876 0.124
#> GSM1182262     2  0.3340      0.842 0.000 0.880 0.120
#> GSM1182263     1  0.5138      0.884 0.748 0.000 0.252
#> GSM1182264     2  0.5397      0.811 0.000 0.720 0.280
#> GSM1182265     2  0.5291      0.814 0.000 0.732 0.268
#> GSM1182266     2  0.5363      0.812 0.000 0.724 0.276
#> GSM1182267     1  0.0000      0.854 1.000 0.000 0.000
#> GSM1182268     1  0.0000      0.854 1.000 0.000 0.000
#> GSM1182269     1  0.0000      0.854 1.000 0.000 0.000
#> GSM1182270     1  0.0000      0.854 1.000 0.000 0.000
#> GSM1182271     1  0.6008      0.868 0.628 0.000 0.372
#> GSM1182272     1  0.6008      0.868 0.628 0.000 0.372
#> GSM1182273     2  0.5254      0.814 0.000 0.736 0.264
#> GSM1182275     2  0.4291      0.842 0.000 0.820 0.180
#> GSM1182276     2  0.5327      0.821 0.000 0.728 0.272
#> GSM1182277     1  0.0000      0.854 1.000 0.000 0.000
#> GSM1182278     1  0.0000      0.854 1.000 0.000 0.000
#> GSM1182279     1  0.5138      0.884 0.748 0.000 0.252
#> GSM1182280     1  0.5138      0.884 0.748 0.000 0.252
#> GSM1182281     1  0.5138      0.884 0.748 0.000 0.252
#> GSM1182282     1  0.0000      0.854 1.000 0.000 0.000
#> GSM1182283     1  0.0000      0.854 1.000 0.000 0.000
#> GSM1182284     1  0.0237      0.855 0.996 0.000 0.004
#> GSM1182285     2  0.2448      0.813 0.000 0.924 0.076
#> GSM1182286     2  0.4796      0.856 0.000 0.780 0.220
#> GSM1182287     2  0.1643      0.839 0.000 0.956 0.044
#> GSM1182288     2  0.2066      0.819 0.000 0.940 0.060
#> GSM1182289     1  0.5138      0.884 0.748 0.000 0.252
#> GSM1182290     1  0.5138      0.884 0.748 0.000 0.252
#> GSM1182291     1  0.6008      0.868 0.628 0.000 0.372
#> GSM1182274     2  0.5254      0.814 0.000 0.736 0.264
#> GSM1182292     2  0.6111      0.821 0.000 0.604 0.396
#> GSM1182293     2  0.4702      0.837 0.000 0.788 0.212
#> GSM1182294     2  0.4399      0.840 0.000 0.812 0.188
#> GSM1182295     2  0.5254      0.841 0.000 0.736 0.264
#> GSM1182296     2  0.5529      0.840 0.000 0.704 0.296
#> GSM1182298     2  0.2537      0.817 0.000 0.920 0.080
#> GSM1182299     2  0.6291      0.793 0.000 0.532 0.468
#> GSM1182300     2  0.4654      0.837 0.000 0.792 0.208
#> GSM1182301     2  0.5882      0.833 0.000 0.652 0.348
#> GSM1182303     2  0.4654      0.837 0.000 0.792 0.208
#> GSM1182304     1  0.5138      0.884 0.748 0.000 0.252
#> GSM1182305     1  0.5138      0.884 0.748 0.000 0.252
#> GSM1182306     1  0.6008      0.868 0.628 0.000 0.372
#> GSM1182307     2  0.5948      0.834 0.000 0.640 0.360
#> GSM1182309     2  0.4452      0.839 0.000 0.808 0.192
#> GSM1182312     2  0.5678      0.841 0.000 0.684 0.316
#> GSM1182314     1  0.6008      0.868 0.628 0.000 0.372
#> GSM1182316     2  0.6140      0.820 0.000 0.596 0.404
#> GSM1182318     2  0.6140      0.819 0.000 0.596 0.404
#> GSM1182319     2  0.4235      0.839 0.000 0.824 0.176
#> GSM1182320     2  0.6026      0.828 0.000 0.624 0.376
#> GSM1182321     2  0.4235      0.839 0.000 0.824 0.176
#> GSM1182322     2  0.6079      0.825 0.000 0.612 0.388
#> GSM1182324     2  0.4346      0.840 0.000 0.816 0.184
#> GSM1182297     2  0.5733      0.841 0.000 0.676 0.324
#> GSM1182302     1  0.6008      0.868 0.628 0.000 0.372
#> GSM1182308     2  0.4702      0.837 0.000 0.788 0.212
#> GSM1182310     2  0.4346      0.840 0.000 0.816 0.184
#> GSM1182311     1  0.0237      0.855 0.996 0.000 0.004
#> GSM1182313     1  0.6008      0.868 0.628 0.000 0.372
#> GSM1182315     2  0.5591      0.839 0.000 0.696 0.304
#> GSM1182317     2  0.5968      0.829 0.000 0.636 0.364
#> GSM1182323     1  0.0237      0.855 0.996 0.000 0.004

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1182186     4  0.7646    -0.1890 0.384 0.000 0.208 0.408
#> GSM1182187     4  0.0000     0.9286 0.000 0.000 0.000 1.000
#> GSM1182188     4  0.0000     0.9286 0.000 0.000 0.000 1.000
#> GSM1182189     1  0.0000     0.8521 1.000 0.000 0.000 0.000
#> GSM1182190     1  0.0000     0.8521 1.000 0.000 0.000 0.000
#> GSM1182191     4  0.7646    -0.1890 0.384 0.000 0.208 0.408
#> GSM1182192     1  0.0000     0.8521 1.000 0.000 0.000 0.000
#> GSM1182193     1  0.0000     0.8521 1.000 0.000 0.000 0.000
#> GSM1182194     2  0.4994    -0.5991 0.000 0.520 0.480 0.000
#> GSM1182195     2  0.4999    -0.6578 0.000 0.508 0.492 0.000
#> GSM1182196     2  0.3266     0.3355 0.000 0.832 0.168 0.000
#> GSM1182197     2  0.2281     0.4731 0.000 0.904 0.096 0.000
#> GSM1182198     2  0.4972    -0.1305 0.000 0.544 0.456 0.000
#> GSM1182199     2  0.4999    -0.4824 0.000 0.508 0.492 0.000
#> GSM1182200     2  0.4477     0.4103 0.000 0.688 0.312 0.000
#> GSM1182201     2  0.4605     0.3490 0.000 0.664 0.336 0.000
#> GSM1182202     4  0.0000     0.9286 0.000 0.000 0.000 1.000
#> GSM1182203     4  0.0000     0.9286 0.000 0.000 0.000 1.000
#> GSM1182204     4  0.0000     0.9286 0.000 0.000 0.000 1.000
#> GSM1182205     3  0.4961     0.8276 0.000 0.448 0.552 0.000
#> GSM1182206     3  0.4925     0.8367 0.000 0.428 0.572 0.000
#> GSM1182207     1  0.7007     0.6141 0.580 0.000 0.208 0.212
#> GSM1182208     1  0.7007     0.6141 0.580 0.000 0.208 0.212
#> GSM1182209     2  0.4500     0.3935 0.000 0.684 0.316 0.000
#> GSM1182210     2  0.4679     0.1780 0.000 0.648 0.352 0.000
#> GSM1182211     2  0.4605     0.2458 0.000 0.664 0.336 0.000
#> GSM1182212     2  0.4585     0.3097 0.000 0.668 0.332 0.000
#> GSM1182213     2  0.4661     0.3632 0.000 0.652 0.348 0.000
#> GSM1182214     2  0.4543     0.2941 0.000 0.676 0.324 0.000
#> GSM1182215     3  0.4989     0.7859 0.000 0.472 0.528 0.000
#> GSM1182216     2  0.4643     0.3080 0.000 0.656 0.344 0.000
#> GSM1182217     4  0.3725     0.7666 0.008 0.000 0.180 0.812
#> GSM1182218     1  0.0000     0.8521 1.000 0.000 0.000 0.000
#> GSM1182219     3  0.4830     0.7793 0.000 0.392 0.608 0.000
#> GSM1182220     3  0.4925     0.7106 0.000 0.428 0.572 0.000
#> GSM1182221     2  0.4406     0.2124 0.000 0.700 0.300 0.000
#> GSM1182222     3  0.4992     0.5520 0.000 0.476 0.524 0.000
#> GSM1182223     3  0.4907     0.8344 0.000 0.420 0.580 0.000
#> GSM1182224     3  0.4907     0.8344 0.000 0.420 0.580 0.000
#> GSM1182225     2  0.4624     0.2341 0.000 0.660 0.340 0.000
#> GSM1182226     2  0.4522     0.3168 0.000 0.680 0.320 0.000
#> GSM1182227     1  0.0000     0.8521 1.000 0.000 0.000 0.000
#> GSM1182228     2  0.4331     0.1657 0.000 0.712 0.288 0.000
#> GSM1182229     3  0.4916     0.8365 0.000 0.424 0.576 0.000
#> GSM1182230     3  0.4999     0.6876 0.000 0.492 0.508 0.000
#> GSM1182231     2  0.4661    -0.1279 0.000 0.652 0.348 0.000
#> GSM1182232     1  0.0000     0.8521 1.000 0.000 0.000 0.000
#> GSM1182233     1  0.0000     0.8521 1.000 0.000 0.000 0.000
#> GSM1182234     1  0.0000     0.8521 1.000 0.000 0.000 0.000
#> GSM1182235     2  0.4967    -0.3619 0.000 0.548 0.452 0.000
#> GSM1182236     1  0.0000     0.8521 1.000 0.000 0.000 0.000
#> GSM1182237     3  0.4961     0.8267 0.000 0.448 0.552 0.000
#> GSM1182238     2  0.4713     0.2635 0.000 0.640 0.360 0.000
#> GSM1182239     2  0.3569     0.4328 0.000 0.804 0.196 0.000
#> GSM1182240     2  0.4500     0.4038 0.000 0.684 0.316 0.000
#> GSM1182241     2  0.4643     0.3569 0.000 0.656 0.344 0.000
#> GSM1182242     2  0.4933    -0.5068 0.000 0.568 0.432 0.000
#> GSM1182243     2  0.4679    -0.0860 0.000 0.648 0.352 0.000
#> GSM1182244     2  0.4985    -0.5832 0.000 0.532 0.468 0.000
#> GSM1182245     1  0.0188     0.8511 0.996 0.000 0.004 0.000
#> GSM1182246     4  0.0000     0.9286 0.000 0.000 0.000 1.000
#> GSM1182247     2  0.4933    -0.4709 0.000 0.568 0.432 0.000
#> GSM1182248     2  0.4877    -0.2698 0.000 0.592 0.408 0.000
#> GSM1182249     2  0.4040     0.3167 0.000 0.752 0.248 0.000
#> GSM1182250     2  0.3649     0.3963 0.000 0.796 0.204 0.000
#> GSM1182251     1  0.7007     0.6141 0.580 0.000 0.208 0.212
#> GSM1182252     2  0.4933    -0.4695 0.000 0.568 0.432 0.000
#> GSM1182253     3  0.4977     0.8044 0.000 0.460 0.540 0.000
#> GSM1182254     2  0.1792     0.4842 0.000 0.932 0.068 0.000
#> GSM1182255     4  0.0000     0.9286 0.000 0.000 0.000 1.000
#> GSM1182256     4  0.0000     0.9286 0.000 0.000 0.000 1.000
#> GSM1182257     4  0.0000     0.9286 0.000 0.000 0.000 1.000
#> GSM1182258     4  0.0000     0.9286 0.000 0.000 0.000 1.000
#> GSM1182259     4  0.0000     0.9286 0.000 0.000 0.000 1.000
#> GSM1182260     2  0.2149     0.4783 0.000 0.912 0.088 0.000
#> GSM1182261     2  0.4500    -0.0386 0.000 0.684 0.316 0.000
#> GSM1182262     2  0.3764     0.2443 0.000 0.784 0.216 0.000
#> GSM1182263     1  0.7007     0.6141 0.580 0.000 0.208 0.212
#> GSM1182264     2  0.4888     0.2639 0.000 0.588 0.412 0.000
#> GSM1182265     2  0.4866     0.2839 0.000 0.596 0.404 0.000
#> GSM1182266     2  0.4830     0.2888 0.000 0.608 0.392 0.000
#> GSM1182267     1  0.0000     0.8521 1.000 0.000 0.000 0.000
#> GSM1182268     1  0.0000     0.8521 1.000 0.000 0.000 0.000
#> GSM1182269     1  0.0000     0.8521 1.000 0.000 0.000 0.000
#> GSM1182270     1  0.0000     0.8521 1.000 0.000 0.000 0.000
#> GSM1182271     4  0.0000     0.9286 0.000 0.000 0.000 1.000
#> GSM1182272     4  0.0000     0.9286 0.000 0.000 0.000 1.000
#> GSM1182273     2  0.4746     0.3270 0.000 0.632 0.368 0.000
#> GSM1182275     2  0.4790    -0.0669 0.000 0.620 0.380 0.000
#> GSM1182276     3  0.4994     0.6057 0.000 0.480 0.520 0.000
#> GSM1182277     1  0.0000     0.8521 1.000 0.000 0.000 0.000
#> GSM1182278     1  0.0000     0.8521 1.000 0.000 0.000 0.000
#> GSM1182279     1  0.7007     0.6141 0.580 0.000 0.208 0.212
#> GSM1182280     1  0.7007     0.6141 0.580 0.000 0.208 0.212
#> GSM1182281     1  0.6745     0.6301 0.612 0.000 0.176 0.212
#> GSM1182282     1  0.0000     0.8521 1.000 0.000 0.000 0.000
#> GSM1182283     1  0.0000     0.8521 1.000 0.000 0.000 0.000
#> GSM1182284     1  0.0188     0.8507 0.996 0.000 0.000 0.004
#> GSM1182285     2  0.4996    -0.6470 0.000 0.516 0.484 0.000
#> GSM1182286     2  0.3610     0.3195 0.000 0.800 0.200 0.000
#> GSM1182287     2  0.4522    -0.0512 0.000 0.680 0.320 0.000
#> GSM1182288     2  0.4961    -0.5497 0.000 0.552 0.448 0.000
#> GSM1182289     1  0.7007     0.6141 0.580 0.000 0.208 0.212
#> GSM1182290     1  0.7007     0.6141 0.580 0.000 0.208 0.212
#> GSM1182291     4  0.0000     0.9286 0.000 0.000 0.000 1.000
#> GSM1182274     2  0.4746     0.3270 0.000 0.632 0.368 0.000
#> GSM1182292     2  0.2216     0.4813 0.000 0.908 0.092 0.000
#> GSM1182293     2  0.3610     0.3369 0.000 0.800 0.200 0.000
#> GSM1182294     2  0.3444     0.3158 0.000 0.816 0.184 0.000
#> GSM1182295     2  0.3219     0.3870 0.000 0.836 0.164 0.000
#> GSM1182296     2  0.2704     0.4261 0.000 0.876 0.124 0.000
#> GSM1182298     2  0.4985    -0.5517 0.000 0.532 0.468 0.000
#> GSM1182299     2  0.3528     0.4298 0.000 0.808 0.192 0.000
#> GSM1182300     2  0.3400     0.3417 0.000 0.820 0.180 0.000
#> GSM1182301     2  0.2408     0.4642 0.000 0.896 0.104 0.000
#> GSM1182303     2  0.3610     0.3325 0.000 0.800 0.200 0.000
#> GSM1182304     1  0.7007     0.6141 0.580 0.000 0.208 0.212
#> GSM1182305     1  0.7007     0.6141 0.580 0.000 0.208 0.212
#> GSM1182306     4  0.0000     0.9286 0.000 0.000 0.000 1.000
#> GSM1182307     2  0.3528     0.4397 0.000 0.808 0.192 0.000
#> GSM1182309     2  0.3764     0.3235 0.000 0.784 0.216 0.000
#> GSM1182312     2  0.3074     0.4225 0.000 0.848 0.152 0.000
#> GSM1182314     4  0.0000     0.9286 0.000 0.000 0.000 1.000
#> GSM1182316     2  0.2530     0.4652 0.000 0.888 0.112 0.000
#> GSM1182318     2  0.1867     0.4799 0.000 0.928 0.072 0.000
#> GSM1182319     2  0.3266     0.3248 0.000 0.832 0.168 0.000
#> GSM1182320     2  0.2345     0.4852 0.000 0.900 0.100 0.000
#> GSM1182321     2  0.3400     0.3108 0.000 0.820 0.180 0.000
#> GSM1182322     2  0.2281     0.4774 0.000 0.904 0.096 0.000
#> GSM1182324     2  0.3266     0.3251 0.000 0.832 0.168 0.000
#> GSM1182297     2  0.2868     0.4657 0.000 0.864 0.136 0.000
#> GSM1182302     4  0.0000     0.9286 0.000 0.000 0.000 1.000
#> GSM1182308     2  0.3688     0.3272 0.000 0.792 0.208 0.000
#> GSM1182310     2  0.3311     0.3217 0.000 0.828 0.172 0.000
#> GSM1182311     1  0.0817     0.8448 0.976 0.000 0.024 0.000
#> GSM1182313     4  0.0000     0.9286 0.000 0.000 0.000 1.000
#> GSM1182315     2  0.2589     0.4275 0.000 0.884 0.116 0.000
#> GSM1182317     2  0.1302     0.4666 0.000 0.956 0.044 0.000
#> GSM1182323     1  0.0921     0.8433 0.972 0.000 0.028 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
#> GSM1182186     5  0.5447    0.75946 0.172 0.000 0.000 0.168 0.660
#> GSM1182187     4  0.0000    0.98429 0.000 0.000 0.000 1.000 0.000
#> GSM1182188     4  0.0000    0.98429 0.000 0.000 0.000 1.000 0.000
#> GSM1182189     1  0.0000    0.97186 1.000 0.000 0.000 0.000 0.000
#> GSM1182190     1  0.0000    0.97186 1.000 0.000 0.000 0.000 0.000
#> GSM1182191     5  0.5447    0.75946 0.172 0.000 0.000 0.168 0.660
#> GSM1182192     1  0.0000    0.97186 1.000 0.000 0.000 0.000 0.000
#> GSM1182193     1  0.0000    0.97186 1.000 0.000 0.000 0.000 0.000
#> GSM1182194     3  0.3409    0.35409 0.000 0.144 0.824 0.000 0.032
#> GSM1182195     3  0.2535    0.43558 0.000 0.076 0.892 0.000 0.032
#> GSM1182196     3  0.5831    0.20641 0.000 0.160 0.604 0.000 0.236
#> GSM1182197     2  0.5483    0.37334 0.000 0.512 0.424 0.000 0.064
#> GSM1182198     3  0.4808   -0.07706 0.000 0.348 0.620 0.000 0.032
#> GSM1182199     3  0.3977    0.26477 0.000 0.204 0.764 0.000 0.032
#> GSM1182200     2  0.4238    0.38892 0.000 0.628 0.368 0.000 0.004
#> GSM1182201     3  0.4942    0.01933 0.000 0.432 0.540 0.000 0.028
#> GSM1182202     4  0.0000    0.98429 0.000 0.000 0.000 1.000 0.000
#> GSM1182203     4  0.0000    0.98429 0.000 0.000 0.000 1.000 0.000
#> GSM1182204     4  0.0000    0.98429 0.000 0.000 0.000 1.000 0.000
#> GSM1182205     3  0.3757    0.42192 0.000 0.208 0.772 0.000 0.020
#> GSM1182206     3  0.4113    0.39926 0.000 0.232 0.740 0.000 0.028
#> GSM1182207     5  0.4306    0.94531 0.328 0.000 0.000 0.012 0.660
#> GSM1182208     5  0.4306    0.94531 0.328 0.000 0.000 0.012 0.660
#> GSM1182209     2  0.4288    0.30504 0.000 0.612 0.384 0.000 0.004
#> GSM1182210     3  0.4557    0.17423 0.000 0.476 0.516 0.000 0.008
#> GSM1182211     3  0.4256    0.22280 0.000 0.436 0.564 0.000 0.000
#> GSM1182212     2  0.4291    0.00341 0.000 0.536 0.464 0.000 0.000
#> GSM1182213     2  0.3999    0.30557 0.000 0.656 0.344 0.000 0.000
#> GSM1182214     2  0.4450   -0.11673 0.000 0.508 0.488 0.000 0.004
#> GSM1182215     3  0.3958    0.42296 0.000 0.184 0.776 0.000 0.040
#> GSM1182216     2  0.4114    0.06859 0.000 0.624 0.376 0.000 0.000
#> GSM1182217     4  0.3766    0.61947 0.004 0.000 0.000 0.728 0.268
#> GSM1182218     1  0.0000    0.97186 1.000 0.000 0.000 0.000 0.000
#> GSM1182219     3  0.4958    0.31745 0.000 0.372 0.592 0.000 0.036
#> GSM1182220     3  0.4555    0.23483 0.000 0.472 0.520 0.000 0.008
#> GSM1182221     3  0.4557    0.19464 0.000 0.476 0.516 0.000 0.008
#> GSM1182222     3  0.4560    0.22156 0.000 0.484 0.508 0.000 0.008
#> GSM1182223     3  0.4254    0.39296 0.000 0.220 0.740 0.000 0.040
#> GSM1182224     3  0.3849    0.39870 0.000 0.232 0.752 0.000 0.016
#> GSM1182225     3  0.4437    0.18016 0.000 0.464 0.532 0.000 0.004
#> GSM1182226     2  0.4227    0.06828 0.000 0.580 0.420 0.000 0.000
#> GSM1182227     1  0.0000    0.97186 1.000 0.000 0.000 0.000 0.000
#> GSM1182228     3  0.6738   -0.35964 0.000 0.320 0.408 0.000 0.272
#> GSM1182229     3  0.4254    0.39296 0.000 0.220 0.740 0.000 0.040
#> GSM1182230     3  0.3278    0.44389 0.000 0.156 0.824 0.000 0.020
#> GSM1182231     3  0.3806    0.43286 0.000 0.084 0.812 0.000 0.104
#> GSM1182232     1  0.0000    0.97186 1.000 0.000 0.000 0.000 0.000
#> GSM1182233     1  0.0000    0.97186 1.000 0.000 0.000 0.000 0.000
#> GSM1182234     1  0.0000    0.97186 1.000 0.000 0.000 0.000 0.000
#> GSM1182235     2  0.4307   -0.24595 0.000 0.500 0.500 0.000 0.000
#> GSM1182236     1  0.0000    0.97186 1.000 0.000 0.000 0.000 0.000
#> GSM1182237     3  0.4028    0.41824 0.000 0.192 0.768 0.000 0.040
#> GSM1182238     2  0.4383   -0.03188 0.000 0.572 0.424 0.000 0.004
#> GSM1182239     2  0.4184    0.48475 0.000 0.700 0.284 0.000 0.016
#> GSM1182240     2  0.3949    0.45900 0.000 0.668 0.332 0.000 0.000
#> GSM1182241     2  0.6046    0.47081 0.000 0.524 0.344 0.000 0.132
#> GSM1182242     3  0.2540    0.42969 0.000 0.088 0.888 0.000 0.024
#> GSM1182243     3  0.3242    0.36746 0.000 0.116 0.844 0.000 0.040
#> GSM1182244     3  0.2712    0.46368 0.000 0.088 0.880 0.000 0.032
#> GSM1182245     1  0.0162    0.96797 0.996 0.000 0.000 0.000 0.004
#> GSM1182246     4  0.0000    0.98429 0.000 0.000 0.000 1.000 0.000
#> GSM1182247     3  0.3051    0.45275 0.000 0.120 0.852 0.000 0.028
#> GSM1182248     3  0.2278    0.45319 0.000 0.060 0.908 0.000 0.032
#> GSM1182249     3  0.5642    0.11358 0.000 0.136 0.624 0.000 0.240
#> GSM1182250     3  0.6455   -0.24873 0.000 0.264 0.500 0.000 0.236
#> GSM1182251     5  0.4306    0.94531 0.328 0.000 0.000 0.012 0.660
#> GSM1182252     3  0.2570    0.46240 0.000 0.084 0.888 0.000 0.028
#> GSM1182253     3  0.3550    0.43345 0.000 0.184 0.796 0.000 0.020
#> GSM1182254     3  0.6388   -0.16712 0.000 0.284 0.508 0.000 0.208
#> GSM1182255     4  0.0000    0.98429 0.000 0.000 0.000 1.000 0.000
#> GSM1182256     4  0.0000    0.98429 0.000 0.000 0.000 1.000 0.000
#> GSM1182257     4  0.0000    0.98429 0.000 0.000 0.000 1.000 0.000
#> GSM1182258     4  0.0000    0.98429 0.000 0.000 0.000 1.000 0.000
#> GSM1182259     4  0.0000    0.98429 0.000 0.000 0.000 1.000 0.000
#> GSM1182260     3  0.6574   -0.25239 0.000 0.288 0.468 0.000 0.244
#> GSM1182261     3  0.2850    0.46268 0.000 0.092 0.872 0.000 0.036
#> GSM1182262     3  0.4010    0.37286 0.000 0.136 0.792 0.000 0.072
#> GSM1182263     5  0.4306    0.94531 0.328 0.000 0.000 0.012 0.660
#> GSM1182264     2  0.6773    0.39161 0.000 0.396 0.304 0.000 0.300
#> GSM1182265     2  0.6734    0.37404 0.000 0.408 0.324 0.000 0.268
#> GSM1182266     2  0.6792    0.39067 0.000 0.380 0.324 0.000 0.296
#> GSM1182267     1  0.0000    0.97186 1.000 0.000 0.000 0.000 0.000
#> GSM1182268     1  0.0000    0.97186 1.000 0.000 0.000 0.000 0.000
#> GSM1182269     1  0.0000    0.97186 1.000 0.000 0.000 0.000 0.000
#> GSM1182270     1  0.0000    0.97186 1.000 0.000 0.000 0.000 0.000
#> GSM1182271     4  0.0000    0.98429 0.000 0.000 0.000 1.000 0.000
#> GSM1182272     4  0.0000    0.98429 0.000 0.000 0.000 1.000 0.000
#> GSM1182273     2  0.6783    0.39128 0.000 0.388 0.316 0.000 0.296
#> GSM1182275     3  0.5188    0.19373 0.000 0.328 0.612 0.000 0.060
#> GSM1182276     3  0.4555    0.23365 0.000 0.472 0.520 0.000 0.008
#> GSM1182277     1  0.0000    0.97186 1.000 0.000 0.000 0.000 0.000
#> GSM1182278     1  0.0000    0.97186 1.000 0.000 0.000 0.000 0.000
#> GSM1182279     5  0.4306    0.94531 0.328 0.000 0.000 0.012 0.660
#> GSM1182280     5  0.4306    0.94531 0.328 0.000 0.000 0.012 0.660
#> GSM1182281     1  0.5433   -0.02437 0.620 0.000 0.000 0.092 0.288
#> GSM1182282     1  0.0000    0.97186 1.000 0.000 0.000 0.000 0.000
#> GSM1182283     1  0.0000    0.97186 1.000 0.000 0.000 0.000 0.000
#> GSM1182284     1  0.0290    0.96350 0.992 0.000 0.000 0.000 0.008
#> GSM1182285     3  0.2344    0.44597 0.000 0.064 0.904 0.000 0.032
#> GSM1182286     3  0.4199    0.38419 0.000 0.180 0.764 0.000 0.056
#> GSM1182287     3  0.2139    0.45621 0.000 0.052 0.916 0.000 0.032
#> GSM1182288     3  0.2388    0.46145 0.000 0.072 0.900 0.000 0.028
#> GSM1182289     5  0.4306    0.94531 0.328 0.000 0.000 0.012 0.660
#> GSM1182290     5  0.4306    0.94531 0.328 0.000 0.000 0.012 0.660
#> GSM1182291     4  0.0000    0.98429 0.000 0.000 0.000 1.000 0.000
#> GSM1182274     2  0.6555    0.43257 0.000 0.460 0.320 0.000 0.220
#> GSM1182292     2  0.4562    0.27396 0.000 0.500 0.492 0.000 0.008
#> GSM1182293     3  0.5708    0.15649 0.000 0.300 0.588 0.000 0.112
#> GSM1182294     3  0.5472    0.23520 0.000 0.156 0.656 0.000 0.188
#> GSM1182295     3  0.4419    0.25812 0.000 0.312 0.668 0.000 0.020
#> GSM1182296     3  0.5252    0.02368 0.000 0.364 0.580 0.000 0.056
#> GSM1182298     3  0.2654    0.42308 0.000 0.084 0.884 0.000 0.032
#> GSM1182299     2  0.4138    0.48456 0.000 0.708 0.276 0.000 0.016
#> GSM1182300     3  0.6018    0.06039 0.000 0.272 0.568 0.000 0.160
#> GSM1182301     2  0.5071    0.38166 0.000 0.540 0.424 0.000 0.036
#> GSM1182303     3  0.5851    0.15971 0.000 0.288 0.580 0.000 0.132
#> GSM1182304     5  0.4306    0.94531 0.328 0.000 0.000 0.012 0.660
#> GSM1182305     5  0.4306    0.94531 0.328 0.000 0.000 0.012 0.660
#> GSM1182306     4  0.0000    0.98429 0.000 0.000 0.000 1.000 0.000
#> GSM1182307     3  0.4305    0.03391 0.000 0.488 0.512 0.000 0.000
#> GSM1182309     3  0.5265    0.23712 0.000 0.248 0.656 0.000 0.096
#> GSM1182312     3  0.4620    0.25911 0.000 0.392 0.592 0.000 0.016
#> GSM1182314     4  0.0000    0.98429 0.000 0.000 0.000 1.000 0.000
#> GSM1182316     2  0.5815    0.44139 0.000 0.540 0.356 0.000 0.104
#> GSM1182318     2  0.5359    0.40521 0.000 0.532 0.412 0.000 0.056
#> GSM1182319     3  0.5440    0.23936 0.000 0.156 0.660 0.000 0.184
#> GSM1182320     3  0.5236   -0.24308 0.000 0.464 0.492 0.000 0.044
#> GSM1182321     3  0.5339    0.25931 0.000 0.152 0.672 0.000 0.176
#> GSM1182322     2  0.5906    0.39967 0.000 0.492 0.404 0.000 0.104
#> GSM1182324     3  0.5854    0.12944 0.000 0.160 0.600 0.000 0.240
#> GSM1182297     2  0.6475    0.42212 0.000 0.428 0.388 0.000 0.184
#> GSM1182302     4  0.0000    0.98429 0.000 0.000 0.000 1.000 0.000
#> GSM1182308     3  0.5697    0.15602 0.000 0.288 0.596 0.000 0.116
#> GSM1182310     3  0.5673    0.19024 0.000 0.156 0.628 0.000 0.216
#> GSM1182311     1  0.0703    0.94386 0.976 0.000 0.000 0.000 0.024
#> GSM1182313     4  0.0000    0.98429 0.000 0.000 0.000 1.000 0.000
#> GSM1182315     3  0.5284   -0.01780 0.000 0.376 0.568 0.000 0.056
#> GSM1182317     3  0.5256   -0.13975 0.000 0.420 0.532 0.000 0.048
#> GSM1182323     1  0.0703    0.94386 0.976 0.000 0.000 0.000 0.024

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1182186     5  0.0146    0.96035 0.000 0.000 0.000 0.000 0.996 0.004
#> GSM1182187     4  0.0146    0.99646 0.000 0.004 0.000 0.996 0.000 0.000
#> GSM1182188     4  0.0000    0.99958 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182189     1  0.0146    0.97013 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM1182190     1  0.0146    0.97013 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM1182191     5  0.0146    0.96035 0.000 0.000 0.000 0.000 0.996 0.004
#> GSM1182192     1  0.0000    0.97068 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182193     1  0.0000    0.97068 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182194     2  0.5744    0.16410 0.000 0.424 0.408 0.000 0.000 0.168
#> GSM1182195     2  0.4644    0.05711 0.000 0.504 0.456 0.000 0.000 0.040
#> GSM1182196     2  0.5054    0.44538 0.000 0.572 0.336 0.000 0.000 0.092
#> GSM1182197     2  0.5022   -0.15117 0.000 0.496 0.072 0.000 0.000 0.432
#> GSM1182198     6  0.6033   -0.01406 0.000 0.336 0.256 0.000 0.000 0.408
#> GSM1182199     2  0.5937    0.19859 0.000 0.436 0.340 0.000 0.000 0.224
#> GSM1182200     6  0.5520    0.45783 0.000 0.200 0.240 0.000 0.000 0.560
#> GSM1182201     3  0.6053   -0.09376 0.000 0.272 0.408 0.000 0.000 0.320
#> GSM1182202     4  0.0000    0.99958 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182203     4  0.0000    0.99958 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182204     4  0.0000    0.99958 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182205     3  0.3354    0.58819 0.000 0.128 0.812 0.000 0.000 0.060
#> GSM1182206     3  0.1867    0.58070 0.000 0.064 0.916 0.000 0.000 0.020
#> GSM1182207     5  0.0146    0.96154 0.000 0.000 0.000 0.000 0.996 0.004
#> GSM1182208     5  0.0000    0.96140 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182209     6  0.5537    0.38989 0.000 0.152 0.328 0.000 0.000 0.520
#> GSM1182210     3  0.4045    0.58985 0.000 0.120 0.756 0.000 0.000 0.124
#> GSM1182211     3  0.4273    0.57506 0.000 0.148 0.732 0.000 0.000 0.120
#> GSM1182212     3  0.5079    0.47610 0.000 0.148 0.628 0.000 0.000 0.224
#> GSM1182213     6  0.5683    0.26878 0.000 0.168 0.348 0.000 0.000 0.484
#> GSM1182214     3  0.5425    0.41063 0.000 0.148 0.552 0.000 0.000 0.300
#> GSM1182215     3  0.3744    0.58838 0.000 0.184 0.764 0.000 0.000 0.052
#> GSM1182216     3  0.5799    0.14491 0.000 0.180 0.428 0.000 0.000 0.392
#> GSM1182217     5  0.4513    0.31293 0.000 0.028 0.000 0.396 0.572 0.004
#> GSM1182218     1  0.0146    0.97013 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM1182219     3  0.1500    0.58586 0.000 0.012 0.936 0.000 0.000 0.052
#> GSM1182220     3  0.1970    0.58292 0.000 0.028 0.912 0.000 0.000 0.060
#> GSM1182221     3  0.3834    0.59029 0.000 0.108 0.776 0.000 0.000 0.116
#> GSM1182222     3  0.1657    0.58526 0.000 0.016 0.928 0.000 0.000 0.056
#> GSM1182223     3  0.1720    0.57840 0.000 0.032 0.928 0.000 0.000 0.040
#> GSM1182224     3  0.2163    0.57425 0.000 0.092 0.892 0.000 0.000 0.016
#> GSM1182225     3  0.4348    0.57139 0.000 0.152 0.724 0.000 0.000 0.124
#> GSM1182226     3  0.5883    0.11518 0.000 0.204 0.436 0.000 0.000 0.360
#> GSM1182227     1  0.0000    0.97068 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182228     2  0.5508   -0.19888 0.000 0.480 0.132 0.000 0.000 0.388
#> GSM1182229     3  0.1863    0.58583 0.000 0.044 0.920 0.000 0.000 0.036
#> GSM1182230     3  0.3171    0.50927 0.000 0.204 0.784 0.000 0.000 0.012
#> GSM1182231     3  0.5160    0.30556 0.000 0.332 0.564 0.000 0.000 0.104
#> GSM1182232     1  0.0000    0.97068 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182233     1  0.0146    0.97013 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM1182234     1  0.0000    0.97068 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182235     3  0.2197    0.60152 0.000 0.044 0.900 0.000 0.000 0.056
#> GSM1182236     1  0.0000    0.97068 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182237     3  0.4243    0.58403 0.000 0.164 0.732 0.000 0.000 0.104
#> GSM1182238     3  0.5659    0.31916 0.000 0.168 0.496 0.000 0.000 0.336
#> GSM1182239     6  0.4729    0.58186 0.000 0.248 0.096 0.000 0.000 0.656
#> GSM1182240     6  0.5392    0.49890 0.000 0.192 0.224 0.000 0.000 0.584
#> GSM1182241     6  0.5030    0.60767 0.000 0.268 0.116 0.000 0.000 0.616
#> GSM1182242     2  0.5361    0.03559 0.000 0.452 0.440 0.000 0.000 0.108
#> GSM1182243     2  0.5003    0.42953 0.000 0.608 0.288 0.000 0.000 0.104
#> GSM1182244     3  0.4795    0.22354 0.000 0.324 0.604 0.000 0.000 0.072
#> GSM1182245     1  0.0551    0.96351 0.984 0.008 0.000 0.000 0.004 0.004
#> GSM1182246     4  0.0000    0.99958 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182247     3  0.4309    0.45056 0.000 0.296 0.660 0.000 0.000 0.044
#> GSM1182248     2  0.5296    0.00368 0.000 0.456 0.444 0.000 0.000 0.100
#> GSM1182249     2  0.5341    0.27897 0.000 0.592 0.224 0.000 0.000 0.184
#> GSM1182250     2  0.4663    0.18139 0.000 0.660 0.088 0.000 0.000 0.252
#> GSM1182251     5  0.0000    0.96140 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182252     3  0.4700    0.29043 0.000 0.340 0.600 0.000 0.000 0.060
#> GSM1182253     3  0.2981    0.57627 0.000 0.160 0.820 0.000 0.000 0.020
#> GSM1182254     2  0.4281    0.26877 0.000 0.708 0.072 0.000 0.000 0.220
#> GSM1182255     4  0.0146    0.99661 0.000 0.004 0.000 0.996 0.000 0.000
#> GSM1182256     4  0.0000    0.99958 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182257     4  0.0000    0.99958 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182258     4  0.0000    0.99958 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182259     4  0.0000    0.99958 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182260     2  0.4516    0.18213 0.000 0.668 0.072 0.000 0.000 0.260
#> GSM1182261     3  0.4247    0.35320 0.000 0.296 0.664 0.000 0.000 0.040
#> GSM1182262     2  0.5421    0.19315 0.000 0.452 0.432 0.000 0.000 0.116
#> GSM1182263     5  0.0146    0.96154 0.000 0.000 0.000 0.000 0.996 0.004
#> GSM1182264     6  0.4532    0.55901 0.000 0.308 0.056 0.000 0.000 0.636
#> GSM1182265     6  0.5364    0.56481 0.000 0.276 0.152 0.000 0.000 0.572
#> GSM1182266     6  0.4917    0.54420 0.000 0.348 0.076 0.000 0.000 0.576
#> GSM1182267     1  0.0000    0.97068 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182268     1  0.0146    0.97013 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM1182269     1  0.0146    0.97013 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM1182270     1  0.0146    0.97013 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM1182271     4  0.0000    0.99958 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182272     4  0.0000    0.99958 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182273     6  0.4392    0.54355 0.000 0.332 0.040 0.000 0.000 0.628
#> GSM1182275     3  0.5289    0.39880 0.000 0.140 0.580 0.000 0.000 0.280
#> GSM1182276     3  0.2390    0.59972 0.000 0.056 0.888 0.000 0.000 0.056
#> GSM1182277     1  0.0000    0.97068 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182278     1  0.0000    0.97068 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182279     5  0.0146    0.96154 0.000 0.000 0.000 0.000 0.996 0.004
#> GSM1182280     5  0.0146    0.96154 0.000 0.000 0.000 0.000 0.996 0.004
#> GSM1182281     1  0.5945    0.01838 0.464 0.032 0.000 0.076 0.420 0.008
#> GSM1182282     1  0.0000    0.97068 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182283     1  0.0000    0.97068 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1182284     1  0.0603    0.96076 0.980 0.016 0.000 0.000 0.000 0.004
#> GSM1182285     3  0.4977    0.14856 0.000 0.372 0.552 0.000 0.000 0.076
#> GSM1182286     3  0.5260   -0.09187 0.000 0.440 0.464 0.000 0.000 0.096
#> GSM1182287     3  0.4886    0.15286 0.000 0.396 0.540 0.000 0.000 0.064
#> GSM1182288     3  0.5065    0.14818 0.000 0.396 0.524 0.000 0.000 0.080
#> GSM1182289     5  0.0146    0.96154 0.000 0.000 0.000 0.000 0.996 0.004
#> GSM1182290     5  0.0146    0.96154 0.000 0.000 0.000 0.000 0.996 0.004
#> GSM1182291     4  0.0000    0.99958 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182274     6  0.4939    0.59799 0.000 0.292 0.096 0.000 0.000 0.612
#> GSM1182292     2  0.5595   -0.07086 0.000 0.464 0.144 0.000 0.000 0.392
#> GSM1182293     2  0.5324    0.39096 0.000 0.540 0.340 0.000 0.000 0.120
#> GSM1182294     2  0.3954    0.46470 0.000 0.740 0.204 0.000 0.000 0.056
#> GSM1182295     2  0.5386    0.40312 0.000 0.548 0.316 0.000 0.000 0.136
#> GSM1182296     2  0.5156    0.42791 0.000 0.620 0.164 0.000 0.000 0.216
#> GSM1182298     2  0.5387    0.09989 0.000 0.464 0.424 0.000 0.000 0.112
#> GSM1182299     6  0.4522    0.58299 0.000 0.252 0.076 0.000 0.000 0.672
#> GSM1182300     2  0.4942    0.48227 0.000 0.652 0.192 0.000 0.000 0.156
#> GSM1182301     2  0.5020    0.02087 0.000 0.548 0.080 0.000 0.000 0.372
#> GSM1182303     2  0.5377    0.27191 0.000 0.528 0.348 0.000 0.000 0.124
#> GSM1182304     5  0.0000    0.96140 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1182305     5  0.0146    0.96035 0.000 0.000 0.000 0.000 0.996 0.004
#> GSM1182306     4  0.0000    0.99958 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182307     3  0.5871    0.03599 0.000 0.196 0.408 0.000 0.000 0.396
#> GSM1182309     2  0.5315    0.43101 0.000 0.564 0.304 0.000 0.000 0.132
#> GSM1182312     3  0.5467    0.36941 0.000 0.304 0.544 0.000 0.000 0.152
#> GSM1182314     4  0.0000    0.99958 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182316     6  0.4717    0.40937 0.000 0.364 0.056 0.000 0.000 0.580
#> GSM1182318     2  0.4929   -0.11204 0.000 0.508 0.064 0.000 0.000 0.428
#> GSM1182319     2  0.3588    0.50010 0.000 0.776 0.180 0.000 0.000 0.044
#> GSM1182320     2  0.5792    0.17599 0.000 0.500 0.228 0.000 0.000 0.272
#> GSM1182321     2  0.3709    0.48144 0.000 0.756 0.204 0.000 0.000 0.040
#> GSM1182322     2  0.4996   -0.09019 0.000 0.520 0.072 0.000 0.000 0.408
#> GSM1182324     2  0.4205    0.48725 0.000 0.728 0.188 0.000 0.000 0.084
#> GSM1182297     6  0.5392    0.32570 0.000 0.444 0.112 0.000 0.000 0.444
#> GSM1182302     4  0.0000    0.99958 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182308     2  0.5411    0.38025 0.000 0.532 0.336 0.000 0.000 0.132
#> GSM1182310     2  0.3771    0.48740 0.000 0.764 0.180 0.000 0.000 0.056
#> GSM1182311     1  0.1232    0.94484 0.956 0.016 0.000 0.000 0.024 0.004
#> GSM1182313     4  0.0000    0.99958 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1182315     2  0.4823    0.40219 0.000 0.660 0.124 0.000 0.000 0.216
#> GSM1182317     2  0.5245    0.26170 0.000 0.560 0.116 0.000 0.000 0.324
#> GSM1182323     1  0.1049    0.94426 0.960 0.008 0.000 0.000 0.032 0.000

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk ATC-mclust-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk ATC-mclust-collect-classes

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

test_to_known_factors(res)
#>              n disease.state(p) gender(p) k
#> ATC:mclust 139           0.0773     1.000 2
#> ATC:mclust 139           0.0773     1.000 3
#> ATC:mclust  65           0.2048     0.477 4
#> ATC:mclust  53           0.5576     0.523 5
#> ATC:mclust  79           0.0436     0.610 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 46361 rows and 139 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 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-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.4791 0.521   0.521
#> 3 3 0.931           0.947       0.928         0.1159 0.926   0.857
#> 4 4 0.929           0.930       0.944         0.0321 0.994   0.988
#> 5 5 0.890           0.917       0.936         0.0241 0.994   0.988
#> 6 6 0.876           0.911       0.928         0.0263 0.994   0.988

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
#> GSM1182186     1       0          1  1  0
#> GSM1182187     1       0          1  1  0
#> GSM1182188     1       0          1  1  0
#> GSM1182189     1       0          1  1  0
#> GSM1182190     1       0          1  1  0
#> GSM1182191     1       0          1  1  0
#> GSM1182192     1       0          1  1  0
#> GSM1182193     1       0          1  1  0
#> GSM1182194     2       0          1  0  1
#> GSM1182195     2       0          1  0  1
#> GSM1182196     2       0          1  0  1
#> GSM1182197     2       0          1  0  1
#> GSM1182198     2       0          1  0  1
#> GSM1182199     2       0          1  0  1
#> GSM1182200     2       0          1  0  1
#> GSM1182201     2       0          1  0  1
#> GSM1182202     1       0          1  1  0
#> GSM1182203     1       0          1  1  0
#> GSM1182204     1       0          1  1  0
#> GSM1182205     2       0          1  0  1
#> GSM1182206     2       0          1  0  1
#> GSM1182207     1       0          1  1  0
#> GSM1182208     1       0          1  1  0
#> GSM1182209     2       0          1  0  1
#> GSM1182210     2       0          1  0  1
#> GSM1182211     2       0          1  0  1
#> GSM1182212     2       0          1  0  1
#> GSM1182213     2       0          1  0  1
#> GSM1182214     2       0          1  0  1
#> GSM1182215     2       0          1  0  1
#> GSM1182216     2       0          1  0  1
#> GSM1182217     1       0          1  1  0
#> GSM1182218     1       0          1  1  0
#> GSM1182219     2       0          1  0  1
#> GSM1182220     2       0          1  0  1
#> GSM1182221     2       0          1  0  1
#> GSM1182222     2       0          1  0  1
#> GSM1182223     2       0          1  0  1
#> GSM1182224     2       0          1  0  1
#> GSM1182225     2       0          1  0  1
#> GSM1182226     2       0          1  0  1
#> GSM1182227     1       0          1  1  0
#> GSM1182228     2       0          1  0  1
#> GSM1182229     2       0          1  0  1
#> GSM1182230     2       0          1  0  1
#> GSM1182231     2       0          1  0  1
#> GSM1182232     1       0          1  1  0
#> GSM1182233     1       0          1  1  0
#> GSM1182234     1       0          1  1  0
#> GSM1182235     2       0          1  0  1
#> GSM1182236     1       0          1  1  0
#> GSM1182237     2       0          1  0  1
#> GSM1182238     2       0          1  0  1
#> GSM1182239     2       0          1  0  1
#> GSM1182240     2       0          1  0  1
#> GSM1182241     2       0          1  0  1
#> GSM1182242     2       0          1  0  1
#> GSM1182243     2       0          1  0  1
#> GSM1182244     2       0          1  0  1
#> GSM1182245     1       0          1  1  0
#> GSM1182246     1       0          1  1  0
#> GSM1182247     2       0          1  0  1
#> GSM1182248     2       0          1  0  1
#> GSM1182249     2       0          1  0  1
#> GSM1182250     2       0          1  0  1
#> GSM1182251     1       0          1  1  0
#> GSM1182252     2       0          1  0  1
#> GSM1182253     2       0          1  0  1
#> GSM1182254     2       0          1  0  1
#> GSM1182255     1       0          1  1  0
#> GSM1182256     1       0          1  1  0
#> GSM1182257     1       0          1  1  0
#> GSM1182258     1       0          1  1  0
#> GSM1182259     1       0          1  1  0
#> GSM1182260     2       0          1  0  1
#> GSM1182261     2       0          1  0  1
#> GSM1182262     2       0          1  0  1
#> GSM1182263     1       0          1  1  0
#> GSM1182264     2       0          1  0  1
#> GSM1182265     2       0          1  0  1
#> GSM1182266     2       0          1  0  1
#> GSM1182267     1       0          1  1  0
#> GSM1182268     1       0          1  1  0
#> GSM1182269     1       0          1  1  0
#> GSM1182270     1       0          1  1  0
#> GSM1182271     1       0          1  1  0
#> GSM1182272     1       0          1  1  0
#> GSM1182273     2       0          1  0  1
#> GSM1182275     2       0          1  0  1
#> GSM1182276     2       0          1  0  1
#> GSM1182277     1       0          1  1  0
#> GSM1182278     1       0          1  1  0
#> GSM1182279     1       0          1  1  0
#> GSM1182280     1       0          1  1  0
#> GSM1182281     1       0          1  1  0
#> GSM1182282     1       0          1  1  0
#> GSM1182283     1       0          1  1  0
#> GSM1182284     1       0          1  1  0
#> GSM1182285     2       0          1  0  1
#> GSM1182286     2       0          1  0  1
#> GSM1182287     2       0          1  0  1
#> GSM1182288     2       0          1  0  1
#> GSM1182289     1       0          1  1  0
#> GSM1182290     1       0          1  1  0
#> GSM1182291     1       0          1  1  0
#> GSM1182274     2       0          1  0  1
#> GSM1182292     2       0          1  0  1
#> GSM1182293     2       0          1  0  1
#> GSM1182294     2       0          1  0  1
#> GSM1182295     2       0          1  0  1
#> GSM1182296     2       0          1  0  1
#> GSM1182298     2       0          1  0  1
#> GSM1182299     2       0          1  0  1
#> GSM1182300     2       0          1  0  1
#> GSM1182301     2       0          1  0  1
#> GSM1182303     2       0          1  0  1
#> GSM1182304     1       0          1  1  0
#> GSM1182305     1       0          1  1  0
#> GSM1182306     1       0          1  1  0
#> GSM1182307     2       0          1  0  1
#> GSM1182309     2       0          1  0  1
#> GSM1182312     2       0          1  0  1
#> GSM1182314     1       0          1  1  0
#> GSM1182316     2       0          1  0  1
#> GSM1182318     2       0          1  0  1
#> GSM1182319     2       0          1  0  1
#> GSM1182320     2       0          1  0  1
#> GSM1182321     2       0          1  0  1
#> GSM1182322     2       0          1  0  1
#> GSM1182324     2       0          1  0  1
#> GSM1182297     2       0          1  0  1
#> GSM1182302     1       0          1  1  0
#> GSM1182308     2       0          1  0  1
#> GSM1182310     2       0          1  0  1
#> GSM1182311     1       0          1  1  0
#> GSM1182313     1       0          1  1  0
#> GSM1182315     2       0          1  0  1
#> GSM1182317     2       0          1  0  1
#> GSM1182323     1       0          1  1  0

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1 p2    p3
#> GSM1182186     3  0.5785      0.868 0.332  0 0.668
#> GSM1182187     3  0.5254      0.950 0.264  0 0.736
#> GSM1182188     3  0.5098      0.954 0.248  0 0.752
#> GSM1182189     1  0.1411      0.859 0.964  0 0.036
#> GSM1182190     1  0.1031      0.896 0.976  0 0.024
#> GSM1182191     3  0.5810      0.861 0.336  0 0.664
#> GSM1182192     1  0.0747      0.890 0.984  0 0.016
#> GSM1182193     1  0.1860      0.843 0.948  0 0.052
#> GSM1182194     2  0.0000      1.000 0.000  1 0.000
#> GSM1182195     2  0.0000      1.000 0.000  1 0.000
#> GSM1182196     2  0.0000      1.000 0.000  1 0.000
#> GSM1182197     2  0.0000      1.000 0.000  1 0.000
#> GSM1182198     2  0.0000      1.000 0.000  1 0.000
#> GSM1182199     2  0.0000      1.000 0.000  1 0.000
#> GSM1182200     2  0.0000      1.000 0.000  1 0.000
#> GSM1182201     2  0.0000      1.000 0.000  1 0.000
#> GSM1182202     3  0.5254      0.950 0.264  0 0.736
#> GSM1182203     3  0.5178      0.954 0.256  0 0.744
#> GSM1182204     3  0.5216      0.952 0.260  0 0.740
#> GSM1182205     2  0.0000      1.000 0.000  1 0.000
#> GSM1182206     2  0.0000      1.000 0.000  1 0.000
#> GSM1182207     1  0.2165      0.830 0.936  0 0.064
#> GSM1182208     1  0.2261      0.825 0.932  0 0.068
#> GSM1182209     2  0.0000      1.000 0.000  1 0.000
#> GSM1182210     2  0.0000      1.000 0.000  1 0.000
#> GSM1182211     2  0.0000      1.000 0.000  1 0.000
#> GSM1182212     2  0.0000      1.000 0.000  1 0.000
#> GSM1182213     2  0.0000      1.000 0.000  1 0.000
#> GSM1182214     2  0.0000      1.000 0.000  1 0.000
#> GSM1182215     2  0.0000      1.000 0.000  1 0.000
#> GSM1182216     2  0.0000      1.000 0.000  1 0.000
#> GSM1182217     3  0.5465      0.926 0.288  0 0.712
#> GSM1182218     1  0.2165      0.887 0.936  0 0.064
#> GSM1182219     2  0.0000      1.000 0.000  1 0.000
#> GSM1182220     2  0.0000      1.000 0.000  1 0.000
#> GSM1182221     2  0.0000      1.000 0.000  1 0.000
#> GSM1182222     2  0.0000      1.000 0.000  1 0.000
#> GSM1182223     2  0.0000      1.000 0.000  1 0.000
#> GSM1182224     2  0.0000      1.000 0.000  1 0.000
#> GSM1182225     2  0.0000      1.000 0.000  1 0.000
#> GSM1182226     2  0.0000      1.000 0.000  1 0.000
#> GSM1182227     1  0.2261      0.886 0.932  0 0.068
#> GSM1182228     2  0.0000      1.000 0.000  1 0.000
#> GSM1182229     2  0.0000      1.000 0.000  1 0.000
#> GSM1182230     2  0.0000      1.000 0.000  1 0.000
#> GSM1182231     2  0.0000      1.000 0.000  1 0.000
#> GSM1182232     1  0.1753      0.897 0.952  0 0.048
#> GSM1182233     1  0.0000      0.886 1.000  0 0.000
#> GSM1182234     1  0.1163      0.897 0.972  0 0.028
#> GSM1182235     2  0.0000      1.000 0.000  1 0.000
#> GSM1182236     1  0.1643      0.898 0.956  0 0.044
#> GSM1182237     2  0.0000      1.000 0.000  1 0.000
#> GSM1182238     2  0.0000      1.000 0.000  1 0.000
#> GSM1182239     2  0.0000      1.000 0.000  1 0.000
#> GSM1182240     2  0.0000      1.000 0.000  1 0.000
#> GSM1182241     2  0.0000      1.000 0.000  1 0.000
#> GSM1182242     2  0.0000      1.000 0.000  1 0.000
#> GSM1182243     2  0.0000      1.000 0.000  1 0.000
#> GSM1182244     2  0.0000      1.000 0.000  1 0.000
#> GSM1182245     1  0.1643      0.898 0.956  0 0.044
#> GSM1182246     3  0.5138      0.955 0.252  0 0.748
#> GSM1182247     2  0.0000      1.000 0.000  1 0.000
#> GSM1182248     2  0.0000      1.000 0.000  1 0.000
#> GSM1182249     2  0.0000      1.000 0.000  1 0.000
#> GSM1182250     2  0.0000      1.000 0.000  1 0.000
#> GSM1182251     1  0.5926      0.221 0.644  0 0.356
#> GSM1182252     2  0.0000      1.000 0.000  1 0.000
#> GSM1182253     2  0.0000      1.000 0.000  1 0.000
#> GSM1182254     2  0.0000      1.000 0.000  1 0.000
#> GSM1182255     3  0.5254      0.950 0.264  0 0.736
#> GSM1182256     3  0.5138      0.955 0.252  0 0.748
#> GSM1182257     3  0.5138      0.955 0.252  0 0.748
#> GSM1182258     3  0.5098      0.954 0.248  0 0.752
#> GSM1182259     3  0.5098      0.954 0.248  0 0.752
#> GSM1182260     2  0.0000      1.000 0.000  1 0.000
#> GSM1182261     2  0.0000      1.000 0.000  1 0.000
#> GSM1182262     2  0.0000      1.000 0.000  1 0.000
#> GSM1182263     1  0.4121      0.760 0.832  0 0.168
#> GSM1182264     2  0.0000      1.000 0.000  1 0.000
#> GSM1182265     2  0.0000      1.000 0.000  1 0.000
#> GSM1182266     2  0.0000      1.000 0.000  1 0.000
#> GSM1182267     1  0.1529      0.898 0.960  0 0.040
#> GSM1182268     1  0.0592      0.878 0.988  0 0.012
#> GSM1182269     1  0.0747      0.876 0.984  0 0.016
#> GSM1182270     1  0.1289      0.897 0.968  0 0.032
#> GSM1182271     3  0.5098      0.954 0.248  0 0.752
#> GSM1182272     3  0.5138      0.955 0.252  0 0.748
#> GSM1182273     2  0.0000      1.000 0.000  1 0.000
#> GSM1182275     2  0.0000      1.000 0.000  1 0.000
#> GSM1182276     2  0.0000      1.000 0.000  1 0.000
#> GSM1182277     1  0.1860      0.895 0.948  0 0.052
#> GSM1182278     1  0.1860      0.895 0.948  0 0.052
#> GSM1182279     1  0.5497      0.469 0.708  0 0.292
#> GSM1182280     1  0.2796      0.863 0.908  0 0.092
#> GSM1182281     3  0.6140      0.730 0.404  0 0.596
#> GSM1182282     1  0.1753      0.897 0.952  0 0.048
#> GSM1182283     1  0.1643      0.898 0.956  0 0.044
#> GSM1182284     1  0.4399      0.725 0.812  0 0.188
#> GSM1182285     2  0.0000      1.000 0.000  1 0.000
#> GSM1182286     2  0.0000      1.000 0.000  1 0.000
#> GSM1182287     2  0.0000      1.000 0.000  1 0.000
#> GSM1182288     2  0.0000      1.000 0.000  1 0.000
#> GSM1182289     1  0.5591      0.430 0.696  0 0.304
#> GSM1182290     1  0.0892      0.873 0.980  0 0.020
#> GSM1182291     3  0.5098      0.954 0.248  0 0.752
#> GSM1182274     2  0.0000      1.000 0.000  1 0.000
#> GSM1182292     2  0.0000      1.000 0.000  1 0.000
#> GSM1182293     2  0.0000      1.000 0.000  1 0.000
#> GSM1182294     2  0.0000      1.000 0.000  1 0.000
#> GSM1182295     2  0.0000      1.000 0.000  1 0.000
#> GSM1182296     2  0.0000      1.000 0.000  1 0.000
#> GSM1182298     2  0.0000      1.000 0.000  1 0.000
#> GSM1182299     2  0.0000      1.000 0.000  1 0.000
#> GSM1182300     2  0.0000      1.000 0.000  1 0.000
#> GSM1182301     2  0.0000      1.000 0.000  1 0.000
#> GSM1182303     2  0.0000      1.000 0.000  1 0.000
#> GSM1182304     1  0.3412      0.826 0.876  0 0.124
#> GSM1182305     3  0.6267      0.604 0.452  0 0.548
#> GSM1182306     3  0.5098      0.954 0.248  0 0.752
#> GSM1182307     2  0.0000      1.000 0.000  1 0.000
#> GSM1182309     2  0.0000      1.000 0.000  1 0.000
#> GSM1182312     2  0.0000      1.000 0.000  1 0.000
#> GSM1182314     3  0.5098      0.954 0.248  0 0.752
#> GSM1182316     2  0.0000      1.000 0.000  1 0.000
#> GSM1182318     2  0.0000      1.000 0.000  1 0.000
#> GSM1182319     2  0.0000      1.000 0.000  1 0.000
#> GSM1182320     2  0.0000      1.000 0.000  1 0.000
#> GSM1182321     2  0.0000      1.000 0.000  1 0.000
#> GSM1182322     2  0.0000      1.000 0.000  1 0.000
#> GSM1182324     2  0.0000      1.000 0.000  1 0.000
#> GSM1182297     2  0.0000      1.000 0.000  1 0.000
#> GSM1182302     3  0.5138      0.955 0.252  0 0.748
#> GSM1182308     2  0.0000      1.000 0.000  1 0.000
#> GSM1182310     2  0.0000      1.000 0.000  1 0.000
#> GSM1182311     1  0.0424      0.890 0.992  0 0.008
#> GSM1182313     3  0.5098      0.954 0.248  0 0.752
#> GSM1182315     2  0.0000      1.000 0.000  1 0.000
#> GSM1182317     2  0.0000      1.000 0.000  1 0.000
#> GSM1182323     1  0.2066      0.891 0.940  0 0.060

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2 p3    p4
#> GSM1182186     4  0.5778      0.631 0.356 0.000 NA 0.604
#> GSM1182187     4  0.4204      0.875 0.192 0.000 NA 0.788
#> GSM1182188     4  0.3581      0.903 0.116 0.000 NA 0.852
#> GSM1182189     1  0.1792      0.870 0.932 0.000 NA 0.000
#> GSM1182190     1  0.0779      0.908 0.980 0.000 NA 0.016
#> GSM1182191     4  0.6014      0.616 0.360 0.000 NA 0.588
#> GSM1182192     1  0.0927      0.904 0.976 0.000 NA 0.008
#> GSM1182193     1  0.2593      0.844 0.892 0.000 NA 0.004
#> GSM1182194     2  0.1489      0.962 0.000 0.952 NA 0.004
#> GSM1182195     2  0.1489      0.962 0.000 0.952 NA 0.004
#> GSM1182196     2  0.0000      0.992 0.000 1.000 NA 0.000
#> GSM1182197     2  0.0336      0.991 0.000 0.992 NA 0.000
#> GSM1182198     2  0.1722      0.956 0.000 0.944 NA 0.008
#> GSM1182199     2  0.1635      0.959 0.000 0.948 NA 0.008
#> GSM1182200     2  0.0336      0.991 0.000 0.992 NA 0.000
#> GSM1182201     2  0.0000      0.992 0.000 1.000 NA 0.000
#> GSM1182202     4  0.4121      0.882 0.184 0.000 NA 0.796
#> GSM1182203     4  0.3900      0.893 0.164 0.000 NA 0.816
#> GSM1182204     4  0.4406      0.873 0.192 0.000 NA 0.780
#> GSM1182205     2  0.0336      0.990 0.000 0.992 NA 0.000
#> GSM1182206     2  0.0188      0.991 0.000 0.996 NA 0.000
#> GSM1182207     1  0.2760      0.829 0.872 0.000 NA 0.000
#> GSM1182208     1  0.3024      0.811 0.852 0.000 NA 0.000
#> GSM1182209     2  0.0188      0.992 0.000 0.996 NA 0.000
#> GSM1182210     2  0.0188      0.992 0.000 0.996 NA 0.000
#> GSM1182211     2  0.0469      0.990 0.000 0.988 NA 0.000
#> GSM1182212     2  0.0469      0.990 0.000 0.988 NA 0.000
#> GSM1182213     2  0.0592      0.988 0.000 0.984 NA 0.000
#> GSM1182214     2  0.0592      0.988 0.000 0.984 NA 0.000
#> GSM1182215     2  0.0188      0.992 0.000 0.996 NA 0.000
#> GSM1182216     2  0.0592      0.988 0.000 0.984 NA 0.000
#> GSM1182217     4  0.5444      0.779 0.264 0.000 NA 0.688
#> GSM1182218     1  0.1489      0.899 0.952 0.000 NA 0.044
#> GSM1182219     2  0.0000      0.992 0.000 1.000 NA 0.000
#> GSM1182220     2  0.0000      0.992 0.000 1.000 NA 0.000
#> GSM1182221     2  0.0000      0.992 0.000 1.000 NA 0.000
#> GSM1182222     2  0.0000      0.992 0.000 1.000 NA 0.000
#> GSM1182223     2  0.0000      0.992 0.000 1.000 NA 0.000
#> GSM1182224     2  0.0592      0.986 0.000 0.984 NA 0.000
#> GSM1182225     2  0.0592      0.988 0.000 0.984 NA 0.000
#> GSM1182226     2  0.0469      0.990 0.000 0.988 NA 0.000
#> GSM1182227     1  0.1545      0.899 0.952 0.000 NA 0.040
#> GSM1182228     2  0.0921      0.980 0.000 0.972 NA 0.000
#> GSM1182229     2  0.0188      0.992 0.000 0.996 NA 0.000
#> GSM1182230     2  0.0188      0.991 0.000 0.996 NA 0.000
#> GSM1182231     2  0.0188      0.992 0.000 0.996 NA 0.000
#> GSM1182232     1  0.0817      0.907 0.976 0.000 NA 0.024
#> GSM1182233     1  0.0592      0.903 0.984 0.000 NA 0.000
#> GSM1182234     1  0.0804      0.907 0.980 0.000 NA 0.008
#> GSM1182235     2  0.0469      0.990 0.000 0.988 NA 0.000
#> GSM1182236     1  0.0921      0.905 0.972 0.000 NA 0.028
#> GSM1182237     2  0.0336      0.991 0.000 0.992 NA 0.000
#> GSM1182238     2  0.0469      0.990 0.000 0.988 NA 0.000
#> GSM1182239     2  0.0188      0.992 0.000 0.996 NA 0.000
#> GSM1182240     2  0.0469      0.990 0.000 0.988 NA 0.000
#> GSM1182241     2  0.0707      0.986 0.000 0.980 NA 0.000
#> GSM1182242     2  0.1118      0.974 0.000 0.964 NA 0.000
#> GSM1182243     2  0.0188      0.991 0.000 0.996 NA 0.000
#> GSM1182244     2  0.0336      0.990 0.000 0.992 NA 0.000
#> GSM1182245     1  0.0592      0.908 0.984 0.000 NA 0.016
#> GSM1182246     4  0.3335      0.909 0.128 0.000 NA 0.856
#> GSM1182247     2  0.0188      0.991 0.000 0.996 NA 0.000
#> GSM1182248     2  0.0336      0.990 0.000 0.992 NA 0.000
#> GSM1182249     2  0.0188      0.991 0.000 0.996 NA 0.000
#> GSM1182250     2  0.0336      0.990 0.000 0.992 NA 0.000
#> GSM1182251     1  0.5219      0.565 0.712 0.000 NA 0.244
#> GSM1182252     2  0.0336      0.990 0.000 0.992 NA 0.000
#> GSM1182253     2  0.0188      0.991 0.000 0.996 NA 0.000
#> GSM1182254     2  0.0000      0.992 0.000 1.000 NA 0.000
#> GSM1182255     4  0.3813      0.900 0.148 0.000 NA 0.828
#> GSM1182256     4  0.2704      0.908 0.124 0.000 NA 0.876
#> GSM1182257     4  0.2888      0.908 0.124 0.000 NA 0.872
#> GSM1182258     4  0.3523      0.900 0.112 0.000 NA 0.856
#> GSM1182259     4  0.3523      0.900 0.112 0.000 NA 0.856
#> GSM1182260     2  0.0188      0.991 0.000 0.996 NA 0.000
#> GSM1182261     2  0.0000      0.992 0.000 1.000 NA 0.000
#> GSM1182262     2  0.0000      0.992 0.000 1.000 NA 0.000
#> GSM1182263     1  0.2949      0.852 0.888 0.000 NA 0.088
#> GSM1182264     2  0.1022      0.975 0.000 0.968 NA 0.000
#> GSM1182265     2  0.0188      0.991 0.000 0.996 NA 0.000
#> GSM1182266     2  0.0188      0.991 0.000 0.996 NA 0.000
#> GSM1182267     1  0.0524      0.907 0.988 0.000 NA 0.004
#> GSM1182268     1  0.1209      0.895 0.964 0.000 NA 0.004
#> GSM1182269     1  0.1004      0.899 0.972 0.000 NA 0.004
#> GSM1182270     1  0.1004      0.907 0.972 0.000 NA 0.024
#> GSM1182271     4  0.3105      0.908 0.120 0.000 NA 0.868
#> GSM1182272     4  0.3161      0.908 0.124 0.000 NA 0.864
#> GSM1182273     2  0.0000      0.992 0.000 1.000 NA 0.000
#> GSM1182275     2  0.0188      0.991 0.000 0.996 NA 0.000
#> GSM1182276     2  0.0188      0.992 0.000 0.996 NA 0.000
#> GSM1182277     1  0.0707      0.908 0.980 0.000 NA 0.020
#> GSM1182278     1  0.0707      0.908 0.980 0.000 NA 0.020
#> GSM1182279     1  0.4423      0.725 0.792 0.000 NA 0.168
#> GSM1182280     1  0.1743      0.890 0.940 0.000 NA 0.056
#> GSM1182281     4  0.6442      0.370 0.440 0.000 NA 0.492
#> GSM1182282     1  0.0804      0.909 0.980 0.000 NA 0.012
#> GSM1182283     1  0.0804      0.907 0.980 0.000 NA 0.012
#> GSM1182284     1  0.3367      0.828 0.864 0.000 NA 0.108
#> GSM1182285     2  0.1398      0.966 0.000 0.956 NA 0.004
#> GSM1182286     2  0.0188      0.992 0.000 0.996 NA 0.000
#> GSM1182287     2  0.0469      0.990 0.000 0.988 NA 0.000
#> GSM1182288     2  0.0469      0.990 0.000 0.988 NA 0.000
#> GSM1182289     1  0.4677      0.682 0.768 0.000 NA 0.192
#> GSM1182290     1  0.2197      0.865 0.916 0.000 NA 0.004
#> GSM1182291     4  0.3485      0.904 0.116 0.000 NA 0.856
#> GSM1182274     2  0.0188      0.992 0.000 0.996 NA 0.000
#> GSM1182292     2  0.0188      0.992 0.000 0.996 NA 0.000
#> GSM1182293     2  0.0188      0.992 0.000 0.996 NA 0.000
#> GSM1182294     2  0.0188      0.992 0.000 0.996 NA 0.000
#> GSM1182295     2  0.0188      0.992 0.000 0.996 NA 0.000
#> GSM1182296     2  0.0188      0.992 0.000 0.996 NA 0.000
#> GSM1182298     2  0.1398      0.966 0.000 0.956 NA 0.004
#> GSM1182299     2  0.0336      0.991 0.000 0.992 NA 0.000
#> GSM1182300     2  0.0000      0.992 0.000 1.000 NA 0.000
#> GSM1182301     2  0.0188      0.992 0.000 0.996 NA 0.000
#> GSM1182303     2  0.0188      0.992 0.000 0.996 NA 0.000
#> GSM1182304     1  0.2198      0.874 0.920 0.000 NA 0.072
#> GSM1182305     1  0.6527     -0.167 0.508 0.000 NA 0.416
#> GSM1182306     4  0.3542      0.905 0.120 0.000 NA 0.852
#> GSM1182307     2  0.0707      0.986 0.000 0.980 NA 0.000
#> GSM1182309     2  0.0000      0.992 0.000 1.000 NA 0.000
#> GSM1182312     2  0.0336      0.991 0.000 0.992 NA 0.000
#> GSM1182314     4  0.3542      0.905 0.120 0.000 NA 0.852
#> GSM1182316     2  0.0000      0.992 0.000 1.000 NA 0.000
#> GSM1182318     2  0.0188      0.992 0.000 0.996 NA 0.000
#> GSM1182319     2  0.0188      0.991 0.000 0.996 NA 0.000
#> GSM1182320     2  0.0000      0.992 0.000 1.000 NA 0.000
#> GSM1182321     2  0.0188      0.991 0.000 0.996 NA 0.000
#> GSM1182322     2  0.0000      0.992 0.000 1.000 NA 0.000
#> GSM1182324     2  0.0000      0.992 0.000 1.000 NA 0.000
#> GSM1182297     2  0.0188      0.992 0.000 0.996 NA 0.000
#> GSM1182302     4  0.3495      0.903 0.140 0.000 NA 0.844
#> GSM1182308     2  0.0188      0.992 0.000 0.996 NA 0.000
#> GSM1182310     2  0.0000      0.992 0.000 1.000 NA 0.000
#> GSM1182311     1  0.0804      0.906 0.980 0.000 NA 0.008
#> GSM1182313     4  0.3441      0.906 0.120 0.000 NA 0.856
#> GSM1182315     2  0.0188      0.992 0.000 0.996 NA 0.000
#> GSM1182317     2  0.0188      0.992 0.000 0.996 NA 0.000
#> GSM1182323     1  0.1109      0.906 0.968 0.000 NA 0.028

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2 p3    p4    p5
#> GSM1182186     4  0.5506      0.591 0.284 0.000 NA 0.616 0.000
#> GSM1182187     4  0.3752      0.816 0.148 0.000 NA 0.804 0.000
#> GSM1182188     4  0.1195      0.876 0.028 0.000 NA 0.960 0.000
#> GSM1182189     1  0.1270      0.876 0.948 0.000 NA 0.000 0.000
#> GSM1182190     1  0.1725      0.912 0.936 0.000 NA 0.044 0.000
#> GSM1182191     4  0.5394      0.604 0.280 0.000 NA 0.628 0.000
#> GSM1182192     1  0.1568      0.909 0.944 0.000 NA 0.036 0.000
#> GSM1182193     1  0.1831      0.863 0.920 0.000 NA 0.000 0.004
#> GSM1182194     2  0.3102      0.885 0.000 0.860 NA 0.000 0.056
#> GSM1182195     2  0.2983      0.893 0.000 0.868 NA 0.000 0.056
#> GSM1182196     2  0.0324      0.981 0.000 0.992 NA 0.000 0.004
#> GSM1182197     2  0.0162      0.981 0.000 0.996 NA 0.000 0.004
#> GSM1182198     2  0.3601      0.844 0.000 0.820 NA 0.000 0.052
#> GSM1182199     2  0.3307      0.869 0.000 0.844 NA 0.000 0.052
#> GSM1182200     2  0.0404      0.980 0.000 0.988 NA 0.000 0.012
#> GSM1182201     2  0.0000      0.980 0.000 1.000 NA 0.000 0.000
#> GSM1182202     4  0.2915      0.847 0.116 0.000 NA 0.860 0.000
#> GSM1182203     4  0.2407      0.867 0.088 0.000 NA 0.896 0.004
#> GSM1182204     4  0.3432      0.831 0.132 0.000 NA 0.828 0.000
#> GSM1182205     2  0.1043      0.966 0.000 0.960 NA 0.000 0.040
#> GSM1182206     2  0.0510      0.978 0.000 0.984 NA 0.000 0.016
#> GSM1182207     1  0.2392      0.848 0.888 0.000 NA 0.004 0.004
#> GSM1182208     1  0.2570      0.841 0.880 0.000 NA 0.004 0.008
#> GSM1182209     2  0.0510      0.979 0.000 0.984 NA 0.000 0.016
#> GSM1182210     2  0.0404      0.980 0.000 0.988 NA 0.000 0.012
#> GSM1182211     2  0.0510      0.979 0.000 0.984 NA 0.000 0.016
#> GSM1182212     2  0.0404      0.980 0.000 0.988 NA 0.000 0.012
#> GSM1182213     2  0.0510      0.980 0.000 0.984 NA 0.000 0.016
#> GSM1182214     2  0.0510      0.979 0.000 0.984 NA 0.000 0.016
#> GSM1182215     2  0.0162      0.980 0.000 0.996 NA 0.000 0.004
#> GSM1182216     2  0.0404      0.980 0.000 0.988 NA 0.000 0.012
#> GSM1182217     4  0.4701      0.739 0.204 0.000 NA 0.720 0.000
#> GSM1182218     1  0.2300      0.910 0.904 0.000 NA 0.072 0.000
#> GSM1182219     2  0.0000      0.980 0.000 1.000 NA 0.000 0.000
#> GSM1182220     2  0.0162      0.981 0.000 0.996 NA 0.000 0.004
#> GSM1182221     2  0.0162      0.981 0.000 0.996 NA 0.000 0.004
#> GSM1182222     2  0.0162      0.981 0.000 0.996 NA 0.000 0.004
#> GSM1182223     2  0.0162      0.980 0.000 0.996 NA 0.000 0.004
#> GSM1182224     2  0.1357      0.958 0.000 0.948 NA 0.000 0.048
#> GSM1182225     2  0.0404      0.980 0.000 0.988 NA 0.000 0.012
#> GSM1182226     2  0.0404      0.980 0.000 0.988 NA 0.000 0.012
#> GSM1182227     1  0.2144      0.911 0.912 0.000 NA 0.068 0.000
#> GSM1182228     2  0.1544      0.947 0.000 0.932 NA 0.000 0.068
#> GSM1182229     2  0.0290      0.980 0.000 0.992 NA 0.000 0.008
#> GSM1182230     2  0.0510      0.978 0.000 0.984 NA 0.000 0.016
#> GSM1182231     2  0.0162      0.980 0.000 0.996 NA 0.000 0.004
#> GSM1182232     1  0.1894      0.910 0.920 0.000 NA 0.072 0.000
#> GSM1182233     1  0.1661      0.899 0.940 0.000 NA 0.024 0.000
#> GSM1182234     1  0.1364      0.911 0.952 0.000 NA 0.036 0.000
#> GSM1182235     2  0.0404      0.980 0.000 0.988 NA 0.000 0.012
#> GSM1182236     1  0.1981      0.912 0.920 0.000 NA 0.064 0.000
#> GSM1182237     2  0.0000      0.980 0.000 1.000 NA 0.000 0.000
#> GSM1182238     2  0.0404      0.980 0.000 0.988 NA 0.000 0.012
#> GSM1182239     2  0.0290      0.980 0.000 0.992 NA 0.000 0.008
#> GSM1182240     2  0.0290      0.980 0.000 0.992 NA 0.000 0.008
#> GSM1182241     2  0.0794      0.973 0.000 0.972 NA 0.000 0.028
#> GSM1182242     2  0.1701      0.951 0.000 0.936 NA 0.000 0.048
#> GSM1182243     2  0.0404      0.979 0.000 0.988 NA 0.000 0.012
#> GSM1182244     2  0.1205      0.964 0.000 0.956 NA 0.000 0.040
#> GSM1182245     1  0.1942      0.911 0.920 0.000 NA 0.068 0.000
#> GSM1182246     4  0.1444      0.880 0.040 0.000 NA 0.948 0.000
#> GSM1182247     2  0.0609      0.976 0.000 0.980 NA 0.000 0.020
#> GSM1182248     2  0.0703      0.975 0.000 0.976 NA 0.000 0.024
#> GSM1182249     2  0.0162      0.980 0.000 0.996 NA 0.000 0.004
#> GSM1182250     2  0.0404      0.979 0.000 0.988 NA 0.000 0.012
#> GSM1182251     1  0.5641      0.518 0.612 0.000 NA 0.268 0.000
#> GSM1182252     2  0.0880      0.971 0.000 0.968 NA 0.000 0.032
#> GSM1182253     2  0.0794      0.972 0.000 0.972 NA 0.000 0.028
#> GSM1182254     2  0.0000      0.980 0.000 1.000 NA 0.000 0.000
#> GSM1182255     4  0.2208      0.873 0.072 0.000 NA 0.908 0.000
#> GSM1182256     4  0.1430      0.879 0.052 0.000 NA 0.944 0.000
#> GSM1182257     4  0.1282      0.880 0.044 0.000 NA 0.952 0.000
#> GSM1182258     4  0.0992      0.872 0.024 0.000 NA 0.968 0.000
#> GSM1182259     4  0.1372      0.871 0.024 0.000 NA 0.956 0.004
#> GSM1182260     2  0.0671      0.978 0.000 0.980 NA 0.000 0.016
#> GSM1182261     2  0.0000      0.980 0.000 1.000 NA 0.000 0.000
#> GSM1182262     2  0.0404      0.979 0.000 0.988 NA 0.000 0.012
#> GSM1182263     1  0.3620      0.856 0.824 0.000 NA 0.108 0.000
#> GSM1182264     2  0.2067      0.938 0.000 0.920 NA 0.000 0.048
#> GSM1182265     2  0.0404      0.979 0.000 0.988 NA 0.000 0.012
#> GSM1182266     2  0.0290      0.980 0.000 0.992 NA 0.000 0.008
#> GSM1182267     1  0.1270      0.913 0.948 0.000 NA 0.052 0.000
#> GSM1182268     1  0.1331      0.887 0.952 0.000 NA 0.008 0.000
#> GSM1182269     1  0.1300      0.895 0.956 0.000 NA 0.016 0.000
#> GSM1182270     1  0.1809      0.914 0.928 0.000 NA 0.060 0.000
#> GSM1182271     4  0.1041      0.877 0.032 0.000 NA 0.964 0.000
#> GSM1182272     4  0.1522      0.880 0.044 0.000 NA 0.944 0.000
#> GSM1182273     2  0.0290      0.980 0.000 0.992 NA 0.000 0.008
#> GSM1182275     2  0.0404      0.979 0.000 0.988 NA 0.000 0.012
#> GSM1182276     2  0.0162      0.981 0.000 0.996 NA 0.000 0.004
#> GSM1182277     1  0.1830      0.911 0.924 0.000 NA 0.068 0.000
#> GSM1182278     1  0.1830      0.911 0.924 0.000 NA 0.068 0.000
#> GSM1182279     1  0.5136      0.682 0.688 0.000 NA 0.196 0.000
#> GSM1182280     1  0.2580      0.905 0.892 0.000 NA 0.064 0.000
#> GSM1182281     4  0.5829      0.406 0.372 0.000 NA 0.536 0.004
#> GSM1182282     1  0.1809      0.914 0.928 0.000 NA 0.060 0.000
#> GSM1182283     1  0.1809      0.914 0.928 0.000 NA 0.060 0.000
#> GSM1182284     1  0.3826      0.839 0.812 0.000 NA 0.128 0.004
#> GSM1182285     2  0.2450      0.922 0.000 0.900 NA 0.000 0.052
#> GSM1182286     2  0.0290      0.981 0.000 0.992 NA 0.000 0.008
#> GSM1182287     2  0.0510      0.979 0.000 0.984 NA 0.000 0.016
#> GSM1182288     2  0.0865      0.974 0.000 0.972 NA 0.000 0.024
#> GSM1182289     1  0.5234      0.651 0.680 0.000 NA 0.220 0.004
#> GSM1182290     1  0.1851      0.864 0.912 0.000 NA 0.000 0.000
#> GSM1182291     4  0.1300      0.875 0.028 0.000 NA 0.956 0.000
#> GSM1182274     2  0.0290      0.980 0.000 0.992 NA 0.000 0.008
#> GSM1182292     2  0.0703      0.975 0.000 0.976 NA 0.000 0.024
#> GSM1182293     2  0.0290      0.980 0.000 0.992 NA 0.000 0.008
#> GSM1182294     2  0.0671      0.977 0.000 0.980 NA 0.000 0.016
#> GSM1182295     2  0.0290      0.980 0.000 0.992 NA 0.000 0.008
#> GSM1182296     2  0.0290      0.980 0.000 0.992 NA 0.000 0.008
#> GSM1182298     2  0.3307      0.869 0.000 0.844 NA 0.000 0.052
#> GSM1182299     2  0.0290      0.980 0.000 0.992 NA 0.000 0.008
#> GSM1182300     2  0.0566      0.980 0.000 0.984 NA 0.000 0.012
#> GSM1182301     2  0.0404      0.980 0.000 0.988 NA 0.000 0.012
#> GSM1182303     2  0.0290      0.980 0.000 0.992 NA 0.000 0.008
#> GSM1182304     1  0.3339      0.868 0.840 0.000 NA 0.112 0.000
#> GSM1182305     4  0.6100      0.133 0.428 0.000 NA 0.448 0.000
#> GSM1182306     4  0.1168      0.877 0.032 0.000 NA 0.960 0.000
#> GSM1182307     2  0.0963      0.969 0.000 0.964 NA 0.000 0.036
#> GSM1182309     2  0.0162      0.981 0.000 0.996 NA 0.000 0.004
#> GSM1182312     2  0.0290      0.980 0.000 0.992 NA 0.000 0.008
#> GSM1182314     4  0.1364      0.879 0.036 0.000 NA 0.952 0.000
#> GSM1182316     2  0.0162      0.981 0.000 0.996 NA 0.000 0.004
#> GSM1182318     2  0.0404      0.980 0.000 0.988 NA 0.000 0.012
#> GSM1182319     2  0.0671      0.977 0.000 0.980 NA 0.000 0.016
#> GSM1182320     2  0.0324      0.981 0.000 0.992 NA 0.000 0.004
#> GSM1182321     2  0.0671      0.977 0.000 0.980 NA 0.000 0.016
#> GSM1182322     2  0.0324      0.981 0.000 0.992 NA 0.000 0.004
#> GSM1182324     2  0.0324      0.980 0.000 0.992 NA 0.000 0.004
#> GSM1182297     2  0.0404      0.980 0.000 0.988 NA 0.000 0.012
#> GSM1182302     4  0.1764      0.877 0.064 0.000 NA 0.928 0.000
#> GSM1182308     2  0.0290      0.980 0.000 0.992 NA 0.000 0.008
#> GSM1182310     2  0.0162      0.981 0.000 0.996 NA 0.000 0.000
#> GSM1182311     1  0.1668      0.908 0.940 0.000 NA 0.032 0.000
#> GSM1182313     4  0.1195      0.876 0.028 0.000 NA 0.960 0.000
#> GSM1182315     2  0.0404      0.980 0.000 0.988 NA 0.000 0.012
#> GSM1182317     2  0.0290      0.980 0.000 0.992 NA 0.000 0.008
#> GSM1182323     1  0.2171      0.911 0.912 0.000 NA 0.064 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
#> GSM1182186     4  0.4949     0.6220 0.248 0.000 NA 0.644 NA 0.000
#> GSM1182187     4  0.2609     0.8741 0.096 0.000 NA 0.868 NA 0.000
#> GSM1182188     4  0.1346     0.9177 0.024 0.000 NA 0.952 NA 0.000
#> GSM1182189     1  0.0951     0.8949 0.968 0.000 NA 0.004 NA 0.000
#> GSM1182190     1  0.1957     0.9147 0.920 0.000 NA 0.048 NA 0.000
#> GSM1182191     4  0.4990     0.6059 0.256 0.000 NA 0.636 NA 0.004
#> GSM1182192     1  0.0993     0.9075 0.964 0.000 NA 0.024 NA 0.000
#> GSM1182193     1  0.1230     0.8946 0.956 0.000 NA 0.008 NA 0.000
#> GSM1182194     2  0.2793     0.8356 0.000 0.800 NA 0.000 NA 0.200
#> GSM1182195     2  0.2491     0.8708 0.000 0.836 NA 0.000 NA 0.164
#> GSM1182196     2  0.0260     0.9635 0.000 0.992 NA 0.000 NA 0.008
#> GSM1182197     2  0.0858     0.9632 0.000 0.968 NA 0.000 NA 0.004
#> GSM1182198     2  0.3371     0.7279 0.000 0.708 NA 0.000 NA 0.292
#> GSM1182199     2  0.3101     0.7875 0.000 0.756 NA 0.000 NA 0.244
#> GSM1182200     2  0.0935     0.9618 0.000 0.964 NA 0.000 NA 0.004
#> GSM1182201     2  0.0405     0.9635 0.000 0.988 NA 0.000 NA 0.008
#> GSM1182202     4  0.1719     0.9077 0.060 0.000 NA 0.924 NA 0.000
#> GSM1182203     4  0.1857     0.9134 0.044 0.000 NA 0.924 NA 0.000
#> GSM1182204     4  0.2265     0.8941 0.076 0.000 NA 0.896 NA 0.000
#> GSM1182205     2  0.1204     0.9502 0.000 0.944 NA 0.000 NA 0.056
#> GSM1182206     2  0.0632     0.9611 0.000 0.976 NA 0.000 NA 0.024
#> GSM1182207     1  0.1471     0.8787 0.932 0.000 NA 0.000 NA 0.000
#> GSM1182208     1  0.1812     0.8685 0.912 0.000 NA 0.000 NA 0.000
#> GSM1182209     2  0.0865     0.9590 0.000 0.964 NA 0.000 NA 0.000
#> GSM1182210     2  0.0547     0.9626 0.000 0.980 NA 0.000 NA 0.000
#> GSM1182211     2  0.0865     0.9590 0.000 0.964 NA 0.000 NA 0.000
#> GSM1182212     2  0.0790     0.9599 0.000 0.968 NA 0.000 NA 0.000
#> GSM1182213     2  0.1501     0.9415 0.000 0.924 NA 0.000 NA 0.000
#> GSM1182214     2  0.1007     0.9568 0.000 0.956 NA 0.000 NA 0.000
#> GSM1182215     2  0.0820     0.9642 0.000 0.972 NA 0.000 NA 0.016
#> GSM1182216     2  0.1082     0.9591 0.000 0.956 NA 0.000 NA 0.004
#> GSM1182217     4  0.3720     0.8003 0.152 0.000 NA 0.788 NA 0.000
#> GSM1182218     1  0.2265     0.9075 0.896 0.000 NA 0.076 NA 0.000
#> GSM1182219     2  0.0508     0.9638 0.000 0.984 NA 0.000 NA 0.012
#> GSM1182220     2  0.0405     0.9641 0.000 0.988 NA 0.000 NA 0.004
#> GSM1182221     2  0.0146     0.9636 0.000 0.996 NA 0.000 NA 0.000
#> GSM1182222     2  0.0260     0.9638 0.000 0.992 NA 0.000 NA 0.000
#> GSM1182223     2  0.0777     0.9618 0.000 0.972 NA 0.000 NA 0.024
#> GSM1182224     2  0.1411     0.9465 0.000 0.936 NA 0.000 NA 0.060
#> GSM1182225     2  0.0935     0.9618 0.000 0.964 NA 0.000 NA 0.004
#> GSM1182226     2  0.0935     0.9615 0.000 0.964 NA 0.000 NA 0.004
#> GSM1182227     1  0.2632     0.9045 0.880 0.000 NA 0.076 NA 0.000
#> GSM1182228     2  0.3454     0.8051 0.000 0.768 NA 0.000 NA 0.024
#> GSM1182229     2  0.0914     0.9643 0.000 0.968 NA 0.000 NA 0.016
#> GSM1182230     2  0.0790     0.9594 0.000 0.968 NA 0.000 NA 0.032
#> GSM1182231     2  0.0291     0.9638 0.000 0.992 NA 0.000 NA 0.004
#> GSM1182232     1  0.2036     0.9121 0.912 0.000 NA 0.064 NA 0.000
#> GSM1182233     1  0.1245     0.9095 0.952 0.000 NA 0.032 NA 0.000
#> GSM1182234     1  0.1485     0.9103 0.944 0.000 NA 0.028 NA 0.000
#> GSM1182235     2  0.0935     0.9610 0.000 0.964 NA 0.000 NA 0.004
#> GSM1182236     1  0.1882     0.9129 0.920 0.000 NA 0.060 NA 0.000
#> GSM1182237     2  0.0820     0.9645 0.000 0.972 NA 0.000 NA 0.016
#> GSM1182238     2  0.1010     0.9603 0.000 0.960 NA 0.000 NA 0.004
#> GSM1182239     2  0.0632     0.9621 0.000 0.976 NA 0.000 NA 0.000
#> GSM1182240     2  0.0692     0.9634 0.000 0.976 NA 0.000 NA 0.004
#> GSM1182241     2  0.1663     0.9315 0.000 0.912 NA 0.000 NA 0.000
#> GSM1182242     2  0.2257     0.9099 0.000 0.876 NA 0.000 NA 0.116
#> GSM1182243     2  0.0713     0.9603 0.000 0.972 NA 0.000 NA 0.028
#> GSM1182244     2  0.1075     0.9533 0.000 0.952 NA 0.000 NA 0.048
#> GSM1182245     1  0.1594     0.9157 0.932 0.000 NA 0.052 NA 0.000
#> GSM1182246     4  0.0858     0.9222 0.028 0.000 NA 0.968 NA 0.000
#> GSM1182247     2  0.0937     0.9568 0.000 0.960 NA 0.000 NA 0.040
#> GSM1182248     2  0.1007     0.9554 0.000 0.956 NA 0.000 NA 0.044
#> GSM1182249     2  0.0458     0.9627 0.000 0.984 NA 0.000 NA 0.016
#> GSM1182250     2  0.0458     0.9627 0.000 0.984 NA 0.000 NA 0.016
#> GSM1182251     1  0.4836     0.5953 0.644 0.000 NA 0.268 NA 0.004
#> GSM1182252     2  0.1204     0.9502 0.000 0.944 NA 0.000 NA 0.056
#> GSM1182253     2  0.1007     0.9555 0.000 0.956 NA 0.000 NA 0.044
#> GSM1182254     2  0.0405     0.9635 0.000 0.988 NA 0.000 NA 0.008
#> GSM1182255     4  0.1718     0.9144 0.044 0.000 NA 0.932 NA 0.000
#> GSM1182256     4  0.0777     0.9220 0.024 0.000 NA 0.972 NA 0.000
#> GSM1182257     4  0.0632     0.9217 0.024 0.000 NA 0.976 NA 0.000
#> GSM1182258     4  0.0993     0.9204 0.024 0.000 NA 0.964 NA 0.000
#> GSM1182259     4  0.0891     0.9217 0.024 0.000 NA 0.968 NA 0.000
#> GSM1182260     2  0.0790     0.9621 0.000 0.968 NA 0.000 NA 0.032
#> GSM1182261     2  0.0458     0.9630 0.000 0.984 NA 0.000 NA 0.016
#> GSM1182262     2  0.0692     0.9627 0.000 0.976 NA 0.000 NA 0.020
#> GSM1182263     1  0.3107     0.8569 0.832 0.000 NA 0.116 NA 0.000
#> GSM1182264     2  0.2697     0.8486 0.000 0.812 NA 0.000 NA 0.188
#> GSM1182265     2  0.0790     0.9606 0.000 0.968 NA 0.000 NA 0.032
#> GSM1182266     2  0.0603     0.9636 0.000 0.980 NA 0.000 NA 0.016
#> GSM1182267     1  0.1801     0.9137 0.924 0.000 NA 0.056 NA 0.000
#> GSM1182268     1  0.0806     0.9011 0.972 0.000 NA 0.008 NA 0.000
#> GSM1182269     1  0.1401     0.9075 0.948 0.000 NA 0.028 NA 0.000
#> GSM1182270     1  0.1914     0.9142 0.920 0.000 NA 0.056 NA 0.000
#> GSM1182271     4  0.0922     0.9218 0.024 0.000 NA 0.968 NA 0.000
#> GSM1182272     4  0.0777     0.9218 0.024 0.000 NA 0.972 NA 0.000
#> GSM1182273     2  0.1151     0.9600 0.000 0.956 NA 0.000 NA 0.012
#> GSM1182275     2  0.0508     0.9635 0.000 0.984 NA 0.000 NA 0.012
#> GSM1182276     2  0.0363     0.9636 0.000 0.988 NA 0.000 NA 0.000
#> GSM1182277     1  0.1807     0.9135 0.920 0.000 NA 0.060 NA 0.000
#> GSM1182278     1  0.2011     0.9115 0.912 0.000 NA 0.064 NA 0.000
#> GSM1182279     1  0.4114     0.7393 0.732 0.000 NA 0.196 NA 0.000
#> GSM1182280     1  0.1995     0.9069 0.912 0.000 NA 0.052 NA 0.000
#> GSM1182281     4  0.5242     0.3940 0.348 0.000 NA 0.564 NA 0.000
#> GSM1182282     1  0.1769     0.9135 0.924 0.000 NA 0.060 NA 0.000
#> GSM1182283     1  0.1578     0.9143 0.936 0.000 NA 0.048 NA 0.000
#> GSM1182284     1  0.3196     0.8515 0.824 0.000 NA 0.136 NA 0.000
#> GSM1182285     2  0.2006     0.9172 0.000 0.892 NA 0.000 NA 0.104
#> GSM1182286     2  0.0547     0.9648 0.000 0.980 NA 0.000 NA 0.000
#> GSM1182287     2  0.1092     0.9643 0.000 0.960 NA 0.000 NA 0.020
#> GSM1182288     2  0.1196     0.9571 0.000 0.952 NA 0.000 NA 0.040
#> GSM1182289     1  0.4229     0.7081 0.712 0.000 NA 0.220 NA 0.000
#> GSM1182290     1  0.1588     0.8775 0.924 0.000 NA 0.000 NA 0.000
#> GSM1182291     4  0.0777     0.9216 0.024 0.000 NA 0.972 NA 0.000
#> GSM1182274     2  0.1391     0.9544 0.000 0.944 NA 0.000 NA 0.016
#> GSM1182292     2  0.1075     0.9566 0.000 0.952 NA 0.000 NA 0.000
#> GSM1182293     2  0.0458     0.9631 0.000 0.984 NA 0.000 NA 0.000
#> GSM1182294     2  0.1168     0.9582 0.000 0.956 NA 0.000 NA 0.016
#> GSM1182295     2  0.0632     0.9617 0.000 0.976 NA 0.000 NA 0.000
#> GSM1182296     2  0.0858     0.9618 0.000 0.968 NA 0.000 NA 0.000
#> GSM1182298     2  0.3050     0.7961 0.000 0.764 NA 0.000 NA 0.236
#> GSM1182299     2  0.0935     0.9610 0.000 0.964 NA 0.000 NA 0.004
#> GSM1182300     2  0.0405     0.9643 0.000 0.988 NA 0.000 NA 0.004
#> GSM1182301     2  0.1082     0.9578 0.000 0.956 NA 0.000 NA 0.000
#> GSM1182303     2  0.0363     0.9634 0.000 0.988 NA 0.000 NA 0.000
#> GSM1182304     1  0.2390     0.8973 0.888 0.000 NA 0.056 NA 0.000
#> GSM1182305     1  0.5705     0.0162 0.448 0.000 NA 0.424 NA 0.004
#> GSM1182306     4  0.1138     0.9201 0.024 0.000 NA 0.960 NA 0.000
#> GSM1182307     2  0.1663     0.9318 0.000 0.912 NA 0.000 NA 0.000
#> GSM1182309     2  0.0363     0.9644 0.000 0.988 NA 0.000 NA 0.000
#> GSM1182312     2  0.0547     0.9630 0.000 0.980 NA 0.000 NA 0.000
#> GSM1182314     4  0.0891     0.9210 0.024 0.000 NA 0.968 NA 0.000
#> GSM1182316     2  0.0363     0.9636 0.000 0.988 NA 0.000 NA 0.000
#> GSM1182318     2  0.0547     0.9624 0.000 0.980 NA 0.000 NA 0.000
#> GSM1182319     2  0.1010     0.9585 0.000 0.960 NA 0.000 NA 0.036
#> GSM1182320     2  0.0363     0.9634 0.000 0.988 NA 0.000 NA 0.000
#> GSM1182321     2  0.1285     0.9528 0.000 0.944 NA 0.000 NA 0.052
#> GSM1182322     2  0.0291     0.9640 0.000 0.992 NA 0.000 NA 0.004
#> GSM1182324     2  0.0363     0.9631 0.000 0.988 NA 0.000 NA 0.012
#> GSM1182297     2  0.0632     0.9628 0.000 0.976 NA 0.000 NA 0.000
#> GSM1182302     4  0.1049     0.9205 0.032 0.000 NA 0.960 NA 0.000
#> GSM1182308     2  0.0458     0.9631 0.000 0.984 NA 0.000 NA 0.000
#> GSM1182310     2  0.0622     0.9642 0.000 0.980 NA 0.000 NA 0.012
#> GSM1182311     1  0.1421     0.9100 0.944 0.000 NA 0.028 NA 0.000
#> GSM1182313     4  0.0777     0.9216 0.024 0.000 NA 0.972 NA 0.000
#> GSM1182315     2  0.1007     0.9585 0.000 0.956 NA 0.000 NA 0.000
#> GSM1182317     2  0.0458     0.9633 0.000 0.984 NA 0.000 NA 0.000
#> GSM1182323     1  0.2011     0.9122 0.912 0.000 NA 0.064 NA 0.000

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk ATC-NMF-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

plot of chunk tab-ATC-NMF-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-ATC-NMF-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk ATC-NMF-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>           n disease.state(p) gender(p) k
#> ATC:NMF 139           0.0773     1.000 2
#> ATC:NMF 136           0.1286     0.964 3
#> ATC:NMF 137           0.0743     0.908 4
#> ATC:NMF 137           0.0743     0.908 5
#> ATC:NMF 137           0.0743     0.908 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