cola Report for GDS3116

Date: 2019-12-25 20:40:25 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 21168 rows and 116 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] 21168   116

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 3 1.000 0.955 0.957 **
MAD:hclust 2 1.000 0.973 0.986 **
MAD:kmeans 2 1.000 0.999 1.000 **
MAD:mclust 2 1.000 0.993 0.997 **
ATC:kmeans 3 1.000 0.980 0.991 ** 2
ATC:mclust 2 1.000 0.991 0.997 **
CV:skmeans 4 0.988 0.947 0.968 ** 2,3
CV:NMF 2 0.963 0.942 0.976 **
MAD:skmeans 4 0.954 0.931 0.950 ** 2,3
CV:hclust 4 0.954 0.920 0.953 **
MAD:NMF 2 0.946 0.943 0.977 *
ATC:skmeans 4 0.938 0.876 0.947 * 2,3
ATC:NMF 3 0.933 0.923 0.964 * 2
CV:pam 2 0.928 0.936 0.974 *
SD:skmeans 4 0.927 0.887 0.930 * 2,3
ATC:pam 4 0.927 0.907 0.962 * 2
ATC:hclust 3 0.920 0.917 0.956 *
SD:mclust 5 0.919 0.937 0.952 * 2
CV:kmeans 3 0.916 0.961 0.960 * 2
SD:NMF 2 0.894 0.928 0.970
MAD:pam 2 0.893 0.926 0.969
SD:pam 2 0.842 0.934 0.970
SD:hclust 3 0.811 0.939 0.943
CV:mclust 2 0.803 0.937 0.966

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

CDF of consensus matrices

Cumulative distribution function curves of consensus matrix for all methods.

collect_plots(res_list, fun = plot_ecdf)

plot of chunk collect-plots

Consensus heatmap

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

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

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

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

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

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

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

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

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

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

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

Membership heatmap

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

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

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

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

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

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

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

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

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

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

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

Signature heatmap

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

Note in following heatmaps, rows are scaled.

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

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

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

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

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

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

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

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

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

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

Statistics table

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

get_stats(res_list, k = 2)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      2 0.894           0.928       0.970          0.502 0.496   0.496
#> CV:NMF      2 0.963           0.942       0.976          0.504 0.496   0.496
#> MAD:NMF     2 0.946           0.943       0.977          0.503 0.496   0.496
#> ATC:NMF     2 1.000           0.981       0.992          0.503 0.498   0.498
#> SD:skmeans  2 1.000           0.981       0.991          0.503 0.498   0.498
#> CV:skmeans  2 1.000           0.990       0.995          0.501 0.499   0.499
#> MAD:skmeans 2 1.000           0.992       0.997          0.501 0.499   0.499
#> ATC:skmeans 2 1.000           0.974       0.991          0.503 0.496   0.496
#> SD:mclust   2 0.922           0.967       0.973          0.478 0.511   0.511
#> CV:mclust   2 0.803           0.937       0.966          0.492 0.511   0.511
#> MAD:mclust  2 1.000           0.993       0.997          0.490 0.511   0.511
#> ATC:mclust  2 1.000           0.991       0.997          0.485 0.514   0.514
#> SD:kmeans   2 0.899           0.964       0.982          0.499 0.503   0.503
#> CV:kmeans   2 1.000           0.991       0.995          0.499 0.501   0.501
#> MAD:kmeans  2 1.000           0.999       1.000          0.497 0.503   0.503
#> ATC:kmeans  2 1.000           0.987       0.994          0.502 0.499   0.499
#> SD:pam      2 0.842           0.934       0.970          0.503 0.496   0.496
#> CV:pam      2 0.928           0.936       0.974          0.503 0.496   0.496
#> MAD:pam     2 0.893           0.926       0.969          0.503 0.496   0.496
#> ATC:pam     2 1.000           0.992       0.997          0.501 0.499   0.499
#> SD:hclust   2 0.611           0.873       0.911          0.475 0.505   0.505
#> CV:hclust   2 0.658           0.913       0.943          0.484 0.505   0.505
#> MAD:hclust  2 1.000           0.973       0.986          0.494 0.505   0.505
#> ATC:hclust  2 0.805           0.923       0.958          0.434 0.568   0.568
get_stats(res_list, k = 3)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      3 0.750           0.832       0.914          0.309 0.794   0.605
#> CV:NMF      3 0.799           0.837       0.917          0.287 0.820   0.651
#> MAD:NMF     3 0.797           0.869       0.931          0.287 0.806   0.627
#> ATC:NMF     3 0.933           0.923       0.964          0.308 0.799   0.612
#> SD:skmeans  3 0.960           0.955       0.980          0.289 0.822   0.654
#> CV:skmeans  3 0.914           0.935       0.969          0.253 0.863   0.731
#> MAD:skmeans 3 0.922           0.967       0.982          0.284 0.829   0.667
#> ATC:skmeans 3 0.969           0.948       0.977          0.257 0.835   0.677
#> SD:mclust   3 0.679           0.785       0.771          0.316 0.829   0.665
#> CV:mclust   3 0.828           0.830       0.920          0.311 0.839   0.684
#> MAD:mclust  3 0.682           0.808       0.790          0.292 0.830   0.668
#> ATC:mclust  3 0.723           0.753       0.840          0.296 0.841   0.691
#> SD:kmeans   3 1.000           0.955       0.957          0.319 0.806   0.624
#> CV:kmeans   3 0.916           0.961       0.960          0.318 0.800   0.615
#> MAD:kmeans  3 0.798           0.949       0.938          0.317 0.806   0.626
#> ATC:kmeans  3 1.000           0.980       0.991          0.324 0.794   0.606
#> SD:pam      3 0.851           0.878       0.945          0.302 0.797   0.611
#> CV:pam      3 0.872           0.887       0.948          0.299 0.804   0.621
#> MAD:pam     3 0.833           0.845       0.924          0.299 0.797   0.610
#> ATC:pam     3 0.873           0.872       0.951          0.314 0.781   0.585
#> SD:hclust   3 0.811           0.939       0.943          0.353 0.837   0.677
#> CV:hclust   3 0.882           0.916       0.936          0.327 0.838   0.680
#> MAD:hclust  3 0.829           0.929       0.933          0.307 0.837   0.677
#> ATC:hclust  3 0.920           0.917       0.956          0.511 0.770   0.595
get_stats(res_list, k = 4)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      4 0.596           0.631       0.794         0.1193 0.887   0.689
#> CV:NMF      4 0.621           0.596       0.783         0.1141 0.891   0.713
#> MAD:NMF     4 0.637           0.655       0.820         0.1187 0.895   0.712
#> ATC:NMF     4 0.789           0.748       0.876         0.0672 0.982   0.947
#> SD:skmeans  4 0.927           0.887       0.930         0.0769 0.947   0.852
#> CV:skmeans  4 0.988           0.947       0.968         0.1126 0.922   0.796
#> MAD:skmeans 4 0.954           0.931       0.950         0.0796 0.941   0.837
#> ATC:skmeans 4 0.938           0.876       0.947         0.0662 0.927   0.807
#> SD:mclust   4 0.721           0.790       0.819         0.1502 0.825   0.547
#> CV:mclust   4 0.693           0.761       0.812         0.1030 0.939   0.829
#> MAD:mclust  4 0.691           0.837       0.868         0.1572 0.845   0.589
#> ATC:mclust  4 0.681           0.770       0.801         0.1104 0.850   0.626
#> SD:kmeans   4 0.723           0.695       0.817         0.1072 0.995   0.986
#> CV:kmeans   4 0.775           0.584       0.814         0.1000 0.993   0.979
#> MAD:kmeans  4 0.735           0.724       0.800         0.1046 0.981   0.943
#> ATC:kmeans  4 0.851           0.796       0.883         0.0884 0.939   0.819
#> SD:pam      4 0.799           0.838       0.911         0.1389 0.885   0.678
#> CV:pam      4 0.808           0.842       0.917         0.1381 0.895   0.701
#> MAD:pam     4 0.667           0.731       0.856         0.1369 0.877   0.656
#> ATC:pam     4 0.927           0.907       0.962         0.0694 0.934   0.811
#> SD:hclust   4 0.744           0.884       0.888         0.0763 1.000   1.000
#> CV:hclust   4 0.954           0.920       0.953         0.0430 0.966   0.905
#> MAD:hclust  4 0.829           0.865       0.915         0.0713 0.991   0.974
#> ATC:hclust  4 0.877           0.837       0.859         0.0672 1.000   1.000
get_stats(res_list, k = 5)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      5 0.658           0.588       0.780         0.0528 0.911   0.699
#> CV:NMF      5 0.676           0.638       0.789         0.0483 0.921   0.752
#> MAD:NMF     5 0.647           0.609       0.764         0.0572 0.933   0.770
#> ATC:NMF     5 0.704           0.611       0.795         0.0520 0.965   0.895
#> SD:skmeans  5 0.776           0.742       0.827         0.0895 0.897   0.677
#> CV:skmeans  5 0.792           0.723       0.868         0.0922 0.939   0.800
#> MAD:skmeans 5 0.799           0.769       0.824         0.0881 0.917   0.737
#> ATC:skmeans 5 0.886           0.852       0.914         0.0349 0.981   0.940
#> SD:mclust   5 0.919           0.937       0.952         0.1014 0.872   0.559
#> CV:mclust   5 0.634           0.656       0.780         0.0761 0.901   0.682
#> MAD:mclust  5 0.860           0.889       0.916         0.0892 0.889   0.605
#> ATC:mclust  5 0.806           0.859       0.885         0.0879 0.889   0.655
#> SD:kmeans   5 0.688           0.660       0.721         0.0628 0.861   0.590
#> CV:kmeans   5 0.724           0.714       0.766         0.0641 0.849   0.558
#> MAD:kmeans  5 0.706           0.607       0.735         0.0695 0.884   0.641
#> ATC:kmeans  5 0.787           0.797       0.856         0.0502 0.940   0.788
#> SD:pam      5 0.815           0.756       0.866         0.0544 0.957   0.832
#> CV:pam      5 0.821           0.831       0.918         0.0549 0.946   0.795
#> MAD:pam     5 0.807           0.761       0.875         0.0598 0.927   0.731
#> ATC:pam     5 0.777           0.710       0.805         0.0899 0.976   0.922
#> SD:hclust   5 0.725           0.536       0.808         0.0597 0.969   0.909
#> CV:hclust   5 0.787           0.818       0.859         0.0828 0.991   0.973
#> MAD:hclust  5 0.766           0.726       0.856         0.0659 0.945   0.834
#> ATC:hclust  5 0.876           0.837       0.876         0.0242 0.933   0.804
get_stats(res_list, k = 6)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      6 0.686           0.573       0.748         0.0320 0.949   0.793
#> CV:NMF      6 0.671           0.597       0.773         0.0453 0.939   0.778
#> MAD:NMF     6 0.695           0.578       0.771         0.0292 0.909   0.687
#> ATC:NMF     6 0.703           0.622       0.783         0.0283 0.964   0.883
#> SD:skmeans  6 0.730           0.663       0.802         0.0483 0.981   0.916
#> CV:skmeans  6 0.752           0.641       0.804         0.0368 0.961   0.845
#> MAD:skmeans 6 0.732           0.659       0.808         0.0508 0.941   0.766
#> ATC:skmeans 6 0.883           0.814       0.899         0.0302 0.996   0.987
#> SD:mclust   6 0.881           0.836       0.898         0.0319 0.964   0.820
#> CV:mclust   6 0.654           0.588       0.740         0.0417 0.964   0.851
#> MAD:mclust  6 0.829           0.792       0.850         0.0292 0.968   0.838
#> ATC:mclust  6 0.884           0.864       0.890         0.0551 0.942   0.759
#> SD:kmeans   6 0.659           0.485       0.684         0.0415 0.917   0.644
#> CV:kmeans   6 0.695           0.679       0.764         0.0400 0.993   0.966
#> MAD:kmeans  6 0.691           0.670       0.727         0.0406 0.952   0.792
#> ATC:kmeans  6 0.728           0.821       0.820         0.0427 0.963   0.846
#> SD:pam      6 0.792           0.701       0.836         0.0424 0.964   0.833
#> CV:pam      6 0.803           0.752       0.851         0.0453 0.959   0.810
#> MAD:pam     6 0.778           0.570       0.790         0.0474 0.927   0.688
#> ATC:pam     6 0.785           0.765       0.860         0.0607 0.876   0.577
#> SD:hclust   6 0.723           0.787       0.825         0.0528 0.904   0.696
#> CV:hclust   6 0.791           0.531       0.808         0.0386 0.963   0.886
#> MAD:hclust  6 0.761           0.710       0.833         0.0437 0.939   0.789
#> ATC:hclust  6 0.830           0.778       0.870         0.0288 0.968   0.892

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

collect_stats(res_list, k = 2)

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

collect_stats(res_list, k = 3)

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

collect_stats(res_list, k = 4)

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

collect_stats(res_list, k = 5)

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

collect_stats(res_list, k = 6)

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

Partition from all methods

Collect partitions from all methods:

collect_classes(res_list, k = 2)

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

collect_classes(res_list, k = 3)

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

collect_classes(res_list, k = 4)

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

collect_classes(res_list, k = 5)

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

collect_classes(res_list, k = 6)

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

Top rows overlap

Overlap of top rows from different top-row methods:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Heatmaps of the top rows:

top_rows_heatmap(res_list, top_n = 1000)

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

top_rows_heatmap(res_list, top_n = 2000)

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

top_rows_heatmap(res_list, top_n = 3000)

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

top_rows_heatmap(res_list, top_n = 4000)

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

top_rows_heatmap(res_list, top_n = 5000)

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

Test to known annotations

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

test_to_known_factors(res_list, k = 2)
#>               n agent(p) individual(p) k
#> SD:NMF      111    1.000      1.13e-04 2
#> CV:NMF      113    0.778      1.13e-04 2
#> MAD:NMF     113    1.000      4.12e-05 2
#> ATC:NMF     116    1.000      1.90e-05 2
#> SD:skmeans  116    1.000      1.90e-05 2
#> CV:skmeans  116    1.000      1.12e-05 2
#> MAD:skmeans 116    1.000      1.12e-05 2
#> ATC:skmeans 114    1.000      3.19e-05 2
#> SD:mclust   116    1.000      6.52e-06 2
#> CV:mclust   116    1.000      6.52e-06 2
#> MAD:mclust  116    1.000      6.52e-06 2
#> ATC:mclust  115    1.000      1.49e-05 2
#> SD:kmeans   115    0.934      1.46e-05 2
#> CV:kmeans   116    0.852      1.91e-05 2
#> MAD:kmeans  116    1.000      1.12e-05 2
#> ATC:kmeans  116    1.000      3.22e-05 2
#> SD:pam      115    1.000      6.83e-05 2
#> CV:pam      113    1.000      2.89e-05 2
#> MAD:pam     113    1.000      4.84e-05 2
#> ATC:pam     115    0.918      2.48e-05 2
#> SD:hclust   116    1.000      6.52e-06 2
#> CV:hclust   114    1.000      7.66e-06 2
#> MAD:hclust  115    1.000      8.53e-06 2
#> ATC:hclust  115    1.000      9.46e-05 2
test_to_known_factors(res_list, k = 3)
#>               n agent(p) individual(p) k
#> SD:NMF      110    0.101      8.84e-06 3
#> CV:NMF      108    0.350      5.57e-06 3
#> MAD:NMF     111    0.186      1.08e-05 3
#> ATC:NMF     113    0.991      1.71e-07 3
#> SD:skmeans  114    0.695      1.33e-07 3
#> CV:skmeans  116    0.962      1.49e-09 3
#> MAD:skmeans 115    0.789      9.02e-08 3
#> ATC:skmeans 111    0.950      2.16e-07 3
#> SD:mclust   108    0.815      1.81e-07 3
#> CV:mclust   102    0.976      5.06e-08 3
#> MAD:mclust  110    0.968      5.70e-08 3
#> ATC:mclust  100    0.739      4.72e-06 3
#> SD:kmeans   115    0.830      2.51e-08 3
#> CV:kmeans   115    0.933      1.07e-08 3
#> MAD:kmeans  115    0.826      2.49e-08 3
#> ATC:kmeans  114    0.974      3.76e-08 3
#> SD:pam      108    0.777      2.04e-06 3
#> CV:pam      109    0.963      1.55e-06 3
#> MAD:pam     105    0.871      2.78e-06 3
#> ATC:pam     108    0.879      6.53e-07 3
#> SD:hclust   116    1.000      2.82e-09 3
#> CV:hclust   111    0.989      8.88e-09 3
#> MAD:hclust  115    0.994      4.62e-09 3
#> ATC:hclust  113    0.988      3.59e-08 3
test_to_known_factors(res_list, k = 4)
#>               n agent(p) individual(p) k
#> SD:NMF       87    0.304      7.78e-06 4
#> CV:NMF       76    1.000      1.02e-03 4
#> MAD:NMF      88    0.544      1.24e-06 4
#> ATC:NMF     102    0.928      2.49e-06 4
#> SD:skmeans  113    0.950      1.96e-10 4
#> CV:skmeans  115    0.997      1.96e-11 4
#> MAD:skmeans 116    0.933      1.12e-10 4
#> ATC:skmeans 107    0.937      2.21e-11 4
#> SD:mclust   105    0.716      2.62e-05 4
#> CV:mclust   110    0.985      1.80e-11 4
#> MAD:mclust  111    0.690      1.18e-06 4
#> ATC:mclust  109    0.531      1.61e-08 4
#> SD:kmeans   101    0.805      2.80e-07 4
#> CV:kmeans    87    0.884      1.89e-06 4
#> MAD:kmeans  100    0.370      7.98e-08 4
#> ATC:kmeans  109    0.986      6.55e-09 4
#> SD:pam      108    0.281      1.06e-05 4
#> CV:pam      108    0.292      5.35e-06 4
#> MAD:pam      99    0.313      1.66e-05 4
#> ATC:pam     111    0.699      6.67e-09 4
#> SD:hclust   116    1.000      2.82e-09 4
#> CV:hclust   113    0.999      7.89e-13 4
#> MAD:hclust  110    1.000      4.34e-13 4
#> ATC:hclust  110    1.000      4.55e-08 4
test_to_known_factors(res_list, k = 5)
#>               n agent(p) individual(p) k
#> SD:NMF       78    0.110      1.68e-05 5
#> CV:NMF       87    0.599      8.94e-05 5
#> MAD:NMF      84    0.130      4.62e-05 5
#> ATC:NMF      76    0.616      4.24e-06 5
#> SD:skmeans  102    0.971      7.44e-10 5
#> CV:skmeans   99    0.978      4.56e-11 5
#> MAD:skmeans 105    0.943      1.90e-09 5
#> ATC:skmeans 105    0.971      1.45e-11 5
#> SD:mclust   114    0.316      4.20e-06 5
#> CV:mclust    95    0.891      2.21e-08 5
#> MAD:mclust  114    0.387      7.53e-07 5
#> ATC:mclust  113    0.998      2.41e-10 5
#> SD:kmeans    98    0.999      3.30e-09 5
#> CV:kmeans    96    0.808      6.59e-11 5
#> MAD:kmeans   97    0.924      7.87e-08 5
#> ATC:kmeans  109    0.963      1.24e-10 5
#> SD:pam      105    0.476      2.58e-08 5
#> CV:pam      110    0.426      8.96e-09 5
#> MAD:pam     106    0.590      4.15e-08 5
#> ATC:pam     108    0.893      8.71e-09 5
#> SD:hclust    88    0.744      5.18e-12 5
#> CV:hclust   115    1.000      5.47e-17 5
#> MAD:hclust  101    0.867      1.75e-12 5
#> ATC:hclust  110    0.930      9.45e-13 5
test_to_known_factors(res_list, k = 6)
#>               n agent(p) individual(p) k
#> SD:NMF       76   0.2979      7.38e-09 6
#> CV:NMF       81   0.0605      1.32e-05 6
#> MAD:NMF      81   0.0235      3.01e-05 6
#> ATC:NMF      87   0.9920      1.52e-07 6
#> SD:skmeans   99   0.9832      3.58e-09 6
#> CV:skmeans   90   0.9286      1.24e-09 6
#> MAD:skmeans 101   0.9938      3.09e-09 6
#> ATC:skmeans 108   0.9943      4.97e-13 6
#> SD:mclust   106   0.3948      3.42e-06 6
#> CV:mclust    84   0.8168      4.91e-06 6
#> MAD:mclust  105   0.3279      1.62e-07 6
#> ATC:mclust  111   0.9925      2.84e-11 6
#> SD:kmeans    74   0.9896      3.76e-07 6
#> CV:kmeans    96   0.8692      6.24e-11 6
#> MAD:kmeans  104   0.9122      2.93e-10 6
#> ATC:kmeans  115   0.9182      1.10e-12 6
#> SD:pam       96   0.5525      2.11e-09 6
#> CV:pam      107   0.5321      9.03e-10 6
#> MAD:pam      71   0.4643      9.00e-05 6
#> ATC:pam     106   0.8048      1.12e-09 6
#> SD:hclust   111   0.9998      1.43e-17 6
#> CV:hclust    84   0.9999      2.62e-14 6
#> MAD:hclust   98   0.9833      1.05e-15 6
#> ATC:hclust  105   0.9841      1.52e-17 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 21168 rows and 116 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 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-hclust-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.611           0.873       0.911         0.4754 0.505   0.505
#> 3 3 0.811           0.939       0.943         0.3527 0.837   0.677
#> 4 4 0.744           0.884       0.888         0.0763 1.000   1.000
#> 5 5 0.725           0.536       0.808         0.0597 0.969   0.909
#> 6 6 0.723           0.787       0.825         0.0528 0.904   0.696

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

suggest_best_k(res)
#> [1] 3

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

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

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM125123     1  0.0000      0.998 1.000 0.000
#> GSM125125     1  0.0000      0.998 1.000 0.000
#> GSM125127     1  0.0000      0.998 1.000 0.000
#> GSM125129     1  0.0000      0.998 1.000 0.000
#> GSM125131     1  0.0000      0.998 1.000 0.000
#> GSM125133     1  0.0000      0.998 1.000 0.000
#> GSM125135     1  0.0000      0.998 1.000 0.000
#> GSM125137     1  0.0000      0.998 1.000 0.000
#> GSM125139     1  0.0000      0.998 1.000 0.000
#> GSM125141     1  0.0000      0.998 1.000 0.000
#> GSM125143     1  0.0000      0.998 1.000 0.000
#> GSM125145     1  0.0000      0.998 1.000 0.000
#> GSM125147     1  0.0000      0.998 1.000 0.000
#> GSM125149     1  0.0000      0.998 1.000 0.000
#> GSM125151     1  0.0000      0.998 1.000 0.000
#> GSM125153     1  0.0000      0.998 1.000 0.000
#> GSM125155     1  0.0000      0.998 1.000 0.000
#> GSM125157     1  0.0000      0.998 1.000 0.000
#> GSM125159     2  0.0000      0.828 0.000 1.000
#> GSM125161     1  0.0000      0.998 1.000 0.000
#> GSM125163     2  0.0000      0.828 0.000 1.000
#> GSM125165     2  0.8443      0.766 0.272 0.728
#> GSM125167     2  0.0000      0.828 0.000 1.000
#> GSM125169     2  0.0000      0.828 0.000 1.000
#> GSM125171     2  0.0000      0.828 0.000 1.000
#> GSM125173     2  0.9393      0.697 0.356 0.644
#> GSM125175     2  0.0000      0.828 0.000 1.000
#> GSM125177     2  0.9248      0.717 0.340 0.660
#> GSM125179     2  0.9209      0.721 0.336 0.664
#> GSM125181     2  0.7674      0.782 0.224 0.776
#> GSM125183     2  0.9209      0.721 0.336 0.664
#> GSM125185     2  0.9209      0.721 0.336 0.664
#> GSM125187     2  0.8861      0.746 0.304 0.696
#> GSM125189     2  0.0000      0.828 0.000 1.000
#> GSM125191     2  0.3733      0.816 0.072 0.928
#> GSM125193     2  0.9358      0.701 0.352 0.648
#> GSM125195     2  0.9393      0.697 0.356 0.644
#> GSM125197     2  0.0000      0.828 0.000 1.000
#> GSM125199     1  0.0000      0.998 1.000 0.000
#> GSM125201     2  0.0000      0.828 0.000 1.000
#> GSM125203     2  0.9248      0.717 0.340 0.660
#> GSM125205     2  0.0000      0.828 0.000 1.000
#> GSM125207     2  0.9000      0.738 0.316 0.684
#> GSM125209     2  0.8386      0.766 0.268 0.732
#> GSM125211     2  0.9209      0.716 0.336 0.664
#> GSM125213     2  0.0000      0.828 0.000 1.000
#> GSM125215     2  0.0000      0.828 0.000 1.000
#> GSM125217     2  0.0000      0.828 0.000 1.000
#> GSM125219     1  0.0000      0.998 1.000 0.000
#> GSM125221     2  0.8661      0.757 0.288 0.712
#> GSM125223     2  0.0000      0.828 0.000 1.000
#> GSM125225     2  0.0000      0.828 0.000 1.000
#> GSM125227     2  0.0000      0.828 0.000 1.000
#> GSM125229     2  0.9209      0.716 0.336 0.664
#> GSM125231     1  0.3733      0.899 0.928 0.072
#> GSM125233     1  0.0000      0.998 1.000 0.000
#> GSM125235     1  0.0000      0.998 1.000 0.000
#> GSM125237     1  0.0000      0.998 1.000 0.000
#> GSM125124     1  0.0000      0.998 1.000 0.000
#> GSM125126     1  0.0000      0.998 1.000 0.000
#> GSM125128     1  0.0000      0.998 1.000 0.000
#> GSM125130     1  0.0000      0.998 1.000 0.000
#> GSM125132     1  0.0000      0.998 1.000 0.000
#> GSM125134     1  0.0000      0.998 1.000 0.000
#> GSM125136     1  0.0000      0.998 1.000 0.000
#> GSM125138     1  0.0000      0.998 1.000 0.000
#> GSM125140     1  0.0000      0.998 1.000 0.000
#> GSM125142     1  0.0000      0.998 1.000 0.000
#> GSM125144     1  0.0000      0.998 1.000 0.000
#> GSM125146     1  0.0000      0.998 1.000 0.000
#> GSM125148     1  0.0000      0.998 1.000 0.000
#> GSM125150     1  0.0000      0.998 1.000 0.000
#> GSM125152     1  0.0000      0.998 1.000 0.000
#> GSM125154     1  0.0000      0.998 1.000 0.000
#> GSM125156     1  0.0000      0.998 1.000 0.000
#> GSM125158     1  0.0000      0.998 1.000 0.000
#> GSM125160     2  0.0000      0.828 0.000 1.000
#> GSM125162     1  0.0000      0.998 1.000 0.000
#> GSM125164     2  0.0000      0.828 0.000 1.000
#> GSM125166     2  0.0000      0.828 0.000 1.000
#> GSM125168     2  0.0000      0.828 0.000 1.000
#> GSM125170     2  0.0000      0.828 0.000 1.000
#> GSM125172     2  0.0000      0.828 0.000 1.000
#> GSM125174     2  0.9393      0.697 0.356 0.644
#> GSM125176     2  0.0000      0.828 0.000 1.000
#> GSM125178     2  0.9248      0.717 0.340 0.660
#> GSM125180     2  0.9209      0.721 0.336 0.664
#> GSM125182     2  0.7674      0.782 0.224 0.776
#> GSM125184     2  0.9209      0.721 0.336 0.664
#> GSM125186     2  0.9209      0.721 0.336 0.664
#> GSM125188     2  0.7883      0.778 0.236 0.764
#> GSM125190     2  0.0000      0.828 0.000 1.000
#> GSM125192     2  0.0000      0.828 0.000 1.000
#> GSM125194     2  0.9358      0.701 0.352 0.648
#> GSM125196     2  0.9393      0.697 0.356 0.644
#> GSM125198     2  0.0000      0.828 0.000 1.000
#> GSM125200     1  0.0000      0.998 1.000 0.000
#> GSM125202     2  0.0000      0.828 0.000 1.000
#> GSM125204     2  0.9248      0.717 0.340 0.660
#> GSM125206     2  0.9393      0.697 0.356 0.644
#> GSM125208     2  0.9000      0.738 0.316 0.684
#> GSM125210     2  0.8386      0.766 0.268 0.732
#> GSM125212     2  0.9209      0.716 0.336 0.664
#> GSM125214     2  0.0000      0.828 0.000 1.000
#> GSM125216     2  0.0000      0.828 0.000 1.000
#> GSM125218     2  0.0000      0.828 0.000 1.000
#> GSM125220     1  0.0000      0.998 1.000 0.000
#> GSM125222     2  0.8661      0.757 0.288 0.712
#> GSM125224     2  0.0000      0.828 0.000 1.000
#> GSM125226     2  0.0000      0.828 0.000 1.000
#> GSM125228     2  0.0000      0.828 0.000 1.000
#> GSM125230     2  0.9209      0.716 0.336 0.664
#> GSM125232     1  0.0376      0.993 0.996 0.004
#> GSM125234     1  0.0938      0.983 0.988 0.012
#> GSM125236     1  0.0000      0.998 1.000 0.000
#> GSM125238     1  0.0000      0.998 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
#> GSM125123     1  0.0000      0.988 1.000 0.000 0.000
#> GSM125125     1  0.0000      0.988 1.000 0.000 0.000
#> GSM125127     1  0.0237      0.988 0.996 0.000 0.004
#> GSM125129     1  0.0592      0.984 0.988 0.000 0.012
#> GSM125131     1  0.0000      0.988 1.000 0.000 0.000
#> GSM125133     1  0.1289      0.969 0.968 0.000 0.032
#> GSM125135     1  0.0237      0.988 0.996 0.000 0.004
#> GSM125137     1  0.1031      0.973 0.976 0.000 0.024
#> GSM125139     1  0.0000      0.988 1.000 0.000 0.000
#> GSM125141     1  0.0000      0.988 1.000 0.000 0.000
#> GSM125143     1  0.0592      0.984 0.988 0.000 0.012
#> GSM125145     1  0.0237      0.988 0.996 0.000 0.004
#> GSM125147     1  0.0000      0.988 1.000 0.000 0.000
#> GSM125149     1  0.0000      0.988 1.000 0.000 0.000
#> GSM125151     1  0.0424      0.986 0.992 0.000 0.008
#> GSM125153     1  0.0237      0.988 0.996 0.000 0.004
#> GSM125155     1  0.0237      0.987 0.996 0.000 0.004
#> GSM125157     1  0.0000      0.988 1.000 0.000 0.000
#> GSM125159     2  0.4002      0.895 0.000 0.840 0.160
#> GSM125161     1  0.1289      0.969 0.968 0.000 0.032
#> GSM125163     2  0.3412      0.906 0.000 0.876 0.124
#> GSM125165     3  0.4339      0.906 0.048 0.084 0.868
#> GSM125167     2  0.4291      0.879 0.000 0.820 0.180
#> GSM125169     2  0.4291      0.879 0.000 0.820 0.180
#> GSM125171     2  0.0892      0.906 0.000 0.980 0.020
#> GSM125173     3  0.3846      0.928 0.108 0.016 0.876
#> GSM125175     2  0.0000      0.905 0.000 1.000 0.000
#> GSM125177     3  0.3587      0.942 0.088 0.020 0.892
#> GSM125179     3  0.3415      0.943 0.080 0.020 0.900
#> GSM125181     3  0.2537      0.887 0.000 0.080 0.920
#> GSM125183     3  0.4015      0.937 0.096 0.028 0.876
#> GSM125185     3  0.3415      0.943 0.080 0.020 0.900
#> GSM125187     3  0.3009      0.940 0.052 0.028 0.920
#> GSM125189     2  0.4002      0.895 0.000 0.840 0.160
#> GSM125191     2  0.6275      0.568 0.008 0.644 0.348
#> GSM125193     3  0.4121      0.921 0.108 0.024 0.868
#> GSM125195     3  0.3528      0.939 0.092 0.016 0.892
#> GSM125197     2  0.0000      0.905 0.000 1.000 0.000
#> GSM125199     1  0.0000      0.988 1.000 0.000 0.000
#> GSM125201     2  0.0000      0.905 0.000 1.000 0.000
#> GSM125203     3  0.3415      0.944 0.080 0.020 0.900
#> GSM125205     2  0.0000      0.905 0.000 1.000 0.000
#> GSM125207     3  0.2743      0.940 0.052 0.020 0.928
#> GSM125209     3  0.2269      0.919 0.016 0.040 0.944
#> GSM125211     3  0.1647      0.918 0.036 0.004 0.960
#> GSM125213     2  0.2878      0.910 0.000 0.904 0.096
#> GSM125215     2  0.0000      0.905 0.000 1.000 0.000
#> GSM125217     2  0.4002      0.894 0.000 0.840 0.160
#> GSM125219     1  0.0237      0.988 0.996 0.000 0.004
#> GSM125221     3  0.3888      0.923 0.048 0.064 0.888
#> GSM125223     2  0.0000      0.905 0.000 1.000 0.000
#> GSM125225     2  0.3816      0.900 0.000 0.852 0.148
#> GSM125227     2  0.0000      0.905 0.000 1.000 0.000
#> GSM125229     3  0.1647      0.918 0.036 0.004 0.960
#> GSM125231     1  0.3816      0.823 0.852 0.000 0.148
#> GSM125233     1  0.0424      0.986 0.992 0.000 0.008
#> GSM125235     1  0.0237      0.988 0.996 0.000 0.004
#> GSM125237     1  0.0000      0.988 1.000 0.000 0.000
#> GSM125124     1  0.0237      0.988 0.996 0.000 0.004
#> GSM125126     1  0.0000      0.988 1.000 0.000 0.000
#> GSM125128     1  0.1289      0.969 0.968 0.000 0.032
#> GSM125130     1  0.0592      0.984 0.988 0.000 0.012
#> GSM125132     1  0.0000      0.988 1.000 0.000 0.000
#> GSM125134     1  0.0237      0.988 0.996 0.000 0.004
#> GSM125136     1  0.1289      0.969 0.968 0.000 0.032
#> GSM125138     1  0.0237      0.988 0.996 0.000 0.004
#> GSM125140     1  0.0000      0.988 1.000 0.000 0.000
#> GSM125142     1  0.0000      0.988 1.000 0.000 0.000
#> GSM125144     1  0.0237      0.988 0.996 0.000 0.004
#> GSM125146     1  0.0237      0.988 0.996 0.000 0.004
#> GSM125148     1  0.0000      0.988 1.000 0.000 0.000
#> GSM125150     1  0.0000      0.988 1.000 0.000 0.000
#> GSM125152     1  0.0424      0.986 0.992 0.000 0.008
#> GSM125154     1  0.0237      0.988 0.996 0.000 0.004
#> GSM125156     1  0.0237      0.987 0.996 0.000 0.004
#> GSM125158     1  0.0000      0.988 1.000 0.000 0.000
#> GSM125160     2  0.4002      0.895 0.000 0.840 0.160
#> GSM125162     1  0.1289      0.969 0.968 0.000 0.032
#> GSM125164     2  0.3412      0.906 0.000 0.876 0.124
#> GSM125166     2  0.3192      0.909 0.000 0.888 0.112
#> GSM125168     2  0.4452      0.867 0.000 0.808 0.192
#> GSM125170     2  0.4452      0.867 0.000 0.808 0.192
#> GSM125172     2  0.0892      0.906 0.000 0.980 0.020
#> GSM125174     3  0.3846      0.928 0.108 0.016 0.876
#> GSM125176     2  0.0000      0.905 0.000 1.000 0.000
#> GSM125178     3  0.3587      0.942 0.088 0.020 0.892
#> GSM125180     3  0.3415      0.943 0.080 0.020 0.900
#> GSM125182     3  0.2537      0.887 0.000 0.080 0.920
#> GSM125184     3  0.4015      0.937 0.096 0.028 0.876
#> GSM125186     3  0.3415      0.943 0.080 0.020 0.900
#> GSM125188     3  0.2496      0.898 0.004 0.068 0.928
#> GSM125190     2  0.4002      0.895 0.000 0.840 0.160
#> GSM125192     2  0.3192      0.909 0.000 0.888 0.112
#> GSM125194     3  0.4121      0.921 0.108 0.024 0.868
#> GSM125196     3  0.3528      0.939 0.092 0.016 0.892
#> GSM125198     2  0.0000      0.905 0.000 1.000 0.000
#> GSM125200     1  0.0000      0.988 1.000 0.000 0.000
#> GSM125202     2  0.0000      0.905 0.000 1.000 0.000
#> GSM125204     3  0.3415      0.944 0.080 0.020 0.900
#> GSM125206     3  0.3528      0.939 0.092 0.016 0.892
#> GSM125208     3  0.2743      0.940 0.052 0.020 0.928
#> GSM125210     3  0.2269      0.919 0.016 0.040 0.944
#> GSM125212     3  0.1647      0.918 0.036 0.004 0.960
#> GSM125214     2  0.2878      0.910 0.000 0.904 0.096
#> GSM125216     2  0.0000      0.905 0.000 1.000 0.000
#> GSM125218     2  0.4002      0.894 0.000 0.840 0.160
#> GSM125220     1  0.0237      0.988 0.996 0.000 0.004
#> GSM125222     3  0.3888      0.923 0.048 0.064 0.888
#> GSM125224     2  0.0000      0.905 0.000 1.000 0.000
#> GSM125226     2  0.3816      0.900 0.000 0.852 0.148
#> GSM125228     2  0.0000      0.905 0.000 1.000 0.000
#> GSM125230     3  0.1647      0.918 0.036 0.004 0.960
#> GSM125232     1  0.2537      0.914 0.920 0.000 0.080
#> GSM125234     1  0.1753      0.950 0.952 0.000 0.048
#> GSM125236     1  0.0237      0.988 0.996 0.000 0.004
#> GSM125238     1  0.0000      0.988 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
#> GSM125123     1  0.1938      0.926 0.936 0.000 0.012 NA
#> GSM125125     1  0.1938      0.926 0.936 0.000 0.012 NA
#> GSM125127     1  0.2999      0.913 0.864 0.000 0.004 NA
#> GSM125129     1  0.3991      0.894 0.808 0.000 0.020 NA
#> GSM125131     1  0.0188      0.923 0.996 0.000 0.000 NA
#> GSM125133     1  0.1716      0.901 0.936 0.000 0.000 NA
#> GSM125135     1  0.2589      0.916 0.884 0.000 0.000 NA
#> GSM125137     1  0.1716      0.902 0.936 0.000 0.000 NA
#> GSM125139     1  0.2021      0.926 0.932 0.000 0.012 NA
#> GSM125141     1  0.0469      0.922 0.988 0.000 0.000 NA
#> GSM125143     1  0.3946      0.895 0.812 0.000 0.020 NA
#> GSM125145     1  0.3969      0.891 0.804 0.000 0.016 NA
#> GSM125147     1  0.0469      0.922 0.988 0.000 0.000 NA
#> GSM125149     1  0.0469      0.922 0.988 0.000 0.000 NA
#> GSM125151     1  0.2662      0.923 0.900 0.000 0.016 NA
#> GSM125153     1  0.3597      0.905 0.836 0.000 0.016 NA
#> GSM125155     1  0.0817      0.922 0.976 0.000 0.000 NA
#> GSM125157     1  0.0188      0.923 0.996 0.000 0.000 NA
#> GSM125159     2  0.3505      0.899 0.000 0.864 0.088 NA
#> GSM125161     1  0.2011      0.893 0.920 0.000 0.000 NA
#> GSM125163     2  0.2706      0.908 0.000 0.900 0.080 NA
#> GSM125165     3  0.4148      0.854 0.012 0.072 0.844 NA
#> GSM125167     2  0.3959      0.886 0.000 0.840 0.092 NA
#> GSM125169     2  0.3959      0.886 0.000 0.840 0.092 NA
#> GSM125171     2  0.1209      0.907 0.000 0.964 0.004 NA
#> GSM125173     3  0.4985      0.627 0.000 0.000 0.532 NA
#> GSM125175     2  0.1211      0.906 0.000 0.960 0.000 NA
#> GSM125177     3  0.2329      0.887 0.000 0.012 0.916 NA
#> GSM125179     3  0.2101      0.885 0.012 0.000 0.928 NA
#> GSM125181     3  0.3392      0.846 0.000 0.072 0.872 NA
#> GSM125183     3  0.2310      0.885 0.008 0.004 0.920 NA
#> GSM125185     3  0.2101      0.885 0.012 0.000 0.928 NA
#> GSM125187     3  0.1762      0.886 0.004 0.004 0.944 NA
#> GSM125189     2  0.3601      0.898 0.000 0.860 0.084 NA
#> GSM125191     2  0.5300      0.581 0.000 0.664 0.308 NA
#> GSM125193     3  0.3229      0.869 0.072 0.000 0.880 NA
#> GSM125195     3  0.2647      0.873 0.000 0.000 0.880 NA
#> GSM125197     2  0.1211      0.906 0.000 0.960 0.000 NA
#> GSM125199     1  0.0188      0.923 0.996 0.000 0.000 NA
#> GSM125201     2  0.1211      0.906 0.000 0.960 0.000 NA
#> GSM125203     3  0.2048      0.888 0.000 0.008 0.928 NA
#> GSM125205     2  0.1211      0.906 0.000 0.960 0.000 NA
#> GSM125207     3  0.0921      0.886 0.000 0.000 0.972 NA
#> GSM125209     3  0.1724      0.878 0.000 0.020 0.948 NA
#> GSM125211     3  0.5511      0.717 0.000 0.028 0.620 NA
#> GSM125213     2  0.2376      0.911 0.000 0.916 0.068 NA
#> GSM125215     2  0.1211      0.906 0.000 0.960 0.000 NA
#> GSM125217     2  0.3601      0.897 0.000 0.860 0.084 NA
#> GSM125219     1  0.2843      0.924 0.892 0.000 0.020 NA
#> GSM125221     3  0.3909      0.864 0.012 0.052 0.856 NA
#> GSM125223     2  0.1211      0.906 0.000 0.960 0.000 NA
#> GSM125225     2  0.3383      0.902 0.000 0.872 0.076 NA
#> GSM125227     2  0.1211      0.906 0.000 0.960 0.000 NA
#> GSM125229     3  0.5511      0.717 0.000 0.028 0.620 NA
#> GSM125231     1  0.6469      0.753 0.668 0.012 0.116 NA
#> GSM125233     1  0.3659      0.908 0.840 0.000 0.024 NA
#> GSM125235     1  0.2610      0.923 0.900 0.000 0.012 NA
#> GSM125237     1  0.0469      0.922 0.988 0.000 0.000 NA
#> GSM125124     1  0.4035      0.890 0.804 0.000 0.020 NA
#> GSM125126     1  0.1938      0.926 0.936 0.000 0.012 NA
#> GSM125128     1  0.1940      0.898 0.924 0.000 0.000 NA
#> GSM125130     1  0.3991      0.894 0.808 0.000 0.020 NA
#> GSM125132     1  0.0188      0.923 0.996 0.000 0.000 NA
#> GSM125134     1  0.3925      0.894 0.808 0.000 0.016 NA
#> GSM125136     1  0.2011      0.893 0.920 0.000 0.000 NA
#> GSM125138     1  0.4035      0.890 0.804 0.000 0.020 NA
#> GSM125140     1  0.2021      0.926 0.932 0.000 0.012 NA
#> GSM125142     1  0.0469      0.922 0.988 0.000 0.000 NA
#> GSM125144     1  0.3695      0.902 0.828 0.000 0.016 NA
#> GSM125146     1  0.3969      0.891 0.804 0.000 0.016 NA
#> GSM125148     1  0.0469      0.922 0.988 0.000 0.000 NA
#> GSM125150     1  0.0469      0.922 0.988 0.000 0.000 NA
#> GSM125152     1  0.2662      0.923 0.900 0.000 0.016 NA
#> GSM125154     1  0.3335      0.912 0.856 0.000 0.016 NA
#> GSM125156     1  0.0817      0.922 0.976 0.000 0.000 NA
#> GSM125158     1  0.0188      0.923 0.996 0.000 0.000 NA
#> GSM125160     2  0.3505      0.899 0.000 0.864 0.088 NA
#> GSM125162     1  0.2011      0.893 0.920 0.000 0.000 NA
#> GSM125164     2  0.2706      0.908 0.000 0.900 0.080 NA
#> GSM125166     2  0.2271      0.910 0.000 0.916 0.076 NA
#> GSM125168     2  0.4144      0.876 0.000 0.828 0.104 NA
#> GSM125170     2  0.4144      0.876 0.000 0.828 0.104 NA
#> GSM125172     2  0.1209      0.907 0.000 0.964 0.004 NA
#> GSM125174     3  0.4985      0.627 0.000 0.000 0.532 NA
#> GSM125176     2  0.1211      0.906 0.000 0.960 0.000 NA
#> GSM125178     3  0.2329      0.887 0.000 0.012 0.916 NA
#> GSM125180     3  0.2101      0.885 0.012 0.000 0.928 NA
#> GSM125182     3  0.3392      0.846 0.000 0.072 0.872 NA
#> GSM125184     3  0.2310      0.885 0.008 0.004 0.920 NA
#> GSM125186     3  0.2101      0.885 0.012 0.000 0.928 NA
#> GSM125188     3  0.3245      0.855 0.000 0.056 0.880 NA
#> GSM125190     2  0.3601      0.898 0.000 0.860 0.084 NA
#> GSM125192     2  0.2271      0.910 0.000 0.916 0.076 NA
#> GSM125194     3  0.3229      0.869 0.072 0.000 0.880 NA
#> GSM125196     3  0.2647      0.873 0.000 0.000 0.880 NA
#> GSM125198     2  0.1211      0.906 0.000 0.960 0.000 NA
#> GSM125200     1  0.0188      0.923 0.996 0.000 0.000 NA
#> GSM125202     2  0.1211      0.906 0.000 0.960 0.000 NA
#> GSM125204     3  0.2048      0.888 0.000 0.008 0.928 NA
#> GSM125206     3  0.2647      0.873 0.000 0.000 0.880 NA
#> GSM125208     3  0.0921      0.886 0.000 0.000 0.972 NA
#> GSM125210     3  0.1724      0.878 0.000 0.020 0.948 NA
#> GSM125212     3  0.5511      0.717 0.000 0.028 0.620 NA
#> GSM125214     2  0.2376      0.911 0.000 0.916 0.068 NA
#> GSM125216     2  0.1211      0.906 0.000 0.960 0.000 NA
#> GSM125218     2  0.3601      0.897 0.000 0.860 0.084 NA
#> GSM125220     1  0.2300      0.927 0.920 0.000 0.016 NA
#> GSM125222     3  0.3909      0.864 0.012 0.052 0.856 NA
#> GSM125224     2  0.1211      0.906 0.000 0.960 0.000 NA
#> GSM125226     2  0.3383      0.902 0.000 0.872 0.076 NA
#> GSM125228     2  0.1211      0.906 0.000 0.960 0.000 NA
#> GSM125230     3  0.5511      0.717 0.000 0.028 0.620 NA
#> GSM125232     1  0.5500      0.816 0.708 0.000 0.068 NA
#> GSM125234     1  0.4951      0.848 0.744 0.000 0.044 NA
#> GSM125236     1  0.2610      0.923 0.900 0.000 0.012 NA
#> GSM125238     1  0.0469      0.922 0.988 0.000 0.000 NA

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM125123     1  0.2561    0.48780 0.856 0.000 0.000 0.000 0.144
#> GSM125125     1  0.2561    0.48780 0.856 0.000 0.000 0.000 0.144
#> GSM125127     1  0.4150   -0.32442 0.612 0.000 0.000 0.000 0.388
#> GSM125129     1  0.4549   -0.65773 0.528 0.000 0.008 0.000 0.464
#> GSM125131     1  0.0290    0.58669 0.992 0.000 0.000 0.000 0.008
#> GSM125133     1  0.2795    0.53190 0.880 0.000 0.000 0.056 0.064
#> GSM125135     1  0.3983   -0.17944 0.660 0.000 0.000 0.000 0.340
#> GSM125137     1  0.1981    0.53995 0.924 0.000 0.000 0.048 0.028
#> GSM125139     1  0.2773    0.46329 0.836 0.000 0.000 0.000 0.164
#> GSM125141     1  0.0404    0.58563 0.988 0.000 0.000 0.000 0.012
#> GSM125143     1  0.4546   -0.65015 0.532 0.000 0.008 0.000 0.460
#> GSM125145     1  0.4305   -0.71278 0.512 0.000 0.000 0.000 0.488
#> GSM125147     1  0.0162    0.58611 0.996 0.000 0.000 0.000 0.004
#> GSM125149     1  0.0162    0.58611 0.996 0.000 0.000 0.000 0.004
#> GSM125151     1  0.3999   -0.09293 0.656 0.000 0.000 0.000 0.344
#> GSM125153     1  0.4242   -0.51595 0.572 0.000 0.000 0.000 0.428
#> GSM125155     1  0.1124    0.58089 0.960 0.000 0.000 0.004 0.036
#> GSM125157     1  0.0290    0.58669 0.992 0.000 0.000 0.000 0.008
#> GSM125159     2  0.3337    0.86169 0.000 0.856 0.072 0.064 0.008
#> GSM125161     1  0.2171    0.52204 0.912 0.000 0.000 0.064 0.024
#> GSM125163     2  0.2650    0.87065 0.000 0.892 0.068 0.036 0.004
#> GSM125165     3  0.3775    0.75138 0.012 0.060 0.844 0.072 0.012
#> GSM125167     2  0.3807    0.84733 0.000 0.828 0.072 0.088 0.012
#> GSM125169     2  0.3750    0.84933 0.000 0.832 0.072 0.084 0.012
#> GSM125171     2  0.2450    0.86217 0.000 0.896 0.000 0.028 0.076
#> GSM125173     3  0.6480    0.00948 0.000 0.000 0.412 0.184 0.404
#> GSM125175     2  0.2172    0.86235 0.000 0.908 0.000 0.016 0.076
#> GSM125177     3  0.2740    0.81344 0.000 0.004 0.888 0.064 0.044
#> GSM125179     3  0.2144    0.81134 0.000 0.000 0.912 0.020 0.068
#> GSM125181     3  0.3523    0.71356 0.000 0.076 0.844 0.072 0.008
#> GSM125183     3  0.2227    0.81490 0.000 0.004 0.916 0.048 0.032
#> GSM125185     3  0.2144    0.81134 0.000 0.000 0.912 0.020 0.068
#> GSM125187     3  0.1877    0.81649 0.004 0.004 0.932 0.052 0.008
#> GSM125189     2  0.3511    0.85880 0.000 0.848 0.072 0.068 0.012
#> GSM125191     2  0.4907    0.52828 0.000 0.656 0.292 0.052 0.000
#> GSM125193     3  0.3073    0.77083 0.068 0.000 0.872 0.052 0.008
#> GSM125195     3  0.3359    0.74368 0.000 0.000 0.840 0.108 0.052
#> GSM125197     2  0.2069    0.86242 0.000 0.912 0.000 0.012 0.076
#> GSM125199     1  0.0290    0.58669 0.992 0.000 0.000 0.000 0.008
#> GSM125201     2  0.2069    0.86242 0.000 0.912 0.000 0.012 0.076
#> GSM125203     3  0.2529    0.81471 0.000 0.004 0.900 0.056 0.040
#> GSM125205     2  0.2069    0.86242 0.000 0.912 0.000 0.012 0.076
#> GSM125207     3  0.1493    0.81644 0.000 0.000 0.948 0.024 0.028
#> GSM125209     3  0.1885    0.80024 0.000 0.020 0.932 0.044 0.004
#> GSM125211     4  0.3662    1.00000 0.000 0.004 0.252 0.744 0.000
#> GSM125213     2  0.1970    0.87456 0.000 0.924 0.060 0.012 0.004
#> GSM125215     2  0.1942    0.86426 0.000 0.920 0.000 0.012 0.068
#> GSM125217     2  0.3511    0.85885 0.000 0.848 0.068 0.072 0.012
#> GSM125219     1  0.3895    0.25521 0.728 0.000 0.004 0.004 0.264
#> GSM125221     3  0.3490    0.75888 0.008 0.040 0.856 0.084 0.012
#> GSM125223     2  0.2069    0.86242 0.000 0.912 0.000 0.012 0.076
#> GSM125225     2  0.3320    0.86363 0.000 0.860 0.068 0.060 0.012
#> GSM125227     2  0.2069    0.86242 0.000 0.912 0.000 0.012 0.076
#> GSM125229     4  0.3662    1.00000 0.000 0.004 0.252 0.744 0.000
#> GSM125231     1  0.7206   -0.70773 0.436 0.004 0.092 0.072 0.396
#> GSM125233     1  0.4350   -0.40866 0.588 0.000 0.004 0.000 0.408
#> GSM125235     1  0.3895    0.04887 0.680 0.000 0.000 0.000 0.320
#> GSM125237     1  0.0162    0.58611 0.996 0.000 0.000 0.000 0.004
#> GSM125124     1  0.4437   -0.67435 0.532 0.000 0.004 0.000 0.464
#> GSM125126     1  0.2561    0.48780 0.856 0.000 0.000 0.000 0.144
#> GSM125128     1  0.2726    0.52703 0.884 0.000 0.000 0.064 0.052
#> GSM125130     1  0.4549   -0.65773 0.528 0.000 0.008 0.000 0.464
#> GSM125132     1  0.0290    0.58669 0.992 0.000 0.000 0.000 0.008
#> GSM125134     1  0.4283   -0.57680 0.544 0.000 0.000 0.000 0.456
#> GSM125136     1  0.2171    0.52204 0.912 0.000 0.000 0.064 0.024
#> GSM125138     1  0.4437   -0.67435 0.532 0.000 0.004 0.000 0.464
#> GSM125140     1  0.2773    0.46329 0.836 0.000 0.000 0.000 0.164
#> GSM125142     1  0.0404    0.58563 0.988 0.000 0.000 0.000 0.012
#> GSM125144     1  0.4403   -0.58015 0.560 0.000 0.004 0.000 0.436
#> GSM125146     1  0.4305   -0.71278 0.512 0.000 0.000 0.000 0.488
#> GSM125148     1  0.0162    0.58611 0.996 0.000 0.000 0.000 0.004
#> GSM125150     1  0.0162    0.58611 0.996 0.000 0.000 0.000 0.004
#> GSM125152     1  0.3999   -0.09293 0.656 0.000 0.000 0.000 0.344
#> GSM125154     1  0.4114   -0.33261 0.624 0.000 0.000 0.000 0.376
#> GSM125156     1  0.1124    0.58089 0.960 0.000 0.000 0.004 0.036
#> GSM125158     1  0.0290    0.58669 0.992 0.000 0.000 0.000 0.008
#> GSM125160     2  0.3337    0.86169 0.000 0.856 0.072 0.064 0.008
#> GSM125162     1  0.2171    0.52204 0.912 0.000 0.000 0.064 0.024
#> GSM125164     2  0.2650    0.87065 0.000 0.892 0.068 0.036 0.004
#> GSM125166     2  0.2353    0.87356 0.000 0.908 0.060 0.028 0.004
#> GSM125168     2  0.3982    0.83748 0.000 0.816 0.084 0.088 0.012
#> GSM125170     2  0.3926    0.83952 0.000 0.820 0.084 0.084 0.012
#> GSM125172     2  0.2450    0.86217 0.000 0.896 0.000 0.028 0.076
#> GSM125174     3  0.6480    0.00948 0.000 0.000 0.412 0.184 0.404
#> GSM125176     2  0.2172    0.86235 0.000 0.908 0.000 0.016 0.076
#> GSM125178     3  0.2740    0.81344 0.000 0.004 0.888 0.064 0.044
#> GSM125180     3  0.2144    0.81134 0.000 0.000 0.912 0.020 0.068
#> GSM125182     3  0.3523    0.71356 0.000 0.076 0.844 0.072 0.008
#> GSM125184     3  0.2227    0.81490 0.000 0.004 0.916 0.048 0.032
#> GSM125186     3  0.2144    0.81134 0.000 0.000 0.912 0.020 0.068
#> GSM125188     3  0.3272    0.73948 0.000 0.060 0.860 0.072 0.008
#> GSM125190     2  0.3511    0.85880 0.000 0.848 0.072 0.068 0.012
#> GSM125192     2  0.2353    0.87356 0.000 0.908 0.060 0.028 0.004
#> GSM125194     3  0.3073    0.77083 0.068 0.000 0.872 0.052 0.008
#> GSM125196     3  0.3359    0.74368 0.000 0.000 0.840 0.108 0.052
#> GSM125198     2  0.2069    0.86242 0.000 0.912 0.000 0.012 0.076
#> GSM125200     1  0.0290    0.58669 0.992 0.000 0.000 0.000 0.008
#> GSM125202     2  0.2069    0.86242 0.000 0.912 0.000 0.012 0.076
#> GSM125204     3  0.2529    0.81471 0.000 0.004 0.900 0.056 0.040
#> GSM125206     3  0.3359    0.74368 0.000 0.000 0.840 0.108 0.052
#> GSM125208     3  0.1493    0.81644 0.000 0.000 0.948 0.024 0.028
#> GSM125210     3  0.1885    0.80024 0.000 0.020 0.932 0.044 0.004
#> GSM125212     4  0.3662    1.00000 0.000 0.004 0.252 0.744 0.000
#> GSM125214     2  0.1970    0.87456 0.000 0.924 0.060 0.012 0.004
#> GSM125216     2  0.1942    0.86426 0.000 0.920 0.000 0.012 0.068
#> GSM125218     2  0.3511    0.85885 0.000 0.848 0.068 0.072 0.012
#> GSM125220     1  0.3461    0.36049 0.772 0.000 0.000 0.004 0.224
#> GSM125222     3  0.3490    0.75888 0.008 0.040 0.856 0.084 0.012
#> GSM125224     2  0.2069    0.86242 0.000 0.912 0.000 0.012 0.076
#> GSM125226     2  0.3320    0.86363 0.000 0.860 0.068 0.060 0.012
#> GSM125228     2  0.2069    0.86242 0.000 0.912 0.000 0.012 0.076
#> GSM125230     4  0.3662    1.00000 0.000 0.004 0.252 0.744 0.000
#> GSM125232     5  0.5879    0.84206 0.436 0.000 0.048 0.024 0.492
#> GSM125234     5  0.4971    0.83331 0.460 0.000 0.028 0.000 0.512
#> GSM125236     1  0.3895    0.04887 0.680 0.000 0.000 0.000 0.320
#> GSM125238     1  0.0162    0.58611 0.996 0.000 0.000 0.000 0.004

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM125123     1  0.2491      0.705 0.836 0.000 0.000 0.000 0.164 0.000
#> GSM125125     1  0.2491      0.705 0.836 0.000 0.000 0.000 0.164 0.000
#> GSM125127     5  0.3819      0.723 0.372 0.000 0.000 0.000 0.624 0.004
#> GSM125129     5  0.3240      0.834 0.244 0.000 0.000 0.000 0.752 0.004
#> GSM125131     1  0.0547      0.859 0.980 0.000 0.000 0.000 0.020 0.000
#> GSM125133     1  0.3072      0.779 0.836 0.000 0.036 0.000 0.124 0.004
#> GSM125135     5  0.3706      0.762 0.380 0.000 0.000 0.000 0.620 0.000
#> GSM125137     1  0.2039      0.804 0.904 0.000 0.020 0.000 0.076 0.000
#> GSM125139     1  0.2697      0.664 0.812 0.000 0.000 0.000 0.188 0.000
#> GSM125141     1  0.0260      0.859 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM125143     5  0.3265      0.835 0.248 0.000 0.000 0.000 0.748 0.004
#> GSM125145     5  0.3050      0.832 0.236 0.000 0.000 0.000 0.764 0.000
#> GSM125147     1  0.0260      0.861 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM125149     1  0.0260      0.861 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM125151     5  0.3727      0.746 0.388 0.000 0.000 0.000 0.612 0.000
#> GSM125153     5  0.3428      0.829 0.304 0.000 0.000 0.000 0.696 0.000
#> GSM125155     1  0.1204      0.844 0.944 0.000 0.000 0.000 0.056 0.000
#> GSM125157     1  0.0632      0.857 0.976 0.000 0.000 0.000 0.024 0.000
#> GSM125159     2  0.3792      0.782 0.000 0.816 0.020 0.068 0.008 0.088
#> GSM125161     1  0.2237      0.787 0.896 0.000 0.036 0.000 0.068 0.000
#> GSM125163     2  0.2538      0.800 0.000 0.892 0.020 0.068 0.008 0.012
#> GSM125165     4  0.3715      0.801 0.008 0.064 0.028 0.832 0.004 0.064
#> GSM125167     2  0.4467      0.764 0.000 0.772 0.048 0.064 0.008 0.108
#> GSM125169     2  0.4565      0.766 0.000 0.768 0.048 0.064 0.012 0.108
#> GSM125171     2  0.3544      0.787 0.000 0.820 0.020 0.000 0.052 0.108
#> GSM125173     6  0.3514      1.000 0.000 0.000 0.000 0.228 0.020 0.752
#> GSM125175     2  0.3589      0.787 0.000 0.816 0.020 0.000 0.052 0.112
#> GSM125177     4  0.2896      0.853 0.000 0.012 0.032 0.880 0.024 0.052
#> GSM125179     4  0.2146      0.847 0.000 0.000 0.008 0.908 0.060 0.024
#> GSM125181     4  0.3529      0.757 0.000 0.088 0.024 0.832 0.004 0.052
#> GSM125183     4  0.2034      0.848 0.000 0.004 0.000 0.912 0.024 0.060
#> GSM125185     4  0.2146      0.847 0.000 0.000 0.008 0.908 0.060 0.024
#> GSM125187     4  0.1694      0.860 0.004 0.004 0.024 0.940 0.004 0.024
#> GSM125189     2  0.4230      0.771 0.000 0.784 0.040 0.064 0.004 0.108
#> GSM125191     2  0.4053      0.499 0.000 0.676 0.020 0.300 0.000 0.004
#> GSM125193     4  0.3009      0.819 0.064 0.000 0.024 0.868 0.004 0.040
#> GSM125195     4  0.3748      0.746 0.000 0.000 0.040 0.816 0.084 0.060
#> GSM125197     2  0.3462      0.786 0.000 0.824 0.020 0.000 0.044 0.112
#> GSM125199     1  0.0632      0.857 0.976 0.000 0.000 0.000 0.024 0.000
#> GSM125201     2  0.3589      0.783 0.000 0.816 0.020 0.000 0.052 0.112
#> GSM125203     4  0.2649      0.855 0.000 0.008 0.032 0.892 0.020 0.048
#> GSM125205     2  0.3589      0.783 0.000 0.816 0.020 0.000 0.052 0.112
#> GSM125207     4  0.1536      0.857 0.000 0.000 0.024 0.944 0.020 0.012
#> GSM125209     4  0.1966      0.845 0.000 0.028 0.024 0.924 0.000 0.024
#> GSM125211     3  0.1663      1.000 0.000 0.000 0.912 0.088 0.000 0.000
#> GSM125213     2  0.2177      0.805 0.000 0.908 0.004 0.060 0.004 0.024
#> GSM125215     2  0.3396      0.789 0.000 0.828 0.020 0.000 0.040 0.112
#> GSM125217     2  0.4245      0.770 0.000 0.784 0.032 0.064 0.008 0.112
#> GSM125219     1  0.3860     -0.283 0.528 0.000 0.000 0.000 0.472 0.000
#> GSM125221     4  0.3618      0.808 0.004 0.032 0.036 0.836 0.008 0.084
#> GSM125223     2  0.3507      0.785 0.000 0.820 0.020 0.000 0.044 0.116
#> GSM125225     2  0.4047      0.776 0.000 0.796 0.032 0.064 0.004 0.104
#> GSM125227     2  0.3417      0.789 0.000 0.828 0.020 0.000 0.044 0.108
#> GSM125229     3  0.1663      1.000 0.000 0.000 0.912 0.088 0.000 0.000
#> GSM125231     5  0.6174      0.647 0.168 0.012 0.016 0.084 0.644 0.076
#> GSM125233     5  0.3499      0.808 0.320 0.000 0.000 0.000 0.680 0.000
#> GSM125235     5  0.3866      0.499 0.484 0.000 0.000 0.000 0.516 0.000
#> GSM125237     1  0.0260      0.861 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM125124     5  0.3371      0.825 0.292 0.000 0.000 0.000 0.708 0.000
#> GSM125126     1  0.2491      0.705 0.836 0.000 0.000 0.000 0.164 0.000
#> GSM125128     1  0.2848      0.786 0.856 0.000 0.036 0.000 0.104 0.004
#> GSM125130     5  0.3240      0.834 0.244 0.000 0.000 0.000 0.752 0.004
#> GSM125132     1  0.0547      0.859 0.980 0.000 0.000 0.000 0.020 0.000
#> GSM125134     5  0.3464      0.796 0.312 0.000 0.000 0.000 0.688 0.000
#> GSM125136     1  0.2237      0.787 0.896 0.000 0.036 0.000 0.068 0.000
#> GSM125138     5  0.3371      0.825 0.292 0.000 0.000 0.000 0.708 0.000
#> GSM125140     1  0.2697      0.664 0.812 0.000 0.000 0.000 0.188 0.000
#> GSM125142     1  0.0260      0.859 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM125144     5  0.3499      0.819 0.320 0.000 0.000 0.000 0.680 0.000
#> GSM125146     5  0.3050      0.832 0.236 0.000 0.000 0.000 0.764 0.000
#> GSM125148     1  0.0260      0.861 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM125150     1  0.0260      0.861 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM125152     5  0.3727      0.746 0.388 0.000 0.000 0.000 0.612 0.000
#> GSM125154     5  0.3634      0.796 0.356 0.000 0.000 0.000 0.644 0.000
#> GSM125156     1  0.1204      0.844 0.944 0.000 0.000 0.000 0.056 0.000
#> GSM125158     1  0.0632      0.857 0.976 0.000 0.000 0.000 0.024 0.000
#> GSM125160     2  0.3792      0.782 0.000 0.816 0.020 0.068 0.008 0.088
#> GSM125162     1  0.2237      0.787 0.896 0.000 0.036 0.000 0.068 0.000
#> GSM125164     2  0.2538      0.800 0.000 0.892 0.020 0.068 0.008 0.012
#> GSM125166     2  0.2138      0.804 0.000 0.912 0.012 0.060 0.008 0.008
#> GSM125168     2  0.4531      0.759 0.000 0.768 0.048 0.072 0.008 0.104
#> GSM125170     2  0.4629      0.761 0.000 0.764 0.048 0.072 0.012 0.104
#> GSM125172     2  0.3544      0.787 0.000 0.820 0.020 0.000 0.052 0.108
#> GSM125174     6  0.3514      1.000 0.000 0.000 0.000 0.228 0.020 0.752
#> GSM125176     2  0.3589      0.787 0.000 0.816 0.020 0.000 0.052 0.112
#> GSM125178     4  0.2896      0.853 0.000 0.012 0.032 0.880 0.024 0.052
#> GSM125180     4  0.2146      0.847 0.000 0.000 0.008 0.908 0.060 0.024
#> GSM125182     4  0.3529      0.757 0.000 0.088 0.024 0.832 0.004 0.052
#> GSM125184     4  0.2034      0.848 0.000 0.004 0.000 0.912 0.024 0.060
#> GSM125186     4  0.2146      0.847 0.000 0.000 0.008 0.908 0.060 0.024
#> GSM125188     4  0.3277      0.788 0.000 0.068 0.028 0.852 0.004 0.048
#> GSM125190     2  0.4230      0.771 0.000 0.784 0.040 0.064 0.004 0.108
#> GSM125192     2  0.2138      0.804 0.000 0.912 0.012 0.060 0.008 0.008
#> GSM125194     4  0.3009      0.819 0.064 0.000 0.024 0.868 0.004 0.040
#> GSM125196     4  0.3748      0.746 0.000 0.000 0.040 0.816 0.084 0.060
#> GSM125198     2  0.3462      0.786 0.000 0.824 0.020 0.000 0.044 0.112
#> GSM125200     1  0.0632      0.857 0.976 0.000 0.000 0.000 0.024 0.000
#> GSM125202     2  0.3589      0.783 0.000 0.816 0.020 0.000 0.052 0.112
#> GSM125204     4  0.2649      0.855 0.000 0.008 0.032 0.892 0.020 0.048
#> GSM125206     4  0.3748      0.746 0.000 0.000 0.040 0.816 0.084 0.060
#> GSM125208     4  0.1536      0.857 0.000 0.000 0.024 0.944 0.020 0.012
#> GSM125210     4  0.1966      0.845 0.000 0.028 0.024 0.924 0.000 0.024
#> GSM125212     3  0.1663      1.000 0.000 0.000 0.912 0.088 0.000 0.000
#> GSM125214     2  0.2177      0.805 0.000 0.908 0.004 0.060 0.004 0.024
#> GSM125216     2  0.3396      0.789 0.000 0.828 0.020 0.000 0.040 0.112
#> GSM125218     2  0.4245      0.770 0.000 0.784 0.032 0.064 0.008 0.112
#> GSM125220     1  0.3810     -0.117 0.572 0.000 0.000 0.000 0.428 0.000
#> GSM125222     4  0.3618      0.808 0.004 0.032 0.036 0.836 0.008 0.084
#> GSM125224     2  0.3507      0.785 0.000 0.820 0.020 0.000 0.044 0.116
#> GSM125226     2  0.4047      0.776 0.000 0.796 0.032 0.064 0.004 0.104
#> GSM125228     2  0.3417      0.789 0.000 0.828 0.020 0.000 0.044 0.108
#> GSM125230     3  0.1663      1.000 0.000 0.000 0.912 0.088 0.000 0.000
#> GSM125232     5  0.4302      0.758 0.168 0.000 0.004 0.044 0.756 0.028
#> GSM125234     5  0.3288      0.795 0.176 0.000 0.000 0.016 0.800 0.008
#> GSM125236     5  0.3866      0.499 0.484 0.000 0.000 0.000 0.516 0.000
#> GSM125238     1  0.0260      0.861 0.992 0.000 0.000 0.000 0.008 0.000

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk SD-hclust-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk SD-hclust-collect-classes

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

test_to_known_factors(res)
#>             n agent(p) individual(p) k
#> SD:hclust 116    1.000      6.52e-06 2
#> SD:hclust 116    1.000      2.82e-09 3
#> SD:hclust 116    1.000      2.82e-09 4
#> SD:hclust  88    0.744      5.18e-12 5
#> SD:hclust 111    1.000      1.43e-17 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 21168 rows and 116 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#>   Subgroups are detected by 'kmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 3.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk SD-kmeans-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.899           0.964       0.982         0.4991 0.503   0.503
#> 3 3 1.000           0.955       0.957         0.3190 0.806   0.624
#> 4 4 0.723           0.695       0.817         0.1072 0.995   0.986
#> 5 5 0.688           0.660       0.721         0.0628 0.861   0.590
#> 6 6 0.659           0.485       0.684         0.0415 0.917   0.644

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

suggest_best_k(res)
#> [1] 3

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

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

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM125123     1  0.0000      1.000 1.000 0.000
#> GSM125125     1  0.0000      1.000 1.000 0.000
#> GSM125127     1  0.0000      1.000 1.000 0.000
#> GSM125129     1  0.0000      1.000 1.000 0.000
#> GSM125131     1  0.0000      1.000 1.000 0.000
#> GSM125133     1  0.0000      1.000 1.000 0.000
#> GSM125135     1  0.0000      1.000 1.000 0.000
#> GSM125137     1  0.0000      1.000 1.000 0.000
#> GSM125139     1  0.0000      1.000 1.000 0.000
#> GSM125141     1  0.0000      1.000 1.000 0.000
#> GSM125143     1  0.0000      1.000 1.000 0.000
#> GSM125145     1  0.0000      1.000 1.000 0.000
#> GSM125147     1  0.0000      1.000 1.000 0.000
#> GSM125149     1  0.0000      1.000 1.000 0.000
#> GSM125151     1  0.0000      1.000 1.000 0.000
#> GSM125153     1  0.0000      1.000 1.000 0.000
#> GSM125155     1  0.0000      1.000 1.000 0.000
#> GSM125157     1  0.0000      1.000 1.000 0.000
#> GSM125159     2  0.0000      0.968 0.000 1.000
#> GSM125161     1  0.0000      1.000 1.000 0.000
#> GSM125163     2  0.0000      0.968 0.000 1.000
#> GSM125165     2  0.0000      0.968 0.000 1.000
#> GSM125167     2  0.0000      0.968 0.000 1.000
#> GSM125169     2  0.0000      0.968 0.000 1.000
#> GSM125171     2  0.0000      0.968 0.000 1.000
#> GSM125173     2  0.0000      0.968 0.000 1.000
#> GSM125175     2  0.0000      0.968 0.000 1.000
#> GSM125177     2  0.0000      0.968 0.000 1.000
#> GSM125179     2  0.6247      0.836 0.156 0.844
#> GSM125181     2  0.0000      0.968 0.000 1.000
#> GSM125183     2  0.6343      0.832 0.160 0.840
#> GSM125185     2  0.5178      0.877 0.116 0.884
#> GSM125187     2  0.8081      0.710 0.248 0.752
#> GSM125189     2  0.0000      0.968 0.000 1.000
#> GSM125191     2  0.0000      0.968 0.000 1.000
#> GSM125193     2  0.6887      0.802 0.184 0.816
#> GSM125195     2  0.0672      0.964 0.008 0.992
#> GSM125197     2  0.0000      0.968 0.000 1.000
#> GSM125199     1  0.0000      1.000 1.000 0.000
#> GSM125201     2  0.0000      0.968 0.000 1.000
#> GSM125203     2  0.0376      0.966 0.004 0.996
#> GSM125205     2  0.0000      0.968 0.000 1.000
#> GSM125207     2  0.0672      0.964 0.008 0.992
#> GSM125209     2  0.0000      0.968 0.000 1.000
#> GSM125211     2  0.0000      0.968 0.000 1.000
#> GSM125213     2  0.0000      0.968 0.000 1.000
#> GSM125215     2  0.0000      0.968 0.000 1.000
#> GSM125217     2  0.0000      0.968 0.000 1.000
#> GSM125219     1  0.0000      1.000 1.000 0.000
#> GSM125221     2  0.0376      0.966 0.004 0.996
#> GSM125223     2  0.0000      0.968 0.000 1.000
#> GSM125225     2  0.0000      0.968 0.000 1.000
#> GSM125227     2  0.0000      0.968 0.000 1.000
#> GSM125229     2  0.0000      0.968 0.000 1.000
#> GSM125231     1  0.0376      0.996 0.996 0.004
#> GSM125233     1  0.0000      1.000 1.000 0.000
#> GSM125235     1  0.0000      1.000 1.000 0.000
#> GSM125237     1  0.0000      1.000 1.000 0.000
#> GSM125124     1  0.0000      1.000 1.000 0.000
#> GSM125126     1  0.0000      1.000 1.000 0.000
#> GSM125128     1  0.0000      1.000 1.000 0.000
#> GSM125130     1  0.0000      1.000 1.000 0.000
#> GSM125132     1  0.0000      1.000 1.000 0.000
#> GSM125134     1  0.0000      1.000 1.000 0.000
#> GSM125136     1  0.0000      1.000 1.000 0.000
#> GSM125138     1  0.0000      1.000 1.000 0.000
#> GSM125140     1  0.0000      1.000 1.000 0.000
#> GSM125142     1  0.0000      1.000 1.000 0.000
#> GSM125144     1  0.0000      1.000 1.000 0.000
#> GSM125146     1  0.0000      1.000 1.000 0.000
#> GSM125148     1  0.0000      1.000 1.000 0.000
#> GSM125150     1  0.0000      1.000 1.000 0.000
#> GSM125152     1  0.0000      1.000 1.000 0.000
#> GSM125154     1  0.0000      1.000 1.000 0.000
#> GSM125156     1  0.0000      1.000 1.000 0.000
#> GSM125158     1  0.0000      1.000 1.000 0.000
#> GSM125160     2  0.0000      0.968 0.000 1.000
#> GSM125162     1  0.0000      1.000 1.000 0.000
#> GSM125164     2  0.0000      0.968 0.000 1.000
#> GSM125166     2  0.0000      0.968 0.000 1.000
#> GSM125168     2  0.0000      0.968 0.000 1.000
#> GSM125170     2  0.0000      0.968 0.000 1.000
#> GSM125172     2  0.0000      0.968 0.000 1.000
#> GSM125174     2  0.5519      0.865 0.128 0.872
#> GSM125176     2  0.0000      0.968 0.000 1.000
#> GSM125178     2  0.1414      0.956 0.020 0.980
#> GSM125180     2  0.6247      0.836 0.156 0.844
#> GSM125182     2  0.0000      0.968 0.000 1.000
#> GSM125184     2  0.0000      0.968 0.000 1.000
#> GSM125186     2  0.6247      0.836 0.156 0.844
#> GSM125188     2  0.0000      0.968 0.000 1.000
#> GSM125190     2  0.0000      0.968 0.000 1.000
#> GSM125192     2  0.0000      0.968 0.000 1.000
#> GSM125194     1  0.0000      1.000 1.000 0.000
#> GSM125196     2  0.0672      0.964 0.008 0.992
#> GSM125198     2  0.0000      0.968 0.000 1.000
#> GSM125200     1  0.0000      1.000 1.000 0.000
#> GSM125202     2  0.0000      0.968 0.000 1.000
#> GSM125204     2  0.4161      0.905 0.084 0.916
#> GSM125206     2  0.0376      0.966 0.004 0.996
#> GSM125208     2  0.5737      0.857 0.136 0.864
#> GSM125210     2  0.0000      0.968 0.000 1.000
#> GSM125212     2  0.0000      0.968 0.000 1.000
#> GSM125214     2  0.0000      0.968 0.000 1.000
#> GSM125216     2  0.0000      0.968 0.000 1.000
#> GSM125218     2  0.0000      0.968 0.000 1.000
#> GSM125220     1  0.0000      1.000 1.000 0.000
#> GSM125222     2  0.0376      0.966 0.004 0.996
#> GSM125224     2  0.0000      0.968 0.000 1.000
#> GSM125226     2  0.0000      0.968 0.000 1.000
#> GSM125228     2  0.0000      0.968 0.000 1.000
#> GSM125230     2  0.9944      0.235 0.456 0.544
#> GSM125232     1  0.0000      1.000 1.000 0.000
#> GSM125234     1  0.0000      1.000 1.000 0.000
#> GSM125236     1  0.0000      1.000 1.000 0.000
#> GSM125238     1  0.0000      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
#> GSM125123     1  0.2165     0.9685 0.936 0.000 0.064
#> GSM125125     1  0.0237     0.9717 0.996 0.000 0.004
#> GSM125127     1  0.2165     0.9685 0.936 0.000 0.064
#> GSM125129     1  0.2165     0.9685 0.936 0.000 0.064
#> GSM125131     1  0.0424     0.9711 0.992 0.000 0.008
#> GSM125133     1  0.0424     0.9711 0.992 0.000 0.008
#> GSM125135     1  0.2165     0.9685 0.936 0.000 0.064
#> GSM125137     1  0.0424     0.9700 0.992 0.000 0.008
#> GSM125139     1  0.2066     0.9685 0.940 0.000 0.060
#> GSM125141     1  0.0237     0.9712 0.996 0.000 0.004
#> GSM125143     1  0.2165     0.9685 0.936 0.000 0.064
#> GSM125145     1  0.2066     0.9685 0.940 0.000 0.060
#> GSM125147     1  0.0237     0.9712 0.996 0.000 0.004
#> GSM125149     1  0.0424     0.9711 0.992 0.000 0.008
#> GSM125151     1  0.2066     0.9685 0.940 0.000 0.060
#> GSM125153     1  0.1964     0.9692 0.944 0.000 0.056
#> GSM125155     1  0.0237     0.9712 0.996 0.000 0.004
#> GSM125157     1  0.0424     0.9711 0.992 0.000 0.008
#> GSM125159     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125161     1  0.0592     0.9698 0.988 0.000 0.012
#> GSM125163     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125165     3  0.2356     0.9797 0.000 0.072 0.928
#> GSM125167     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125169     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125171     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125173     3  0.2356     0.9797 0.000 0.072 0.928
#> GSM125175     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125177     3  0.2356     0.9797 0.000 0.072 0.928
#> GSM125179     3  0.2301     0.9741 0.004 0.060 0.936
#> GSM125181     3  0.2356     0.9797 0.000 0.072 0.928
#> GSM125183     3  0.2496     0.9785 0.004 0.068 0.928
#> GSM125185     3  0.2496     0.9785 0.004 0.068 0.928
#> GSM125187     3  0.2301     0.9741 0.004 0.060 0.936
#> GSM125189     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125191     2  0.4346     0.7523 0.000 0.816 0.184
#> GSM125193     3  0.2066     0.9740 0.000 0.060 0.940
#> GSM125195     3  0.2356     0.9797 0.000 0.072 0.928
#> GSM125197     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125199     1  0.0237     0.9712 0.996 0.000 0.004
#> GSM125201     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125203     3  0.2356     0.9797 0.000 0.072 0.928
#> GSM125205     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125207     3  0.2356     0.9797 0.000 0.072 0.928
#> GSM125209     2  0.6274     0.0704 0.000 0.544 0.456
#> GSM125211     3  0.2261     0.9785 0.000 0.068 0.932
#> GSM125213     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125215     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125217     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125219     1  0.2165     0.9685 0.936 0.000 0.064
#> GSM125221     3  0.2356     0.9797 0.000 0.072 0.928
#> GSM125223     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125225     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125227     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125229     3  0.5178     0.7343 0.000 0.256 0.744
#> GSM125231     3  0.0592     0.9150 0.012 0.000 0.988
#> GSM125233     1  0.2165     0.9685 0.936 0.000 0.064
#> GSM125235     1  0.0424     0.9711 0.992 0.000 0.008
#> GSM125237     1  0.0424     0.9711 0.992 0.000 0.008
#> GSM125124     1  0.2066     0.9685 0.940 0.000 0.060
#> GSM125126     1  0.0237     0.9717 0.996 0.000 0.004
#> GSM125128     1  0.0424     0.9711 0.992 0.000 0.008
#> GSM125130     1  0.2165     0.9685 0.936 0.000 0.064
#> GSM125132     1  0.0424     0.9711 0.992 0.000 0.008
#> GSM125134     1  0.2066     0.9685 0.940 0.000 0.060
#> GSM125136     1  0.0592     0.9698 0.988 0.000 0.012
#> GSM125138     1  0.2066     0.9685 0.940 0.000 0.060
#> GSM125140     1  0.2066     0.9685 0.940 0.000 0.060
#> GSM125142     1  0.0592     0.9722 0.988 0.000 0.012
#> GSM125144     1  0.2066     0.9685 0.940 0.000 0.060
#> GSM125146     1  0.2066     0.9685 0.940 0.000 0.060
#> GSM125148     1  0.0237     0.9712 0.996 0.000 0.004
#> GSM125150     1  0.0237     0.9712 0.996 0.000 0.004
#> GSM125152     1  0.2066     0.9685 0.940 0.000 0.060
#> GSM125154     1  0.2066     0.9685 0.940 0.000 0.060
#> GSM125156     1  0.0892     0.9719 0.980 0.000 0.020
#> GSM125158     1  0.0892     0.9719 0.980 0.000 0.020
#> GSM125160     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125162     1  0.0592     0.9698 0.988 0.000 0.012
#> GSM125164     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125166     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125168     3  0.2625     0.9707 0.000 0.084 0.916
#> GSM125170     3  0.2356     0.9797 0.000 0.072 0.928
#> GSM125172     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125174     3  0.2496     0.9785 0.004 0.068 0.928
#> GSM125176     2  0.4452     0.7402 0.000 0.808 0.192
#> GSM125178     3  0.2356     0.9797 0.000 0.072 0.928
#> GSM125180     3  0.2301     0.9741 0.004 0.060 0.936
#> GSM125182     3  0.2711     0.9670 0.000 0.088 0.912
#> GSM125184     3  0.2356     0.9797 0.000 0.072 0.928
#> GSM125186     3  0.2301     0.9741 0.004 0.060 0.936
#> GSM125188     3  0.2356     0.9797 0.000 0.072 0.928
#> GSM125190     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125192     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125194     3  0.0237     0.9163 0.004 0.000 0.996
#> GSM125196     3  0.2356     0.9797 0.000 0.072 0.928
#> GSM125198     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125200     1  0.0000     0.9716 1.000 0.000 0.000
#> GSM125202     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125204     3  0.2356     0.9797 0.000 0.072 0.928
#> GSM125206     3  0.2356     0.9797 0.000 0.072 0.928
#> GSM125208     3  0.2496     0.9785 0.004 0.068 0.928
#> GSM125210     3  0.2356     0.9797 0.000 0.072 0.928
#> GSM125212     3  0.2537     0.9715 0.000 0.080 0.920
#> GSM125214     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125216     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125218     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125220     1  0.0424     0.9711 0.992 0.000 0.008
#> GSM125222     3  0.2356     0.9797 0.000 0.072 0.928
#> GSM125224     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125226     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125228     2  0.0000     0.9715 0.000 1.000 0.000
#> GSM125230     3  0.1031     0.9407 0.000 0.024 0.976
#> GSM125232     3  0.0592     0.9150 0.012 0.000 0.988
#> GSM125234     1  0.4842     0.7913 0.776 0.000 0.224
#> GSM125236     1  0.2165     0.9685 0.936 0.000 0.064
#> GSM125238     1  0.0237     0.9712 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
#> GSM125123     1  0.0000    0.76575 1.000 0.000 0.000 0.000
#> GSM125125     1  0.4790    0.82368 0.620 0.000 0.000 0.380
#> GSM125127     1  0.0921    0.74643 0.972 0.000 0.028 0.000
#> GSM125129     1  0.0000    0.76575 1.000 0.000 0.000 0.000
#> GSM125131     1  0.4955    0.81576 0.556 0.000 0.000 0.444
#> GSM125133     1  0.4643    0.80250 0.656 0.000 0.000 0.344
#> GSM125135     1  0.1474    0.78564 0.948 0.000 0.000 0.052
#> GSM125137     1  0.4972    0.81290 0.544 0.000 0.000 0.456
#> GSM125139     1  0.2408    0.79159 0.896 0.000 0.000 0.104
#> GSM125141     1  0.4961    0.81550 0.552 0.000 0.000 0.448
#> GSM125143     1  0.0469    0.75828 0.988 0.000 0.012 0.000
#> GSM125145     1  0.0817    0.77443 0.976 0.000 0.000 0.024
#> GSM125147     1  0.4961    0.81550 0.552 0.000 0.000 0.448
#> GSM125149     1  0.4961    0.81550 0.552 0.000 0.000 0.448
#> GSM125151     1  0.2345    0.79194 0.900 0.000 0.000 0.100
#> GSM125153     1  0.3688    0.81485 0.792 0.000 0.000 0.208
#> GSM125155     1  0.4948    0.81761 0.560 0.000 0.000 0.440
#> GSM125157     1  0.4955    0.81576 0.556 0.000 0.000 0.444
#> GSM125159     2  0.3975    0.75702 0.000 0.760 0.000 0.240
#> GSM125161     1  0.4925    0.81195 0.572 0.000 0.000 0.428
#> GSM125163     2  0.2345    0.84267 0.000 0.900 0.000 0.100
#> GSM125165     3  0.4907    0.14216 0.000 0.000 0.580 0.420
#> GSM125167     2  0.4072    0.74882 0.000 0.748 0.000 0.252
#> GSM125169     2  0.4511    0.72144 0.000 0.724 0.008 0.268
#> GSM125171     2  0.1022    0.85693 0.000 0.968 0.000 0.032
#> GSM125173     3  0.4624    0.43959 0.000 0.000 0.660 0.340
#> GSM125175     2  0.0921    0.85719 0.000 0.972 0.000 0.028
#> GSM125177     3  0.0336    0.66682 0.000 0.000 0.992 0.008
#> GSM125179     3  0.3982    0.63544 0.004 0.000 0.776 0.220
#> GSM125181     3  0.4898    0.11178 0.000 0.000 0.584 0.416
#> GSM125183     3  0.3649    0.64091 0.000 0.000 0.796 0.204
#> GSM125185     3  0.3908    0.63604 0.004 0.000 0.784 0.212
#> GSM125187     3  0.3688    0.63868 0.000 0.000 0.792 0.208
#> GSM125189     2  0.4072    0.74882 0.000 0.748 0.000 0.252
#> GSM125191     2  0.7026   -0.16351 0.000 0.476 0.120 0.404
#> GSM125193     3  0.2011    0.63183 0.000 0.000 0.920 0.080
#> GSM125195     3  0.1118    0.66754 0.000 0.000 0.964 0.036
#> GSM125197     2  0.0707    0.85081 0.000 0.980 0.000 0.020
#> GSM125199     1  0.4955    0.81576 0.556 0.000 0.000 0.444
#> GSM125201     2  0.0817    0.84961 0.000 0.976 0.000 0.024
#> GSM125203     3  0.0817    0.66707 0.000 0.000 0.976 0.024
#> GSM125205     2  0.0817    0.84961 0.000 0.976 0.000 0.024
#> GSM125207     3  0.1118    0.66792 0.000 0.000 0.964 0.036
#> GSM125209     4  0.7663    0.00000 0.000 0.212 0.380 0.408
#> GSM125211     3  0.3870    0.47821 0.000 0.004 0.788 0.208
#> GSM125213     2  0.2081    0.84654 0.000 0.916 0.000 0.084
#> GSM125215     2  0.0000    0.85688 0.000 1.000 0.000 0.000
#> GSM125217     2  0.4040    0.75213 0.000 0.752 0.000 0.248
#> GSM125219     1  0.0000    0.76575 1.000 0.000 0.000 0.000
#> GSM125221     3  0.4331    0.54493 0.000 0.000 0.712 0.288
#> GSM125223     2  0.0469    0.85366 0.000 0.988 0.000 0.012
#> GSM125225     2  0.0188    0.85717 0.000 0.996 0.000 0.004
#> GSM125227     2  0.0000    0.85688 0.000 1.000 0.000 0.000
#> GSM125229     3  0.5494    0.25625 0.000 0.076 0.716 0.208
#> GSM125231     3  0.4417    0.46241 0.160 0.000 0.796 0.044
#> GSM125233     1  0.0000    0.76575 1.000 0.000 0.000 0.000
#> GSM125235     1  0.4643    0.80250 0.656 0.000 0.000 0.344
#> GSM125237     1  0.4955    0.81576 0.556 0.000 0.000 0.444
#> GSM125124     1  0.2408    0.79159 0.896 0.000 0.000 0.104
#> GSM125126     1  0.4898    0.82046 0.584 0.000 0.000 0.416
#> GSM125128     1  0.4643    0.80250 0.656 0.000 0.000 0.344
#> GSM125130     1  0.0895    0.75007 0.976 0.000 0.020 0.004
#> GSM125132     1  0.4955    0.81576 0.556 0.000 0.000 0.444
#> GSM125134     1  0.2973    0.80182 0.856 0.000 0.000 0.144
#> GSM125136     1  0.4697    0.80055 0.644 0.000 0.000 0.356
#> GSM125138     1  0.2408    0.79159 0.896 0.000 0.000 0.104
#> GSM125140     1  0.2408    0.79159 0.896 0.000 0.000 0.104
#> GSM125142     1  0.4866    0.82404 0.596 0.000 0.000 0.404
#> GSM125144     1  0.2408    0.79159 0.896 0.000 0.000 0.104
#> GSM125146     1  0.1792    0.78980 0.932 0.000 0.000 0.068
#> GSM125148     1  0.4961    0.81550 0.552 0.000 0.000 0.448
#> GSM125150     1  0.4961    0.81550 0.552 0.000 0.000 0.448
#> GSM125152     1  0.2345    0.79194 0.900 0.000 0.000 0.100
#> GSM125154     1  0.3356    0.80864 0.824 0.000 0.000 0.176
#> GSM125156     1  0.4477    0.82568 0.688 0.000 0.000 0.312
#> GSM125158     1  0.4406    0.82582 0.700 0.000 0.000 0.300
#> GSM125160     2  0.3688    0.78306 0.000 0.792 0.000 0.208
#> GSM125162     1  0.4925    0.81195 0.572 0.000 0.000 0.428
#> GSM125164     2  0.2408    0.84157 0.000 0.896 0.000 0.104
#> GSM125166     2  0.2469    0.84148 0.000 0.892 0.000 0.108
#> GSM125168     3  0.5586   -0.07775 0.000 0.020 0.528 0.452
#> GSM125170     3  0.5273    0.00285 0.000 0.008 0.536 0.456
#> GSM125172     2  0.1022    0.85693 0.000 0.968 0.000 0.032
#> GSM125174     3  0.3688    0.64030 0.000 0.000 0.792 0.208
#> GSM125176     2  0.6104    0.51515 0.000 0.680 0.140 0.180
#> GSM125178     3  0.0336    0.66682 0.000 0.000 0.992 0.008
#> GSM125180     3  0.3982    0.63544 0.004 0.000 0.776 0.220
#> GSM125182     3  0.5526   -0.02476 0.000 0.020 0.564 0.416
#> GSM125184     3  0.3688    0.64030 0.000 0.000 0.792 0.208
#> GSM125186     3  0.3908    0.63604 0.004 0.000 0.784 0.212
#> GSM125188     3  0.4877    0.15433 0.000 0.000 0.592 0.408
#> GSM125190     2  0.4391    0.73937 0.000 0.740 0.008 0.252
#> GSM125192     2  0.2216    0.84510 0.000 0.908 0.000 0.092
#> GSM125194     3  0.0707    0.66633 0.000 0.000 0.980 0.020
#> GSM125196     3  0.1118    0.66754 0.000 0.000 0.964 0.036
#> GSM125198     2  0.0707    0.85081 0.000 0.980 0.000 0.020
#> GSM125200     1  0.4643    0.82733 0.656 0.000 0.000 0.344
#> GSM125202     2  0.0817    0.84961 0.000 0.976 0.000 0.024
#> GSM125204     3  0.0817    0.66707 0.000 0.000 0.976 0.024
#> GSM125206     3  0.0188    0.66722 0.000 0.000 0.996 0.004
#> GSM125208     3  0.1118    0.66792 0.000 0.000 0.964 0.036
#> GSM125210     3  0.3726    0.63705 0.000 0.000 0.788 0.212
#> GSM125212     3  0.4011    0.47003 0.000 0.008 0.784 0.208
#> GSM125214     2  0.0000    0.85688 0.000 1.000 0.000 0.000
#> GSM125216     2  0.0000    0.85688 0.000 1.000 0.000 0.000
#> GSM125218     2  0.4040    0.75213 0.000 0.752 0.000 0.248
#> GSM125220     1  0.4624    0.80286 0.660 0.000 0.000 0.340
#> GSM125222     3  0.4250    0.56355 0.000 0.000 0.724 0.276
#> GSM125224     2  0.0336    0.85490 0.000 0.992 0.000 0.008
#> GSM125226     2  0.4072    0.74882 0.000 0.748 0.000 0.252
#> GSM125228     2  0.0000    0.85688 0.000 1.000 0.000 0.000
#> GSM125230     3  0.1792    0.63994 0.000 0.000 0.932 0.068
#> GSM125232     3  0.5533    0.35858 0.220 0.000 0.708 0.072
#> GSM125234     1  0.4589    0.48944 0.784 0.000 0.168 0.048
#> GSM125236     1  0.0000    0.76575 1.000 0.000 0.000 0.000
#> GSM125238     1  0.4961    0.81550 0.552 0.000 0.000 0.448

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM125123     5  0.4249      0.802 0.296 0.000 0.016 0.000 0.688
#> GSM125125     1  0.3151      0.649 0.836 0.000 0.020 0.000 0.144
#> GSM125127     5  0.4184      0.802 0.284 0.000 0.016 0.000 0.700
#> GSM125129     5  0.4025      0.802 0.292 0.000 0.008 0.000 0.700
#> GSM125131     1  0.0898      0.771 0.972 0.000 0.008 0.000 0.020
#> GSM125133     1  0.4017      0.634 0.788 0.000 0.064 0.000 0.148
#> GSM125135     5  0.4610      0.692 0.388 0.000 0.016 0.000 0.596
#> GSM125137     1  0.1281      0.760 0.956 0.000 0.032 0.000 0.012
#> GSM125139     5  0.5396      0.691 0.444 0.000 0.056 0.000 0.500
#> GSM125141     1  0.0000      0.772 1.000 0.000 0.000 0.000 0.000
#> GSM125143     5  0.3884      0.803 0.288 0.000 0.004 0.000 0.708
#> GSM125145     5  0.5114      0.763 0.340 0.000 0.052 0.000 0.608
#> GSM125147     1  0.0162      0.772 0.996 0.000 0.000 0.000 0.004
#> GSM125149     1  0.0000      0.772 1.000 0.000 0.000 0.000 0.000
#> GSM125151     5  0.5308      0.723 0.416 0.000 0.052 0.000 0.532
#> GSM125153     1  0.5091      0.133 0.676 0.000 0.088 0.000 0.236
#> GSM125155     1  0.2260      0.722 0.908 0.000 0.064 0.000 0.028
#> GSM125157     1  0.0451      0.772 0.988 0.000 0.004 0.000 0.008
#> GSM125159     2  0.5632      0.777 0.000 0.676 0.024 0.200 0.100
#> GSM125161     1  0.3590      0.692 0.828 0.000 0.080 0.000 0.092
#> GSM125163     2  0.4013      0.830 0.000 0.804 0.004 0.108 0.084
#> GSM125165     4  0.3134      0.533 0.000 0.000 0.120 0.848 0.032
#> GSM125167     2  0.6220      0.750 0.000 0.616 0.028 0.224 0.132
#> GSM125169     2  0.6857      0.665 0.000 0.528 0.040 0.288 0.144
#> GSM125171     2  0.3744      0.837 0.000 0.832 0.024 0.036 0.108
#> GSM125173     4  0.3876      0.522 0.000 0.000 0.192 0.776 0.032
#> GSM125175     2  0.3278      0.840 0.000 0.860 0.020 0.028 0.092
#> GSM125177     3  0.3913      0.733 0.000 0.000 0.676 0.324 0.000
#> GSM125179     4  0.4329      0.498 0.000 0.000 0.252 0.716 0.032
#> GSM125181     4  0.3146      0.490 0.000 0.000 0.092 0.856 0.052
#> GSM125183     4  0.4003      0.490 0.000 0.000 0.288 0.704 0.008
#> GSM125185     4  0.4141      0.501 0.000 0.000 0.236 0.736 0.028
#> GSM125187     4  0.4040      0.483 0.000 0.000 0.260 0.724 0.016
#> GSM125189     2  0.6448      0.747 0.000 0.604 0.040 0.220 0.136
#> GSM125191     4  0.5381      0.140 0.000 0.288 0.012 0.640 0.060
#> GSM125193     3  0.4588      0.707 0.000 0.000 0.604 0.380 0.016
#> GSM125195     3  0.4963      0.718 0.000 0.000 0.608 0.352 0.040
#> GSM125197     2  0.1124      0.833 0.000 0.960 0.004 0.000 0.036
#> GSM125199     1  0.0451      0.772 0.988 0.000 0.004 0.000 0.008
#> GSM125201     2  0.1444      0.832 0.000 0.948 0.012 0.000 0.040
#> GSM125203     3  0.4511      0.735 0.000 0.000 0.628 0.356 0.016
#> GSM125205     2  0.1408      0.830 0.000 0.948 0.008 0.000 0.044
#> GSM125207     3  0.4321      0.698 0.000 0.000 0.600 0.396 0.004
#> GSM125209     4  0.4147      0.437 0.000 0.116 0.016 0.804 0.064
#> GSM125211     3  0.4957      0.560 0.000 0.000 0.624 0.332 0.044
#> GSM125213     2  0.2511      0.840 0.000 0.892 0.000 0.080 0.028
#> GSM125215     2  0.0671      0.838 0.000 0.980 0.004 0.000 0.016
#> GSM125217     2  0.6497      0.744 0.000 0.596 0.040 0.228 0.136
#> GSM125219     5  0.4464      0.789 0.288 0.000 0.028 0.000 0.684
#> GSM125221     4  0.3430      0.535 0.000 0.000 0.220 0.776 0.004
#> GSM125223     2  0.1082      0.836 0.000 0.964 0.008 0.000 0.028
#> GSM125225     2  0.0771      0.839 0.000 0.976 0.004 0.000 0.020
#> GSM125227     2  0.0992      0.837 0.000 0.968 0.008 0.000 0.024
#> GSM125229     3  0.5769      0.504 0.000 0.044 0.632 0.276 0.048
#> GSM125231     3  0.5446      0.522 0.000 0.000 0.628 0.272 0.100
#> GSM125233     5  0.4046      0.804 0.296 0.000 0.008 0.000 0.696
#> GSM125235     1  0.3193      0.673 0.840 0.000 0.028 0.000 0.132
#> GSM125237     1  0.0290      0.772 0.992 0.000 0.000 0.000 0.008
#> GSM125124     5  0.5761      0.704 0.420 0.000 0.088 0.000 0.492
#> GSM125126     1  0.2079      0.740 0.916 0.000 0.020 0.000 0.064
#> GSM125128     1  0.4489      0.582 0.740 0.000 0.068 0.000 0.192
#> GSM125130     5  0.3957      0.802 0.280 0.000 0.008 0.000 0.712
#> GSM125132     1  0.0579      0.772 0.984 0.000 0.008 0.000 0.008
#> GSM125134     1  0.5742     -0.541 0.508 0.000 0.088 0.000 0.404
#> GSM125136     1  0.4197      0.631 0.776 0.000 0.076 0.000 0.148
#> GSM125138     5  0.5803      0.701 0.420 0.000 0.092 0.000 0.488
#> GSM125140     5  0.5396      0.691 0.444 0.000 0.056 0.000 0.500
#> GSM125142     1  0.3535      0.618 0.832 0.000 0.088 0.000 0.080
#> GSM125144     5  0.5761      0.704 0.420 0.000 0.088 0.000 0.492
#> GSM125146     5  0.5341      0.650 0.444 0.000 0.052 0.000 0.504
#> GSM125148     1  0.0162      0.772 0.996 0.000 0.000 0.000 0.004
#> GSM125150     1  0.0324      0.769 0.992 0.000 0.004 0.000 0.004
#> GSM125152     5  0.5308      0.723 0.416 0.000 0.052 0.000 0.532
#> GSM125154     1  0.5440     -0.185 0.612 0.000 0.088 0.000 0.300
#> GSM125156     1  0.4678      0.301 0.712 0.000 0.064 0.000 0.224
#> GSM125158     1  0.4639      0.298 0.708 0.000 0.056 0.000 0.236
#> GSM125160     2  0.5419      0.789 0.000 0.696 0.020 0.184 0.100
#> GSM125162     1  0.3590      0.692 0.828 0.000 0.080 0.000 0.092
#> GSM125164     2  0.4063      0.829 0.000 0.800 0.004 0.112 0.084
#> GSM125166     2  0.4458      0.825 0.000 0.784 0.016 0.100 0.100
#> GSM125168     4  0.3911      0.493 0.000 0.008 0.072 0.816 0.104
#> GSM125170     4  0.3854      0.502 0.000 0.004 0.080 0.816 0.100
#> GSM125172     2  0.3613      0.839 0.000 0.840 0.024 0.032 0.104
#> GSM125174     4  0.4275      0.499 0.000 0.000 0.284 0.696 0.020
#> GSM125176     2  0.6631      0.561 0.000 0.528 0.036 0.324 0.112
#> GSM125178     3  0.3895      0.733 0.000 0.000 0.680 0.320 0.000
#> GSM125180     4  0.4329      0.498 0.000 0.000 0.252 0.716 0.032
#> GSM125182     4  0.3765      0.477 0.000 0.020 0.080 0.836 0.064
#> GSM125184     4  0.3884      0.498 0.000 0.000 0.288 0.708 0.004
#> GSM125186     4  0.4141      0.501 0.000 0.000 0.236 0.736 0.028
#> GSM125188     4  0.3112      0.494 0.000 0.000 0.100 0.856 0.044
#> GSM125190     2  0.6776      0.703 0.000 0.560 0.048 0.256 0.136
#> GSM125192     2  0.3743      0.834 0.000 0.824 0.004 0.096 0.076
#> GSM125194     3  0.4418      0.732 0.000 0.000 0.652 0.332 0.016
#> GSM125196     3  0.4977      0.715 0.000 0.000 0.604 0.356 0.040
#> GSM125198     2  0.1124      0.833 0.000 0.960 0.004 0.000 0.036
#> GSM125200     1  0.3944      0.542 0.788 0.000 0.052 0.000 0.160
#> GSM125202     2  0.1444      0.832 0.000 0.948 0.012 0.000 0.040
#> GSM125204     3  0.4511      0.735 0.000 0.000 0.628 0.356 0.016
#> GSM125206     3  0.4734      0.738 0.000 0.000 0.652 0.312 0.036
#> GSM125208     3  0.4321      0.698 0.000 0.000 0.600 0.396 0.004
#> GSM125210     4  0.3720      0.518 0.000 0.000 0.228 0.760 0.012
#> GSM125212     3  0.5107      0.558 0.000 0.004 0.620 0.332 0.044
#> GSM125214     2  0.0324      0.840 0.000 0.992 0.000 0.004 0.004
#> GSM125216     2  0.0671      0.838 0.000 0.980 0.004 0.000 0.016
#> GSM125218     2  0.6497      0.744 0.000 0.596 0.040 0.228 0.136
#> GSM125220     1  0.4199      0.621 0.772 0.000 0.068 0.000 0.160
#> GSM125222     4  0.3521      0.532 0.000 0.000 0.232 0.764 0.004
#> GSM125224     2  0.1082      0.836 0.000 0.964 0.008 0.000 0.028
#> GSM125226     2  0.6379      0.749 0.000 0.608 0.036 0.220 0.136
#> GSM125228     2  0.0992      0.837 0.000 0.968 0.008 0.000 0.024
#> GSM125230     3  0.4193      0.695 0.000 0.000 0.720 0.256 0.024
#> GSM125232     3  0.6436      0.187 0.000 0.000 0.504 0.232 0.264
#> GSM125234     5  0.5242      0.698 0.204 0.000 0.044 0.044 0.708
#> GSM125236     5  0.4297      0.799 0.288 0.000 0.020 0.000 0.692
#> GSM125238     1  0.0000      0.772 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
#> GSM125123     1  0.3354     0.7672 0.780 0.000 0.004 0.004 0.204 0.008
#> GSM125125     5  0.3562     0.5505 0.224 0.000 0.008 0.000 0.756 0.012
#> GSM125127     1  0.4167     0.7616 0.760 0.000 0.012 0.016 0.180 0.032
#> GSM125129     1  0.3244     0.7694 0.784 0.000 0.004 0.004 0.204 0.004
#> GSM125131     5  0.0881     0.7531 0.012 0.000 0.008 0.000 0.972 0.008
#> GSM125133     5  0.4921     0.5858 0.156 0.000 0.076 0.004 0.720 0.044
#> GSM125135     1  0.4402     0.6852 0.664 0.000 0.020 0.000 0.296 0.020
#> GSM125137     5  0.1844     0.7385 0.024 0.000 0.048 0.000 0.924 0.004
#> GSM125139     1  0.5838     0.6014 0.496 0.000 0.028 0.000 0.376 0.100
#> GSM125141     5  0.0291     0.7532 0.004 0.000 0.000 0.000 0.992 0.004
#> GSM125143     1  0.3371     0.7680 0.788 0.000 0.008 0.008 0.192 0.004
#> GSM125145     1  0.5260     0.7293 0.652 0.000 0.040 0.000 0.232 0.076
#> GSM125147     5  0.0291     0.7535 0.004 0.000 0.000 0.000 0.992 0.004
#> GSM125149     5  0.0260     0.7538 0.008 0.000 0.000 0.000 0.992 0.000
#> GSM125151     1  0.5486     0.6718 0.560 0.000 0.020 0.000 0.332 0.088
#> GSM125153     5  0.5723     0.1929 0.204 0.000 0.044 0.000 0.620 0.132
#> GSM125155     5  0.3201     0.6764 0.036 0.000 0.028 0.000 0.848 0.088
#> GSM125157     5  0.0665     0.7536 0.008 0.000 0.004 0.000 0.980 0.008
#> GSM125159     2  0.4439     0.5089 0.040 0.760 0.084 0.000 0.000 0.116
#> GSM125161     5  0.4083     0.6698 0.060 0.000 0.100 0.004 0.796 0.040
#> GSM125163     2  0.3987     0.3756 0.024 0.728 0.012 0.000 0.000 0.236
#> GSM125165     4  0.5995     0.2439 0.024 0.404 0.124 0.448 0.000 0.000
#> GSM125167     2  0.1223     0.6020 0.004 0.960 0.012 0.008 0.000 0.016
#> GSM125169     2  0.1552     0.5960 0.004 0.940 0.020 0.036 0.000 0.000
#> GSM125171     2  0.5493    -0.2747 0.040 0.528 0.040 0.004 0.000 0.388
#> GSM125173     4  0.6080     0.2862 0.032 0.248 0.140 0.572 0.000 0.008
#> GSM125175     2  0.5111    -0.2803 0.032 0.552 0.032 0.000 0.000 0.384
#> GSM125177     3  0.4538     0.5918 0.004 0.012 0.508 0.468 0.000 0.008
#> GSM125179     4  0.1003     0.4385 0.020 0.016 0.000 0.964 0.000 0.000
#> GSM125181     4  0.6406     0.1839 0.052 0.400 0.128 0.420 0.000 0.000
#> GSM125183     4  0.2270     0.4197 0.004 0.020 0.072 0.900 0.000 0.004
#> GSM125185     4  0.1173     0.4365 0.016 0.008 0.016 0.960 0.000 0.000
#> GSM125187     4  0.1503     0.4281 0.016 0.008 0.032 0.944 0.000 0.000
#> GSM125189     2  0.0881     0.6011 0.012 0.972 0.008 0.000 0.000 0.008
#> GSM125191     2  0.6145     0.2700 0.056 0.536 0.080 0.320 0.000 0.008
#> GSM125193     3  0.5056     0.5877 0.020 0.024 0.536 0.412 0.000 0.008
#> GSM125195     4  0.5115    -0.5375 0.036 0.004 0.464 0.480 0.000 0.016
#> GSM125197     6  0.3855     0.9305 0.016 0.276 0.004 0.000 0.000 0.704
#> GSM125199     5  0.0779     0.7528 0.008 0.000 0.008 0.000 0.976 0.008
#> GSM125201     6  0.4687     0.9101 0.044 0.276 0.012 0.004 0.000 0.664
#> GSM125203     4  0.4878    -0.5511 0.020 0.008 0.464 0.496 0.000 0.012
#> GSM125205     6  0.4204     0.9204 0.028 0.272 0.004 0.004 0.000 0.692
#> GSM125207     4  0.4350    -0.4901 0.016 0.004 0.428 0.552 0.000 0.000
#> GSM125209     4  0.6327     0.0339 0.064 0.424 0.084 0.424 0.000 0.004
#> GSM125211     3  0.6041     0.5621 0.028 0.096 0.612 0.228 0.000 0.036
#> GSM125213     2  0.5481    -0.2129 0.044 0.520 0.044 0.000 0.000 0.392
#> GSM125215     6  0.4042     0.9204 0.016 0.316 0.004 0.000 0.000 0.664
#> GSM125217     2  0.1579     0.5977 0.008 0.944 0.020 0.004 0.000 0.024
#> GSM125219     1  0.3597     0.7562 0.776 0.000 0.012 0.004 0.196 0.012
#> GSM125221     4  0.3996     0.3847 0.008 0.112 0.104 0.776 0.000 0.000
#> GSM125223     6  0.3555     0.9340 0.008 0.280 0.000 0.000 0.000 0.712
#> GSM125225     6  0.3955     0.9038 0.008 0.340 0.004 0.000 0.000 0.648
#> GSM125227     6  0.3565     0.9354 0.004 0.304 0.000 0.000 0.000 0.692
#> GSM125229     3  0.5971     0.5129 0.024 0.108 0.640 0.180 0.000 0.048
#> GSM125231     3  0.6040     0.4959 0.048 0.008 0.456 0.424 0.000 0.064
#> GSM125233     1  0.3104     0.7679 0.788 0.000 0.000 0.004 0.204 0.004
#> GSM125235     5  0.3529     0.6277 0.176 0.000 0.028 0.000 0.788 0.008
#> GSM125237     5  0.0146     0.7537 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM125124     1  0.6488     0.6082 0.464 0.000 0.052 0.000 0.332 0.152
#> GSM125126     5  0.2222     0.7142 0.084 0.000 0.008 0.000 0.896 0.012
#> GSM125128     5  0.5458     0.5008 0.224 0.000 0.080 0.004 0.648 0.044
#> GSM125130     1  0.3483     0.7589 0.792 0.000 0.004 0.024 0.176 0.004
#> GSM125132     5  0.0665     0.7529 0.004 0.000 0.008 0.000 0.980 0.008
#> GSM125134     5  0.6509    -0.4356 0.364 0.000 0.052 0.000 0.436 0.148
#> GSM125136     5  0.5188     0.5782 0.140 0.000 0.112 0.004 0.700 0.044
#> GSM125138     1  0.6495     0.6026 0.460 0.000 0.052 0.000 0.336 0.152
#> GSM125140     1  0.5854     0.5804 0.484 0.000 0.028 0.000 0.388 0.100
#> GSM125142     5  0.4139     0.6020 0.036 0.000 0.052 0.000 0.776 0.136
#> GSM125144     1  0.6477     0.6060 0.460 0.000 0.052 0.000 0.340 0.148
#> GSM125146     1  0.5827     0.5931 0.528 0.000 0.044 0.000 0.348 0.080
#> GSM125148     5  0.0436     0.7533 0.004 0.000 0.004 0.000 0.988 0.004
#> GSM125150     5  0.0767     0.7501 0.008 0.000 0.012 0.000 0.976 0.004
#> GSM125152     1  0.5474     0.6748 0.564 0.000 0.020 0.000 0.328 0.088
#> GSM125154     5  0.6280    -0.1235 0.268 0.000 0.052 0.000 0.532 0.148
#> GSM125156     5  0.5053     0.3560 0.208 0.000 0.028 0.000 0.676 0.088
#> GSM125158     5  0.4907     0.3692 0.204 0.000 0.024 0.000 0.688 0.084
#> GSM125160     2  0.4675     0.4875 0.040 0.736 0.084 0.000 0.000 0.140
#> GSM125162     5  0.4083     0.6698 0.060 0.000 0.100 0.004 0.796 0.040
#> GSM125164     2  0.3962     0.3826 0.024 0.732 0.012 0.000 0.000 0.232
#> GSM125166     2  0.4081     0.3738 0.024 0.732 0.020 0.000 0.000 0.224
#> GSM125168     2  0.4603     0.1689 0.008 0.628 0.040 0.324 0.000 0.000
#> GSM125170     2  0.4690     0.1021 0.008 0.584 0.036 0.372 0.000 0.000
#> GSM125172     2  0.5486    -0.2512 0.040 0.532 0.040 0.004 0.000 0.384
#> GSM125174     4  0.3065     0.4134 0.024 0.020 0.080 0.864 0.000 0.012
#> GSM125176     2  0.5509     0.5053 0.032 0.680 0.032 0.180 0.000 0.076
#> GSM125178     3  0.4542     0.5896 0.004 0.012 0.496 0.480 0.000 0.008
#> GSM125180     4  0.1003     0.4385 0.020 0.016 0.000 0.964 0.000 0.000
#> GSM125182     2  0.6305    -0.1982 0.048 0.424 0.120 0.408 0.000 0.000
#> GSM125184     4  0.2082     0.4242 0.008 0.020 0.052 0.916 0.000 0.004
#> GSM125186     4  0.1173     0.4365 0.016 0.008 0.016 0.960 0.000 0.000
#> GSM125188     4  0.6438     0.2496 0.056 0.336 0.136 0.472 0.000 0.000
#> GSM125190     2  0.1173     0.6010 0.008 0.960 0.016 0.016 0.000 0.000
#> GSM125192     2  0.4329     0.2276 0.024 0.664 0.012 0.000 0.000 0.300
#> GSM125194     3  0.4778     0.5911 0.020 0.008 0.520 0.444 0.000 0.008
#> GSM125196     4  0.5115    -0.5375 0.036 0.004 0.464 0.480 0.000 0.016
#> GSM125198     6  0.3855     0.9305 0.016 0.276 0.004 0.000 0.000 0.704
#> GSM125200     5  0.4392     0.5113 0.176 0.000 0.024 0.000 0.740 0.060
#> GSM125202     6  0.4687     0.9101 0.044 0.276 0.012 0.004 0.000 0.664
#> GSM125204     4  0.4878    -0.5511 0.020 0.008 0.464 0.496 0.000 0.012
#> GSM125206     3  0.4991     0.5486 0.028 0.004 0.496 0.456 0.000 0.016
#> GSM125208     4  0.4350    -0.4901 0.016 0.004 0.428 0.552 0.000 0.000
#> GSM125210     4  0.1275     0.4365 0.016 0.012 0.016 0.956 0.000 0.000
#> GSM125212     3  0.6041     0.5621 0.028 0.096 0.612 0.228 0.000 0.036
#> GSM125214     6  0.4379     0.8749 0.024 0.336 0.008 0.000 0.000 0.632
#> GSM125216     6  0.4042     0.9204 0.016 0.316 0.004 0.000 0.000 0.664
#> GSM125218     2  0.1490     0.5976 0.008 0.948 0.016 0.004 0.000 0.024
#> GSM125220     5  0.5310     0.5287 0.208 0.000 0.076 0.004 0.668 0.044
#> GSM125222     4  0.3862     0.3872 0.008 0.104 0.100 0.788 0.000 0.000
#> GSM125224     6  0.3489     0.9365 0.004 0.288 0.000 0.000 0.000 0.708
#> GSM125226     2  0.0665     0.6017 0.008 0.980 0.000 0.004 0.000 0.008
#> GSM125228     6  0.3565     0.9354 0.004 0.304 0.000 0.000 0.000 0.692
#> GSM125230     3  0.5057     0.6175 0.016 0.016 0.628 0.304 0.000 0.036
#> GSM125232     4  0.6698    -0.0409 0.136 0.004 0.176 0.548 0.000 0.136
#> GSM125234     1  0.3590     0.7007 0.804 0.000 0.000 0.076 0.116 0.004
#> GSM125236     1  0.3183     0.7689 0.792 0.000 0.004 0.004 0.196 0.004
#> GSM125238     5  0.0146     0.7537 0.004 0.000 0.000 0.000 0.996 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-kmeans-consensus-heatmap-1

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk SD-kmeans-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk SD-kmeans-collect-classes

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

test_to_known_factors(res)
#>             n agent(p) individual(p) k
#> SD:kmeans 115    0.934      1.46e-05 2
#> SD:kmeans 115    0.830      2.51e-08 3
#> SD:kmeans 101    0.805      2.80e-07 4
#> SD:kmeans  98    0.999      3.30e-09 5
#> SD:kmeans  74    0.990      3.76e-07 6

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


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 21168 rows and 116 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 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-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           0.981       0.991         0.5026 0.498   0.498
#> 3 3 0.960           0.955       0.980         0.2890 0.822   0.654
#> 4 4 0.927           0.887       0.930         0.0769 0.947   0.852
#> 5 5 0.776           0.742       0.827         0.0895 0.897   0.677
#> 6 6 0.730           0.663       0.802         0.0483 0.981   0.916

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
#> GSM125123     1  0.0000      0.996 1.000 0.000
#> GSM125125     1  0.0000      0.996 1.000 0.000
#> GSM125127     1  0.0000      0.996 1.000 0.000
#> GSM125129     1  0.0000      0.996 1.000 0.000
#> GSM125131     1  0.0000      0.996 1.000 0.000
#> GSM125133     1  0.0000      0.996 1.000 0.000
#> GSM125135     1  0.0000      0.996 1.000 0.000
#> GSM125137     1  0.0000      0.996 1.000 0.000
#> GSM125139     1  0.0000      0.996 1.000 0.000
#> GSM125141     1  0.0000      0.996 1.000 0.000
#> GSM125143     1  0.0000      0.996 1.000 0.000
#> GSM125145     1  0.0000      0.996 1.000 0.000
#> GSM125147     1  0.0000      0.996 1.000 0.000
#> GSM125149     1  0.0000      0.996 1.000 0.000
#> GSM125151     1  0.0000      0.996 1.000 0.000
#> GSM125153     1  0.0000      0.996 1.000 0.000
#> GSM125155     1  0.0000      0.996 1.000 0.000
#> GSM125157     1  0.0000      0.996 1.000 0.000
#> GSM125159     2  0.0000      0.986 0.000 1.000
#> GSM125161     1  0.0000      0.996 1.000 0.000
#> GSM125163     2  0.0000      0.986 0.000 1.000
#> GSM125165     2  0.0000      0.986 0.000 1.000
#> GSM125167     2  0.0000      0.986 0.000 1.000
#> GSM125169     2  0.0000      0.986 0.000 1.000
#> GSM125171     2  0.0000      0.986 0.000 1.000
#> GSM125173     2  0.0000      0.986 0.000 1.000
#> GSM125175     2  0.0000      0.986 0.000 1.000
#> GSM125177     2  0.0000      0.986 0.000 1.000
#> GSM125179     2  0.7056      0.775 0.192 0.808
#> GSM125181     2  0.0000      0.986 0.000 1.000
#> GSM125183     2  0.6887      0.786 0.184 0.816
#> GSM125185     2  0.0000      0.986 0.000 1.000
#> GSM125187     1  0.4690      0.887 0.900 0.100
#> GSM125189     2  0.0000      0.986 0.000 1.000
#> GSM125191     2  0.0000      0.986 0.000 1.000
#> GSM125193     1  0.5178      0.869 0.884 0.116
#> GSM125195     2  0.0000      0.986 0.000 1.000
#> GSM125197     2  0.0000      0.986 0.000 1.000
#> GSM125199     1  0.0000      0.996 1.000 0.000
#> GSM125201     2  0.0000      0.986 0.000 1.000
#> GSM125203     2  0.0000      0.986 0.000 1.000
#> GSM125205     2  0.0000      0.986 0.000 1.000
#> GSM125207     2  0.0000      0.986 0.000 1.000
#> GSM125209     2  0.0000      0.986 0.000 1.000
#> GSM125211     2  0.0000      0.986 0.000 1.000
#> GSM125213     2  0.0000      0.986 0.000 1.000
#> GSM125215     2  0.0000      0.986 0.000 1.000
#> GSM125217     2  0.0000      0.986 0.000 1.000
#> GSM125219     1  0.0000      0.996 1.000 0.000
#> GSM125221     2  0.0000      0.986 0.000 1.000
#> GSM125223     2  0.0000      0.986 0.000 1.000
#> GSM125225     2  0.0000      0.986 0.000 1.000
#> GSM125227     2  0.0000      0.986 0.000 1.000
#> GSM125229     2  0.0000      0.986 0.000 1.000
#> GSM125231     1  0.0000      0.996 1.000 0.000
#> GSM125233     1  0.0000      0.996 1.000 0.000
#> GSM125235     1  0.0000      0.996 1.000 0.000
#> GSM125237     1  0.0000      0.996 1.000 0.000
#> GSM125124     1  0.0000      0.996 1.000 0.000
#> GSM125126     1  0.0000      0.996 1.000 0.000
#> GSM125128     1  0.0000      0.996 1.000 0.000
#> GSM125130     1  0.0000      0.996 1.000 0.000
#> GSM125132     1  0.0000      0.996 1.000 0.000
#> GSM125134     1  0.0000      0.996 1.000 0.000
#> GSM125136     1  0.0000      0.996 1.000 0.000
#> GSM125138     1  0.0000      0.996 1.000 0.000
#> GSM125140     1  0.0000      0.996 1.000 0.000
#> GSM125142     1  0.0000      0.996 1.000 0.000
#> GSM125144     1  0.0000      0.996 1.000 0.000
#> GSM125146     1  0.0000      0.996 1.000 0.000
#> GSM125148     1  0.0000      0.996 1.000 0.000
#> GSM125150     1  0.0000      0.996 1.000 0.000
#> GSM125152     1  0.0000      0.996 1.000 0.000
#> GSM125154     1  0.0000      0.996 1.000 0.000
#> GSM125156     1  0.0000      0.996 1.000 0.000
#> GSM125158     1  0.0000      0.996 1.000 0.000
#> GSM125160     2  0.0000      0.986 0.000 1.000
#> GSM125162     1  0.0000      0.996 1.000 0.000
#> GSM125164     2  0.0000      0.986 0.000 1.000
#> GSM125166     2  0.0000      0.986 0.000 1.000
#> GSM125168     2  0.0000      0.986 0.000 1.000
#> GSM125170     2  0.0000      0.986 0.000 1.000
#> GSM125172     2  0.0000      0.986 0.000 1.000
#> GSM125174     2  0.4022      0.910 0.080 0.920
#> GSM125176     2  0.0000      0.986 0.000 1.000
#> GSM125178     2  0.0000      0.986 0.000 1.000
#> GSM125180     2  0.6973      0.781 0.188 0.812
#> GSM125182     2  0.0000      0.986 0.000 1.000
#> GSM125184     2  0.0000      0.986 0.000 1.000
#> GSM125186     2  0.7139      0.769 0.196 0.804
#> GSM125188     2  0.0000      0.986 0.000 1.000
#> GSM125190     2  0.0000      0.986 0.000 1.000
#> GSM125192     2  0.0000      0.986 0.000 1.000
#> GSM125194     1  0.0000      0.996 1.000 0.000
#> GSM125196     2  0.0000      0.986 0.000 1.000
#> GSM125198     2  0.0000      0.986 0.000 1.000
#> GSM125200     1  0.0000      0.996 1.000 0.000
#> GSM125202     2  0.0000      0.986 0.000 1.000
#> GSM125204     2  0.0000      0.986 0.000 1.000
#> GSM125206     2  0.0000      0.986 0.000 1.000
#> GSM125208     2  0.0376      0.983 0.004 0.996
#> GSM125210     2  0.0000      0.986 0.000 1.000
#> GSM125212     2  0.0000      0.986 0.000 1.000
#> GSM125214     2  0.0000      0.986 0.000 1.000
#> GSM125216     2  0.0000      0.986 0.000 1.000
#> GSM125218     2  0.0000      0.986 0.000 1.000
#> GSM125220     1  0.0000      0.996 1.000 0.000
#> GSM125222     2  0.0000      0.986 0.000 1.000
#> GSM125224     2  0.0000      0.986 0.000 1.000
#> GSM125226     2  0.0000      0.986 0.000 1.000
#> GSM125228     2  0.0000      0.986 0.000 1.000
#> GSM125230     1  0.0000      0.996 1.000 0.000
#> GSM125232     1  0.0000      0.996 1.000 0.000
#> GSM125234     1  0.0000      0.996 1.000 0.000
#> GSM125236     1  0.0000      0.996 1.000 0.000
#> GSM125238     1  0.0000      0.996 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
#> GSM125123     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125125     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125127     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125129     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125131     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125133     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125135     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125137     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125139     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125141     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125143     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125145     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125147     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125149     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125151     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125153     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125155     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125157     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125159     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125161     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125163     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125165     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125167     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125169     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125171     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125173     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125175     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125177     3  0.3816      0.828 0.000 0.148 0.852
#> GSM125179     3  0.0000      0.953 0.000 0.000 1.000
#> GSM125181     2  0.0237      0.971 0.000 0.996 0.004
#> GSM125183     3  0.0000      0.953 0.000 0.000 1.000
#> GSM125185     3  0.0000      0.953 0.000 0.000 1.000
#> GSM125187     3  0.0000      0.953 0.000 0.000 1.000
#> GSM125189     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125191     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125193     3  0.5763      0.690 0.244 0.016 0.740
#> GSM125195     3  0.0000      0.953 0.000 0.000 1.000
#> GSM125197     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125199     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125201     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125203     3  0.3267      0.863 0.000 0.116 0.884
#> GSM125205     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125207     3  0.0000      0.953 0.000 0.000 1.000
#> GSM125209     2  0.0237      0.971 0.000 0.996 0.004
#> GSM125211     2  0.5882      0.454 0.000 0.652 0.348
#> GSM125213     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125215     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125217     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125219     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125221     2  0.6045      0.362 0.000 0.620 0.380
#> GSM125223     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125225     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125227     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125229     2  0.0424      0.967 0.000 0.992 0.008
#> GSM125231     3  0.0424      0.947 0.008 0.000 0.992
#> GSM125233     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125235     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125237     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125124     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125126     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125128     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125130     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125132     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125134     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125136     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125138     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125140     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125142     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125144     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125146     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125148     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125150     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125152     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125154     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125156     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125158     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125160     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125162     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125164     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125166     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125168     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125170     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125172     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125174     3  0.0000      0.953 0.000 0.000 1.000
#> GSM125176     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125178     3  0.0424      0.948 0.000 0.008 0.992
#> GSM125180     3  0.0000      0.953 0.000 0.000 1.000
#> GSM125182     2  0.0237      0.971 0.000 0.996 0.004
#> GSM125184     3  0.0000      0.953 0.000 0.000 1.000
#> GSM125186     3  0.0000      0.953 0.000 0.000 1.000
#> GSM125188     2  0.1031      0.953 0.000 0.976 0.024
#> GSM125190     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125192     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125194     3  0.4796      0.732 0.220 0.000 0.780
#> GSM125196     3  0.0000      0.953 0.000 0.000 1.000
#> GSM125198     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125200     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125202     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125204     3  0.0000      0.953 0.000 0.000 1.000
#> GSM125206     3  0.3116      0.871 0.000 0.108 0.892
#> GSM125208     3  0.0000      0.953 0.000 0.000 1.000
#> GSM125210     3  0.0000      0.953 0.000 0.000 1.000
#> GSM125212     2  0.5465      0.583 0.000 0.712 0.288
#> GSM125214     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125216     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125218     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125220     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125222     3  0.4291      0.782 0.000 0.180 0.820
#> GSM125224     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125226     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125228     2  0.0000      0.974 0.000 1.000 0.000
#> GSM125230     3  0.0000      0.953 0.000 0.000 1.000
#> GSM125232     3  0.0000      0.953 0.000 0.000 1.000
#> GSM125234     1  0.4504      0.756 0.804 0.000 0.196
#> GSM125236     1  0.0000      0.996 1.000 0.000 0.000
#> GSM125238     1  0.0000      0.996 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
#> GSM125123     1  0.1004     0.9701 0.972 0.000 0.024 0.004
#> GSM125125     1  0.0336     0.9731 0.992 0.000 0.008 0.000
#> GSM125127     1  0.1256     0.9671 0.964 0.000 0.028 0.008
#> GSM125129     1  0.1004     0.9701 0.972 0.000 0.024 0.004
#> GSM125131     1  0.0817     0.9715 0.976 0.000 0.024 0.000
#> GSM125133     1  0.0921     0.9707 0.972 0.000 0.028 0.000
#> GSM125135     1  0.1004     0.9703 0.972 0.000 0.024 0.004
#> GSM125137     1  0.1022     0.9693 0.968 0.000 0.032 0.000
#> GSM125139     1  0.1004     0.9701 0.972 0.000 0.024 0.004
#> GSM125141     1  0.0921     0.9707 0.972 0.000 0.028 0.000
#> GSM125143     1  0.1004     0.9701 0.972 0.000 0.024 0.004
#> GSM125145     1  0.1256     0.9671 0.964 0.000 0.028 0.008
#> GSM125147     1  0.0921     0.9707 0.972 0.000 0.028 0.000
#> GSM125149     1  0.0921     0.9707 0.972 0.000 0.028 0.000
#> GSM125151     1  0.1004     0.9701 0.972 0.000 0.024 0.004
#> GSM125153     1  0.0707     0.9730 0.980 0.000 0.020 0.000
#> GSM125155     1  0.0707     0.9721 0.980 0.000 0.020 0.000
#> GSM125157     1  0.0921     0.9707 0.972 0.000 0.028 0.000
#> GSM125159     2  0.0188     0.9299 0.000 0.996 0.000 0.004
#> GSM125161     1  0.1022     0.9693 0.968 0.000 0.032 0.000
#> GSM125163     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125165     2  0.7440    -0.0527 0.000 0.440 0.172 0.388
#> GSM125167     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125169     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125171     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125173     2  0.5012     0.7200 0.000 0.772 0.112 0.116
#> GSM125175     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125177     3  0.3611     0.8346 0.000 0.060 0.860 0.080
#> GSM125179     4  0.0188     0.8780 0.000 0.000 0.004 0.996
#> GSM125181     2  0.7026     0.1187 0.000 0.476 0.120 0.404
#> GSM125183     4  0.2921     0.8487 0.000 0.000 0.140 0.860
#> GSM125185     4  0.1022     0.8726 0.000 0.000 0.032 0.968
#> GSM125187     4  0.1389     0.8690 0.000 0.000 0.048 0.952
#> GSM125189     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125191     2  0.1209     0.9086 0.000 0.964 0.004 0.032
#> GSM125193     3  0.2224     0.8036 0.032 0.000 0.928 0.040
#> GSM125195     3  0.3837     0.8194 0.000 0.000 0.776 0.224
#> GSM125197     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125199     1  0.0921     0.9707 0.972 0.000 0.028 0.000
#> GSM125201     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125203     3  0.4035     0.8343 0.000 0.020 0.804 0.176
#> GSM125205     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125207     3  0.4040     0.8076 0.000 0.000 0.752 0.248
#> GSM125209     2  0.4661     0.6577 0.000 0.728 0.016 0.256
#> GSM125211     3  0.3198     0.7904 0.000 0.080 0.880 0.040
#> GSM125213     2  0.0188     0.9299 0.000 0.996 0.000 0.004
#> GSM125215     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125217     2  0.0188     0.9299 0.000 0.996 0.000 0.004
#> GSM125219     1  0.0895     0.9709 0.976 0.000 0.020 0.004
#> GSM125221     4  0.4801     0.7836 0.000 0.048 0.188 0.764
#> GSM125223     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125225     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125227     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125229     3  0.4220     0.6171 0.000 0.248 0.748 0.004
#> GSM125231     3  0.3672     0.7836 0.012 0.000 0.824 0.164
#> GSM125233     1  0.1004     0.9701 0.972 0.000 0.024 0.004
#> GSM125235     1  0.0921     0.9707 0.972 0.000 0.028 0.000
#> GSM125237     1  0.0921     0.9707 0.972 0.000 0.028 0.000
#> GSM125124     1  0.1256     0.9671 0.964 0.000 0.028 0.008
#> GSM125126     1  0.0188     0.9730 0.996 0.000 0.004 0.000
#> GSM125128     1  0.0921     0.9707 0.972 0.000 0.028 0.000
#> GSM125130     1  0.1109     0.9688 0.968 0.000 0.028 0.004
#> GSM125132     1  0.0817     0.9715 0.976 0.000 0.024 0.000
#> GSM125134     1  0.1151     0.9688 0.968 0.000 0.024 0.008
#> GSM125136     1  0.1022     0.9693 0.968 0.000 0.032 0.000
#> GSM125138     1  0.1256     0.9671 0.964 0.000 0.028 0.008
#> GSM125140     1  0.1004     0.9701 0.972 0.000 0.024 0.004
#> GSM125142     1  0.1118     0.9712 0.964 0.000 0.036 0.000
#> GSM125144     1  0.1256     0.9671 0.964 0.000 0.028 0.008
#> GSM125146     1  0.1004     0.9701 0.972 0.000 0.024 0.004
#> GSM125148     1  0.0921     0.9707 0.972 0.000 0.028 0.000
#> GSM125150     1  0.0921     0.9707 0.972 0.000 0.028 0.000
#> GSM125152     1  0.1004     0.9701 0.972 0.000 0.024 0.004
#> GSM125154     1  0.0895     0.9722 0.976 0.000 0.020 0.004
#> GSM125156     1  0.0336     0.9730 0.992 0.000 0.008 0.000
#> GSM125158     1  0.0469     0.9727 0.988 0.000 0.012 0.000
#> GSM125160     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125162     1  0.1022     0.9693 0.968 0.000 0.032 0.000
#> GSM125164     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125166     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125168     2  0.2334     0.8623 0.000 0.908 0.004 0.088
#> GSM125170     2  0.2973     0.8108 0.000 0.856 0.000 0.144
#> GSM125172     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125174     4  0.2589     0.8620 0.000 0.000 0.116 0.884
#> GSM125176     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125178     3  0.2799     0.8308 0.000 0.008 0.884 0.108
#> GSM125180     4  0.0188     0.8780 0.000 0.000 0.004 0.996
#> GSM125182     2  0.5147     0.6812 0.000 0.740 0.060 0.200
#> GSM125184     4  0.2469     0.8632 0.000 0.000 0.108 0.892
#> GSM125186     4  0.1022     0.8726 0.000 0.000 0.032 0.968
#> GSM125188     2  0.7107     0.0810 0.000 0.464 0.128 0.408
#> GSM125190     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125192     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125194     3  0.1629     0.8073 0.024 0.000 0.952 0.024
#> GSM125196     3  0.3873     0.8168 0.000 0.000 0.772 0.228
#> GSM125198     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125200     1  0.0469     0.9727 0.988 0.000 0.012 0.000
#> GSM125202     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125204     3  0.3569     0.8293 0.000 0.000 0.804 0.196
#> GSM125206     3  0.4462     0.8298 0.000 0.064 0.804 0.132
#> GSM125208     3  0.4008     0.8103 0.000 0.000 0.756 0.244
#> GSM125210     4  0.1022     0.8726 0.000 0.000 0.032 0.968
#> GSM125212     3  0.3117     0.7807 0.000 0.092 0.880 0.028
#> GSM125214     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125216     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125218     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125220     1  0.0921     0.9707 0.972 0.000 0.028 0.000
#> GSM125222     4  0.4323     0.8073 0.000 0.028 0.184 0.788
#> GSM125224     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125226     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125228     2  0.0000     0.9321 0.000 1.000 0.000 0.000
#> GSM125230     3  0.2466     0.8220 0.004 0.000 0.900 0.096
#> GSM125232     4  0.4511     0.6705 0.008 0.000 0.268 0.724
#> GSM125234     1  0.4365     0.7636 0.784 0.000 0.028 0.188
#> GSM125236     1  0.1004     0.9701 0.972 0.000 0.024 0.004
#> GSM125238     1  0.0921     0.9707 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
#> GSM125123     5  0.4114    0.87050 0.376 0.000 0.000 0.000 0.624
#> GSM125125     1  0.3561    0.40270 0.740 0.000 0.000 0.000 0.260
#> GSM125127     5  0.3990    0.85625 0.308 0.000 0.000 0.004 0.688
#> GSM125129     5  0.4060    0.88552 0.360 0.000 0.000 0.000 0.640
#> GSM125131     1  0.0404    0.78415 0.988 0.000 0.000 0.000 0.012
#> GSM125133     1  0.0963    0.76675 0.964 0.000 0.000 0.000 0.036
#> GSM125135     5  0.4283    0.72726 0.456 0.000 0.000 0.000 0.544
#> GSM125137     1  0.0510    0.77611 0.984 0.000 0.000 0.000 0.016
#> GSM125139     5  0.4249    0.83526 0.432 0.000 0.000 0.000 0.568
#> GSM125141     1  0.0290    0.78455 0.992 0.000 0.000 0.000 0.008
#> GSM125143     5  0.4238    0.88330 0.368 0.000 0.000 0.004 0.628
#> GSM125145     5  0.4256    0.75704 0.436 0.000 0.000 0.000 0.564
#> GSM125147     1  0.0290    0.78474 0.992 0.000 0.000 0.000 0.008
#> GSM125149     1  0.0162    0.78231 0.996 0.000 0.000 0.000 0.004
#> GSM125151     5  0.4171    0.87625 0.396 0.000 0.000 0.000 0.604
#> GSM125153     1  0.3774    0.32920 0.704 0.000 0.000 0.000 0.296
#> GSM125155     1  0.2329    0.68915 0.876 0.000 0.000 0.000 0.124
#> GSM125157     1  0.0000    0.78373 1.000 0.000 0.000 0.000 0.000
#> GSM125159     2  0.1124    0.92129 0.000 0.960 0.004 0.000 0.036
#> GSM125161     1  0.0609    0.77336 0.980 0.000 0.000 0.000 0.020
#> GSM125163     2  0.0290    0.93033 0.000 0.992 0.000 0.000 0.008
#> GSM125165     4  0.7389    0.34520 0.000 0.328 0.052 0.440 0.180
#> GSM125167     2  0.1704    0.90709 0.000 0.928 0.004 0.000 0.068
#> GSM125169     2  0.1831    0.90415 0.000 0.920 0.004 0.000 0.076
#> GSM125171     2  0.0404    0.93011 0.000 0.988 0.000 0.000 0.012
#> GSM125173     2  0.5834    0.54327 0.000 0.656 0.020 0.192 0.132
#> GSM125175     2  0.0290    0.93119 0.000 0.992 0.000 0.000 0.008
#> GSM125177     3  0.2737    0.81964 0.000 0.052 0.896 0.032 0.020
#> GSM125179     4  0.1485    0.74978 0.000 0.000 0.020 0.948 0.032
#> GSM125181     4  0.8028    0.35870 0.000 0.312 0.116 0.388 0.184
#> GSM125183     4  0.2139    0.73484 0.000 0.000 0.032 0.916 0.052
#> GSM125185     4  0.2110    0.74080 0.000 0.000 0.072 0.912 0.016
#> GSM125187     4  0.3055    0.73596 0.000 0.000 0.072 0.864 0.064
#> GSM125189     2  0.1502    0.91393 0.000 0.940 0.004 0.000 0.056
#> GSM125191     2  0.2910    0.85963 0.000 0.888 0.036 0.052 0.024
#> GSM125193     3  0.5056    0.73953 0.088 0.000 0.732 0.020 0.160
#> GSM125195     3  0.1893    0.82863 0.000 0.000 0.928 0.048 0.024
#> GSM125197     2  0.0162    0.93175 0.000 0.996 0.000 0.000 0.004
#> GSM125199     1  0.0404    0.78415 0.988 0.000 0.000 0.000 0.012
#> GSM125201     2  0.0290    0.93099 0.000 0.992 0.000 0.000 0.008
#> GSM125203     3  0.1492    0.83165 0.000 0.004 0.948 0.040 0.008
#> GSM125205     2  0.0404    0.92994 0.000 0.988 0.000 0.000 0.012
#> GSM125207     3  0.2448    0.81507 0.000 0.000 0.892 0.088 0.020
#> GSM125209     2  0.6721    0.30583 0.000 0.564 0.088 0.276 0.072
#> GSM125211     3  0.4703    0.78725 0.000 0.028 0.768 0.068 0.136
#> GSM125213     2  0.0162    0.93144 0.000 0.996 0.000 0.000 0.004
#> GSM125215     2  0.0162    0.93175 0.000 0.996 0.000 0.000 0.004
#> GSM125217     2  0.1768    0.90492 0.000 0.924 0.004 0.000 0.072
#> GSM125219     5  0.4249    0.76142 0.432 0.000 0.000 0.000 0.568
#> GSM125221     4  0.4106    0.70127 0.000 0.020 0.040 0.800 0.140
#> GSM125223     2  0.0162    0.93175 0.000 0.996 0.000 0.000 0.004
#> GSM125225     2  0.0000    0.93156 0.000 1.000 0.000 0.000 0.000
#> GSM125227     2  0.0162    0.93175 0.000 0.996 0.000 0.000 0.004
#> GSM125229     3  0.4724    0.69306 0.000 0.164 0.732 0.000 0.104
#> GSM125231     3  0.6313    0.41045 0.008 0.000 0.512 0.132 0.348
#> GSM125233     5  0.4045    0.87957 0.356 0.000 0.000 0.000 0.644
#> GSM125235     1  0.0703    0.78306 0.976 0.000 0.000 0.000 0.024
#> GSM125237     1  0.0162    0.78475 0.996 0.000 0.000 0.000 0.004
#> GSM125124     5  0.4211    0.86893 0.360 0.000 0.000 0.004 0.636
#> GSM125126     1  0.2424    0.68111 0.868 0.000 0.000 0.000 0.132
#> GSM125128     1  0.1544    0.73699 0.932 0.000 0.000 0.000 0.068
#> GSM125130     5  0.4127    0.85922 0.312 0.000 0.000 0.008 0.680
#> GSM125132     1  0.1121    0.76736 0.956 0.000 0.000 0.000 0.044
#> GSM125134     1  0.4302   -0.54437 0.520 0.000 0.000 0.000 0.480
#> GSM125136     1  0.0880    0.76838 0.968 0.000 0.000 0.000 0.032
#> GSM125138     5  0.4264    0.86195 0.376 0.000 0.000 0.004 0.620
#> GSM125140     5  0.4242    0.84001 0.428 0.000 0.000 0.000 0.572
#> GSM125142     1  0.3039    0.59058 0.808 0.000 0.000 0.000 0.192
#> GSM125144     5  0.4225    0.86884 0.364 0.000 0.000 0.004 0.632
#> GSM125146     1  0.4283   -0.44792 0.544 0.000 0.000 0.000 0.456
#> GSM125148     1  0.0609    0.78342 0.980 0.000 0.000 0.000 0.020
#> GSM125150     1  0.1671    0.74302 0.924 0.000 0.000 0.000 0.076
#> GSM125152     5  0.4138    0.88313 0.384 0.000 0.000 0.000 0.616
#> GSM125154     1  0.4074    0.00765 0.636 0.000 0.000 0.000 0.364
#> GSM125156     1  0.3966    0.04976 0.664 0.000 0.000 0.000 0.336
#> GSM125158     1  0.4030   -0.04589 0.648 0.000 0.000 0.000 0.352
#> GSM125160     2  0.0703    0.92696 0.000 0.976 0.000 0.000 0.024
#> GSM125162     1  0.0609    0.77336 0.980 0.000 0.000 0.000 0.020
#> GSM125164     2  0.0290    0.93089 0.000 0.992 0.000 0.000 0.008
#> GSM125166     2  0.0290    0.93116 0.000 0.992 0.000 0.000 0.008
#> GSM125168     2  0.3798    0.79566 0.000 0.816 0.004 0.120 0.060
#> GSM125170     2  0.5107    0.58379 0.000 0.676 0.004 0.248 0.072
#> GSM125172     2  0.0290    0.93099 0.000 0.992 0.000 0.000 0.008
#> GSM125174     4  0.1725    0.73661 0.000 0.000 0.020 0.936 0.044
#> GSM125176     2  0.0807    0.92681 0.000 0.976 0.000 0.012 0.012
#> GSM125178     3  0.2535    0.81583 0.000 0.000 0.892 0.076 0.032
#> GSM125180     4  0.1485    0.74978 0.000 0.000 0.020 0.948 0.032
#> GSM125182     2  0.6651    0.50592 0.000 0.624 0.104 0.152 0.120
#> GSM125184     4  0.1493    0.73838 0.000 0.000 0.028 0.948 0.024
#> GSM125186     4  0.2144    0.74196 0.000 0.000 0.068 0.912 0.020
#> GSM125188     4  0.8261    0.35013 0.000 0.300 0.152 0.360 0.188
#> GSM125190     2  0.1768    0.90636 0.000 0.924 0.004 0.000 0.072
#> GSM125192     2  0.0000    0.93156 0.000 1.000 0.000 0.000 0.000
#> GSM125194     3  0.5546    0.74155 0.068 0.000 0.708 0.060 0.164
#> GSM125196     3  0.1800    0.82902 0.000 0.000 0.932 0.048 0.020
#> GSM125198     2  0.0162    0.93175 0.000 0.996 0.000 0.000 0.004
#> GSM125200     1  0.3661    0.33381 0.724 0.000 0.000 0.000 0.276
#> GSM125202     2  0.0290    0.93099 0.000 0.992 0.000 0.000 0.008
#> GSM125204     3  0.1522    0.83069 0.000 0.000 0.944 0.044 0.012
#> GSM125206     3  0.1891    0.83333 0.000 0.032 0.936 0.016 0.016
#> GSM125208     3  0.2390    0.81693 0.000 0.000 0.896 0.084 0.020
#> GSM125210     4  0.2270    0.73973 0.000 0.000 0.076 0.904 0.020
#> GSM125212     3  0.4800    0.78490 0.000 0.036 0.764 0.064 0.136
#> GSM125214     2  0.0162    0.93175 0.000 0.996 0.000 0.000 0.004
#> GSM125216     2  0.0162    0.93175 0.000 0.996 0.000 0.000 0.004
#> GSM125218     2  0.1831    0.90331 0.000 0.920 0.004 0.000 0.076
#> GSM125220     1  0.1341    0.75076 0.944 0.000 0.000 0.000 0.056
#> GSM125222     4  0.3619    0.71147 0.000 0.008 0.040 0.828 0.124
#> GSM125224     2  0.0162    0.93175 0.000 0.996 0.000 0.000 0.004
#> GSM125226     2  0.1638    0.90921 0.000 0.932 0.004 0.000 0.064
#> GSM125228     2  0.0162    0.93175 0.000 0.996 0.000 0.000 0.004
#> GSM125230     3  0.3691    0.80481 0.000 0.000 0.820 0.076 0.104
#> GSM125232     4  0.5538    0.37454 0.000 0.000 0.088 0.588 0.324
#> GSM125234     5  0.4872    0.76969 0.248 0.000 0.004 0.056 0.692
#> GSM125236     5  0.4074    0.87853 0.364 0.000 0.000 0.000 0.636
#> GSM125238     1  0.0162    0.78475 0.996 0.000 0.000 0.000 0.004

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM125123     1  0.3620     0.7618 0.772 0.000 0.000 0.000 0.184 0.044
#> GSM125125     5  0.4099     0.2993 0.372 0.000 0.000 0.000 0.612 0.016
#> GSM125127     1  0.3213     0.7693 0.836 0.000 0.000 0.004 0.084 0.076
#> GSM125129     1  0.3014     0.7838 0.832 0.000 0.000 0.000 0.132 0.036
#> GSM125131     5  0.1151     0.7900 0.032 0.000 0.000 0.000 0.956 0.012
#> GSM125133     5  0.2058     0.7510 0.056 0.000 0.000 0.000 0.908 0.036
#> GSM125135     1  0.4570     0.6709 0.644 0.000 0.000 0.000 0.292 0.064
#> GSM125137     5  0.0806     0.7830 0.008 0.000 0.000 0.000 0.972 0.020
#> GSM125139     1  0.3690     0.7232 0.700 0.000 0.000 0.000 0.288 0.012
#> GSM125141     5  0.0632     0.7894 0.024 0.000 0.000 0.000 0.976 0.000
#> GSM125143     1  0.3837     0.7741 0.752 0.000 0.000 0.000 0.196 0.052
#> GSM125145     1  0.4970     0.6837 0.640 0.000 0.000 0.004 0.252 0.104
#> GSM125147     5  0.0891     0.7890 0.024 0.000 0.000 0.000 0.968 0.008
#> GSM125149     5  0.0363     0.7878 0.012 0.000 0.000 0.000 0.988 0.000
#> GSM125151     1  0.3445     0.7639 0.744 0.000 0.000 0.000 0.244 0.012
#> GSM125153     5  0.5081     0.2519 0.308 0.000 0.000 0.000 0.588 0.104
#> GSM125155     5  0.3110     0.6493 0.196 0.000 0.000 0.000 0.792 0.012
#> GSM125157     5  0.0717     0.7881 0.016 0.000 0.000 0.000 0.976 0.008
#> GSM125159     2  0.2442     0.7929 0.004 0.852 0.000 0.000 0.000 0.144
#> GSM125161     5  0.1196     0.7691 0.008 0.000 0.000 0.000 0.952 0.040
#> GSM125163     2  0.0937     0.8484 0.000 0.960 0.000 0.000 0.000 0.040
#> GSM125165     6  0.5861     0.6308 0.000 0.156 0.020 0.272 0.000 0.552
#> GSM125167     2  0.3175     0.7000 0.000 0.744 0.000 0.000 0.000 0.256
#> GSM125169     2  0.3314     0.6973 0.004 0.740 0.000 0.000 0.000 0.256
#> GSM125171     2  0.0260     0.8534 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM125173     2  0.6271     0.0931 0.020 0.536 0.028 0.116 0.000 0.300
#> GSM125175     2  0.0603     0.8521 0.004 0.980 0.000 0.000 0.000 0.016
#> GSM125177     3  0.3541     0.7132 0.020 0.024 0.832 0.020 0.000 0.104
#> GSM125179     4  0.0458     0.7450 0.000 0.000 0.016 0.984 0.000 0.000
#> GSM125181     6  0.6788     0.7694 0.004 0.128 0.088 0.308 0.000 0.472
#> GSM125183     4  0.2793     0.6993 0.004 0.000 0.028 0.856 0.000 0.112
#> GSM125185     4  0.1700     0.7311 0.000 0.000 0.048 0.928 0.000 0.024
#> GSM125187     4  0.3133     0.6863 0.016 0.000 0.064 0.852 0.000 0.068
#> GSM125189     2  0.2482     0.7947 0.004 0.848 0.000 0.000 0.000 0.148
#> GSM125191     2  0.3539     0.7553 0.000 0.828 0.032 0.052 0.000 0.088
#> GSM125193     3  0.5795     0.4730 0.036 0.000 0.500 0.004 0.068 0.392
#> GSM125195     3  0.2318     0.7009 0.020 0.000 0.904 0.048 0.000 0.028
#> GSM125197     2  0.0000     0.8538 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125199     5  0.0632     0.7894 0.024 0.000 0.000 0.000 0.976 0.000
#> GSM125201     2  0.0291     0.8524 0.004 0.992 0.000 0.000 0.000 0.004
#> GSM125203     3  0.1453     0.7134 0.008 0.000 0.944 0.040 0.000 0.008
#> GSM125205     2  0.0146     0.8540 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM125207     3  0.3930     0.6780 0.016 0.000 0.780 0.148 0.000 0.056
#> GSM125209     2  0.6849    -0.3080 0.000 0.440 0.064 0.268 0.000 0.228
#> GSM125211     3  0.5472     0.5741 0.048 0.024 0.520 0.008 0.000 0.400
#> GSM125213     2  0.1204     0.8420 0.000 0.944 0.000 0.000 0.000 0.056
#> GSM125215     2  0.0000     0.8538 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125217     2  0.3290     0.7020 0.004 0.744 0.000 0.000 0.000 0.252
#> GSM125219     1  0.3896     0.7083 0.744 0.000 0.000 0.000 0.204 0.052
#> GSM125221     4  0.4792     0.2404 0.004 0.008 0.036 0.592 0.000 0.360
#> GSM125223     2  0.0146     0.8541 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM125225     2  0.0632     0.8535 0.000 0.976 0.000 0.000 0.000 0.024
#> GSM125227     2  0.0146     0.8541 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM125229     3  0.6037     0.5449 0.044 0.108 0.524 0.000 0.000 0.324
#> GSM125231     3  0.7185     0.3388 0.244 0.000 0.404 0.080 0.004 0.268
#> GSM125233     1  0.3202     0.7752 0.816 0.000 0.000 0.000 0.144 0.040
#> GSM125235     5  0.2201     0.7638 0.076 0.000 0.000 0.000 0.896 0.028
#> GSM125237     5  0.0891     0.7890 0.024 0.000 0.000 0.000 0.968 0.008
#> GSM125124     1  0.4556     0.7517 0.704 0.000 0.000 0.004 0.192 0.100
#> GSM125126     5  0.3376     0.6293 0.220 0.000 0.000 0.000 0.764 0.016
#> GSM125128     5  0.3062     0.6881 0.112 0.000 0.000 0.000 0.836 0.052
#> GSM125130     1  0.2609     0.7743 0.868 0.000 0.000 0.000 0.096 0.036
#> GSM125132     5  0.1219     0.7865 0.048 0.000 0.000 0.000 0.948 0.004
#> GSM125134     1  0.5345     0.5214 0.540 0.000 0.000 0.004 0.352 0.104
#> GSM125136     5  0.1564     0.7644 0.024 0.000 0.000 0.000 0.936 0.040
#> GSM125138     1  0.4828     0.7286 0.668 0.000 0.000 0.004 0.220 0.108
#> GSM125140     1  0.3748     0.7095 0.688 0.000 0.000 0.000 0.300 0.012
#> GSM125142     5  0.4396     0.5311 0.208 0.000 0.000 0.000 0.704 0.088
#> GSM125144     1  0.4599     0.7496 0.700 0.000 0.000 0.004 0.192 0.104
#> GSM125146     1  0.5443     0.4235 0.504 0.000 0.000 0.004 0.384 0.108
#> GSM125148     5  0.1498     0.7818 0.032 0.000 0.000 0.000 0.940 0.028
#> GSM125150     5  0.2302     0.7301 0.120 0.000 0.000 0.000 0.872 0.008
#> GSM125152     1  0.3348     0.7776 0.768 0.000 0.000 0.000 0.216 0.016
#> GSM125154     5  0.5319    -0.2026 0.420 0.000 0.000 0.000 0.476 0.104
#> GSM125156     5  0.4333    -0.1999 0.468 0.000 0.000 0.000 0.512 0.020
#> GSM125158     5  0.4172    -0.1342 0.460 0.000 0.000 0.000 0.528 0.012
#> GSM125160     2  0.1700     0.8310 0.004 0.916 0.000 0.000 0.000 0.080
#> GSM125162     5  0.1196     0.7691 0.008 0.000 0.000 0.000 0.952 0.040
#> GSM125164     2  0.0865     0.8492 0.000 0.964 0.000 0.000 0.000 0.036
#> GSM125166     2  0.0935     0.8512 0.004 0.964 0.000 0.000 0.000 0.032
#> GSM125168     2  0.4707     0.5483 0.000 0.656 0.000 0.092 0.000 0.252
#> GSM125170     2  0.5882     0.1344 0.004 0.508 0.000 0.256 0.000 0.232
#> GSM125172     2  0.0146     0.8540 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM125174     4  0.2766     0.7015 0.012 0.000 0.028 0.868 0.000 0.092
#> GSM125176     2  0.1390     0.8383 0.004 0.948 0.000 0.032 0.000 0.016
#> GSM125178     3  0.3467     0.7130 0.024 0.000 0.820 0.032 0.000 0.124
#> GSM125180     4  0.0458     0.7450 0.000 0.000 0.016 0.984 0.000 0.000
#> GSM125182     2  0.6954    -0.2173 0.004 0.436 0.096 0.136 0.000 0.328
#> GSM125184     4  0.1933     0.7215 0.004 0.000 0.032 0.920 0.000 0.044
#> GSM125186     4  0.1700     0.7311 0.000 0.000 0.048 0.928 0.000 0.024
#> GSM125188     6  0.7126     0.7414 0.012 0.116 0.116 0.312 0.000 0.444
#> GSM125190     2  0.3081     0.7352 0.004 0.776 0.000 0.000 0.000 0.220
#> GSM125192     2  0.0146     0.8543 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM125194     3  0.6341     0.4824 0.056 0.000 0.504 0.016 0.076 0.348
#> GSM125196     3  0.2220     0.7027 0.020 0.000 0.908 0.052 0.000 0.020
#> GSM125198     2  0.0000     0.8538 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125200     5  0.3782     0.1002 0.412 0.000 0.000 0.000 0.588 0.000
#> GSM125202     2  0.0146     0.8535 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM125204     3  0.1523     0.7107 0.008 0.000 0.940 0.044 0.000 0.008
#> GSM125206     3  0.2472     0.7047 0.020 0.032 0.904 0.012 0.000 0.032
#> GSM125208     3  0.3950     0.6802 0.016 0.000 0.780 0.144 0.000 0.060
#> GSM125210     4  0.1616     0.7322 0.000 0.000 0.048 0.932 0.000 0.020
#> GSM125212     3  0.5554     0.5646 0.044 0.032 0.512 0.008 0.000 0.404
#> GSM125214     2  0.0000     0.8538 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125216     2  0.0000     0.8538 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125218     2  0.3109     0.7315 0.004 0.772 0.000 0.000 0.000 0.224
#> GSM125220     5  0.2625     0.7286 0.072 0.000 0.000 0.000 0.872 0.056
#> GSM125222     4  0.4495     0.3877 0.004 0.008 0.028 0.648 0.000 0.312
#> GSM125224     2  0.0146     0.8541 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM125226     2  0.2838     0.7645 0.004 0.808 0.000 0.000 0.000 0.188
#> GSM125228     2  0.0146     0.8541 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM125230     3  0.4768     0.6551 0.048 0.000 0.628 0.012 0.000 0.312
#> GSM125232     4  0.6728     0.2475 0.248 0.000 0.080 0.492 0.000 0.180
#> GSM125234     1  0.2957     0.7488 0.872 0.000 0.004 0.024 0.056 0.044
#> GSM125236     1  0.3455     0.7702 0.800 0.000 0.000 0.000 0.144 0.056
#> GSM125238     5  0.0891     0.7890 0.024 0.000 0.000 0.000 0.968 0.008

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk SD-skmeans-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk SD-skmeans-collect-classes

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

test_to_known_factors(res)
#>              n agent(p) individual(p) k
#> SD:skmeans 116    1.000      1.90e-05 2
#> SD:skmeans 114    0.695      1.33e-07 3
#> SD:skmeans 113    0.950      1.96e-10 4
#> SD:skmeans 102    0.971      7.44e-10 5
#> SD:skmeans  99    0.983      3.58e-09 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 21168 rows and 116 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 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-pam-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.842           0.934       0.970         0.5033 0.496   0.496
#> 3 3 0.851           0.878       0.945         0.3016 0.797   0.611
#> 4 4 0.799           0.838       0.911         0.1389 0.885   0.678
#> 5 5 0.815           0.756       0.866         0.0544 0.957   0.832
#> 6 6 0.792           0.701       0.836         0.0424 0.964   0.833

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
#> GSM125123     1  0.0000      0.967 1.000 0.000
#> GSM125125     1  0.0000      0.967 1.000 0.000
#> GSM125127     1  0.0000      0.967 1.000 0.000
#> GSM125129     1  0.0000      0.967 1.000 0.000
#> GSM125131     1  0.0000      0.967 1.000 0.000
#> GSM125133     1  0.0000      0.967 1.000 0.000
#> GSM125135     1  0.0000      0.967 1.000 0.000
#> GSM125137     1  0.0000      0.967 1.000 0.000
#> GSM125139     1  0.0000      0.967 1.000 0.000
#> GSM125141     1  0.0000      0.967 1.000 0.000
#> GSM125143     1  0.0000      0.967 1.000 0.000
#> GSM125145     1  0.0000      0.967 1.000 0.000
#> GSM125147     1  0.0000      0.967 1.000 0.000
#> GSM125149     1  0.0000      0.967 1.000 0.000
#> GSM125151     1  0.0000      0.967 1.000 0.000
#> GSM125153     1  0.0000      0.967 1.000 0.000
#> GSM125155     1  0.0000      0.967 1.000 0.000
#> GSM125157     1  0.0000      0.967 1.000 0.000
#> GSM125159     2  0.0000      0.970 0.000 1.000
#> GSM125161     1  0.0000      0.967 1.000 0.000
#> GSM125163     2  0.0000      0.970 0.000 1.000
#> GSM125165     2  0.1184      0.959 0.016 0.984
#> GSM125167     2  0.0000      0.970 0.000 1.000
#> GSM125169     2  0.0000      0.970 0.000 1.000
#> GSM125171     2  0.0000      0.970 0.000 1.000
#> GSM125173     2  0.0000      0.970 0.000 1.000
#> GSM125175     2  0.0000      0.970 0.000 1.000
#> GSM125177     2  0.0000      0.970 0.000 1.000
#> GSM125179     2  0.6973      0.769 0.188 0.812
#> GSM125181     2  0.2043      0.946 0.032 0.968
#> GSM125183     2  0.9896      0.195 0.440 0.560
#> GSM125185     2  0.0376      0.967 0.004 0.996
#> GSM125187     1  0.6343      0.811 0.840 0.160
#> GSM125189     2  0.0000      0.970 0.000 1.000
#> GSM125191     2  0.0000      0.970 0.000 1.000
#> GSM125193     1  0.5629      0.846 0.868 0.132
#> GSM125195     1  0.8661      0.613 0.712 0.288
#> GSM125197     2  0.0000      0.970 0.000 1.000
#> GSM125199     1  0.0000      0.967 1.000 0.000
#> GSM125201     2  0.0000      0.970 0.000 1.000
#> GSM125203     1  0.8861      0.594 0.696 0.304
#> GSM125205     2  0.0000      0.970 0.000 1.000
#> GSM125207     2  0.5519      0.850 0.128 0.872
#> GSM125209     2  0.0000      0.970 0.000 1.000
#> GSM125211     2  0.4298      0.893 0.088 0.912
#> GSM125213     2  0.0000      0.970 0.000 1.000
#> GSM125215     2  0.0000      0.970 0.000 1.000
#> GSM125217     2  0.0000      0.970 0.000 1.000
#> GSM125219     1  0.0000      0.967 1.000 0.000
#> GSM125221     2  0.3431      0.919 0.064 0.936
#> GSM125223     2  0.0000      0.970 0.000 1.000
#> GSM125225     2  0.0000      0.970 0.000 1.000
#> GSM125227     2  0.0000      0.970 0.000 1.000
#> GSM125229     2  0.0000      0.970 0.000 1.000
#> GSM125231     1  0.5294      0.858 0.880 0.120
#> GSM125233     1  0.0000      0.967 1.000 0.000
#> GSM125235     1  0.0000      0.967 1.000 0.000
#> GSM125237     1  0.0000      0.967 1.000 0.000
#> GSM125124     1  0.0000      0.967 1.000 0.000
#> GSM125126     1  0.0000      0.967 1.000 0.000
#> GSM125128     1  0.0000      0.967 1.000 0.000
#> GSM125130     1  0.0000      0.967 1.000 0.000
#> GSM125132     1  0.0000      0.967 1.000 0.000
#> GSM125134     1  0.0000      0.967 1.000 0.000
#> GSM125136     1  0.0000      0.967 1.000 0.000
#> GSM125138     1  0.0000      0.967 1.000 0.000
#> GSM125140     1  0.0000      0.967 1.000 0.000
#> GSM125142     1  0.0000      0.967 1.000 0.000
#> GSM125144     1  0.0000      0.967 1.000 0.000
#> GSM125146     1  0.0000      0.967 1.000 0.000
#> GSM125148     1  0.0000      0.967 1.000 0.000
#> GSM125150     1  0.0000      0.967 1.000 0.000
#> GSM125152     1  0.0000      0.967 1.000 0.000
#> GSM125154     1  0.0000      0.967 1.000 0.000
#> GSM125156     1  0.0000      0.967 1.000 0.000
#> GSM125158     1  0.0000      0.967 1.000 0.000
#> GSM125160     2  0.0000      0.970 0.000 1.000
#> GSM125162     1  0.0000      0.967 1.000 0.000
#> GSM125164     2  0.0000      0.970 0.000 1.000
#> GSM125166     2  0.0000      0.970 0.000 1.000
#> GSM125168     2  0.0000      0.970 0.000 1.000
#> GSM125170     2  0.0000      0.970 0.000 1.000
#> GSM125172     2  0.0000      0.970 0.000 1.000
#> GSM125174     2  0.3733      0.912 0.072 0.928
#> GSM125176     2  0.0000      0.970 0.000 1.000
#> GSM125178     2  0.6148      0.820 0.152 0.848
#> GSM125180     2  0.6148      0.823 0.152 0.848
#> GSM125182     2  0.0000      0.970 0.000 1.000
#> GSM125184     2  0.0000      0.970 0.000 1.000
#> GSM125186     2  0.8608      0.604 0.284 0.716
#> GSM125188     2  0.0000      0.970 0.000 1.000
#> GSM125190     2  0.0000      0.970 0.000 1.000
#> GSM125192     2  0.0000      0.970 0.000 1.000
#> GSM125194     1  0.0000      0.967 1.000 0.000
#> GSM125196     2  0.0000      0.970 0.000 1.000
#> GSM125198     2  0.0000      0.970 0.000 1.000
#> GSM125200     1  0.0000      0.967 1.000 0.000
#> GSM125202     2  0.0000      0.970 0.000 1.000
#> GSM125204     1  0.8081      0.690 0.752 0.248
#> GSM125206     2  0.0000      0.970 0.000 1.000
#> GSM125208     1  0.8813      0.599 0.700 0.300
#> GSM125210     2  0.0376      0.967 0.004 0.996
#> GSM125212     2  0.0000      0.970 0.000 1.000
#> GSM125214     2  0.0000      0.970 0.000 1.000
#> GSM125216     2  0.0000      0.970 0.000 1.000
#> GSM125218     2  0.0000      0.970 0.000 1.000
#> GSM125220     1  0.0000      0.967 1.000 0.000
#> GSM125222     2  0.1184      0.959 0.016 0.984
#> GSM125224     2  0.0000      0.970 0.000 1.000
#> GSM125226     2  0.0000      0.970 0.000 1.000
#> GSM125228     2  0.0000      0.970 0.000 1.000
#> GSM125230     1  0.5294      0.858 0.880 0.120
#> GSM125232     1  0.5294      0.858 0.880 0.120
#> GSM125234     1  0.0376      0.964 0.996 0.004
#> GSM125236     1  0.0000      0.967 1.000 0.000
#> GSM125238     1  0.0000      0.967 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
#> GSM125123     1  0.0892      0.975 0.980 0.000 0.020
#> GSM125125     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125127     1  0.1031      0.972 0.976 0.000 0.024
#> GSM125129     1  0.0892      0.975 0.980 0.000 0.020
#> GSM125131     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125133     1  0.0424      0.977 0.992 0.000 0.008
#> GSM125135     1  0.0747      0.976 0.984 0.000 0.016
#> GSM125137     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125139     1  0.0747      0.976 0.984 0.000 0.016
#> GSM125141     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125143     1  0.0892      0.975 0.980 0.000 0.020
#> GSM125145     1  0.0892      0.975 0.980 0.000 0.020
#> GSM125147     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125149     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125151     1  0.0892      0.975 0.980 0.000 0.020
#> GSM125153     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125155     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125157     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125159     2  0.0000      0.923 0.000 1.000 0.000
#> GSM125161     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125163     2  0.0000      0.923 0.000 1.000 0.000
#> GSM125165     3  0.4121      0.777 0.000 0.168 0.832
#> GSM125167     2  0.0237      0.922 0.000 0.996 0.004
#> GSM125169     2  0.0237      0.922 0.000 0.996 0.004
#> GSM125171     2  0.0424      0.920 0.000 0.992 0.008
#> GSM125173     3  0.0424      0.875 0.000 0.008 0.992
#> GSM125175     2  0.0000      0.923 0.000 1.000 0.000
#> GSM125177     2  0.1753      0.891 0.000 0.952 0.048
#> GSM125179     3  0.0000      0.877 0.000 0.000 1.000
#> GSM125181     3  0.0237      0.877 0.000 0.004 0.996
#> GSM125183     3  0.0237      0.877 0.004 0.000 0.996
#> GSM125185     3  0.0000      0.877 0.000 0.000 1.000
#> GSM125187     3  0.0237      0.877 0.004 0.000 0.996
#> GSM125189     2  0.0000      0.923 0.000 1.000 0.000
#> GSM125191     2  0.3116      0.836 0.000 0.892 0.108
#> GSM125193     1  0.2959      0.890 0.900 0.000 0.100
#> GSM125195     3  0.0424      0.876 0.000 0.008 0.992
#> GSM125197     2  0.0000      0.923 0.000 1.000 0.000
#> GSM125199     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125201     2  0.0000      0.923 0.000 1.000 0.000
#> GSM125203     3  0.6473      0.493 0.332 0.016 0.652
#> GSM125205     2  0.0000      0.923 0.000 1.000 0.000
#> GSM125207     3  0.0000      0.877 0.000 0.000 1.000
#> GSM125209     2  0.4931      0.688 0.000 0.768 0.232
#> GSM125211     3  0.4164      0.798 0.008 0.144 0.848
#> GSM125213     2  0.0000      0.923 0.000 1.000 0.000
#> GSM125215     2  0.0000      0.923 0.000 1.000 0.000
#> GSM125217     2  0.5431      0.559 0.000 0.716 0.284
#> GSM125219     1  0.1031      0.972 0.976 0.000 0.024
#> GSM125221     3  0.4094      0.826 0.028 0.100 0.872
#> GSM125223     2  0.0000      0.923 0.000 1.000 0.000
#> GSM125225     2  0.0000      0.923 0.000 1.000 0.000
#> GSM125227     2  0.0000      0.923 0.000 1.000 0.000
#> GSM125229     2  0.0592      0.918 0.000 0.988 0.012
#> GSM125231     3  0.0592      0.874 0.012 0.000 0.988
#> GSM125233     1  0.0892      0.975 0.980 0.000 0.020
#> GSM125235     1  0.0237      0.980 0.996 0.000 0.004
#> GSM125237     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125124     1  0.1411      0.963 0.964 0.000 0.036
#> GSM125126     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125128     1  0.0747      0.976 0.984 0.000 0.016
#> GSM125130     1  0.1031      0.972 0.976 0.000 0.024
#> GSM125132     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125134     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125136     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125138     1  0.2356      0.913 0.928 0.000 0.072
#> GSM125140     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125142     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125144     1  0.0892      0.975 0.980 0.000 0.020
#> GSM125146     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125148     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125150     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125152     1  0.0892      0.975 0.980 0.000 0.020
#> GSM125154     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125156     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125158     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125160     2  0.0000      0.923 0.000 1.000 0.000
#> GSM125162     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125164     2  0.0000      0.923 0.000 1.000 0.000
#> GSM125166     2  0.0424      0.920 0.000 0.992 0.008
#> GSM125168     3  0.5706      0.459 0.000 0.320 0.680
#> GSM125170     2  0.6225      0.190 0.000 0.568 0.432
#> GSM125172     2  0.0237      0.922 0.000 0.996 0.004
#> GSM125174     3  0.0000      0.877 0.000 0.000 1.000
#> GSM125176     2  0.0424      0.920 0.000 0.992 0.008
#> GSM125178     2  0.5926      0.397 0.000 0.644 0.356
#> GSM125180     3  0.0000      0.877 0.000 0.000 1.000
#> GSM125182     2  0.4796      0.702 0.000 0.780 0.220
#> GSM125184     3  0.1529      0.864 0.000 0.040 0.960
#> GSM125186     3  0.0000      0.877 0.000 0.000 1.000
#> GSM125188     3  0.5058      0.690 0.000 0.244 0.756
#> GSM125190     2  0.0747      0.914 0.000 0.984 0.016
#> GSM125192     2  0.0000      0.923 0.000 1.000 0.000
#> GSM125194     3  0.5905      0.489 0.352 0.000 0.648
#> GSM125196     2  0.6295      0.179 0.000 0.528 0.472
#> GSM125198     2  0.0000      0.923 0.000 1.000 0.000
#> GSM125200     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125202     2  0.0000      0.923 0.000 1.000 0.000
#> GSM125204     3  0.5072      0.726 0.196 0.012 0.792
#> GSM125206     3  0.5397      0.638 0.000 0.280 0.720
#> GSM125208     3  0.0000      0.877 0.000 0.000 1.000
#> GSM125210     3  0.0000      0.877 0.000 0.000 1.000
#> GSM125212     3  0.5397      0.639 0.000 0.280 0.720
#> GSM125214     2  0.0000      0.923 0.000 1.000 0.000
#> GSM125216     2  0.0000      0.923 0.000 1.000 0.000
#> GSM125218     2  0.0000      0.923 0.000 1.000 0.000
#> GSM125220     1  0.0237      0.980 0.996 0.000 0.004
#> GSM125222     3  0.3816      0.796 0.000 0.148 0.852
#> GSM125224     2  0.0000      0.923 0.000 1.000 0.000
#> GSM125226     2  0.6026      0.348 0.000 0.624 0.376
#> GSM125228     2  0.0000      0.923 0.000 1.000 0.000
#> GSM125230     3  0.3686      0.792 0.140 0.000 0.860
#> GSM125232     3  0.0592      0.874 0.012 0.000 0.988
#> GSM125234     1  0.6008      0.424 0.628 0.000 0.372
#> GSM125236     1  0.1031      0.972 0.976 0.000 0.024
#> GSM125238     1  0.0000      0.981 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
#> GSM125123     4  0.3219      0.837 0.164 0.000 0.000 0.836
#> GSM125125     1  0.1022      0.945 0.968 0.000 0.000 0.032
#> GSM125127     4  0.2376      0.911 0.068 0.000 0.016 0.916
#> GSM125129     1  0.2408      0.878 0.896 0.000 0.000 0.104
#> GSM125131     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM125133     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM125135     1  0.4454      0.521 0.692 0.000 0.000 0.308
#> GSM125137     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM125139     4  0.2011      0.904 0.080 0.000 0.000 0.920
#> GSM125141     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM125143     4  0.1302      0.914 0.044 0.000 0.000 0.956
#> GSM125145     4  0.1716      0.914 0.064 0.000 0.000 0.936
#> GSM125147     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM125149     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM125151     4  0.1022      0.911 0.032 0.000 0.000 0.968
#> GSM125153     4  0.2011      0.910 0.080 0.000 0.000 0.920
#> GSM125155     1  0.0707      0.956 0.980 0.000 0.000 0.020
#> GSM125157     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM125159     2  0.0188      0.916 0.000 0.996 0.004 0.000
#> GSM125161     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM125163     2  0.0000      0.916 0.000 1.000 0.000 0.000
#> GSM125165     3  0.2888      0.808 0.000 0.124 0.872 0.004
#> GSM125167     2  0.2281      0.860 0.000 0.904 0.096 0.000
#> GSM125169     2  0.2412      0.864 0.000 0.908 0.084 0.008
#> GSM125171     2  0.0817      0.907 0.000 0.976 0.024 0.000
#> GSM125173     3  0.1118      0.850 0.000 0.036 0.964 0.000
#> GSM125175     2  0.0000      0.916 0.000 1.000 0.000 0.000
#> GSM125177     2  0.1767      0.891 0.000 0.944 0.044 0.012
#> GSM125179     3  0.2589      0.810 0.000 0.000 0.884 0.116
#> GSM125181     3  0.1022      0.847 0.000 0.000 0.968 0.032
#> GSM125183     3  0.0817      0.846 0.024 0.000 0.976 0.000
#> GSM125185     3  0.1637      0.842 0.000 0.000 0.940 0.060
#> GSM125187     3  0.3157      0.802 0.004 0.000 0.852 0.144
#> GSM125189     2  0.0000      0.916 0.000 1.000 0.000 0.000
#> GSM125191     2  0.2593      0.848 0.000 0.892 0.104 0.004
#> GSM125193     1  0.3182      0.821 0.860 0.004 0.132 0.004
#> GSM125195     3  0.1256      0.848 0.000 0.008 0.964 0.028
#> GSM125197     2  0.0000      0.916 0.000 1.000 0.000 0.000
#> GSM125199     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM125201     2  0.0000      0.916 0.000 1.000 0.000 0.000
#> GSM125203     3  0.5564      0.519 0.312 0.012 0.656 0.020
#> GSM125205     2  0.0000      0.916 0.000 1.000 0.000 0.000
#> GSM125207     3  0.1022      0.846 0.000 0.000 0.968 0.032
#> GSM125209     2  0.5085      0.643 0.000 0.708 0.260 0.032
#> GSM125211     3  0.2888      0.812 0.000 0.124 0.872 0.004
#> GSM125213     2  0.0592      0.911 0.000 0.984 0.016 0.000
#> GSM125215     2  0.0592      0.911 0.000 0.984 0.016 0.000
#> GSM125217     2  0.4790      0.353 0.000 0.620 0.380 0.000
#> GSM125219     4  0.1978      0.903 0.068 0.000 0.004 0.928
#> GSM125221     3  0.2287      0.844 0.012 0.060 0.924 0.004
#> GSM125223     2  0.0000      0.916 0.000 1.000 0.000 0.000
#> GSM125225     2  0.0188      0.916 0.000 0.996 0.004 0.000
#> GSM125227     2  0.0000      0.916 0.000 1.000 0.000 0.000
#> GSM125229     2  0.2048      0.883 0.000 0.928 0.064 0.008
#> GSM125231     4  0.4776      0.428 0.000 0.000 0.376 0.624
#> GSM125233     4  0.3311      0.830 0.172 0.000 0.000 0.828
#> GSM125235     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM125237     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM125124     4  0.1022      0.911 0.032 0.000 0.000 0.968
#> GSM125126     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM125128     1  0.0188      0.966 0.996 0.000 0.000 0.004
#> GSM125130     4  0.0817      0.907 0.024 0.000 0.000 0.976
#> GSM125132     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM125134     4  0.2011      0.910 0.080 0.000 0.000 0.920
#> GSM125136     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM125138     4  0.1824      0.913 0.060 0.000 0.004 0.936
#> GSM125140     4  0.1118      0.912 0.036 0.000 0.000 0.964
#> GSM125142     4  0.2149      0.908 0.088 0.000 0.000 0.912
#> GSM125144     4  0.1022      0.911 0.032 0.000 0.000 0.968
#> GSM125146     4  0.2469      0.900 0.108 0.000 0.000 0.892
#> GSM125148     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM125150     1  0.1557      0.919 0.944 0.000 0.000 0.056
#> GSM125152     4  0.1022      0.911 0.032 0.000 0.000 0.968
#> GSM125154     4  0.2011      0.910 0.080 0.000 0.000 0.920
#> GSM125156     4  0.2149      0.901 0.088 0.000 0.000 0.912
#> GSM125158     4  0.4624      0.572 0.340 0.000 0.000 0.660
#> GSM125160     2  0.0000      0.916 0.000 1.000 0.000 0.000
#> GSM125162     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM125164     2  0.0524      0.914 0.000 0.988 0.004 0.008
#> GSM125166     2  0.0336      0.914 0.000 0.992 0.008 0.000
#> GSM125168     3  0.4781      0.432 0.000 0.336 0.660 0.004
#> GSM125170     2  0.4972      0.106 0.000 0.544 0.456 0.000
#> GSM125172     2  0.1867      0.875 0.000 0.928 0.072 0.000
#> GSM125174     3  0.0779      0.847 0.000 0.004 0.980 0.016
#> GSM125176     2  0.0592      0.911 0.000 0.984 0.016 0.000
#> GSM125178     2  0.5024      0.349 0.000 0.632 0.360 0.008
#> GSM125180     3  0.3444      0.749 0.000 0.000 0.816 0.184
#> GSM125182     2  0.5022      0.643 0.000 0.708 0.264 0.028
#> GSM125184     3  0.1474      0.849 0.000 0.052 0.948 0.000
#> GSM125186     3  0.1940      0.837 0.000 0.000 0.924 0.076
#> GSM125188     3  0.4692      0.739 0.000 0.212 0.756 0.032
#> GSM125190     2  0.0817      0.908 0.000 0.976 0.024 0.000
#> GSM125192     2  0.0000      0.916 0.000 1.000 0.000 0.000
#> GSM125194     3  0.4608      0.577 0.304 0.000 0.692 0.004
#> GSM125196     2  0.5611      0.344 0.000 0.564 0.412 0.024
#> GSM125198     2  0.0000      0.916 0.000 1.000 0.000 0.000
#> GSM125200     4  0.1867      0.914 0.072 0.000 0.000 0.928
#> GSM125202     2  0.0469      0.913 0.000 0.988 0.012 0.000
#> GSM125204     3  0.5023      0.735 0.164 0.008 0.772 0.056
#> GSM125206     3  0.4594      0.630 0.000 0.280 0.712 0.008
#> GSM125208     3  0.1474      0.845 0.000 0.000 0.948 0.052
#> GSM125210     3  0.1022      0.846 0.000 0.000 0.968 0.032
#> GSM125212     3  0.3688      0.740 0.000 0.208 0.792 0.000
#> GSM125214     2  0.0000      0.916 0.000 1.000 0.000 0.000
#> GSM125216     2  0.0000      0.916 0.000 1.000 0.000 0.000
#> GSM125218     2  0.0000      0.916 0.000 1.000 0.000 0.000
#> GSM125220     1  0.0336      0.962 0.992 0.000 0.000 0.008
#> GSM125222     3  0.2654      0.821 0.000 0.108 0.888 0.004
#> GSM125224     2  0.0000      0.916 0.000 1.000 0.000 0.000
#> GSM125226     3  0.4994      0.101 0.000 0.480 0.520 0.000
#> GSM125228     2  0.0000      0.916 0.000 1.000 0.000 0.000
#> GSM125230     3  0.3160      0.808 0.108 0.000 0.872 0.020
#> GSM125232     4  0.1867      0.873 0.000 0.000 0.072 0.928
#> GSM125234     4  0.2589      0.810 0.000 0.000 0.116 0.884
#> GSM125236     4  0.4978      0.457 0.384 0.000 0.004 0.612
#> GSM125238     1  0.0000      0.969 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
#> GSM125123     5  0.2852      0.787 0.172 0.000 0.000 0.000 0.828
#> GSM125125     1  0.0510      0.954 0.984 0.000 0.000 0.000 0.016
#> GSM125127     5  0.1251      0.896 0.036 0.000 0.000 0.008 0.956
#> GSM125129     1  0.1965      0.879 0.904 0.000 0.000 0.000 0.096
#> GSM125131     1  0.0000      0.966 1.000 0.000 0.000 0.000 0.000
#> GSM125133     1  0.0000      0.966 1.000 0.000 0.000 0.000 0.000
#> GSM125135     1  0.3752      0.564 0.708 0.000 0.000 0.000 0.292
#> GSM125137     1  0.0000      0.966 1.000 0.000 0.000 0.000 0.000
#> GSM125139     5  0.1478      0.878 0.064 0.000 0.000 0.000 0.936
#> GSM125141     1  0.0000      0.966 1.000 0.000 0.000 0.000 0.000
#> GSM125143     5  0.0609      0.897 0.020 0.000 0.000 0.000 0.980
#> GSM125145     5  0.0880      0.897 0.032 0.000 0.000 0.000 0.968
#> GSM125147     1  0.0000      0.966 1.000 0.000 0.000 0.000 0.000
#> GSM125149     1  0.0000      0.966 1.000 0.000 0.000 0.000 0.000
#> GSM125151     5  0.0162      0.893 0.004 0.000 0.000 0.000 0.996
#> GSM125153     5  0.1043      0.896 0.040 0.000 0.000 0.000 0.960
#> GSM125155     1  0.0404      0.958 0.988 0.000 0.000 0.000 0.012
#> GSM125157     1  0.0000      0.966 1.000 0.000 0.000 0.000 0.000
#> GSM125159     2  0.1740      0.852 0.000 0.932 0.056 0.012 0.000
#> GSM125161     1  0.0000      0.966 1.000 0.000 0.000 0.000 0.000
#> GSM125163     2  0.1597      0.856 0.000 0.940 0.048 0.012 0.000
#> GSM125165     4  0.1644      0.652 0.000 0.048 0.008 0.940 0.004
#> GSM125167     2  0.5675      0.581 0.000 0.608 0.100 0.288 0.004
#> GSM125169     2  0.4823      0.597 0.000 0.672 0.052 0.276 0.000
#> GSM125171     2  0.1952      0.826 0.000 0.912 0.004 0.084 0.000
#> GSM125173     4  0.0771      0.663 0.000 0.020 0.004 0.976 0.000
#> GSM125175     2  0.0000      0.861 0.000 1.000 0.000 0.000 0.000
#> GSM125177     3  0.5008      0.384 0.000 0.428 0.544 0.024 0.004
#> GSM125179     4  0.4713      0.568 0.000 0.000 0.280 0.676 0.044
#> GSM125181     4  0.3999      0.552 0.000 0.000 0.344 0.656 0.000
#> GSM125183     4  0.1012      0.657 0.020 0.000 0.012 0.968 0.000
#> GSM125185     4  0.4613      0.521 0.000 0.000 0.360 0.620 0.020
#> GSM125187     4  0.4866      0.535 0.000 0.000 0.344 0.620 0.036
#> GSM125189     2  0.0162      0.862 0.000 0.996 0.004 0.000 0.000
#> GSM125191     2  0.3116      0.815 0.000 0.860 0.076 0.064 0.000
#> GSM125193     1  0.4018      0.778 0.812 0.004 0.092 0.088 0.004
#> GSM125195     3  0.3707      0.581 0.000 0.000 0.716 0.284 0.000
#> GSM125197     2  0.1768      0.851 0.000 0.924 0.072 0.000 0.004
#> GSM125199     1  0.0000      0.966 1.000 0.000 0.000 0.000 0.000
#> GSM125201     2  0.2289      0.852 0.000 0.904 0.080 0.012 0.004
#> GSM125203     3  0.4592      0.609 0.140 0.000 0.756 0.100 0.004
#> GSM125205     2  0.1768      0.851 0.000 0.924 0.072 0.000 0.004
#> GSM125207     3  0.2020      0.620 0.000 0.000 0.900 0.100 0.000
#> GSM125209     2  0.5952      0.376 0.000 0.548 0.324 0.128 0.000
#> GSM125211     4  0.1934      0.648 0.000 0.052 0.016 0.928 0.004
#> GSM125213     2  0.2208      0.849 0.000 0.908 0.072 0.020 0.000
#> GSM125215     2  0.2349      0.847 0.000 0.900 0.084 0.012 0.004
#> GSM125217     2  0.5470      0.455 0.000 0.564 0.072 0.364 0.000
#> GSM125219     5  0.4290      0.700 0.044 0.000 0.196 0.004 0.756
#> GSM125221     4  0.1412      0.660 0.000 0.036 0.008 0.952 0.004
#> GSM125223     2  0.1638      0.851 0.000 0.932 0.064 0.000 0.004
#> GSM125225     2  0.1768      0.853 0.000 0.924 0.072 0.000 0.004
#> GSM125227     2  0.0703      0.861 0.000 0.976 0.024 0.000 0.000
#> GSM125229     3  0.6033      0.557 0.000 0.220 0.580 0.200 0.000
#> GSM125231     5  0.5895      0.417 0.000 0.000 0.152 0.260 0.588
#> GSM125233     5  0.2813      0.792 0.168 0.000 0.000 0.000 0.832
#> GSM125235     1  0.0000      0.966 1.000 0.000 0.000 0.000 0.000
#> GSM125237     1  0.0000      0.966 1.000 0.000 0.000 0.000 0.000
#> GSM125124     5  0.0162      0.893 0.004 0.000 0.000 0.000 0.996
#> GSM125126     1  0.0000      0.966 1.000 0.000 0.000 0.000 0.000
#> GSM125128     1  0.0162      0.962 0.996 0.000 0.000 0.000 0.004
#> GSM125130     5  0.0162      0.893 0.004 0.000 0.000 0.000 0.996
#> GSM125132     1  0.0000      0.966 1.000 0.000 0.000 0.000 0.000
#> GSM125134     5  0.1043      0.896 0.040 0.000 0.000 0.000 0.960
#> GSM125136     1  0.0000      0.966 1.000 0.000 0.000 0.000 0.000
#> GSM125138     5  0.0703      0.896 0.024 0.000 0.000 0.000 0.976
#> GSM125140     5  0.0290      0.894 0.008 0.000 0.000 0.000 0.992
#> GSM125142     5  0.1121      0.896 0.044 0.000 0.000 0.000 0.956
#> GSM125144     5  0.0162      0.893 0.004 0.000 0.000 0.000 0.996
#> GSM125146     5  0.1608      0.884 0.072 0.000 0.000 0.000 0.928
#> GSM125148     1  0.0000      0.966 1.000 0.000 0.000 0.000 0.000
#> GSM125150     1  0.1341      0.915 0.944 0.000 0.000 0.000 0.056
#> GSM125152     5  0.0162      0.893 0.004 0.000 0.000 0.000 0.996
#> GSM125154     5  0.1043      0.896 0.040 0.000 0.000 0.000 0.960
#> GSM125156     5  0.1908      0.861 0.092 0.000 0.000 0.000 0.908
#> GSM125158     5  0.3999      0.535 0.344 0.000 0.000 0.000 0.656
#> GSM125160     2  0.1124      0.858 0.000 0.960 0.036 0.004 0.000
#> GSM125162     1  0.0000      0.966 1.000 0.000 0.000 0.000 0.000
#> GSM125164     2  0.1549      0.855 0.000 0.944 0.040 0.016 0.000
#> GSM125166     2  0.0579      0.862 0.000 0.984 0.008 0.008 0.000
#> GSM125168     4  0.4559     -0.251 0.000 0.480 0.008 0.512 0.000
#> GSM125170     2  0.4249      0.366 0.000 0.568 0.000 0.432 0.000
#> GSM125172     2  0.3366      0.669 0.000 0.768 0.000 0.232 0.000
#> GSM125174     4  0.1211      0.657 0.000 0.000 0.016 0.960 0.024
#> GSM125176     2  0.1469      0.856 0.000 0.948 0.036 0.016 0.000
#> GSM125178     3  0.5571      0.479 0.000 0.388 0.544 0.064 0.004
#> GSM125180     4  0.4887      0.561 0.000 0.000 0.288 0.660 0.052
#> GSM125182     2  0.5851      0.464 0.000 0.548 0.112 0.340 0.000
#> GSM125184     4  0.1124      0.661 0.000 0.036 0.004 0.960 0.000
#> GSM125186     4  0.4657      0.561 0.000 0.000 0.296 0.668 0.036
#> GSM125188     4  0.5501      0.516 0.000 0.064 0.360 0.572 0.004
#> GSM125190     2  0.1341      0.848 0.000 0.944 0.000 0.056 0.000
#> GSM125192     2  0.0609      0.862 0.000 0.980 0.020 0.000 0.000
#> GSM125194     4  0.4264      0.325 0.376 0.000 0.000 0.620 0.004
#> GSM125196     3  0.2970      0.651 0.000 0.004 0.828 0.168 0.000
#> GSM125198     2  0.1638      0.851 0.000 0.932 0.064 0.000 0.004
#> GSM125200     5  0.0880      0.898 0.032 0.000 0.000 0.000 0.968
#> GSM125202     2  0.2238      0.852 0.000 0.912 0.064 0.020 0.004
#> GSM125204     3  0.3248      0.644 0.032 0.000 0.864 0.084 0.020
#> GSM125206     3  0.5590      0.513 0.000 0.080 0.592 0.324 0.004
#> GSM125208     3  0.2144      0.638 0.000 0.000 0.912 0.068 0.020
#> GSM125210     4  0.3966      0.551 0.000 0.000 0.336 0.664 0.000
#> GSM125212     4  0.2653      0.624 0.000 0.096 0.024 0.880 0.000
#> GSM125214     2  0.1444      0.861 0.000 0.948 0.040 0.012 0.000
#> GSM125216     2  0.0290      0.862 0.000 0.992 0.008 0.000 0.000
#> GSM125218     2  0.0000      0.861 0.000 1.000 0.000 0.000 0.000
#> GSM125220     1  0.1478      0.913 0.936 0.000 0.064 0.000 0.000
#> GSM125222     4  0.2313      0.649 0.000 0.044 0.040 0.912 0.004
#> GSM125224     2  0.1638      0.851 0.000 0.932 0.064 0.000 0.004
#> GSM125226     4  0.4659     -0.183 0.000 0.492 0.012 0.496 0.000
#> GSM125228     2  0.0000      0.861 0.000 1.000 0.000 0.000 0.000
#> GSM125230     4  0.2193      0.646 0.028 0.000 0.044 0.920 0.008
#> GSM125232     5  0.0794      0.885 0.000 0.000 0.000 0.028 0.972
#> GSM125234     5  0.2659      0.826 0.000 0.000 0.060 0.052 0.888
#> GSM125236     5  0.4438      0.428 0.384 0.000 0.004 0.004 0.608
#> GSM125238     1  0.0000      0.966 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
#> GSM125123     1  0.2631     0.7747 0.820 0.000 0.000 0.000 0.180 0.000
#> GSM125125     5  0.0547     0.9508 0.020 0.000 0.000 0.000 0.980 0.000
#> GSM125127     1  0.0935     0.8942 0.964 0.000 0.004 0.000 0.032 0.000
#> GSM125129     5  0.1714     0.8846 0.092 0.000 0.000 0.000 0.908 0.000
#> GSM125131     5  0.0000     0.9645 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125133     5  0.0000     0.9645 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125135     5  0.3330     0.5790 0.284 0.000 0.000 0.000 0.716 0.000
#> GSM125137     5  0.0000     0.9645 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125139     1  0.1327     0.8734 0.936 0.000 0.000 0.000 0.064 0.000
#> GSM125141     5  0.0000     0.9645 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125143     1  0.0458     0.8948 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM125145     1  0.0713     0.8956 0.972 0.000 0.000 0.000 0.028 0.000
#> GSM125147     5  0.0000     0.9645 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125149     5  0.0000     0.9645 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125151     1  0.0146     0.8917 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125153     1  0.0790     0.8948 0.968 0.000 0.000 0.000 0.032 0.000
#> GSM125155     5  0.0363     0.9568 0.012 0.000 0.000 0.000 0.988 0.000
#> GSM125157     5  0.0000     0.9645 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125159     2  0.1010     0.6913 0.000 0.960 0.000 0.004 0.000 0.036
#> GSM125161     5  0.0000     0.9645 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125163     2  0.0777     0.6902 0.000 0.972 0.000 0.004 0.000 0.024
#> GSM125165     4  0.1524     0.6402 0.000 0.060 0.008 0.932 0.000 0.000
#> GSM125167     2  0.5045     0.4920 0.004 0.624 0.008 0.292 0.000 0.072
#> GSM125169     2  0.3820     0.5322 0.000 0.700 0.008 0.284 0.000 0.008
#> GSM125171     2  0.4560     0.6495 0.000 0.744 0.032 0.092 0.000 0.132
#> GSM125173     4  0.1989     0.6535 0.000 0.028 0.052 0.916 0.000 0.004
#> GSM125175     2  0.2730     0.6260 0.000 0.808 0.000 0.000 0.000 0.192
#> GSM125177     3  0.4513     0.4599 0.000 0.372 0.596 0.016 0.000 0.016
#> GSM125179     4  0.4748     0.5605 0.052 0.000 0.316 0.624 0.000 0.008
#> GSM125181     4  0.6276     0.4538 0.004 0.168 0.348 0.460 0.000 0.020
#> GSM125183     4  0.1745     0.6495 0.000 0.000 0.056 0.924 0.020 0.000
#> GSM125185     4  0.6529     0.4362 0.016 0.164 0.360 0.440 0.000 0.020
#> GSM125187     4  0.4325     0.5120 0.016 0.000 0.412 0.568 0.000 0.004
#> GSM125189     2  0.2664     0.6351 0.000 0.816 0.000 0.000 0.000 0.184
#> GSM125191     2  0.2610     0.6679 0.004 0.892 0.048 0.020 0.000 0.036
#> GSM125193     5  0.3464     0.7762 0.000 0.000 0.108 0.084 0.808 0.000
#> GSM125195     3  0.2558     0.6832 0.004 0.000 0.840 0.156 0.000 0.000
#> GSM125197     6  0.1863     0.8619 0.000 0.104 0.000 0.000 0.000 0.896
#> GSM125199     5  0.0000     0.9645 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125201     6  0.2454     0.7993 0.000 0.160 0.000 0.000 0.000 0.840
#> GSM125203     3  0.3483     0.6715 0.000 0.000 0.820 0.040 0.120 0.020
#> GSM125205     6  0.1863     0.8619 0.000 0.104 0.000 0.000 0.000 0.896
#> GSM125207     3  0.1237     0.6636 0.000 0.020 0.956 0.020 0.000 0.004
#> GSM125209     2  0.5583     0.3443 0.004 0.584 0.304 0.080 0.000 0.028
#> GSM125211     4  0.2114     0.6305 0.000 0.008 0.012 0.904 0.000 0.076
#> GSM125213     2  0.2467     0.6542 0.004 0.880 0.008 0.008 0.000 0.100
#> GSM125215     6  0.1714     0.8552 0.000 0.092 0.000 0.000 0.000 0.908
#> GSM125217     2  0.4617     0.4901 0.000 0.636 0.008 0.312 0.000 0.044
#> GSM125219     1  0.3912     0.6597 0.732 0.000 0.224 0.000 0.044 0.000
#> GSM125221     4  0.1789     0.6495 0.000 0.032 0.044 0.924 0.000 0.000
#> GSM125223     6  0.1910     0.8621 0.000 0.108 0.000 0.000 0.000 0.892
#> GSM125225     6  0.3996    -0.0636 0.000 0.484 0.000 0.004 0.000 0.512
#> GSM125227     2  0.3531     0.4535 0.000 0.672 0.000 0.000 0.000 0.328
#> GSM125229     3  0.5940     0.6356 0.000 0.128 0.620 0.172 0.000 0.080
#> GSM125231     1  0.5554     0.3113 0.544 0.000 0.276 0.180 0.000 0.000
#> GSM125233     1  0.2562     0.7834 0.828 0.000 0.000 0.000 0.172 0.000
#> GSM125235     5  0.0146     0.9620 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM125237     5  0.0000     0.9645 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125124     1  0.0146     0.8917 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125126     5  0.0146     0.9620 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM125128     5  0.0000     0.9645 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125130     1  0.0146     0.8917 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125132     5  0.0000     0.9645 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125134     1  0.0790     0.8948 0.968 0.000 0.000 0.000 0.032 0.000
#> GSM125136     5  0.0000     0.9645 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125138     1  0.0632     0.8950 0.976 0.000 0.000 0.000 0.024 0.000
#> GSM125140     1  0.0260     0.8928 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM125142     1  0.0865     0.8948 0.964 0.000 0.000 0.000 0.036 0.000
#> GSM125144     1  0.0260     0.8928 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM125146     1  0.1387     0.8813 0.932 0.000 0.000 0.000 0.068 0.000
#> GSM125148     5  0.0000     0.9645 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125150     5  0.1267     0.9096 0.060 0.000 0.000 0.000 0.940 0.000
#> GSM125152     1  0.0146     0.8917 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125154     1  0.0790     0.8948 0.968 0.000 0.000 0.000 0.032 0.000
#> GSM125156     1  0.1765     0.8535 0.904 0.000 0.000 0.000 0.096 0.000
#> GSM125158     1  0.3607     0.5247 0.652 0.000 0.000 0.000 0.348 0.000
#> GSM125160     2  0.0692     0.6959 0.000 0.976 0.000 0.004 0.000 0.020
#> GSM125162     5  0.0000     0.9645 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125164     2  0.0547     0.6948 0.000 0.980 0.000 0.000 0.000 0.020
#> GSM125166     2  0.2278     0.6676 0.000 0.868 0.000 0.004 0.000 0.128
#> GSM125168     4  0.5032    -0.2400 0.000 0.456 0.052 0.484 0.000 0.008
#> GSM125170     2  0.4086     0.3161 0.000 0.528 0.000 0.464 0.000 0.008
#> GSM125172     2  0.5454     0.5442 0.000 0.568 0.000 0.252 0.000 0.180
#> GSM125174     4  0.1829     0.6513 0.024 0.000 0.056 0.920 0.000 0.000
#> GSM125176     2  0.0777     0.6955 0.000 0.972 0.000 0.004 0.000 0.024
#> GSM125178     3  0.4326     0.4809 0.000 0.368 0.608 0.016 0.000 0.008
#> GSM125180     4  0.4906     0.5542 0.064 0.000 0.316 0.612 0.000 0.008
#> GSM125182     2  0.5604     0.4054 0.004 0.584 0.100 0.292 0.000 0.020
#> GSM125184     4  0.2001     0.6524 0.000 0.040 0.048 0.912 0.000 0.000
#> GSM125186     4  0.4780     0.5539 0.040 0.004 0.336 0.612 0.000 0.008
#> GSM125188     4  0.6549     0.4192 0.004 0.224 0.316 0.432 0.000 0.024
#> GSM125190     2  0.3158     0.6346 0.000 0.812 0.004 0.164 0.000 0.020
#> GSM125192     2  0.2278     0.6678 0.000 0.868 0.004 0.000 0.000 0.128
#> GSM125194     4  0.3717     0.3385 0.000 0.000 0.000 0.616 0.384 0.000
#> GSM125196     3  0.1714     0.7108 0.000 0.000 0.908 0.092 0.000 0.000
#> GSM125198     6  0.1910     0.8621 0.000 0.108 0.000 0.000 0.000 0.892
#> GSM125200     1  0.0713     0.8964 0.972 0.000 0.000 0.000 0.028 0.000
#> GSM125202     6  0.2872     0.8298 0.000 0.140 0.000 0.024 0.000 0.836
#> GSM125204     3  0.1320     0.7063 0.000 0.000 0.948 0.016 0.036 0.000
#> GSM125206     3  0.4487     0.5935 0.000 0.068 0.668 0.264 0.000 0.000
#> GSM125208     3  0.0603     0.6966 0.004 0.000 0.980 0.016 0.000 0.000
#> GSM125210     4  0.6239     0.4665 0.004 0.168 0.328 0.480 0.000 0.020
#> GSM125212     4  0.2828     0.6219 0.000 0.040 0.012 0.868 0.000 0.080
#> GSM125214     2  0.3866    -0.2974 0.000 0.516 0.000 0.000 0.000 0.484
#> GSM125216     6  0.3765     0.4120 0.000 0.404 0.000 0.000 0.000 0.596
#> GSM125218     2  0.2743     0.6510 0.000 0.828 0.000 0.008 0.000 0.164
#> GSM125220     5  0.1663     0.8883 0.000 0.000 0.088 0.000 0.912 0.000
#> GSM125222     4  0.2376     0.6405 0.000 0.044 0.068 0.888 0.000 0.000
#> GSM125224     6  0.1910     0.8621 0.000 0.108 0.000 0.000 0.000 0.892
#> GSM125226     4  0.5712    -0.3384 0.004 0.436 0.008 0.444 0.000 0.108
#> GSM125228     2  0.2697     0.6277 0.000 0.812 0.000 0.000 0.000 0.188
#> GSM125230     4  0.2856     0.6154 0.000 0.000 0.068 0.856 0.000 0.076
#> GSM125232     1  0.0632     0.8853 0.976 0.000 0.000 0.024 0.000 0.000
#> GSM125234     1  0.2100     0.8201 0.884 0.000 0.112 0.004 0.000 0.000
#> GSM125236     1  0.3965     0.4163 0.604 0.000 0.008 0.000 0.388 0.000
#> GSM125238     5  0.0000     0.9645 0.000 0.000 0.000 0.000 1.000 0.000

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk SD-pam-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk SD-pam-collect-classes

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

test_to_known_factors(res)
#>          n agent(p) individual(p) k
#> SD:pam 115    1.000      6.83e-05 2
#> SD:pam 108    0.777      2.04e-06 3
#> SD:pam 108    0.281      1.06e-05 4
#> SD:pam 105    0.476      2.58e-08 5
#> SD:pam  96    0.552      2.11e-09 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 21168 rows and 116 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 5.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk SD-mclust-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.922           0.967       0.973         0.4782 0.511   0.511
#> 3 3 0.679           0.785       0.771         0.3164 0.829   0.665
#> 4 4 0.721           0.790       0.819         0.1502 0.825   0.547
#> 5 5 0.919           0.937       0.952         0.1014 0.872   0.559
#> 6 6 0.881           0.836       0.898         0.0319 0.964   0.820

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

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

There is also optional best \(k\) = 2 that is worth to check.

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

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

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM125123     1  0.0376      0.967 0.996 0.004
#> GSM125125     1  0.0000      0.969 1.000 0.000
#> GSM125127     1  0.6048      0.849 0.852 0.148
#> GSM125129     1  0.0000      0.969 1.000 0.000
#> GSM125131     1  0.0000      0.969 1.000 0.000
#> GSM125133     1  0.4690      0.898 0.900 0.100
#> GSM125135     1  0.0000      0.969 1.000 0.000
#> GSM125137     1  0.0000      0.969 1.000 0.000
#> GSM125139     1  0.0000      0.969 1.000 0.000
#> GSM125141     1  0.0000      0.969 1.000 0.000
#> GSM125143     1  0.6247      0.840 0.844 0.156
#> GSM125145     1  0.0938      0.962 0.988 0.012
#> GSM125147     1  0.0000      0.969 1.000 0.000
#> GSM125149     1  0.0000      0.969 1.000 0.000
#> GSM125151     1  0.0000      0.969 1.000 0.000
#> GSM125153     1  0.0000      0.969 1.000 0.000
#> GSM125155     1  0.0000      0.969 1.000 0.000
#> GSM125157     1  0.0000      0.969 1.000 0.000
#> GSM125159     2  0.1414      0.988 0.020 0.980
#> GSM125161     1  0.0000      0.969 1.000 0.000
#> GSM125163     2  0.1414      0.988 0.020 0.980
#> GSM125165     2  0.1414      0.988 0.020 0.980
#> GSM125167     2  0.1414      0.988 0.020 0.980
#> GSM125169     2  0.1414      0.988 0.020 0.980
#> GSM125171     2  0.1414      0.988 0.020 0.980
#> GSM125173     2  0.1414      0.988 0.020 0.980
#> GSM125175     2  0.1184      0.986 0.016 0.984
#> GSM125177     2  0.1414      0.988 0.020 0.980
#> GSM125179     2  0.2603      0.976 0.044 0.956
#> GSM125181     2  0.1414      0.988 0.020 0.980
#> GSM125183     2  0.2603      0.976 0.044 0.956
#> GSM125185     2  0.2236      0.982 0.036 0.964
#> GSM125187     2  0.2603      0.977 0.044 0.956
#> GSM125189     2  0.1414      0.988 0.020 0.980
#> GSM125191     2  0.1414      0.988 0.020 0.980
#> GSM125193     2  0.2423      0.979 0.040 0.960
#> GSM125195     2  0.2043      0.984 0.032 0.968
#> GSM125197     2  0.0000      0.976 0.000 1.000
#> GSM125199     1  0.0000      0.969 1.000 0.000
#> GSM125201     2  0.0000      0.976 0.000 1.000
#> GSM125203     2  0.1633      0.987 0.024 0.976
#> GSM125205     2  0.0000      0.976 0.000 1.000
#> GSM125207     2  0.2043      0.984 0.032 0.968
#> GSM125209     2  0.1414      0.988 0.020 0.980
#> GSM125211     2  0.1414      0.988 0.020 0.980
#> GSM125213     2  0.1414      0.988 0.020 0.980
#> GSM125215     2  0.1414      0.988 0.020 0.980
#> GSM125217     2  0.1414      0.988 0.020 0.980
#> GSM125219     1  0.5178      0.884 0.884 0.116
#> GSM125221     2  0.2236      0.982 0.036 0.964
#> GSM125223     2  0.0000      0.976 0.000 1.000
#> GSM125225     2  0.1414      0.988 0.020 0.980
#> GSM125227     2  0.0000      0.976 0.000 1.000
#> GSM125229     2  0.1414      0.988 0.020 0.980
#> GSM125231     2  0.4690      0.917 0.100 0.900
#> GSM125233     1  0.0000      0.969 1.000 0.000
#> GSM125235     1  0.0000      0.969 1.000 0.000
#> GSM125237     1  0.0000      0.969 1.000 0.000
#> GSM125124     1  0.0000      0.969 1.000 0.000
#> GSM125126     1  0.0000      0.969 1.000 0.000
#> GSM125128     1  0.4815      0.895 0.896 0.104
#> GSM125130     1  0.5408      0.876 0.876 0.124
#> GSM125132     1  0.0000      0.969 1.000 0.000
#> GSM125134     1  0.0000      0.969 1.000 0.000
#> GSM125136     1  0.1633      0.955 0.976 0.024
#> GSM125138     1  0.0000      0.969 1.000 0.000
#> GSM125140     1  0.0000      0.969 1.000 0.000
#> GSM125142     1  0.0000      0.969 1.000 0.000
#> GSM125144     1  0.0000      0.969 1.000 0.000
#> GSM125146     1  0.4161      0.911 0.916 0.084
#> GSM125148     1  0.0000      0.969 1.000 0.000
#> GSM125150     1  0.0000      0.969 1.000 0.000
#> GSM125152     1  0.0000      0.969 1.000 0.000
#> GSM125154     1  0.0000      0.969 1.000 0.000
#> GSM125156     1  0.0000      0.969 1.000 0.000
#> GSM125158     1  0.0000      0.969 1.000 0.000
#> GSM125160     2  0.1414      0.988 0.020 0.980
#> GSM125162     1  0.0000      0.969 1.000 0.000
#> GSM125164     2  0.1414      0.988 0.020 0.980
#> GSM125166     2  0.0000      0.976 0.000 1.000
#> GSM125168     2  0.1414      0.988 0.020 0.980
#> GSM125170     2  0.1414      0.988 0.020 0.980
#> GSM125172     2  0.0000      0.976 0.000 1.000
#> GSM125174     2  0.2603      0.976 0.044 0.956
#> GSM125176     2  0.1414      0.988 0.020 0.980
#> GSM125178     2  0.2236      0.982 0.036 0.964
#> GSM125180     2  0.2603      0.976 0.044 0.956
#> GSM125182     2  0.1414      0.988 0.020 0.980
#> GSM125184     2  0.1633      0.987 0.024 0.976
#> GSM125186     2  0.2423      0.979 0.040 0.960
#> GSM125188     2  0.1414      0.988 0.020 0.980
#> GSM125190     2  0.1414      0.988 0.020 0.980
#> GSM125192     2  0.0000      0.976 0.000 1.000
#> GSM125194     2  0.2603      0.977 0.044 0.956
#> GSM125196     2  0.1633      0.987 0.024 0.976
#> GSM125198     2  0.0000      0.976 0.000 1.000
#> GSM125200     1  0.0000      0.969 1.000 0.000
#> GSM125202     2  0.1184      0.986 0.016 0.984
#> GSM125204     2  0.2423      0.979 0.040 0.960
#> GSM125206     2  0.1633      0.987 0.024 0.976
#> GSM125208     2  0.2423      0.979 0.040 0.960
#> GSM125210     2  0.1633      0.987 0.024 0.976
#> GSM125212     2  0.1414      0.988 0.020 0.980
#> GSM125214     2  0.1414      0.988 0.020 0.980
#> GSM125216     2  0.1414      0.988 0.020 0.980
#> GSM125218     2  0.1414      0.988 0.020 0.980
#> GSM125220     1  0.6048      0.849 0.852 0.148
#> GSM125222     2  0.2236      0.982 0.036 0.964
#> GSM125224     2  0.0000      0.976 0.000 1.000
#> GSM125226     2  0.1414      0.988 0.020 0.980
#> GSM125228     2  0.0000      0.976 0.000 1.000
#> GSM125230     2  0.2778      0.973 0.048 0.952
#> GSM125232     2  0.4939      0.908 0.108 0.892
#> GSM125234     1  0.8081      0.701 0.752 0.248
#> GSM125236     1  0.5629      0.867 0.868 0.132
#> GSM125238     1  0.0000      0.969 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
#> GSM125123     1  0.0000     0.8465 1.000 0.000 0.000
#> GSM125125     1  0.5760     0.8612 0.672 0.000 0.328
#> GSM125127     1  0.0475     0.8427 0.992 0.004 0.004
#> GSM125129     1  0.0000     0.8465 1.000 0.000 0.000
#> GSM125131     1  0.5760     0.8612 0.672 0.000 0.328
#> GSM125133     1  0.5760     0.8612 0.672 0.000 0.328
#> GSM125135     1  0.0000     0.8465 1.000 0.000 0.000
#> GSM125137     1  0.5760     0.8612 0.672 0.000 0.328
#> GSM125139     1  0.0000     0.8465 1.000 0.000 0.000
#> GSM125141     1  0.5760     0.8612 0.672 0.000 0.328
#> GSM125143     1  0.0829     0.8382 0.984 0.004 0.012
#> GSM125145     1  0.0000     0.8465 1.000 0.000 0.000
#> GSM125147     1  0.5760     0.8612 0.672 0.000 0.328
#> GSM125149     1  0.5760     0.8612 0.672 0.000 0.328
#> GSM125151     1  0.0000     0.8465 1.000 0.000 0.000
#> GSM125153     1  0.1163     0.8499 0.972 0.000 0.028
#> GSM125155     1  0.5760     0.8612 0.672 0.000 0.328
#> GSM125157     1  0.5760     0.8612 0.672 0.000 0.328
#> GSM125159     2  0.1163     0.8449 0.000 0.972 0.028
#> GSM125161     1  0.5760     0.8612 0.672 0.000 0.328
#> GSM125163     2  0.0000     0.8581 0.000 1.000 0.000
#> GSM125165     3  0.6302     0.7028 0.000 0.480 0.520
#> GSM125167     2  0.0892     0.8500 0.000 0.980 0.020
#> GSM125169     2  0.3192     0.7412 0.000 0.888 0.112
#> GSM125171     2  0.0000     0.8581 0.000 1.000 0.000
#> GSM125173     3  0.6280     0.7475 0.000 0.460 0.540
#> GSM125175     2  0.0000     0.8581 0.000 1.000 0.000
#> GSM125177     3  0.5810     0.9171 0.000 0.336 0.664
#> GSM125179     3  0.5785     0.9183 0.000 0.332 0.668
#> GSM125181     3  0.6302     0.7028 0.000 0.480 0.520
#> GSM125183     3  0.5810     0.9171 0.000 0.336 0.664
#> GSM125185     3  0.5785     0.9183 0.000 0.332 0.668
#> GSM125187     3  0.5785     0.9183 0.000 0.332 0.668
#> GSM125189     2  0.1289     0.8418 0.000 0.968 0.032
#> GSM125191     2  0.4605     0.5357 0.000 0.796 0.204
#> GSM125193     3  0.6291     0.7307 0.000 0.468 0.532
#> GSM125195     3  0.5785     0.9183 0.000 0.332 0.668
#> GSM125197     2  0.0237     0.8565 0.000 0.996 0.004
#> GSM125199     1  0.5760     0.8612 0.672 0.000 0.328
#> GSM125201     2  0.0237     0.8565 0.000 0.996 0.004
#> GSM125203     3  0.5810     0.9171 0.000 0.336 0.664
#> GSM125205     2  0.0237     0.8565 0.000 0.996 0.004
#> GSM125207     3  0.5785     0.9183 0.000 0.332 0.668
#> GSM125209     2  0.6215    -0.4472 0.000 0.572 0.428
#> GSM125211     2  0.5926    -0.0656 0.000 0.644 0.356
#> GSM125213     2  0.0592     0.8539 0.000 0.988 0.012
#> GSM125215     2  0.0000     0.8581 0.000 1.000 0.000
#> GSM125217     2  0.1411     0.8387 0.000 0.964 0.036
#> GSM125219     1  0.0237     0.8444 0.996 0.004 0.000
#> GSM125221     3  0.6204     0.8118 0.000 0.424 0.576
#> GSM125223     2  0.0237     0.8565 0.000 0.996 0.004
#> GSM125225     2  0.0000     0.8581 0.000 1.000 0.000
#> GSM125227     2  0.0000     0.8581 0.000 1.000 0.000
#> GSM125229     2  0.5785     0.0742 0.000 0.668 0.332
#> GSM125231     3  0.7622     0.8271 0.060 0.332 0.608
#> GSM125233     1  0.0000     0.8465 1.000 0.000 0.000
#> GSM125235     1  0.5760     0.8612 0.672 0.000 0.328
#> GSM125237     1  0.5760     0.8612 0.672 0.000 0.328
#> GSM125124     1  0.0000     0.8465 1.000 0.000 0.000
#> GSM125126     1  0.5760     0.8612 0.672 0.000 0.328
#> GSM125128     1  0.5982     0.8591 0.668 0.004 0.328
#> GSM125130     1  0.2200     0.8052 0.940 0.004 0.056
#> GSM125132     1  0.5760     0.8612 0.672 0.000 0.328
#> GSM125134     1  0.0000     0.8465 1.000 0.000 0.000
#> GSM125136     1  0.5760     0.8612 0.672 0.000 0.328
#> GSM125138     1  0.0000     0.8465 1.000 0.000 0.000
#> GSM125140     1  0.0000     0.8465 1.000 0.000 0.000
#> GSM125142     1  0.4452     0.8611 0.808 0.000 0.192
#> GSM125144     1  0.0000     0.8465 1.000 0.000 0.000
#> GSM125146     1  0.0000     0.8465 1.000 0.000 0.000
#> GSM125148     1  0.5760     0.8612 0.672 0.000 0.328
#> GSM125150     1  0.5760     0.8612 0.672 0.000 0.328
#> GSM125152     1  0.0000     0.8465 1.000 0.000 0.000
#> GSM125154     1  0.0000     0.8465 1.000 0.000 0.000
#> GSM125156     1  0.3752     0.8592 0.856 0.000 0.144
#> GSM125158     1  0.4346     0.8609 0.816 0.000 0.184
#> GSM125160     2  0.0592     0.8539 0.000 0.988 0.012
#> GSM125162     1  0.5760     0.8612 0.672 0.000 0.328
#> GSM125164     2  0.0237     0.8571 0.000 0.996 0.004
#> GSM125166     2  0.0237     0.8565 0.000 0.996 0.004
#> GSM125168     2  0.5138     0.3923 0.000 0.748 0.252
#> GSM125170     3  0.6225     0.7990 0.000 0.432 0.568
#> GSM125172     2  0.0237     0.8565 0.000 0.996 0.004
#> GSM125174     3  0.5785     0.9183 0.000 0.332 0.668
#> GSM125176     2  0.5948    -0.1618 0.000 0.640 0.360
#> GSM125178     3  0.5785     0.9183 0.000 0.332 0.668
#> GSM125180     3  0.5785     0.9183 0.000 0.332 0.668
#> GSM125182     2  0.6295    -0.5992 0.000 0.528 0.472
#> GSM125184     3  0.5785     0.9183 0.000 0.332 0.668
#> GSM125186     3  0.5785     0.9183 0.000 0.332 0.668
#> GSM125188     3  0.6302     0.7028 0.000 0.480 0.520
#> GSM125190     2  0.2261     0.8032 0.000 0.932 0.068
#> GSM125192     2  0.0237     0.8565 0.000 0.996 0.004
#> GSM125194     3  0.6033     0.9149 0.004 0.336 0.660
#> GSM125196     3  0.5785     0.9183 0.000 0.332 0.668
#> GSM125198     2  0.0237     0.8565 0.000 0.996 0.004
#> GSM125200     1  0.5706     0.8615 0.680 0.000 0.320
#> GSM125202     2  0.0000     0.8581 0.000 1.000 0.000
#> GSM125204     3  0.5785     0.9183 0.000 0.332 0.668
#> GSM125206     3  0.5810     0.9171 0.000 0.336 0.664
#> GSM125208     3  0.5785     0.9183 0.000 0.332 0.668
#> GSM125210     3  0.5785     0.9183 0.000 0.332 0.668
#> GSM125212     2  0.5760     0.0949 0.000 0.672 0.328
#> GSM125214     2  0.0000     0.8581 0.000 1.000 0.000
#> GSM125216     2  0.0000     0.8581 0.000 1.000 0.000
#> GSM125218     2  0.1289     0.8418 0.000 0.968 0.032
#> GSM125220     1  0.6057     0.8530 0.656 0.004 0.340
#> GSM125222     3  0.5810     0.9171 0.000 0.336 0.664
#> GSM125224     2  0.0237     0.8565 0.000 0.996 0.004
#> GSM125226     2  0.1411     0.8386 0.000 0.964 0.036
#> GSM125228     2  0.0237     0.8565 0.000 0.996 0.004
#> GSM125230     3  0.6738     0.8859 0.020 0.356 0.624
#> GSM125232     3  0.9585     0.5309 0.212 0.332 0.456
#> GSM125234     1  0.9424    -0.1571 0.472 0.188 0.340
#> GSM125236     1  0.0237     0.8444 0.996 0.004 0.000
#> GSM125238     1  0.5760     0.8612 0.672 0.000 0.328

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM125123     1  0.4049     0.9278 0.780 0.000 0.008 0.212
#> GSM125125     4  0.5000    -0.4920 0.500 0.000 0.000 0.500
#> GSM125127     1  0.4595     0.8966 0.776 0.000 0.040 0.184
#> GSM125129     1  0.4049     0.9278 0.780 0.000 0.008 0.212
#> GSM125131     4  0.0000     0.9288 0.000 0.000 0.000 1.000
#> GSM125133     4  0.0000     0.9288 0.000 0.000 0.000 1.000
#> GSM125135     1  0.4072     0.9034 0.748 0.000 0.000 0.252
#> GSM125137     4  0.0000     0.9288 0.000 0.000 0.000 1.000
#> GSM125139     1  0.4049     0.9278 0.780 0.000 0.008 0.212
#> GSM125141     4  0.0000     0.9288 0.000 0.000 0.000 1.000
#> GSM125143     1  0.4348     0.9133 0.780 0.000 0.024 0.196
#> GSM125145     1  0.4158     0.9238 0.768 0.000 0.008 0.224
#> GSM125147     4  0.0000     0.9288 0.000 0.000 0.000 1.000
#> GSM125149     4  0.0000     0.9288 0.000 0.000 0.000 1.000
#> GSM125151     1  0.4049     0.9278 0.780 0.000 0.008 0.212
#> GSM125153     1  0.4252     0.9039 0.744 0.000 0.004 0.252
#> GSM125155     4  0.0921     0.8990 0.028 0.000 0.000 0.972
#> GSM125157     4  0.0000     0.9288 0.000 0.000 0.000 1.000
#> GSM125159     2  0.7002     0.4137 0.128 0.520 0.352 0.000
#> GSM125161     4  0.0000     0.9288 0.000 0.000 0.000 1.000
#> GSM125163     2  0.2928     0.7661 0.012 0.880 0.108 0.000
#> GSM125165     3  0.4590     0.8070 0.148 0.060 0.792 0.000
#> GSM125167     2  0.6876     0.4266 0.116 0.532 0.352 0.000
#> GSM125169     3  0.7242     0.0292 0.148 0.376 0.476 0.000
#> GSM125171     2  0.3428     0.7410 0.012 0.844 0.144 0.000
#> GSM125173     3  0.3858     0.8414 0.100 0.056 0.844 0.000
#> GSM125175     2  0.1004     0.7988 0.004 0.972 0.024 0.000
#> GSM125177     3  0.2197     0.8767 0.024 0.048 0.928 0.000
#> GSM125179     3  0.0188     0.8914 0.004 0.000 0.996 0.000
#> GSM125181     3  0.3787     0.8406 0.124 0.036 0.840 0.000
#> GSM125183     3  0.0188     0.8914 0.004 0.000 0.996 0.000
#> GSM125185     3  0.0188     0.8914 0.004 0.000 0.996 0.000
#> GSM125187     3  0.0188     0.8914 0.004 0.000 0.996 0.000
#> GSM125189     2  0.7155     0.3912 0.144 0.504 0.352 0.000
#> GSM125191     3  0.5551     0.7174 0.112 0.160 0.728 0.000
#> GSM125193     3  0.2882     0.8670 0.084 0.024 0.892 0.000
#> GSM125195     3  0.0188     0.8914 0.004 0.000 0.996 0.000
#> GSM125197     2  0.1867     0.7658 0.072 0.928 0.000 0.000
#> GSM125199     4  0.0000     0.9288 0.000 0.000 0.000 1.000
#> GSM125201     2  0.0188     0.7955 0.000 0.996 0.004 0.000
#> GSM125203     3  0.2224     0.8778 0.040 0.032 0.928 0.000
#> GSM125205     2  0.0188     0.7955 0.000 0.996 0.004 0.000
#> GSM125207     3  0.0188     0.8914 0.004 0.000 0.996 0.000
#> GSM125209     3  0.4188     0.8299 0.112 0.064 0.824 0.000
#> GSM125211     3  0.5247     0.7651 0.148 0.100 0.752 0.000
#> GSM125213     2  0.6324     0.4557 0.072 0.572 0.356 0.000
#> GSM125215     2  0.1042     0.7993 0.008 0.972 0.020 0.000
#> GSM125217     2  0.7175     0.3726 0.144 0.496 0.360 0.000
#> GSM125219     1  0.4284     0.9178 0.780 0.000 0.020 0.200
#> GSM125221     3  0.3198     0.8609 0.080 0.040 0.880 0.000
#> GSM125223     2  0.1867     0.7658 0.072 0.928 0.000 0.000
#> GSM125225     2  0.1305     0.7946 0.036 0.960 0.004 0.000
#> GSM125227     2  0.1211     0.7799 0.040 0.960 0.000 0.000
#> GSM125229     3  0.5416     0.7506 0.148 0.112 0.740 0.000
#> GSM125231     3  0.0188     0.8914 0.004 0.000 0.996 0.000
#> GSM125233     1  0.4049     0.9278 0.780 0.000 0.008 0.212
#> GSM125235     4  0.0000     0.9288 0.000 0.000 0.000 1.000
#> GSM125237     4  0.0000     0.9288 0.000 0.000 0.000 1.000
#> GSM125124     1  0.4049     0.9278 0.780 0.000 0.008 0.212
#> GSM125126     4  0.0592     0.9131 0.016 0.000 0.000 0.984
#> GSM125128     4  0.0000     0.9288 0.000 0.000 0.000 1.000
#> GSM125130     1  0.4888     0.7747 0.780 0.000 0.124 0.096
#> GSM125132     4  0.0000     0.9288 0.000 0.000 0.000 1.000
#> GSM125134     1  0.4123     0.9254 0.772 0.000 0.008 0.220
#> GSM125136     4  0.0000     0.9288 0.000 0.000 0.000 1.000
#> GSM125138     1  0.4049     0.9278 0.780 0.000 0.008 0.212
#> GSM125140     1  0.4049     0.9278 0.780 0.000 0.008 0.212
#> GSM125142     1  0.4746     0.7530 0.632 0.000 0.000 0.368
#> GSM125144     1  0.4049     0.9278 0.780 0.000 0.008 0.212
#> GSM125146     1  0.4262     0.9170 0.756 0.000 0.008 0.236
#> GSM125148     4  0.0000     0.9288 0.000 0.000 0.000 1.000
#> GSM125150     4  0.4985    -0.3956 0.468 0.000 0.000 0.532
#> GSM125152     1  0.4049     0.9278 0.780 0.000 0.008 0.212
#> GSM125154     1  0.4088     0.9185 0.764 0.000 0.004 0.232
#> GSM125156     1  0.4977     0.5535 0.540 0.000 0.000 0.460
#> GSM125158     1  0.4877     0.6747 0.592 0.000 0.000 0.408
#> GSM125160     2  0.6280     0.5311 0.084 0.612 0.304 0.000
#> GSM125162     4  0.0000     0.9288 0.000 0.000 0.000 1.000
#> GSM125164     2  0.3925     0.7178 0.016 0.808 0.176 0.000
#> GSM125166     2  0.1940     0.7823 0.000 0.924 0.076 0.000
#> GSM125168     3  0.4852     0.7693 0.072 0.152 0.776 0.000
#> GSM125170     3  0.0779     0.8888 0.004 0.016 0.980 0.000
#> GSM125172     2  0.0188     0.7955 0.000 0.996 0.004 0.000
#> GSM125174     3  0.0188     0.8914 0.004 0.000 0.996 0.000
#> GSM125176     3  0.4040     0.5839 0.000 0.248 0.752 0.000
#> GSM125178     3  0.0188     0.8911 0.004 0.000 0.996 0.000
#> GSM125180     3  0.0188     0.8914 0.004 0.000 0.996 0.000
#> GSM125182     3  0.4037     0.8362 0.112 0.056 0.832 0.000
#> GSM125184     3  0.0188     0.8914 0.004 0.000 0.996 0.000
#> GSM125186     3  0.0188     0.8914 0.004 0.000 0.996 0.000
#> GSM125188     3  0.3962     0.8353 0.124 0.044 0.832 0.000
#> GSM125190     2  0.7049     0.3090 0.124 0.484 0.392 0.000
#> GSM125192     2  0.0336     0.7972 0.000 0.992 0.008 0.000
#> GSM125194     3  0.0895     0.8838 0.004 0.000 0.976 0.020
#> GSM125196     3  0.0188     0.8914 0.004 0.000 0.996 0.000
#> GSM125198     2  0.1867     0.7658 0.072 0.928 0.000 0.000
#> GSM125200     1  0.4985     0.5348 0.532 0.000 0.000 0.468
#> GSM125202     2  0.0817     0.7988 0.000 0.976 0.024 0.000
#> GSM125204     3  0.0188     0.8914 0.004 0.000 0.996 0.000
#> GSM125206     3  0.0804     0.8890 0.008 0.012 0.980 0.000
#> GSM125208     3  0.0188     0.8914 0.004 0.000 0.996 0.000
#> GSM125210     3  0.0188     0.8914 0.004 0.000 0.996 0.000
#> GSM125212     3  0.5416     0.7506 0.148 0.112 0.740 0.000
#> GSM125214     2  0.0817     0.7988 0.000 0.976 0.024 0.000
#> GSM125216     2  0.1004     0.7987 0.004 0.972 0.024 0.000
#> GSM125218     2  0.7081     0.4032 0.136 0.512 0.352 0.000
#> GSM125220     4  0.1398     0.8718 0.004 0.000 0.040 0.956
#> GSM125222     3  0.0469     0.8909 0.012 0.000 0.988 0.000
#> GSM125224     2  0.1867     0.7658 0.072 0.928 0.000 0.000
#> GSM125226     2  0.7165     0.3829 0.144 0.500 0.356 0.000
#> GSM125228     2  0.1637     0.7710 0.060 0.940 0.000 0.000
#> GSM125230     3  0.1677     0.8725 0.012 0.000 0.948 0.040
#> GSM125232     3  0.2179     0.8446 0.064 0.000 0.924 0.012
#> GSM125234     3  0.3991     0.6961 0.172 0.000 0.808 0.020
#> GSM125236     1  0.4387     0.9152 0.776 0.000 0.024 0.200
#> GSM125238     4  0.0000     0.9288 0.000 0.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM125123     5  0.0000      0.974 0.000 0.000 0.000 0.000 1.000
#> GSM125125     5  0.0290      0.970 0.008 0.000 0.000 0.000 0.992
#> GSM125127     5  0.0290      0.968 0.000 0.000 0.008 0.000 0.992
#> GSM125129     5  0.0000      0.974 0.000 0.000 0.000 0.000 1.000
#> GSM125131     1  0.0880      0.980 0.968 0.000 0.000 0.000 0.032
#> GSM125133     1  0.0880      0.980 0.968 0.000 0.000 0.000 0.032
#> GSM125135     5  0.0510      0.965 0.016 0.000 0.000 0.000 0.984
#> GSM125137     1  0.0880      0.980 0.968 0.000 0.000 0.000 0.032
#> GSM125139     5  0.0000      0.974 0.000 0.000 0.000 0.000 1.000
#> GSM125141     1  0.0880      0.980 0.968 0.000 0.000 0.000 0.032
#> GSM125143     5  0.0000      0.974 0.000 0.000 0.000 0.000 1.000
#> GSM125145     5  0.0162      0.972 0.004 0.000 0.000 0.000 0.996
#> GSM125147     1  0.0880      0.980 0.968 0.000 0.000 0.000 0.032
#> GSM125149     1  0.0880      0.980 0.968 0.000 0.000 0.000 0.032
#> GSM125151     5  0.0000      0.974 0.000 0.000 0.000 0.000 1.000
#> GSM125153     5  0.1197      0.936 0.048 0.000 0.000 0.000 0.952
#> GSM125155     1  0.2690      0.860 0.844 0.000 0.000 0.000 0.156
#> GSM125157     1  0.0880      0.980 0.968 0.000 0.000 0.000 0.032
#> GSM125159     4  0.1270      0.901 0.000 0.052 0.000 0.948 0.000
#> GSM125161     1  0.0880      0.980 0.968 0.000 0.000 0.000 0.032
#> GSM125163     2  0.1544      0.954 0.000 0.932 0.000 0.068 0.000
#> GSM125165     4  0.1732      0.907 0.000 0.000 0.080 0.920 0.000
#> GSM125167     4  0.1908      0.880 0.000 0.092 0.000 0.908 0.000
#> GSM125169     4  0.0000      0.913 0.000 0.000 0.000 1.000 0.000
#> GSM125171     2  0.2974      0.897 0.000 0.868 0.052 0.080 0.000
#> GSM125173     4  0.2424      0.887 0.000 0.000 0.132 0.868 0.000
#> GSM125175     2  0.1544      0.954 0.000 0.932 0.000 0.068 0.000
#> GSM125177     3  0.0880      0.965 0.000 0.000 0.968 0.032 0.000
#> GSM125179     3  0.0000      0.984 0.000 0.000 1.000 0.000 0.000
#> GSM125181     4  0.3276      0.875 0.032 0.000 0.132 0.836 0.000
#> GSM125183     3  0.0000      0.984 0.000 0.000 1.000 0.000 0.000
#> GSM125185     3  0.0510      0.979 0.016 0.000 0.984 0.000 0.000
#> GSM125187     3  0.0000      0.984 0.000 0.000 1.000 0.000 0.000
#> GSM125189     4  0.0880      0.908 0.000 0.032 0.000 0.968 0.000
#> GSM125191     4  0.2362      0.907 0.000 0.024 0.076 0.900 0.000
#> GSM125193     4  0.2389      0.888 0.000 0.000 0.116 0.880 0.004
#> GSM125195     3  0.0000      0.984 0.000 0.000 1.000 0.000 0.000
#> GSM125197     2  0.0000      0.925 0.000 1.000 0.000 0.000 0.000
#> GSM125199     1  0.0880      0.980 0.968 0.000 0.000 0.000 0.032
#> GSM125201     2  0.1544      0.954 0.000 0.932 0.000 0.068 0.000
#> GSM125203     3  0.1282      0.952 0.004 0.000 0.952 0.044 0.000
#> GSM125205     2  0.1544      0.954 0.000 0.932 0.000 0.068 0.000
#> GSM125207     3  0.0703      0.975 0.024 0.000 0.976 0.000 0.000
#> GSM125209     4  0.3035      0.891 0.032 0.000 0.112 0.856 0.000
#> GSM125211     4  0.0162      0.913 0.000 0.000 0.004 0.996 0.000
#> GSM125213     4  0.2179      0.865 0.000 0.112 0.000 0.888 0.000
#> GSM125215     2  0.1544      0.954 0.000 0.932 0.000 0.068 0.000
#> GSM125217     4  0.0162      0.912 0.000 0.004 0.000 0.996 0.000
#> GSM125219     5  0.0000      0.974 0.000 0.000 0.000 0.000 1.000
#> GSM125221     4  0.3305      0.773 0.000 0.000 0.224 0.776 0.000
#> GSM125223     2  0.0000      0.925 0.000 1.000 0.000 0.000 0.000
#> GSM125225     2  0.1544      0.954 0.000 0.932 0.000 0.068 0.000
#> GSM125227     2  0.1121      0.946 0.000 0.956 0.000 0.044 0.000
#> GSM125229     4  0.0000      0.913 0.000 0.000 0.000 1.000 0.000
#> GSM125231     3  0.0000      0.984 0.000 0.000 1.000 0.000 0.000
#> GSM125233     5  0.0000      0.974 0.000 0.000 0.000 0.000 1.000
#> GSM125235     1  0.0880      0.980 0.968 0.000 0.000 0.000 0.032
#> GSM125237     1  0.0880      0.980 0.968 0.000 0.000 0.000 0.032
#> GSM125124     5  0.0000      0.974 0.000 0.000 0.000 0.000 1.000
#> GSM125126     1  0.2516      0.879 0.860 0.000 0.000 0.000 0.140
#> GSM125128     1  0.0880      0.980 0.968 0.000 0.000 0.000 0.032
#> GSM125130     5  0.0880      0.945 0.000 0.000 0.032 0.000 0.968
#> GSM125132     1  0.1043      0.974 0.960 0.000 0.000 0.000 0.040
#> GSM125134     5  0.0000      0.974 0.000 0.000 0.000 0.000 1.000
#> GSM125136     1  0.0880      0.980 0.968 0.000 0.000 0.000 0.032
#> GSM125138     5  0.0000      0.974 0.000 0.000 0.000 0.000 1.000
#> GSM125140     5  0.0000      0.974 0.000 0.000 0.000 0.000 1.000
#> GSM125142     5  0.0404      0.968 0.012 0.000 0.000 0.000 0.988
#> GSM125144     5  0.0000      0.974 0.000 0.000 0.000 0.000 1.000
#> GSM125146     5  0.0290      0.970 0.008 0.000 0.000 0.000 0.992
#> GSM125148     1  0.0880      0.980 0.968 0.000 0.000 0.000 0.032
#> GSM125150     5  0.2377      0.842 0.128 0.000 0.000 0.000 0.872
#> GSM125152     5  0.0000      0.974 0.000 0.000 0.000 0.000 1.000
#> GSM125154     5  0.0000      0.974 0.000 0.000 0.000 0.000 1.000
#> GSM125156     5  0.0162      0.972 0.004 0.000 0.000 0.000 0.996
#> GSM125158     5  0.0162      0.972 0.004 0.000 0.000 0.000 0.996
#> GSM125160     4  0.2424      0.846 0.000 0.132 0.000 0.868 0.000
#> GSM125162     1  0.0880      0.980 0.968 0.000 0.000 0.000 0.032
#> GSM125164     2  0.2130      0.938 0.000 0.908 0.012 0.080 0.000
#> GSM125166     2  0.1544      0.954 0.000 0.932 0.000 0.068 0.000
#> GSM125168     4  0.3846      0.843 0.000 0.056 0.144 0.800 0.000
#> GSM125170     3  0.0880      0.960 0.000 0.000 0.968 0.032 0.000
#> GSM125172     2  0.1544      0.954 0.000 0.932 0.000 0.068 0.000
#> GSM125174     3  0.0000      0.984 0.000 0.000 1.000 0.000 0.000
#> GSM125176     2  0.4201      0.326 0.000 0.592 0.408 0.000 0.000
#> GSM125178     3  0.0162      0.982 0.000 0.000 0.996 0.004 0.000
#> GSM125180     3  0.0000      0.984 0.000 0.000 1.000 0.000 0.000
#> GSM125182     4  0.3182      0.882 0.032 0.000 0.124 0.844 0.000
#> GSM125184     3  0.0000      0.984 0.000 0.000 1.000 0.000 0.000
#> GSM125186     3  0.0290      0.982 0.008 0.000 0.992 0.000 0.000
#> GSM125188     4  0.3229      0.878 0.032 0.000 0.128 0.840 0.000
#> GSM125190     4  0.1300      0.916 0.000 0.016 0.028 0.956 0.000
#> GSM125192     2  0.1544      0.954 0.000 0.932 0.000 0.068 0.000
#> GSM125194     3  0.0404      0.976 0.000 0.000 0.988 0.000 0.012
#> GSM125196     3  0.0000      0.984 0.000 0.000 1.000 0.000 0.000
#> GSM125198     2  0.0000      0.925 0.000 1.000 0.000 0.000 0.000
#> GSM125200     5  0.0162      0.972 0.004 0.000 0.000 0.000 0.996
#> GSM125202     2  0.1544      0.954 0.000 0.932 0.000 0.068 0.000
#> GSM125204     3  0.0000      0.984 0.000 0.000 1.000 0.000 0.000
#> GSM125206     3  0.0000      0.984 0.000 0.000 1.000 0.000 0.000
#> GSM125208     3  0.0703      0.975 0.024 0.000 0.976 0.000 0.000
#> GSM125210     3  0.0162      0.983 0.004 0.000 0.996 0.000 0.000
#> GSM125212     4  0.0000      0.913 0.000 0.000 0.000 1.000 0.000
#> GSM125214     2  0.1544      0.954 0.000 0.932 0.000 0.068 0.000
#> GSM125216     2  0.1544      0.954 0.000 0.932 0.000 0.068 0.000
#> GSM125218     4  0.0162      0.912 0.000 0.004 0.000 0.996 0.000
#> GSM125220     1  0.2984      0.864 0.860 0.000 0.108 0.000 0.032
#> GSM125222     3  0.0162      0.982 0.000 0.000 0.996 0.004 0.000
#> GSM125224     2  0.0000      0.925 0.000 1.000 0.000 0.000 0.000
#> GSM125226     4  0.0609      0.911 0.000 0.020 0.000 0.980 0.000
#> GSM125228     2  0.0703      0.937 0.000 0.976 0.000 0.024 0.000
#> GSM125230     3  0.1074      0.967 0.004 0.000 0.968 0.016 0.012
#> GSM125232     3  0.2280      0.853 0.000 0.000 0.880 0.000 0.120
#> GSM125234     5  0.4138      0.379 0.000 0.000 0.384 0.000 0.616
#> GSM125236     5  0.0000      0.974 0.000 0.000 0.000 0.000 1.000
#> GSM125238     1  0.0880      0.980 0.968 0.000 0.000 0.000 0.032

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM125123     1  0.0692     0.9432 0.976 0.000 0.000 0.004 0.020 0.000
#> GSM125125     1  0.1398     0.9408 0.940 0.000 0.000 0.008 0.052 0.000
#> GSM125127     1  0.1686     0.9092 0.924 0.000 0.064 0.012 0.000 0.000
#> GSM125129     1  0.0972     0.9448 0.964 0.000 0.000 0.008 0.028 0.000
#> GSM125131     5  0.0713     0.9594 0.028 0.000 0.000 0.000 0.972 0.000
#> GSM125133     5  0.0547     0.9605 0.020 0.000 0.000 0.000 0.980 0.000
#> GSM125135     1  0.1625     0.9265 0.928 0.000 0.000 0.012 0.060 0.000
#> GSM125137     5  0.0547     0.9609 0.000 0.000 0.000 0.020 0.980 0.000
#> GSM125139     1  0.0806     0.9429 0.972 0.000 0.000 0.008 0.020 0.000
#> GSM125141     5  0.0260     0.9645 0.008 0.000 0.000 0.000 0.992 0.000
#> GSM125143     1  0.1334     0.9340 0.948 0.000 0.032 0.000 0.020 0.000
#> GSM125145     1  0.1176     0.9412 0.956 0.000 0.000 0.020 0.024 0.000
#> GSM125147     5  0.0547     0.9605 0.020 0.000 0.000 0.000 0.980 0.000
#> GSM125149     5  0.0458     0.9627 0.000 0.000 0.000 0.016 0.984 0.000
#> GSM125151     1  0.0806     0.9429 0.972 0.000 0.000 0.008 0.020 0.000
#> GSM125153     1  0.2170     0.8882 0.888 0.000 0.000 0.012 0.100 0.000
#> GSM125155     5  0.1957     0.8620 0.112 0.000 0.000 0.000 0.888 0.000
#> GSM125157     5  0.0146     0.9659 0.000 0.000 0.000 0.004 0.996 0.000
#> GSM125159     6  0.1838     0.7800 0.000 0.068 0.000 0.016 0.000 0.916
#> GSM125161     5  0.0547     0.9609 0.000 0.000 0.000 0.020 0.980 0.000
#> GSM125163     6  0.3833     0.2440 0.000 0.444 0.000 0.000 0.000 0.556
#> GSM125165     4  0.4325     0.6941 0.000 0.000 0.064 0.692 0.000 0.244
#> GSM125167     6  0.2312     0.7691 0.000 0.112 0.000 0.012 0.000 0.876
#> GSM125169     6  0.0458     0.7604 0.000 0.000 0.000 0.016 0.000 0.984
#> GSM125171     2  0.2230     0.8582 0.000 0.892 0.084 0.000 0.000 0.024
#> GSM125173     4  0.5416     0.6788 0.000 0.000 0.224 0.580 0.000 0.196
#> GSM125175     2  0.0790     0.9227 0.000 0.968 0.000 0.000 0.000 0.032
#> GSM125177     3  0.0405     0.9150 0.000 0.000 0.988 0.004 0.000 0.008
#> GSM125179     3  0.0146     0.9174 0.000 0.000 0.996 0.004 0.000 0.000
#> GSM125181     4  0.3321     0.7293 0.000 0.000 0.080 0.820 0.000 0.100
#> GSM125183     3  0.0790     0.9046 0.000 0.000 0.968 0.032 0.000 0.000
#> GSM125185     3  0.1957     0.8692 0.000 0.000 0.888 0.112 0.000 0.000
#> GSM125187     3  0.0909     0.9100 0.000 0.000 0.968 0.012 0.020 0.000
#> GSM125189     6  0.1367     0.7801 0.000 0.044 0.000 0.012 0.000 0.944
#> GSM125191     6  0.3757     0.7459 0.000 0.084 0.028 0.076 0.000 0.812
#> GSM125193     4  0.4199     0.7428 0.000 0.000 0.100 0.736 0.000 0.164
#> GSM125195     3  0.0632     0.9161 0.000 0.000 0.976 0.024 0.000 0.000
#> GSM125197     2  0.0937     0.9052 0.000 0.960 0.000 0.040 0.000 0.000
#> GSM125199     5  0.0000     0.9664 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125201     2  0.0713     0.9232 0.000 0.972 0.000 0.000 0.000 0.028
#> GSM125203     3  0.4403     0.0709 0.000 0.000 0.564 0.408 0.000 0.028
#> GSM125205     2  0.0713     0.9232 0.000 0.972 0.000 0.000 0.000 0.028
#> GSM125207     3  0.1957     0.8692 0.000 0.000 0.888 0.112 0.000 0.000
#> GSM125209     6  0.4301     0.5737 0.000 0.000 0.064 0.240 0.000 0.696
#> GSM125211     4  0.3446     0.6065 0.000 0.000 0.000 0.692 0.000 0.308
#> GSM125213     6  0.2744     0.7465 0.000 0.144 0.000 0.016 0.000 0.840
#> GSM125215     2  0.1141     0.9149 0.000 0.948 0.000 0.000 0.000 0.052
#> GSM125217     6  0.0547     0.7589 0.000 0.000 0.000 0.020 0.000 0.980
#> GSM125219     1  0.1148     0.9411 0.960 0.000 0.016 0.004 0.020 0.000
#> GSM125221     4  0.4486     0.7462 0.000 0.000 0.184 0.704 0.000 0.112
#> GSM125223     2  0.0937     0.9052 0.000 0.960 0.000 0.040 0.000 0.000
#> GSM125225     2  0.1501     0.8994 0.000 0.924 0.000 0.000 0.000 0.076
#> GSM125227     2  0.0891     0.9151 0.000 0.968 0.000 0.024 0.000 0.008
#> GSM125229     6  0.3672     0.1305 0.000 0.000 0.000 0.368 0.000 0.632
#> GSM125231     3  0.1204     0.8895 0.000 0.000 0.944 0.056 0.000 0.000
#> GSM125233     1  0.0806     0.9429 0.972 0.000 0.000 0.008 0.020 0.000
#> GSM125235     5  0.0000     0.9664 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125237     5  0.0000     0.9664 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125124     1  0.0260     0.9421 0.992 0.000 0.000 0.008 0.000 0.000
#> GSM125126     5  0.1663     0.8910 0.088 0.000 0.000 0.000 0.912 0.000
#> GSM125128     5  0.0000     0.9664 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125130     1  0.2081     0.9210 0.916 0.000 0.036 0.036 0.012 0.000
#> GSM125132     5  0.0865     0.9560 0.036 0.000 0.000 0.000 0.964 0.000
#> GSM125134     1  0.1092     0.9418 0.960 0.000 0.000 0.020 0.020 0.000
#> GSM125136     5  0.0458     0.9627 0.000 0.000 0.000 0.016 0.984 0.000
#> GSM125138     1  0.0405     0.9428 0.988 0.000 0.000 0.008 0.004 0.000
#> GSM125140     1  0.0806     0.9429 0.972 0.000 0.000 0.008 0.020 0.000
#> GSM125142     1  0.1524     0.9244 0.932 0.000 0.000 0.008 0.060 0.000
#> GSM125144     1  0.0260     0.9421 0.992 0.000 0.000 0.008 0.000 0.000
#> GSM125146     1  0.1297     0.9349 0.948 0.000 0.000 0.012 0.040 0.000
#> GSM125148     5  0.0790     0.9581 0.032 0.000 0.000 0.000 0.968 0.000
#> GSM125150     1  0.2558     0.8303 0.840 0.000 0.000 0.004 0.156 0.000
#> GSM125152     1  0.0909     0.9424 0.968 0.000 0.000 0.012 0.020 0.000
#> GSM125154     1  0.1176     0.9412 0.956 0.000 0.000 0.020 0.024 0.000
#> GSM125156     1  0.0937     0.9443 0.960 0.000 0.000 0.000 0.040 0.000
#> GSM125158     1  0.0692     0.9428 0.976 0.000 0.000 0.004 0.020 0.000
#> GSM125160     6  0.2692     0.7447 0.000 0.148 0.000 0.012 0.000 0.840
#> GSM125162     5  0.0547     0.9609 0.000 0.000 0.000 0.020 0.980 0.000
#> GSM125164     2  0.2573     0.8340 0.000 0.856 0.008 0.004 0.000 0.132
#> GSM125166     2  0.1863     0.8698 0.000 0.896 0.000 0.000 0.000 0.104
#> GSM125168     6  0.6264     0.3400 0.000 0.128 0.328 0.048 0.000 0.496
#> GSM125170     3  0.0603     0.9131 0.000 0.000 0.980 0.016 0.000 0.004
#> GSM125172     2  0.0713     0.9232 0.000 0.972 0.000 0.000 0.000 0.028
#> GSM125174     3  0.0146     0.9174 0.000 0.000 0.996 0.004 0.000 0.000
#> GSM125176     2  0.4642     0.1601 0.000 0.508 0.452 0.000 0.000 0.040
#> GSM125178     3  0.0146     0.9167 0.000 0.000 0.996 0.004 0.000 0.000
#> GSM125180     3  0.0260     0.9168 0.000 0.000 0.992 0.008 0.000 0.000
#> GSM125182     6  0.4638     0.4794 0.000 0.000 0.068 0.296 0.000 0.636
#> GSM125184     3  0.0146     0.9174 0.000 0.000 0.996 0.004 0.000 0.000
#> GSM125186     3  0.1910     0.8723 0.000 0.000 0.892 0.108 0.000 0.000
#> GSM125188     4  0.3307     0.7254 0.000 0.000 0.072 0.820 0.000 0.108
#> GSM125190     6  0.2001     0.7751 0.000 0.044 0.020 0.016 0.000 0.920
#> GSM125192     2  0.1007     0.9189 0.000 0.956 0.000 0.000 0.000 0.044
#> GSM125194     4  0.4510     0.4673 0.008 0.000 0.416 0.556 0.020 0.000
#> GSM125196     3  0.0363     0.9179 0.000 0.000 0.988 0.012 0.000 0.000
#> GSM125198     2  0.0937     0.9052 0.000 0.960 0.000 0.040 0.000 0.000
#> GSM125200     1  0.0692     0.9428 0.976 0.000 0.000 0.004 0.020 0.000
#> GSM125202     2  0.0713     0.9232 0.000 0.972 0.000 0.000 0.000 0.028
#> GSM125204     3  0.1196     0.9106 0.000 0.000 0.952 0.040 0.008 0.000
#> GSM125206     3  0.0146     0.9167 0.000 0.000 0.996 0.004 0.000 0.000
#> GSM125208     3  0.2260     0.8475 0.000 0.000 0.860 0.140 0.000 0.000
#> GSM125210     3  0.1387     0.8976 0.000 0.000 0.932 0.068 0.000 0.000
#> GSM125212     4  0.3797     0.4344 0.000 0.000 0.000 0.580 0.000 0.420
#> GSM125214     2  0.1267     0.9126 0.000 0.940 0.000 0.000 0.000 0.060
#> GSM125216     2  0.0790     0.9227 0.000 0.968 0.000 0.000 0.000 0.032
#> GSM125218     6  0.0547     0.7589 0.000 0.000 0.000 0.020 0.000 0.980
#> GSM125220     5  0.1556     0.8796 0.000 0.000 0.080 0.000 0.920 0.000
#> GSM125222     4  0.3817     0.4770 0.000 0.000 0.432 0.568 0.000 0.000
#> GSM125224     2  0.0937     0.9052 0.000 0.960 0.000 0.040 0.000 0.000
#> GSM125226     6  0.1461     0.7775 0.000 0.044 0.000 0.016 0.000 0.940
#> GSM125228     2  0.0972     0.9138 0.000 0.964 0.000 0.028 0.000 0.008
#> GSM125230     4  0.4391     0.6365 0.000 0.000 0.320 0.644 0.028 0.008
#> GSM125232     3  0.3032     0.7746 0.104 0.000 0.840 0.056 0.000 0.000
#> GSM125234     1  0.4893     0.3862 0.572 0.000 0.356 0.072 0.000 0.000
#> GSM125236     1  0.1478     0.9344 0.944 0.000 0.032 0.004 0.020 0.000
#> GSM125238     5  0.0547     0.9605 0.020 0.000 0.000 0.000 0.980 0.000

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk SD-mclust-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk SD-mclust-collect-classes

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

test_to_known_factors(res)
#>             n agent(p) individual(p) k
#> SD:mclust 116    1.000      6.52e-06 2
#> SD:mclust 108    0.815      1.81e-07 3
#> SD:mclust 105    0.716      2.62e-05 4
#> SD:mclust 114    0.316      4.20e-06 5
#> SD:mclust 106    0.395      3.42e-06 6

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


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

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

collect_plots(res)

plot of chunk SD-NMF-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.894           0.928       0.970         0.5023 0.496   0.496
#> 3 3 0.750           0.832       0.914         0.3090 0.794   0.605
#> 4 4 0.596           0.631       0.794         0.1193 0.887   0.689
#> 5 5 0.658           0.588       0.780         0.0528 0.911   0.699
#> 6 6 0.686           0.573       0.748         0.0320 0.949   0.793

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
#> GSM125123     1  0.0000      0.982 1.000 0.000
#> GSM125125     1  0.0000      0.982 1.000 0.000
#> GSM125127     1  0.0000      0.982 1.000 0.000
#> GSM125129     1  0.0000      0.982 1.000 0.000
#> GSM125131     1  0.0000      0.982 1.000 0.000
#> GSM125133     1  0.0000      0.982 1.000 0.000
#> GSM125135     1  0.0000      0.982 1.000 0.000
#> GSM125137     1  0.0000      0.982 1.000 0.000
#> GSM125139     1  0.0000      0.982 1.000 0.000
#> GSM125141     1  0.0000      0.982 1.000 0.000
#> GSM125143     1  0.0000      0.982 1.000 0.000
#> GSM125145     1  0.0000      0.982 1.000 0.000
#> GSM125147     1  0.0000      0.982 1.000 0.000
#> GSM125149     1  0.0000      0.982 1.000 0.000
#> GSM125151     1  0.0000      0.982 1.000 0.000
#> GSM125153     1  0.0000      0.982 1.000 0.000
#> GSM125155     1  0.0000      0.982 1.000 0.000
#> GSM125157     1  0.0000      0.982 1.000 0.000
#> GSM125159     2  0.0000      0.954 0.000 1.000
#> GSM125161     1  0.0000      0.982 1.000 0.000
#> GSM125163     2  0.0000      0.954 0.000 1.000
#> GSM125165     2  0.0000      0.954 0.000 1.000
#> GSM125167     2  0.0000      0.954 0.000 1.000
#> GSM125169     2  0.0376      0.951 0.004 0.996
#> GSM125171     2  0.0000      0.954 0.000 1.000
#> GSM125173     2  0.0000      0.954 0.000 1.000
#> GSM125175     2  0.0000      0.954 0.000 1.000
#> GSM125177     2  0.0000      0.954 0.000 1.000
#> GSM125179     2  0.9977      0.155 0.472 0.528
#> GSM125181     2  0.0000      0.954 0.000 1.000
#> GSM125183     2  0.9393      0.484 0.356 0.644
#> GSM125185     2  0.0000      0.954 0.000 1.000
#> GSM125187     1  0.1184      0.967 0.984 0.016
#> GSM125189     2  0.0000      0.954 0.000 1.000
#> GSM125191     2  0.0000      0.954 0.000 1.000
#> GSM125193     1  0.0376      0.978 0.996 0.004
#> GSM125195     1  0.7219      0.738 0.800 0.200
#> GSM125197     2  0.0000      0.954 0.000 1.000
#> GSM125199     1  0.0000      0.982 1.000 0.000
#> GSM125201     2  0.0000      0.954 0.000 1.000
#> GSM125203     2  0.9522      0.446 0.372 0.628
#> GSM125205     2  0.0000      0.954 0.000 1.000
#> GSM125207     2  0.0000      0.954 0.000 1.000
#> GSM125209     2  0.0000      0.954 0.000 1.000
#> GSM125211     2  0.0000      0.954 0.000 1.000
#> GSM125213     2  0.0000      0.954 0.000 1.000
#> GSM125215     2  0.0000      0.954 0.000 1.000
#> GSM125217     2  0.0000      0.954 0.000 1.000
#> GSM125219     1  0.0000      0.982 1.000 0.000
#> GSM125221     2  0.7299      0.750 0.204 0.796
#> GSM125223     2  0.0000      0.954 0.000 1.000
#> GSM125225     2  0.0000      0.954 0.000 1.000
#> GSM125227     2  0.0000      0.954 0.000 1.000
#> GSM125229     2  0.0000      0.954 0.000 1.000
#> GSM125231     1  0.0000      0.982 1.000 0.000
#> GSM125233     1  0.0000      0.982 1.000 0.000
#> GSM125235     1  0.0000      0.982 1.000 0.000
#> GSM125237     1  0.0000      0.982 1.000 0.000
#> GSM125124     1  0.0000      0.982 1.000 0.000
#> GSM125126     1  0.0000      0.982 1.000 0.000
#> GSM125128     1  0.0000      0.982 1.000 0.000
#> GSM125130     1  0.0000      0.982 1.000 0.000
#> GSM125132     1  0.0000      0.982 1.000 0.000
#> GSM125134     1  0.0000      0.982 1.000 0.000
#> GSM125136     1  0.0000      0.982 1.000 0.000
#> GSM125138     1  0.0000      0.982 1.000 0.000
#> GSM125140     1  0.0000      0.982 1.000 0.000
#> GSM125142     1  0.0000      0.982 1.000 0.000
#> GSM125144     1  0.0000      0.982 1.000 0.000
#> GSM125146     1  0.0000      0.982 1.000 0.000
#> GSM125148     1  0.0000      0.982 1.000 0.000
#> GSM125150     1  0.0000      0.982 1.000 0.000
#> GSM125152     1  0.0000      0.982 1.000 0.000
#> GSM125154     1  0.0000      0.982 1.000 0.000
#> GSM125156     1  0.0000      0.982 1.000 0.000
#> GSM125158     1  0.0000      0.982 1.000 0.000
#> GSM125160     2  0.0000      0.954 0.000 1.000
#> GSM125162     1  0.0000      0.982 1.000 0.000
#> GSM125164     2  0.0000      0.954 0.000 1.000
#> GSM125166     2  0.0000      0.954 0.000 1.000
#> GSM125168     2  0.0000      0.954 0.000 1.000
#> GSM125170     2  0.0000      0.954 0.000 1.000
#> GSM125172     2  0.0000      0.954 0.000 1.000
#> GSM125174     2  0.2043      0.929 0.032 0.968
#> GSM125176     2  0.0000      0.954 0.000 1.000
#> GSM125178     1  0.9209      0.465 0.664 0.336
#> GSM125180     1  0.6148      0.809 0.848 0.152
#> GSM125182     2  0.0000      0.954 0.000 1.000
#> GSM125184     2  0.0000      0.954 0.000 1.000
#> GSM125186     2  0.9608      0.410 0.384 0.616
#> GSM125188     2  0.0000      0.954 0.000 1.000
#> GSM125190     2  0.0000      0.954 0.000 1.000
#> GSM125192     2  0.0000      0.954 0.000 1.000
#> GSM125194     1  0.0000      0.982 1.000 0.000
#> GSM125196     2  0.7139      0.760 0.196 0.804
#> GSM125198     2  0.0000      0.954 0.000 1.000
#> GSM125200     1  0.0000      0.982 1.000 0.000
#> GSM125202     2  0.0000      0.954 0.000 1.000
#> GSM125204     1  0.7602      0.705 0.780 0.220
#> GSM125206     2  0.6531      0.796 0.168 0.832
#> GSM125208     2  0.8608      0.622 0.284 0.716
#> GSM125210     2  0.0000      0.954 0.000 1.000
#> GSM125212     2  0.0000      0.954 0.000 1.000
#> GSM125214     2  0.0000      0.954 0.000 1.000
#> GSM125216     2  0.0000      0.954 0.000 1.000
#> GSM125218     2  0.0000      0.954 0.000 1.000
#> GSM125220     1  0.0000      0.982 1.000 0.000
#> GSM125222     2  0.4298      0.880 0.088 0.912
#> GSM125224     2  0.0000      0.954 0.000 1.000
#> GSM125226     2  0.0000      0.954 0.000 1.000
#> GSM125228     2  0.0000      0.954 0.000 1.000
#> GSM125230     1  0.2236      0.948 0.964 0.036
#> GSM125232     1  0.0000      0.982 1.000 0.000
#> GSM125234     1  0.0000      0.982 1.000 0.000
#> GSM125236     1  0.0000      0.982 1.000 0.000
#> GSM125238     1  0.0000      0.982 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
#> GSM125123     1  0.4974     0.7363 0.764 0.000 0.236
#> GSM125125     1  0.1163     0.9186 0.972 0.000 0.028
#> GSM125127     1  0.5733     0.5764 0.676 0.000 0.324
#> GSM125129     1  0.3686     0.8461 0.860 0.000 0.140
#> GSM125131     1  0.0000     0.9193 1.000 0.000 0.000
#> GSM125133     1  0.0237     0.9180 0.996 0.000 0.004
#> GSM125135     1  0.1411     0.9163 0.964 0.000 0.036
#> GSM125137     1  0.0237     0.9180 0.996 0.000 0.004
#> GSM125139     1  0.5254     0.6935 0.736 0.000 0.264
#> GSM125141     1  0.0237     0.9201 0.996 0.000 0.004
#> GSM125143     1  0.4887     0.7459 0.772 0.000 0.228
#> GSM125145     1  0.2448     0.8965 0.924 0.000 0.076
#> GSM125147     1  0.0000     0.9193 1.000 0.000 0.000
#> GSM125149     1  0.0237     0.9180 0.996 0.000 0.004
#> GSM125151     3  0.6111     0.3205 0.396 0.000 0.604
#> GSM125153     1  0.1163     0.9182 0.972 0.000 0.028
#> GSM125155     1  0.0747     0.9199 0.984 0.000 0.016
#> GSM125157     1  0.0237     0.9180 0.996 0.000 0.004
#> GSM125159     2  0.0829     0.9178 0.004 0.984 0.012
#> GSM125161     1  0.0475     0.9156 0.992 0.004 0.004
#> GSM125163     2  0.0237     0.9195 0.000 0.996 0.004
#> GSM125165     2  0.1877     0.9125 0.012 0.956 0.032
#> GSM125167     2  0.0829     0.9178 0.004 0.984 0.012
#> GSM125169     2  0.5541     0.6823 0.252 0.740 0.008
#> GSM125171     2  0.0424     0.9193 0.000 0.992 0.008
#> GSM125173     2  0.0747     0.9180 0.000 0.984 0.016
#> GSM125175     2  0.0237     0.9196 0.000 0.996 0.004
#> GSM125177     3  0.6307    -0.0681 0.000 0.488 0.512
#> GSM125179     3  0.0424     0.8658 0.008 0.000 0.992
#> GSM125181     2  0.4233     0.8231 0.004 0.836 0.160
#> GSM125183     3  0.4290     0.8301 0.064 0.064 0.872
#> GSM125185     3  0.1031     0.8593 0.000 0.024 0.976
#> GSM125187     3  0.0424     0.8655 0.008 0.000 0.992
#> GSM125189     2  0.0661     0.9173 0.004 0.988 0.008
#> GSM125191     2  0.2625     0.8848 0.000 0.916 0.084
#> GSM125193     1  0.0661     0.9129 0.988 0.004 0.008
#> GSM125195     3  0.0592     0.8652 0.012 0.000 0.988
#> GSM125197     2  0.0237     0.9196 0.000 0.996 0.004
#> GSM125199     1  0.0237     0.9201 0.996 0.000 0.004
#> GSM125201     2  0.0237     0.9196 0.000 0.996 0.004
#> GSM125203     2  0.8886     0.4264 0.188 0.572 0.240
#> GSM125205     2  0.0237     0.9196 0.000 0.996 0.004
#> GSM125207     3  0.1163     0.8577 0.000 0.028 0.972
#> GSM125209     2  0.4654     0.7720 0.000 0.792 0.208
#> GSM125211     2  0.2804     0.8872 0.060 0.924 0.016
#> GSM125213     2  0.0892     0.9171 0.000 0.980 0.020
#> GSM125215     2  0.0237     0.9196 0.000 0.996 0.004
#> GSM125217     2  0.2280     0.8925 0.052 0.940 0.008
#> GSM125219     1  0.4062     0.8222 0.836 0.000 0.164
#> GSM125221     2  0.6702     0.5614 0.328 0.648 0.024
#> GSM125223     2  0.0237     0.9196 0.000 0.996 0.004
#> GSM125225     2  0.0000     0.9190 0.000 1.000 0.000
#> GSM125227     2  0.0237     0.9196 0.000 0.996 0.004
#> GSM125229     2  0.4808     0.7626 0.188 0.804 0.008
#> GSM125231     3  0.4346     0.7471 0.184 0.000 0.816
#> GSM125233     1  0.5058     0.7234 0.756 0.000 0.244
#> GSM125235     1  0.0000     0.9193 1.000 0.000 0.000
#> GSM125237     1  0.0237     0.9201 0.996 0.000 0.004
#> GSM125124     3  0.2165     0.8436 0.064 0.000 0.936
#> GSM125126     1  0.0747     0.9201 0.984 0.000 0.016
#> GSM125128     1  0.0237     0.9180 0.996 0.000 0.004
#> GSM125130     3  0.2796     0.8248 0.092 0.000 0.908
#> GSM125132     1  0.0237     0.9201 0.996 0.000 0.004
#> GSM125134     1  0.2878     0.8832 0.904 0.000 0.096
#> GSM125136     1  0.0237     0.9180 0.996 0.000 0.004
#> GSM125138     3  0.6111     0.3347 0.396 0.000 0.604
#> GSM125140     1  0.5431     0.6600 0.716 0.000 0.284
#> GSM125142     1  0.1411     0.9161 0.964 0.000 0.036
#> GSM125144     3  0.5016     0.6648 0.240 0.000 0.760
#> GSM125146     1  0.1964     0.9081 0.944 0.000 0.056
#> GSM125148     1  0.0237     0.9201 0.996 0.000 0.004
#> GSM125150     1  0.0747     0.9199 0.984 0.000 0.016
#> GSM125152     3  0.4654     0.7081 0.208 0.000 0.792
#> GSM125154     1  0.3192     0.8720 0.888 0.000 0.112
#> GSM125156     1  0.1643     0.9137 0.956 0.000 0.044
#> GSM125158     1  0.1643     0.9133 0.956 0.000 0.044
#> GSM125160     2  0.0424     0.9191 0.000 0.992 0.008
#> GSM125162     1  0.0475     0.9156 0.992 0.004 0.004
#> GSM125164     2  0.1289     0.9133 0.000 0.968 0.032
#> GSM125166     2  0.0424     0.9194 0.000 0.992 0.008
#> GSM125168     2  0.3551     0.8450 0.000 0.868 0.132
#> GSM125170     2  0.1860     0.9034 0.000 0.948 0.052
#> GSM125172     2  0.0237     0.9196 0.000 0.996 0.004
#> GSM125174     3  0.1411     0.8548 0.000 0.036 0.964
#> GSM125176     2  0.5560     0.6298 0.000 0.700 0.300
#> GSM125178     3  0.4473     0.7665 0.164 0.008 0.828
#> GSM125180     3  0.0424     0.8658 0.008 0.000 0.992
#> GSM125182     2  0.5678     0.6205 0.000 0.684 0.316
#> GSM125184     3  0.1411     0.8538 0.000 0.036 0.964
#> GSM125186     3  0.0237     0.8654 0.004 0.000 0.996
#> GSM125188     2  0.5845     0.6288 0.004 0.688 0.308
#> GSM125190     2  0.1015     0.9153 0.012 0.980 0.008
#> GSM125192     2  0.0747     0.9181 0.000 0.984 0.016
#> GSM125194     1  0.6228     0.3945 0.624 0.004 0.372
#> GSM125196     3  0.0661     0.8650 0.004 0.008 0.988
#> GSM125198     2  0.0237     0.9196 0.000 0.996 0.004
#> GSM125200     1  0.1529     0.9148 0.960 0.000 0.040
#> GSM125202     2  0.0237     0.9196 0.000 0.996 0.004
#> GSM125204     3  0.0848     0.8662 0.008 0.008 0.984
#> GSM125206     3  0.2492     0.8531 0.016 0.048 0.936
#> GSM125208     3  0.0475     0.8658 0.004 0.004 0.992
#> GSM125210     3  0.1753     0.8446 0.000 0.048 0.952
#> GSM125212     2  0.1781     0.9119 0.020 0.960 0.020
#> GSM125214     2  0.0892     0.9172 0.000 0.980 0.020
#> GSM125216     2  0.1163     0.9153 0.000 0.972 0.028
#> GSM125218     2  0.2384     0.8898 0.056 0.936 0.008
#> GSM125220     1  0.0237     0.9180 0.996 0.000 0.004
#> GSM125222     2  0.7717     0.6091 0.112 0.668 0.220
#> GSM125224     2  0.0237     0.9196 0.000 0.996 0.004
#> GSM125226     2  0.0661     0.9173 0.004 0.988 0.008
#> GSM125228     2  0.0237     0.9196 0.000 0.996 0.004
#> GSM125230     3  0.6950     0.1133 0.476 0.016 0.508
#> GSM125232     3  0.0747     0.8646 0.016 0.000 0.984
#> GSM125234     3  0.1289     0.8586 0.032 0.000 0.968
#> GSM125236     1  0.2796     0.8849 0.908 0.000 0.092
#> GSM125238     1  0.0000     0.9193 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
#> GSM125123     1  0.4827    0.72998 0.784 0.000 0.124 0.092
#> GSM125125     1  0.0524    0.84170 0.988 0.000 0.008 0.004
#> GSM125127     1  0.5271    0.49203 0.640 0.000 0.340 0.020
#> GSM125129     1  0.3658    0.77379 0.836 0.000 0.144 0.020
#> GSM125131     1  0.1211    0.84061 0.960 0.000 0.000 0.040
#> GSM125133     1  0.1867    0.83290 0.928 0.000 0.000 0.072
#> GSM125135     1  0.1890    0.82846 0.936 0.000 0.056 0.008
#> GSM125137     1  0.4730    0.51962 0.636 0.000 0.000 0.364
#> GSM125139     1  0.3182    0.80585 0.876 0.000 0.096 0.028
#> GSM125141     1  0.2281    0.82431 0.904 0.000 0.000 0.096
#> GSM125143     1  0.2796    0.81811 0.892 0.000 0.092 0.016
#> GSM125145     1  0.4204    0.72670 0.788 0.000 0.192 0.020
#> GSM125147     1  0.1474    0.83709 0.948 0.000 0.000 0.052
#> GSM125149     1  0.3528    0.75584 0.808 0.000 0.000 0.192
#> GSM125151     1  0.6626    0.14147 0.528 0.000 0.384 0.088
#> GSM125153     1  0.1854    0.83186 0.940 0.000 0.048 0.012
#> GSM125155     1  0.1867    0.83404 0.928 0.000 0.000 0.072
#> GSM125157     1  0.3172    0.78342 0.840 0.000 0.000 0.160
#> GSM125159     4  0.4819    0.37826 0.000 0.344 0.004 0.652
#> GSM125161     1  0.4776    0.49440 0.624 0.000 0.000 0.376
#> GSM125163     2  0.0921    0.80183 0.000 0.972 0.000 0.028
#> GSM125165     4  0.4050    0.65593 0.000 0.168 0.024 0.808
#> GSM125167     2  0.4477    0.53640 0.000 0.688 0.000 0.312
#> GSM125169     2  0.6850    0.37849 0.188 0.600 0.000 0.212
#> GSM125171     2  0.3972    0.65607 0.004 0.816 0.164 0.016
#> GSM125173     2  0.5353    0.25159 0.000 0.556 0.012 0.432
#> GSM125175     2  0.0000    0.80684 0.000 1.000 0.000 0.000
#> GSM125177     3  0.7205    0.10431 0.000 0.172 0.532 0.296
#> GSM125179     3  0.1902    0.63587 0.004 0.000 0.932 0.064
#> GSM125181     4  0.2775    0.64394 0.000 0.020 0.084 0.896
#> GSM125183     4  0.5530    0.40255 0.020 0.004 0.360 0.616
#> GSM125185     3  0.4661    0.40774 0.000 0.000 0.652 0.348
#> GSM125187     4  0.4992    0.01792 0.000 0.000 0.476 0.524
#> GSM125189     2  0.4679    0.47964 0.000 0.648 0.000 0.352
#> GSM125191     2  0.6801   -0.01952 0.000 0.456 0.096 0.448
#> GSM125193     4  0.3400    0.58663 0.180 0.000 0.000 0.820
#> GSM125195     3  0.3853    0.61563 0.020 0.000 0.820 0.160
#> GSM125197     2  0.0000    0.80684 0.000 1.000 0.000 0.000
#> GSM125199     1  0.2081    0.82884 0.916 0.000 0.000 0.084
#> GSM125201     2  0.0000    0.80684 0.000 1.000 0.000 0.000
#> GSM125203     4  0.6795    0.53285 0.016 0.140 0.196 0.648
#> GSM125205     2  0.1182    0.78955 0.000 0.968 0.016 0.016
#> GSM125207     3  0.4817    0.33193 0.000 0.000 0.612 0.388
#> GSM125209     4  0.7176    0.42014 0.000 0.196 0.252 0.552
#> GSM125211     4  0.3324    0.67152 0.012 0.136 0.000 0.852
#> GSM125213     2  0.5420    0.42896 0.000 0.624 0.024 0.352
#> GSM125215     2  0.0188    0.80683 0.000 0.996 0.000 0.004
#> GSM125217     4  0.4677    0.41153 0.004 0.316 0.000 0.680
#> GSM125219     1  0.4171    0.77313 0.828 0.000 0.084 0.088
#> GSM125221     4  0.4664    0.64427 0.128 0.068 0.004 0.800
#> GSM125223     2  0.0000    0.80684 0.000 1.000 0.000 0.000
#> GSM125225     2  0.0921    0.80183 0.000 0.972 0.000 0.028
#> GSM125227     2  0.0000    0.80684 0.000 1.000 0.000 0.000
#> GSM125229     4  0.5428    0.60077 0.140 0.120 0.000 0.740
#> GSM125231     3  0.4833    0.55947 0.228 0.000 0.740 0.032
#> GSM125233     1  0.4205    0.76384 0.820 0.000 0.124 0.056
#> GSM125235     1  0.2149    0.82822 0.912 0.000 0.000 0.088
#> GSM125237     1  0.2408    0.81970 0.896 0.000 0.000 0.104
#> GSM125124     3  0.4019    0.58545 0.196 0.000 0.792 0.012
#> GSM125126     1  0.0336    0.84193 0.992 0.000 0.000 0.008
#> GSM125128     1  0.2149    0.83014 0.912 0.000 0.000 0.088
#> GSM125130     3  0.6037    0.46324 0.304 0.000 0.628 0.068
#> GSM125132     1  0.0592    0.84183 0.984 0.000 0.000 0.016
#> GSM125134     1  0.4775    0.66846 0.740 0.000 0.232 0.028
#> GSM125136     1  0.3764    0.73277 0.784 0.000 0.000 0.216
#> GSM125138     3  0.5708    0.17583 0.416 0.000 0.556 0.028
#> GSM125140     1  0.2868    0.79545 0.864 0.000 0.136 0.000
#> GSM125142     1  0.0779    0.84062 0.980 0.000 0.016 0.004
#> GSM125144     3  0.5643    0.13938 0.428 0.000 0.548 0.024
#> GSM125146     1  0.3991    0.74609 0.808 0.000 0.172 0.020
#> GSM125148     1  0.0000    0.84158 1.000 0.000 0.000 0.000
#> GSM125150     1  0.0000    0.84158 1.000 0.000 0.000 0.000
#> GSM125152     3  0.6000    0.37963 0.356 0.000 0.592 0.052
#> GSM125154     1  0.4163    0.73060 0.792 0.000 0.188 0.020
#> GSM125156     1  0.0376    0.84228 0.992 0.000 0.004 0.004
#> GSM125158     1  0.1118    0.83588 0.964 0.000 0.036 0.000
#> GSM125160     2  0.4661    0.46925 0.000 0.652 0.000 0.348
#> GSM125162     1  0.4624    0.56043 0.660 0.000 0.000 0.340
#> GSM125164     2  0.1970    0.78923 0.000 0.932 0.008 0.060
#> GSM125166     2  0.1022    0.80051 0.000 0.968 0.000 0.032
#> GSM125168     2  0.7015    0.02408 0.000 0.484 0.120 0.396
#> GSM125170     2  0.4638    0.70192 0.000 0.788 0.060 0.152
#> GSM125172     2  0.0000    0.80684 0.000 1.000 0.000 0.000
#> GSM125174     3  0.2611    0.62880 0.008 0.000 0.896 0.096
#> GSM125176     2  0.3810    0.65322 0.000 0.804 0.188 0.008
#> GSM125178     3  0.5769    0.26199 0.036 0.000 0.588 0.376
#> GSM125180     3  0.1356    0.63839 0.008 0.000 0.960 0.032
#> GSM125182     4  0.6488    0.41904 0.000 0.104 0.292 0.604
#> GSM125184     3  0.3340    0.59872 0.004 0.004 0.848 0.144
#> GSM125186     3  0.4431    0.47984 0.000 0.000 0.696 0.304
#> GSM125188     4  0.3392    0.62233 0.000 0.020 0.124 0.856
#> GSM125190     2  0.3528    0.69738 0.000 0.808 0.000 0.192
#> GSM125192     2  0.0657    0.80577 0.000 0.984 0.004 0.012
#> GSM125194     4  0.3991    0.63792 0.120 0.000 0.048 0.832
#> GSM125196     3  0.3219    0.60457 0.000 0.000 0.836 0.164
#> GSM125198     2  0.0000    0.80684 0.000 1.000 0.000 0.000
#> GSM125200     1  0.1004    0.83963 0.972 0.000 0.024 0.004
#> GSM125202     2  0.0524    0.80127 0.000 0.988 0.004 0.008
#> GSM125204     3  0.4677    0.46669 0.000 0.004 0.680 0.316
#> GSM125206     3  0.4266    0.61581 0.040 0.056 0.848 0.056
#> GSM125208     4  0.4992    0.00885 0.000 0.000 0.476 0.524
#> GSM125210     3  0.4164    0.52696 0.000 0.000 0.736 0.264
#> GSM125212     4  0.3538    0.65957 0.004 0.160 0.004 0.832
#> GSM125214     2  0.0376    0.80659 0.000 0.992 0.004 0.004
#> GSM125216     2  0.0336    0.80554 0.000 0.992 0.008 0.000
#> GSM125218     2  0.5155    0.16795 0.004 0.528 0.000 0.468
#> GSM125220     1  0.3649    0.74824 0.796 0.000 0.000 0.204
#> GSM125222     4  0.5692    0.67729 0.024 0.136 0.088 0.752
#> GSM125224     2  0.0000    0.80684 0.000 1.000 0.000 0.000
#> GSM125226     2  0.4679    0.47821 0.000 0.648 0.000 0.352
#> GSM125228     2  0.0000    0.80684 0.000 1.000 0.000 0.000
#> GSM125230     4  0.4785    0.65478 0.080 0.020 0.088 0.812
#> GSM125232     3  0.2443    0.63738 0.024 0.000 0.916 0.060
#> GSM125234     3  0.5435    0.57493 0.204 0.004 0.728 0.064
#> GSM125236     1  0.3160    0.79933 0.872 0.000 0.108 0.020
#> GSM125238     1  0.2216    0.82581 0.908 0.000 0.000 0.092

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM125123     1  0.2538    0.84597 0.900 0.000 0.048 0.004 0.048
#> GSM125125     1  0.0960    0.86397 0.972 0.000 0.008 0.004 0.016
#> GSM125127     1  0.6098    0.41599 0.592 0.008 0.104 0.008 0.288
#> GSM125129     1  0.3065    0.83715 0.872 0.000 0.072 0.008 0.048
#> GSM125131     1  0.0404    0.86547 0.988 0.000 0.000 0.012 0.000
#> GSM125133     1  0.0703    0.86429 0.976 0.000 0.000 0.024 0.000
#> GSM125135     1  0.2938    0.84473 0.880 0.000 0.064 0.008 0.048
#> GSM125137     1  0.4366    0.57990 0.664 0.000 0.016 0.320 0.000
#> GSM125139     1  0.2419    0.85207 0.904 0.000 0.028 0.004 0.064
#> GSM125141     1  0.2172    0.85070 0.908 0.000 0.016 0.076 0.000
#> GSM125143     1  0.3961    0.78239 0.792 0.000 0.160 0.004 0.044
#> GSM125145     1  0.3292    0.81183 0.844 0.000 0.032 0.004 0.120
#> GSM125147     1  0.1205    0.86249 0.956 0.000 0.004 0.040 0.000
#> GSM125149     1  0.1851    0.84584 0.912 0.000 0.000 0.088 0.000
#> GSM125151     1  0.5411    0.58885 0.664 0.000 0.160 0.000 0.176
#> GSM125153     1  0.3558    0.78404 0.816 0.000 0.020 0.008 0.156
#> GSM125155     1  0.1282    0.86450 0.952 0.000 0.000 0.044 0.004
#> GSM125157     1  0.1851    0.84584 0.912 0.000 0.000 0.088 0.000
#> GSM125159     4  0.4386    0.59637 0.000 0.096 0.140 0.764 0.000
#> GSM125161     1  0.5051    0.58380 0.664 0.000 0.072 0.264 0.000
#> GSM125163     2  0.1671    0.76587 0.000 0.924 0.000 0.076 0.000
#> GSM125165     4  0.3070    0.59851 0.004 0.088 0.008 0.872 0.028
#> GSM125167     2  0.4689    0.34115 0.000 0.592 0.008 0.392 0.008
#> GSM125169     2  0.6908    0.26093 0.160 0.516 0.020 0.296 0.008
#> GSM125171     2  0.1743    0.77010 0.004 0.940 0.028 0.000 0.028
#> GSM125173     4  0.5705    0.42240 0.000 0.288 0.024 0.624 0.064
#> GSM125175     2  0.0290    0.78549 0.000 0.992 0.000 0.008 0.000
#> GSM125177     3  0.6083    0.36463 0.000 0.024 0.608 0.104 0.264
#> GSM125179     5  0.2863    0.49533 0.000 0.000 0.064 0.060 0.876
#> GSM125181     4  0.3437    0.51730 0.000 0.012 0.176 0.808 0.004
#> GSM125183     5  0.5267    0.09762 0.000 0.008 0.032 0.428 0.532
#> GSM125185     3  0.6262    0.50008 0.000 0.000 0.520 0.176 0.304
#> GSM125187     3  0.6530    0.20722 0.000 0.000 0.424 0.380 0.196
#> GSM125189     2  0.4452    0.04190 0.000 0.500 0.004 0.496 0.000
#> GSM125191     2  0.6873   -0.13302 0.000 0.400 0.220 0.372 0.008
#> GSM125193     4  0.4101    0.53262 0.048 0.000 0.184 0.768 0.000
#> GSM125195     3  0.3459    0.60039 0.000 0.016 0.832 0.016 0.136
#> GSM125197     2  0.1544    0.76017 0.000 0.932 0.068 0.000 0.000
#> GSM125199     1  0.1121    0.86163 0.956 0.000 0.000 0.044 0.000
#> GSM125201     2  0.2707    0.70596 0.000 0.860 0.132 0.008 0.000
#> GSM125203     3  0.3269    0.48978 0.016 0.020 0.852 0.112 0.000
#> GSM125205     2  0.3475    0.65205 0.000 0.804 0.180 0.004 0.012
#> GSM125207     3  0.4930    0.56694 0.000 0.000 0.716 0.144 0.140
#> GSM125209     4  0.6849    0.13474 0.000 0.148 0.404 0.424 0.024
#> GSM125211     4  0.4000    0.53430 0.004 0.004 0.224 0.756 0.012
#> GSM125213     2  0.6270    0.09664 0.000 0.496 0.136 0.364 0.004
#> GSM125215     2  0.1281    0.78444 0.000 0.956 0.032 0.012 0.000
#> GSM125217     4  0.3639    0.59698 0.008 0.164 0.020 0.808 0.000
#> GSM125219     1  0.3346    0.82263 0.848 0.000 0.108 0.008 0.036
#> GSM125221     4  0.3412    0.58994 0.024 0.080 0.012 0.864 0.020
#> GSM125223     2  0.0703    0.78058 0.000 0.976 0.024 0.000 0.000
#> GSM125225     2  0.1544    0.77038 0.000 0.932 0.000 0.068 0.000
#> GSM125227     2  0.0693    0.78590 0.000 0.980 0.008 0.012 0.000
#> GSM125229     4  0.5101    0.43916 0.040 0.012 0.296 0.652 0.000
#> GSM125231     5  0.3491    0.49386 0.028 0.000 0.124 0.012 0.836
#> GSM125233     1  0.3880    0.78378 0.800 0.000 0.152 0.004 0.044
#> GSM125235     1  0.0963    0.86299 0.964 0.000 0.000 0.036 0.000
#> GSM125237     1  0.1478    0.85571 0.936 0.000 0.000 0.064 0.000
#> GSM125124     5  0.1918    0.52729 0.036 0.000 0.036 0.000 0.928
#> GSM125126     1  0.0324    0.86502 0.992 0.000 0.000 0.004 0.004
#> GSM125128     1  0.1915    0.85791 0.928 0.000 0.040 0.032 0.000
#> GSM125130     3  0.6635    0.22961 0.220 0.000 0.480 0.004 0.296
#> GSM125132     1  0.0162    0.86520 0.996 0.000 0.000 0.000 0.004
#> GSM125134     5  0.4971    0.00364 0.472 0.000 0.020 0.004 0.504
#> GSM125136     1  0.2448    0.83713 0.892 0.000 0.020 0.088 0.000
#> GSM125138     5  0.3863    0.50786 0.176 0.000 0.020 0.012 0.792
#> GSM125140     1  0.3037    0.83085 0.864 0.000 0.032 0.004 0.100
#> GSM125142     1  0.3503    0.80070 0.828 0.000 0.016 0.016 0.140
#> GSM125144     5  0.4113    0.46294 0.232 0.000 0.028 0.000 0.740
#> GSM125146     1  0.3935    0.73056 0.772 0.000 0.024 0.004 0.200
#> GSM125148     1  0.0854    0.86594 0.976 0.000 0.008 0.004 0.012
#> GSM125150     1  0.0671    0.86451 0.980 0.000 0.004 0.000 0.016
#> GSM125152     1  0.6225    0.11891 0.484 0.000 0.148 0.000 0.368
#> GSM125154     5  0.5278    0.21477 0.408 0.000 0.024 0.016 0.552
#> GSM125156     1  0.1278    0.86781 0.960 0.000 0.004 0.016 0.020
#> GSM125158     1  0.1285    0.85915 0.956 0.000 0.004 0.004 0.036
#> GSM125160     4  0.5741    0.34241 0.000 0.360 0.096 0.544 0.000
#> GSM125162     1  0.4496    0.67575 0.728 0.000 0.056 0.216 0.000
#> GSM125164     2  0.2894    0.73008 0.000 0.860 0.008 0.124 0.008
#> GSM125166     2  0.3323    0.72496 0.000 0.844 0.004 0.116 0.036
#> GSM125168     4  0.7216    0.17882 0.000 0.304 0.016 0.352 0.328
#> GSM125170     5  0.6918   -0.10507 0.000 0.388 0.016 0.188 0.408
#> GSM125172     2  0.0968    0.78631 0.000 0.972 0.012 0.012 0.004
#> GSM125174     5  0.1894    0.52118 0.000 0.000 0.008 0.072 0.920
#> GSM125176     2  0.4003    0.68002 0.000 0.796 0.012 0.036 0.156
#> GSM125178     3  0.6386    0.23809 0.000 0.000 0.480 0.180 0.340
#> GSM125180     5  0.3037    0.46470 0.000 0.000 0.100 0.040 0.860
#> GSM125182     4  0.5700    0.06381 0.000 0.052 0.460 0.476 0.012
#> GSM125184     5  0.2625    0.49465 0.000 0.000 0.016 0.108 0.876
#> GSM125186     3  0.6099    0.48202 0.000 0.000 0.512 0.136 0.352
#> GSM125188     4  0.4227    0.20956 0.000 0.000 0.420 0.580 0.000
#> GSM125190     2  0.6054    0.19011 0.000 0.500 0.016 0.408 0.076
#> GSM125192     2  0.1764    0.77061 0.000 0.928 0.000 0.064 0.008
#> GSM125194     4  0.3224    0.55312 0.016 0.000 0.160 0.824 0.000
#> GSM125196     3  0.3548    0.59254 0.000 0.012 0.796 0.004 0.188
#> GSM125198     2  0.1270    0.76856 0.000 0.948 0.052 0.000 0.000
#> GSM125200     1  0.0880    0.86214 0.968 0.000 0.000 0.000 0.032
#> GSM125202     2  0.2036    0.75919 0.000 0.920 0.056 0.000 0.024
#> GSM125204     3  0.2798    0.56039 0.008 0.000 0.888 0.060 0.044
#> GSM125206     3  0.5511    0.35667 0.004 0.056 0.632 0.012 0.296
#> GSM125208     3  0.4221    0.44104 0.000 0.000 0.732 0.236 0.032
#> GSM125210     3  0.6190    0.40424 0.000 0.000 0.444 0.136 0.420
#> GSM125212     4  0.4190    0.51816 0.000 0.008 0.256 0.724 0.012
#> GSM125214     2  0.0671    0.78567 0.000 0.980 0.004 0.016 0.000
#> GSM125216     2  0.0579    0.78621 0.000 0.984 0.008 0.008 0.000
#> GSM125218     4  0.4321    0.21654 0.000 0.396 0.004 0.600 0.000
#> GSM125220     1  0.2361    0.83804 0.892 0.000 0.012 0.096 0.000
#> GSM125222     4  0.5932    0.46289 0.008 0.100 0.020 0.656 0.216
#> GSM125224     2  0.0671    0.78396 0.000 0.980 0.016 0.004 0.000
#> GSM125226     2  0.5008    0.12461 0.000 0.500 0.012 0.476 0.012
#> GSM125228     2  0.0510    0.78473 0.000 0.984 0.000 0.016 0.000
#> GSM125230     4  0.4513    0.47446 0.000 0.004 0.284 0.688 0.024
#> GSM125232     5  0.1836    0.51915 0.000 0.000 0.036 0.032 0.932
#> GSM125234     3  0.6140    0.29116 0.096 0.004 0.460 0.004 0.436
#> GSM125236     1  0.2589    0.84545 0.900 0.000 0.044 0.008 0.048
#> GSM125238     1  0.1830    0.85521 0.924 0.000 0.008 0.068 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
#> GSM125123     1  0.1949     0.8380 0.904 0.000 0.000 0.004 0.004 0.088
#> GSM125125     1  0.0363     0.8607 0.988 0.000 0.000 0.000 0.000 0.012
#> GSM125127     1  0.4973     0.6684 0.708 0.000 0.004 0.172 0.080 0.036
#> GSM125129     1  0.2271     0.8417 0.904 0.000 0.004 0.004 0.032 0.056
#> GSM125131     1  0.0000     0.8607 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125133     1  0.0405     0.8609 0.988 0.000 0.004 0.000 0.008 0.000
#> GSM125135     1  0.2503     0.8432 0.900 0.000 0.044 0.012 0.032 0.012
#> GSM125137     1  0.5849     0.4149 0.552 0.000 0.280 0.008 0.152 0.008
#> GSM125139     1  0.1370     0.8599 0.948 0.000 0.000 0.012 0.004 0.036
#> GSM125141     1  0.3075     0.8079 0.840 0.000 0.004 0.016 0.128 0.012
#> GSM125143     1  0.3952     0.7340 0.756 0.000 0.012 0.012 0.016 0.204
#> GSM125145     1  0.2532     0.8277 0.884 0.000 0.000 0.080 0.024 0.012
#> GSM125147     1  0.0870     0.8615 0.972 0.000 0.000 0.004 0.012 0.012
#> GSM125149     1  0.2122     0.8398 0.900 0.000 0.008 0.000 0.084 0.008
#> GSM125151     1  0.3833     0.5802 0.648 0.000 0.000 0.008 0.000 0.344
#> GSM125153     1  0.4537     0.3473 0.572 0.000 0.004 0.400 0.016 0.008
#> GSM125155     1  0.0976     0.8623 0.968 0.000 0.016 0.000 0.008 0.008
#> GSM125157     1  0.1226     0.8562 0.952 0.000 0.004 0.000 0.040 0.004
#> GSM125159     3  0.4282     0.4534 0.000 0.072 0.724 0.000 0.200 0.004
#> GSM125161     1  0.5190     0.3023 0.524 0.000 0.392 0.000 0.080 0.004
#> GSM125163     2  0.2730     0.5491 0.000 0.808 0.000 0.000 0.192 0.000
#> GSM125165     5  0.4479     0.4473 0.000 0.064 0.180 0.024 0.732 0.000
#> GSM125167     2  0.3854    -0.2516 0.000 0.536 0.000 0.000 0.464 0.000
#> GSM125169     5  0.4870     0.4033 0.048 0.436 0.000 0.000 0.512 0.004
#> GSM125171     2  0.2400     0.6759 0.004 0.904 0.008 0.032 0.048 0.004
#> GSM125173     3  0.7247     0.0580 0.000 0.112 0.360 0.196 0.332 0.000
#> GSM125175     2  0.1010     0.6997 0.000 0.960 0.000 0.004 0.036 0.000
#> GSM125177     3  0.5904     0.4586 0.000 0.060 0.668 0.052 0.156 0.064
#> GSM125179     4  0.4008     0.7052 0.000 0.000 0.004 0.768 0.100 0.128
#> GSM125181     5  0.5909     0.2441 0.000 0.028 0.188 0.000 0.576 0.208
#> GSM125183     4  0.4533     0.2295 0.000 0.004 0.024 0.504 0.468 0.000
#> GSM125185     6  0.2882     0.5838 0.000 0.000 0.004 0.028 0.120 0.848
#> GSM125187     6  0.4210     0.4377 0.000 0.004 0.008 0.008 0.344 0.636
#> GSM125189     2  0.4179    -0.3124 0.000 0.516 0.012 0.000 0.472 0.000
#> GSM125191     2  0.6254    -0.3739 0.000 0.400 0.012 0.000 0.368 0.220
#> GSM125193     3  0.5605     0.4030 0.028 0.000 0.568 0.000 0.312 0.092
#> GSM125195     6  0.5794     0.4434 0.004 0.028 0.136 0.020 0.156 0.656
#> GSM125197     2  0.2306     0.6540 0.000 0.888 0.016 0.000 0.092 0.004
#> GSM125199     1  0.0603     0.8612 0.980 0.000 0.004 0.000 0.016 0.000
#> GSM125201     2  0.4724     0.4995 0.000 0.724 0.084 0.008 0.168 0.016
#> GSM125203     6  0.6850     0.0398 0.020 0.040 0.392 0.000 0.152 0.396
#> GSM125205     2  0.5480     0.4338 0.000 0.668 0.088 0.024 0.196 0.024
#> GSM125207     6  0.3859     0.3998 0.000 0.000 0.292 0.008 0.008 0.692
#> GSM125209     6  0.5943     0.1489 0.000 0.136 0.016 0.004 0.324 0.520
#> GSM125211     3  0.0951     0.5916 0.004 0.000 0.968 0.008 0.020 0.000
#> GSM125213     2  0.5992    -0.0978 0.000 0.532 0.024 0.000 0.288 0.156
#> GSM125215     2  0.0363     0.7072 0.000 0.988 0.000 0.000 0.012 0.000
#> GSM125217     5  0.6165     0.3780 0.004 0.220 0.332 0.000 0.440 0.004
#> GSM125219     1  0.3073     0.7478 0.788 0.000 0.000 0.000 0.008 0.204
#> GSM125221     5  0.4967     0.5781 0.020 0.144 0.104 0.008 0.720 0.004
#> GSM125223     2  0.0632     0.7029 0.000 0.976 0.000 0.000 0.024 0.000
#> GSM125225     2  0.2378     0.6066 0.000 0.848 0.000 0.000 0.152 0.000
#> GSM125227     2  0.0508     0.7072 0.000 0.984 0.004 0.000 0.012 0.000
#> GSM125229     3  0.1396     0.5858 0.008 0.012 0.952 0.000 0.024 0.004
#> GSM125231     4  0.2854     0.7425 0.000 0.004 0.048 0.876 0.056 0.016
#> GSM125233     1  0.3758     0.6000 0.668 0.000 0.000 0.000 0.008 0.324
#> GSM125235     1  0.0551     0.8611 0.984 0.000 0.004 0.000 0.008 0.004
#> GSM125237     1  0.0653     0.8614 0.980 0.000 0.004 0.000 0.012 0.004
#> GSM125124     4  0.1982     0.7869 0.016 0.000 0.000 0.912 0.004 0.068
#> GSM125126     1  0.0291     0.8614 0.992 0.000 0.000 0.000 0.004 0.004
#> GSM125128     1  0.0717     0.8631 0.976 0.000 0.016 0.000 0.008 0.000
#> GSM125130     6  0.3876     0.3668 0.244 0.000 0.000 0.016 0.012 0.728
#> GSM125132     1  0.0146     0.8609 0.996 0.000 0.004 0.000 0.000 0.000
#> GSM125134     4  0.3830     0.5205 0.280 0.000 0.004 0.704 0.004 0.008
#> GSM125136     1  0.2128     0.8428 0.908 0.000 0.056 0.000 0.032 0.004
#> GSM125138     4  0.1148     0.7910 0.020 0.000 0.000 0.960 0.016 0.004
#> GSM125140     1  0.1275     0.8609 0.956 0.000 0.000 0.012 0.016 0.016
#> GSM125142     1  0.4915     0.5568 0.652 0.000 0.004 0.264 0.072 0.008
#> GSM125144     4  0.2361     0.7485 0.104 0.000 0.000 0.880 0.004 0.012
#> GSM125146     1  0.4502     0.3933 0.588 0.000 0.004 0.384 0.016 0.008
#> GSM125148     1  0.1729     0.8526 0.936 0.000 0.004 0.036 0.012 0.012
#> GSM125150     1  0.0291     0.8614 0.992 0.000 0.000 0.000 0.004 0.004
#> GSM125152     1  0.4555     0.5231 0.616 0.000 0.000 0.040 0.004 0.340
#> GSM125154     4  0.3698     0.7090 0.108 0.000 0.008 0.812 0.064 0.008
#> GSM125156     1  0.1010     0.8613 0.960 0.000 0.036 0.000 0.000 0.004
#> GSM125158     1  0.0405     0.8610 0.988 0.000 0.000 0.008 0.000 0.004
#> GSM125160     3  0.5771    -0.0783 0.000 0.352 0.484 0.000 0.160 0.004
#> GSM125162     1  0.4704     0.5272 0.632 0.000 0.304 0.000 0.060 0.004
#> GSM125164     2  0.3499     0.2727 0.000 0.680 0.000 0.000 0.320 0.000
#> GSM125166     2  0.3629     0.3995 0.000 0.724 0.000 0.016 0.260 0.000
#> GSM125168     5  0.6359     0.4541 0.000 0.296 0.012 0.292 0.400 0.000
#> GSM125170     5  0.5925     0.5012 0.004 0.352 0.000 0.164 0.476 0.004
#> GSM125172     2  0.1116     0.7025 0.000 0.960 0.008 0.004 0.028 0.000
#> GSM125174     4  0.1643     0.7847 0.000 0.000 0.000 0.924 0.068 0.008
#> GSM125176     2  0.4301     0.5443 0.000 0.760 0.000 0.124 0.096 0.020
#> GSM125178     3  0.5214     0.4735 0.000 0.008 0.680 0.204 0.072 0.036
#> GSM125180     4  0.3596     0.6638 0.000 0.000 0.004 0.748 0.016 0.232
#> GSM125182     6  0.5715     0.3685 0.000 0.040 0.068 0.004 0.328 0.560
#> GSM125184     4  0.2485     0.7775 0.000 0.000 0.008 0.884 0.084 0.024
#> GSM125186     6  0.2964     0.5816 0.000 0.000 0.004 0.040 0.108 0.848
#> GSM125188     6  0.5650     0.3516 0.000 0.000 0.168 0.000 0.332 0.500
#> GSM125190     5  0.4452     0.5729 0.004 0.328 0.000 0.028 0.636 0.004
#> GSM125192     2  0.2053     0.6522 0.000 0.888 0.000 0.004 0.108 0.000
#> GSM125194     3  0.5414     0.3151 0.004 0.000 0.500 0.028 0.424 0.044
#> GSM125196     6  0.4845     0.4850 0.000 0.008 0.120 0.024 0.120 0.728
#> GSM125198     2  0.2162     0.6599 0.000 0.896 0.012 0.000 0.088 0.004
#> GSM125200     1  0.0260     0.8607 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM125202     2  0.3551     0.5901 0.000 0.812 0.028 0.012 0.140 0.008
#> GSM125204     6  0.4922     0.4600 0.004 0.008 0.196 0.004 0.096 0.692
#> GSM125206     3  0.8661     0.1592 0.000 0.120 0.292 0.256 0.200 0.132
#> GSM125208     3  0.4325     0.0333 0.000 0.000 0.524 0.000 0.020 0.456
#> GSM125210     6  0.4199     0.5601 0.000 0.004 0.004 0.088 0.148 0.756
#> GSM125212     3  0.1026     0.5918 0.000 0.004 0.968 0.008 0.012 0.008
#> GSM125214     2  0.1007     0.6968 0.000 0.956 0.000 0.000 0.044 0.000
#> GSM125216     2  0.0458     0.7059 0.000 0.984 0.000 0.000 0.016 0.000
#> GSM125218     5  0.4468     0.3133 0.004 0.484 0.020 0.000 0.492 0.000
#> GSM125220     1  0.1812     0.8453 0.912 0.000 0.008 0.000 0.080 0.000
#> GSM125222     5  0.5267     0.5636 0.004 0.132 0.016 0.156 0.684 0.008
#> GSM125224     2  0.0260     0.7069 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM125226     5  0.3930     0.4609 0.000 0.420 0.004 0.000 0.576 0.000
#> GSM125228     2  0.0790     0.7040 0.000 0.968 0.000 0.000 0.032 0.000
#> GSM125230     3  0.1434     0.5910 0.000 0.000 0.948 0.020 0.024 0.008
#> GSM125232     4  0.1180     0.7877 0.000 0.000 0.012 0.960 0.012 0.016
#> GSM125234     6  0.4425     0.4635 0.124 0.004 0.000 0.088 0.024 0.760
#> GSM125236     1  0.1448     0.8565 0.948 0.000 0.000 0.012 0.016 0.024
#> GSM125238     1  0.2014     0.8509 0.920 0.000 0.008 0.008 0.052 0.012

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk SD-NMF-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk SD-NMF-collect-classes

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

test_to_known_factors(res)
#>          n agent(p) individual(p) k
#> SD:NMF 111    1.000      1.13e-04 2
#> SD:NMF 110    0.101      8.84e-06 3
#> SD:NMF  87    0.304      7.78e-06 4
#> SD:NMF  78    0.110      1.68e-05 5
#> SD:NMF  76    0.298      7.38e-09 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 21168 rows and 116 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#>   Subgroups are detected by 'hclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 4.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk CV-hclust-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.658           0.913       0.943         0.4843 0.505   0.505
#> 3 3 0.882           0.916       0.936         0.3266 0.838   0.680
#> 4 4 0.954           0.920       0.953         0.0430 0.966   0.905
#> 5 5 0.787           0.818       0.859         0.0828 0.991   0.973
#> 6 6 0.791           0.531       0.808         0.0386 0.963   0.886

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

suggest_best_k(res)
#> [1] 4

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

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

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM125123     1  0.0000      0.984 1.000 0.000
#> GSM125125     1  0.0000      0.984 1.000 0.000
#> GSM125127     1  0.0000      0.984 1.000 0.000
#> GSM125129     1  0.0000      0.984 1.000 0.000
#> GSM125131     1  0.0000      0.984 1.000 0.000
#> GSM125133     1  0.0000      0.984 1.000 0.000
#> GSM125135     1  0.0000      0.984 1.000 0.000
#> GSM125137     1  0.0000      0.984 1.000 0.000
#> GSM125139     1  0.0000      0.984 1.000 0.000
#> GSM125141     1  0.0000      0.984 1.000 0.000
#> GSM125143     1  0.0000      0.984 1.000 0.000
#> GSM125145     1  0.0000      0.984 1.000 0.000
#> GSM125147     1  0.0000      0.984 1.000 0.000
#> GSM125149     1  0.0000      0.984 1.000 0.000
#> GSM125151     1  0.0000      0.984 1.000 0.000
#> GSM125153     1  0.0000      0.984 1.000 0.000
#> GSM125155     1  0.0000      0.984 1.000 0.000
#> GSM125157     1  0.0000      0.984 1.000 0.000
#> GSM125159     2  0.0000      0.905 0.000 1.000
#> GSM125161     1  0.0000      0.984 1.000 0.000
#> GSM125163     2  0.0000      0.905 0.000 1.000
#> GSM125165     2  0.5737      0.882 0.136 0.864
#> GSM125167     2  0.0376      0.905 0.004 0.996
#> GSM125169     2  0.0000      0.905 0.000 1.000
#> GSM125171     2  0.0000      0.905 0.000 1.000
#> GSM125173     2  0.4431      0.893 0.092 0.908
#> GSM125175     2  0.0000      0.905 0.000 1.000
#> GSM125177     2  0.7674      0.827 0.224 0.776
#> GSM125179     2  0.6712      0.864 0.176 0.824
#> GSM125181     2  0.4562      0.893 0.096 0.904
#> GSM125183     2  0.6531      0.868 0.168 0.832
#> GSM125185     2  0.6712      0.864 0.176 0.824
#> GSM125187     2  0.6623      0.866 0.172 0.828
#> GSM125189     2  0.0000      0.905 0.000 1.000
#> GSM125191     2  0.2603      0.901 0.044 0.956
#> GSM125193     2  0.7674      0.827 0.224 0.776
#> GSM125195     2  0.7883      0.815 0.236 0.764
#> GSM125197     2  0.0000      0.905 0.000 1.000
#> GSM125199     1  0.0000      0.984 1.000 0.000
#> GSM125201     2  0.0000      0.905 0.000 1.000
#> GSM125203     2  0.7674      0.827 0.224 0.776
#> GSM125205     2  0.0000      0.905 0.000 1.000
#> GSM125207     2  0.7815      0.819 0.232 0.768
#> GSM125209     2  0.5946      0.879 0.144 0.856
#> GSM125211     2  0.7815      0.819 0.232 0.768
#> GSM125213     2  0.0000      0.905 0.000 1.000
#> GSM125215     2  0.0000      0.905 0.000 1.000
#> GSM125217     2  0.0000      0.905 0.000 1.000
#> GSM125219     1  0.0000      0.984 1.000 0.000
#> GSM125221     2  0.6048      0.877 0.148 0.852
#> GSM125223     2  0.0000      0.905 0.000 1.000
#> GSM125225     2  0.0000      0.905 0.000 1.000
#> GSM125227     2  0.0000      0.905 0.000 1.000
#> GSM125229     2  0.7815      0.819 0.232 0.768
#> GSM125231     1  0.9248      0.363 0.660 0.340
#> GSM125233     1  0.0000      0.984 1.000 0.000
#> GSM125235     1  0.0000      0.984 1.000 0.000
#> GSM125237     1  0.0000      0.984 1.000 0.000
#> GSM125124     1  0.0000      0.984 1.000 0.000
#> GSM125126     1  0.0000      0.984 1.000 0.000
#> GSM125128     1  0.0000      0.984 1.000 0.000
#> GSM125130     1  0.0000      0.984 1.000 0.000
#> GSM125132     1  0.0000      0.984 1.000 0.000
#> GSM125134     1  0.0000      0.984 1.000 0.000
#> GSM125136     1  0.0000      0.984 1.000 0.000
#> GSM125138     1  0.0000      0.984 1.000 0.000
#> GSM125140     1  0.0000      0.984 1.000 0.000
#> GSM125142     1  0.0000      0.984 1.000 0.000
#> GSM125144     1  0.0000      0.984 1.000 0.000
#> GSM125146     1  0.0000      0.984 1.000 0.000
#> GSM125148     1  0.0000      0.984 1.000 0.000
#> GSM125150     1  0.0000      0.984 1.000 0.000
#> GSM125152     1  0.0000      0.984 1.000 0.000
#> GSM125154     1  0.0000      0.984 1.000 0.000
#> GSM125156     1  0.0000      0.984 1.000 0.000
#> GSM125158     1  0.0000      0.984 1.000 0.000
#> GSM125160     2  0.0000      0.905 0.000 1.000
#> GSM125162     1  0.0000      0.984 1.000 0.000
#> GSM125164     2  0.0000      0.905 0.000 1.000
#> GSM125166     2  0.0000      0.905 0.000 1.000
#> GSM125168     2  0.0376      0.905 0.004 0.996
#> GSM125170     2  0.0000      0.905 0.000 1.000
#> GSM125172     2  0.0000      0.905 0.000 1.000
#> GSM125174     2  0.4431      0.893 0.092 0.908
#> GSM125176     2  0.0000      0.905 0.000 1.000
#> GSM125178     2  0.7674      0.827 0.224 0.776
#> GSM125180     2  0.6712      0.864 0.176 0.824
#> GSM125182     2  0.4562      0.893 0.096 0.904
#> GSM125184     2  0.6531      0.868 0.168 0.832
#> GSM125186     2  0.6712      0.864 0.176 0.824
#> GSM125188     2  0.5178      0.888 0.116 0.884
#> GSM125190     2  0.0000      0.905 0.000 1.000
#> GSM125192     2  0.0000      0.905 0.000 1.000
#> GSM125194     2  0.7674      0.827 0.224 0.776
#> GSM125196     2  0.7883      0.815 0.236 0.764
#> GSM125198     2  0.0000      0.905 0.000 1.000
#> GSM125200     1  0.0000      0.984 1.000 0.000
#> GSM125202     2  0.0000      0.905 0.000 1.000
#> GSM125204     2  0.7674      0.827 0.224 0.776
#> GSM125206     2  0.7883      0.815 0.236 0.764
#> GSM125208     2  0.7815      0.819 0.232 0.768
#> GSM125210     2  0.5946      0.879 0.144 0.856
#> GSM125212     2  0.7815      0.819 0.232 0.768
#> GSM125214     2  0.0000      0.905 0.000 1.000
#> GSM125216     2  0.0000      0.905 0.000 1.000
#> GSM125218     2  0.0000      0.905 0.000 1.000
#> GSM125220     1  0.0000      0.984 1.000 0.000
#> GSM125222     2  0.6048      0.877 0.148 0.852
#> GSM125224     2  0.0000      0.905 0.000 1.000
#> GSM125226     2  0.0672      0.905 0.008 0.992
#> GSM125228     2  0.0000      0.905 0.000 1.000
#> GSM125230     2  0.8016      0.805 0.244 0.756
#> GSM125232     1  0.9170      0.387 0.668 0.332
#> GSM125234     1  0.0000      0.984 1.000 0.000
#> GSM125236     1  0.0000      0.984 1.000 0.000
#> GSM125238     1  0.0000      0.984 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
#> GSM125123     1  0.0237     0.9696 0.996 0.000 0.004
#> GSM125125     1  0.0237     0.9696 0.996 0.000 0.004
#> GSM125127     1  0.1289     0.9591 0.968 0.000 0.032
#> GSM125129     1  0.0892     0.9641 0.980 0.000 0.020
#> GSM125131     1  0.0000     0.9701 1.000 0.000 0.000
#> GSM125133     1  0.0892     0.9660 0.980 0.000 0.020
#> GSM125135     1  0.1411     0.9587 0.964 0.000 0.036
#> GSM125137     1  0.0892     0.9614 0.980 0.000 0.020
#> GSM125139     1  0.0000     0.9701 1.000 0.000 0.000
#> GSM125141     1  0.0000     0.9701 1.000 0.000 0.000
#> GSM125143     1  0.0892     0.9641 0.980 0.000 0.020
#> GSM125145     1  0.1289     0.9605 0.968 0.000 0.032
#> GSM125147     1  0.0000     0.9701 1.000 0.000 0.000
#> GSM125149     1  0.0000     0.9701 1.000 0.000 0.000
#> GSM125151     1  0.0000     0.9701 1.000 0.000 0.000
#> GSM125153     1  0.0237     0.9695 0.996 0.000 0.004
#> GSM125155     1  0.0000     0.9701 1.000 0.000 0.000
#> GSM125157     1  0.0000     0.9701 1.000 0.000 0.000
#> GSM125159     2  0.1031     0.9415 0.000 0.976 0.024
#> GSM125161     1  0.1163     0.9569 0.972 0.000 0.028
#> GSM125163     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125165     3  0.5610     0.8661 0.028 0.196 0.776
#> GSM125167     2  0.1643     0.9244 0.000 0.956 0.044
#> GSM125169     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125171     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125173     2  0.6912     0.2368 0.016 0.540 0.444
#> GSM125175     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125177     3  0.4087     0.9302 0.068 0.052 0.880
#> GSM125179     3  0.5067     0.9301 0.052 0.116 0.832
#> GSM125181     3  0.4784     0.8545 0.004 0.200 0.796
#> GSM125183     3  0.4930     0.9293 0.044 0.120 0.836
#> GSM125185     3  0.5067     0.9301 0.052 0.116 0.832
#> GSM125187     3  0.5105     0.9278 0.048 0.124 0.828
#> GSM125189     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125191     2  0.6445     0.4390 0.020 0.672 0.308
#> GSM125193     3  0.4189     0.9304 0.068 0.056 0.876
#> GSM125195     3  0.3764     0.9249 0.068 0.040 0.892
#> GSM125197     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125199     1  0.0000     0.9701 1.000 0.000 0.000
#> GSM125201     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125203     3  0.4087     0.9302 0.068 0.052 0.880
#> GSM125205     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125207     3  0.4165     0.9262 0.076 0.048 0.876
#> GSM125209     3  0.4995     0.9158 0.032 0.144 0.824
#> GSM125211     3  0.3155     0.9209 0.044 0.040 0.916
#> GSM125213     2  0.1031     0.9415 0.000 0.976 0.024
#> GSM125215     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125217     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125219     1  0.1411     0.9545 0.964 0.000 0.036
#> GSM125221     3  0.4931     0.9182 0.032 0.140 0.828
#> GSM125223     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125225     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125227     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125229     3  0.3267     0.9222 0.044 0.044 0.912
#> GSM125231     1  0.6302     0.0693 0.520 0.000 0.480
#> GSM125233     1  0.1031     0.9625 0.976 0.000 0.024
#> GSM125235     1  0.1031     0.9632 0.976 0.000 0.024
#> GSM125237     1  0.0000     0.9701 1.000 0.000 0.000
#> GSM125124     1  0.0237     0.9695 0.996 0.000 0.004
#> GSM125126     1  0.0237     0.9696 0.996 0.000 0.004
#> GSM125128     1  0.0424     0.9682 0.992 0.000 0.008
#> GSM125130     1  0.0892     0.9641 0.980 0.000 0.020
#> GSM125132     1  0.0000     0.9701 1.000 0.000 0.000
#> GSM125134     1  0.0592     0.9674 0.988 0.000 0.012
#> GSM125136     1  0.1163     0.9569 0.972 0.000 0.028
#> GSM125138     1  0.0237     0.9695 0.996 0.000 0.004
#> GSM125140     1  0.0000     0.9701 1.000 0.000 0.000
#> GSM125142     1  0.0000     0.9701 1.000 0.000 0.000
#> GSM125144     1  0.0424     0.9686 0.992 0.000 0.008
#> GSM125146     1  0.1289     0.9605 0.968 0.000 0.032
#> GSM125148     1  0.0000     0.9701 1.000 0.000 0.000
#> GSM125150     1  0.0000     0.9701 1.000 0.000 0.000
#> GSM125152     1  0.0000     0.9701 1.000 0.000 0.000
#> GSM125154     1  0.0237     0.9695 0.996 0.000 0.004
#> GSM125156     1  0.0000     0.9701 1.000 0.000 0.000
#> GSM125158     1  0.0000     0.9701 1.000 0.000 0.000
#> GSM125160     2  0.1031     0.9415 0.000 0.976 0.024
#> GSM125162     1  0.1163     0.9569 0.972 0.000 0.028
#> GSM125164     2  0.1031     0.9415 0.000 0.976 0.024
#> GSM125166     2  0.1031     0.9415 0.000 0.976 0.024
#> GSM125168     2  0.1643     0.9244 0.000 0.956 0.044
#> GSM125170     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125172     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125174     2  0.6912     0.2368 0.016 0.540 0.444
#> GSM125176     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125178     3  0.4087     0.9302 0.068 0.052 0.880
#> GSM125180     3  0.5067     0.9301 0.052 0.116 0.832
#> GSM125182     3  0.4784     0.8545 0.004 0.200 0.796
#> GSM125184     3  0.4930     0.9293 0.044 0.120 0.836
#> GSM125186     3  0.5067     0.9301 0.052 0.116 0.832
#> GSM125188     3  0.4645     0.8811 0.008 0.176 0.816
#> GSM125190     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125192     2  0.1031     0.9415 0.000 0.976 0.024
#> GSM125194     3  0.4189     0.9304 0.068 0.056 0.876
#> GSM125196     3  0.3764     0.9249 0.068 0.040 0.892
#> GSM125198     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125200     1  0.0000     0.9701 1.000 0.000 0.000
#> GSM125202     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125204     3  0.4087     0.9302 0.068 0.052 0.880
#> GSM125206     3  0.3764     0.9249 0.068 0.040 0.892
#> GSM125208     3  0.4165     0.9262 0.076 0.048 0.876
#> GSM125210     3  0.4995     0.9158 0.032 0.144 0.824
#> GSM125212     3  0.3155     0.9209 0.044 0.040 0.916
#> GSM125214     2  0.1031     0.9415 0.000 0.976 0.024
#> GSM125216     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125218     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125220     1  0.1163     0.9610 0.972 0.000 0.028
#> GSM125222     3  0.4931     0.9182 0.032 0.140 0.828
#> GSM125224     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125226     2  0.2165     0.8993 0.000 0.936 0.064
#> GSM125228     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125230     3  0.2492     0.9089 0.048 0.016 0.936
#> GSM125232     1  0.6295     0.1003 0.528 0.000 0.472
#> GSM125234     1  0.1411     0.9545 0.964 0.000 0.036
#> GSM125236     1  0.1031     0.9632 0.976 0.000 0.024
#> GSM125238     1  0.0000     0.9701 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
#> GSM125123     1  0.0188     0.9845 0.996 0.000 0.000 0.004
#> GSM125125     1  0.0188     0.9845 0.996 0.000 0.000 0.004
#> GSM125127     1  0.1356     0.9724 0.960 0.000 0.008 0.032
#> GSM125129     1  0.1109     0.9754 0.968 0.000 0.004 0.028
#> GSM125131     1  0.0000     0.9843 1.000 0.000 0.000 0.000
#> GSM125133     1  0.0895     0.9802 0.976 0.000 0.004 0.020
#> GSM125135     1  0.1452     0.9711 0.956 0.000 0.008 0.036
#> GSM125137     1  0.0927     0.9766 0.976 0.000 0.008 0.016
#> GSM125139     1  0.0188     0.9846 0.996 0.000 0.004 0.000
#> GSM125141     1  0.0188     0.9846 0.996 0.000 0.004 0.000
#> GSM125143     1  0.1109     0.9754 0.968 0.000 0.004 0.028
#> GSM125145     1  0.1489     0.9686 0.952 0.000 0.004 0.044
#> GSM125147     1  0.0188     0.9846 0.996 0.000 0.004 0.000
#> GSM125149     1  0.0188     0.9846 0.996 0.000 0.004 0.000
#> GSM125151     1  0.0336     0.9840 0.992 0.000 0.000 0.008
#> GSM125153     1  0.0469     0.9837 0.988 0.000 0.000 0.012
#> GSM125155     1  0.0188     0.9846 0.996 0.000 0.004 0.000
#> GSM125157     1  0.0000     0.9843 1.000 0.000 0.000 0.000
#> GSM125159     2  0.0817     0.9598 0.000 0.976 0.024 0.000
#> GSM125161     1  0.1042     0.9723 0.972 0.000 0.008 0.020
#> GSM125163     2  0.0000     0.9733 0.000 1.000 0.000 0.000
#> GSM125165     3  0.4237     0.7852 0.000 0.152 0.808 0.040
#> GSM125167     2  0.1302     0.9385 0.000 0.956 0.044 0.000
#> GSM125169     2  0.0000     0.9733 0.000 1.000 0.000 0.000
#> GSM125171     2  0.0000     0.9733 0.000 1.000 0.000 0.000
#> GSM125173     4  0.1211     1.0000 0.000 0.000 0.040 0.960
#> GSM125175     2  0.0000     0.9733 0.000 1.000 0.000 0.000
#> GSM125177     3  0.1739     0.8587 0.016 0.024 0.952 0.008
#> GSM125179     3  0.3455     0.8586 0.012 0.064 0.880 0.044
#> GSM125181     3  0.4188     0.7898 0.000 0.148 0.812 0.040
#> GSM125183     3  0.3312     0.8593 0.008 0.068 0.884 0.040
#> GSM125185     3  0.3455     0.8586 0.012 0.064 0.880 0.044
#> GSM125187     3  0.3515     0.8579 0.012 0.072 0.876 0.040
#> GSM125189     2  0.0000     0.9733 0.000 1.000 0.000 0.000
#> GSM125191     2  0.4999     0.4350 0.000 0.660 0.328 0.012
#> GSM125193     3  0.1843     0.8592 0.016 0.028 0.948 0.008
#> GSM125195     3  0.1526     0.8505 0.016 0.012 0.960 0.012
#> GSM125197     2  0.0000     0.9733 0.000 1.000 0.000 0.000
#> GSM125199     1  0.0188     0.9846 0.996 0.000 0.004 0.000
#> GSM125201     2  0.0000     0.9733 0.000 1.000 0.000 0.000
#> GSM125203     3  0.1739     0.8587 0.016 0.024 0.952 0.008
#> GSM125205     2  0.0000     0.9733 0.000 1.000 0.000 0.000
#> GSM125207     3  0.2221     0.8501 0.020 0.020 0.936 0.024
#> GSM125209     3  0.3399     0.8470 0.000 0.092 0.868 0.040
#> GSM125211     3  0.1733     0.8488 0.000 0.024 0.948 0.028
#> GSM125213     2  0.0817     0.9598 0.000 0.976 0.024 0.000
#> GSM125215     2  0.0000     0.9733 0.000 1.000 0.000 0.000
#> GSM125217     2  0.0000     0.9733 0.000 1.000 0.000 0.000
#> GSM125219     1  0.1584     0.9659 0.952 0.000 0.012 0.036
#> GSM125221     3  0.3333     0.8493 0.000 0.088 0.872 0.040
#> GSM125223     2  0.0000     0.9733 0.000 1.000 0.000 0.000
#> GSM125225     2  0.0000     0.9733 0.000 1.000 0.000 0.000
#> GSM125227     2  0.0000     0.9733 0.000 1.000 0.000 0.000
#> GSM125229     3  0.1837     0.8504 0.000 0.028 0.944 0.028
#> GSM125231     3  0.6557     0.0279 0.448 0.000 0.476 0.076
#> GSM125233     1  0.1209     0.9744 0.964 0.000 0.004 0.032
#> GSM125235     1  0.1256     0.9741 0.964 0.000 0.008 0.028
#> GSM125237     1  0.0188     0.9846 0.996 0.000 0.004 0.000
#> GSM125124     1  0.0376     0.9842 0.992 0.000 0.004 0.004
#> GSM125126     1  0.0188     0.9845 0.996 0.000 0.000 0.004
#> GSM125128     1  0.0469     0.9833 0.988 0.000 0.000 0.012
#> GSM125130     1  0.1109     0.9754 0.968 0.000 0.004 0.028
#> GSM125132     1  0.0000     0.9843 1.000 0.000 0.000 0.000
#> GSM125134     1  0.0672     0.9825 0.984 0.000 0.008 0.008
#> GSM125136     1  0.1042     0.9723 0.972 0.000 0.008 0.020
#> GSM125138     1  0.0376     0.9842 0.992 0.000 0.004 0.004
#> GSM125140     1  0.0188     0.9846 0.996 0.000 0.004 0.000
#> GSM125142     1  0.0188     0.9846 0.996 0.000 0.004 0.000
#> GSM125144     1  0.0592     0.9826 0.984 0.000 0.000 0.016
#> GSM125146     1  0.1489     0.9686 0.952 0.000 0.004 0.044
#> GSM125148     1  0.0188     0.9846 0.996 0.000 0.004 0.000
#> GSM125150     1  0.0188     0.9846 0.996 0.000 0.004 0.000
#> GSM125152     1  0.0336     0.9840 0.992 0.000 0.000 0.008
#> GSM125154     1  0.0524     0.9833 0.988 0.000 0.004 0.008
#> GSM125156     1  0.0188     0.9846 0.996 0.000 0.004 0.000
#> GSM125158     1  0.0000     0.9843 1.000 0.000 0.000 0.000
#> GSM125160     2  0.0817     0.9598 0.000 0.976 0.024 0.000
#> GSM125162     1  0.1042     0.9723 0.972 0.000 0.008 0.020
#> GSM125164     2  0.0817     0.9598 0.000 0.976 0.024 0.000
#> GSM125166     2  0.0817     0.9598 0.000 0.976 0.024 0.000
#> GSM125168     2  0.1302     0.9385 0.000 0.956 0.044 0.000
#> GSM125170     2  0.0000     0.9733 0.000 1.000 0.000 0.000
#> GSM125172     2  0.0000     0.9733 0.000 1.000 0.000 0.000
#> GSM125174     4  0.1211     1.0000 0.000 0.000 0.040 0.960
#> GSM125176     2  0.0000     0.9733 0.000 1.000 0.000 0.000
#> GSM125178     3  0.1739     0.8587 0.016 0.024 0.952 0.008
#> GSM125180     3  0.3455     0.8586 0.012 0.064 0.880 0.044
#> GSM125182     3  0.4188     0.7898 0.000 0.148 0.812 0.040
#> GSM125184     3  0.3312     0.8593 0.008 0.068 0.884 0.040
#> GSM125186     3  0.3455     0.8586 0.012 0.064 0.880 0.044
#> GSM125188     3  0.3876     0.8174 0.000 0.124 0.836 0.040
#> GSM125190     2  0.0000     0.9733 0.000 1.000 0.000 0.000
#> GSM125192     2  0.0817     0.9598 0.000 0.976 0.024 0.000
#> GSM125194     3  0.1843     0.8592 0.016 0.028 0.948 0.008
#> GSM125196     3  0.1526     0.8505 0.016 0.012 0.960 0.012
#> GSM125198     2  0.0000     0.9733 0.000 1.000 0.000 0.000
#> GSM125200     1  0.0188     0.9846 0.996 0.000 0.004 0.000
#> GSM125202     2  0.0000     0.9733 0.000 1.000 0.000 0.000
#> GSM125204     3  0.1739     0.8587 0.016 0.024 0.952 0.008
#> GSM125206     3  0.1526     0.8505 0.016 0.012 0.960 0.012
#> GSM125208     3  0.2221     0.8501 0.020 0.020 0.936 0.024
#> GSM125210     3  0.3399     0.8470 0.000 0.092 0.868 0.040
#> GSM125212     3  0.1733     0.8488 0.000 0.024 0.948 0.028
#> GSM125214     2  0.0817     0.9598 0.000 0.976 0.024 0.000
#> GSM125216     2  0.0000     0.9733 0.000 1.000 0.000 0.000
#> GSM125218     2  0.0000     0.9733 0.000 1.000 0.000 0.000
#> GSM125220     1  0.1388     0.9715 0.960 0.000 0.012 0.028
#> GSM125222     3  0.3333     0.8493 0.000 0.088 0.872 0.040
#> GSM125224     2  0.0000     0.9733 0.000 1.000 0.000 0.000
#> GSM125226     2  0.2048     0.8986 0.000 0.928 0.064 0.008
#> GSM125228     2  0.0000     0.9733 0.000 1.000 0.000 0.000
#> GSM125230     3  0.1022     0.8324 0.000 0.000 0.968 0.032
#> GSM125232     3  0.6559     0.0197 0.456 0.000 0.468 0.076
#> GSM125234     1  0.1584     0.9659 0.952 0.000 0.012 0.036
#> GSM125236     1  0.1256     0.9741 0.964 0.000 0.008 0.028
#> GSM125238     1  0.0188     0.9846 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
#> GSM125123     1  0.2377      0.818 0.872 0.000 0.000 0.000 0.128
#> GSM125125     1  0.2377      0.818 0.872 0.000 0.000 0.000 0.128
#> GSM125127     1  0.4003      0.714 0.704 0.000 0.000 0.008 0.288
#> GSM125129     1  0.3928      0.694 0.700 0.000 0.000 0.004 0.296
#> GSM125131     1  0.1608      0.813 0.928 0.000 0.000 0.000 0.072
#> GSM125133     1  0.3430      0.737 0.776 0.000 0.000 0.004 0.220
#> GSM125135     1  0.4046      0.709 0.696 0.000 0.000 0.008 0.296
#> GSM125137     1  0.3696      0.691 0.772 0.000 0.000 0.016 0.212
#> GSM125139     1  0.1341      0.825 0.944 0.000 0.000 0.000 0.056
#> GSM125141     1  0.0794      0.826 0.972 0.000 0.000 0.000 0.028
#> GSM125143     1  0.3814      0.711 0.720 0.000 0.000 0.004 0.276
#> GSM125145     1  0.3861      0.725 0.728 0.000 0.000 0.008 0.264
#> GSM125147     1  0.0794      0.825 0.972 0.000 0.000 0.000 0.028
#> GSM125149     1  0.0794      0.822 0.972 0.000 0.000 0.000 0.028
#> GSM125151     1  0.2719      0.804 0.852 0.000 0.000 0.004 0.144
#> GSM125153     1  0.2488      0.813 0.872 0.000 0.000 0.004 0.124
#> GSM125155     1  0.1195      0.824 0.960 0.000 0.000 0.012 0.028
#> GSM125157     1  0.0404      0.827 0.988 0.000 0.000 0.000 0.012
#> GSM125159     2  0.1041      0.956 0.000 0.964 0.032 0.000 0.004
#> GSM125161     1  0.3988      0.650 0.732 0.000 0.000 0.016 0.252
#> GSM125163     2  0.0290      0.967 0.000 0.992 0.008 0.000 0.000
#> GSM125165     3  0.2116      0.734 0.000 0.076 0.912 0.004 0.008
#> GSM125167     2  0.1571      0.931 0.000 0.936 0.060 0.000 0.004
#> GSM125169     2  0.0510      0.965 0.000 0.984 0.016 0.000 0.000
#> GSM125171     2  0.0000      0.968 0.000 1.000 0.000 0.000 0.000
#> GSM125173     4  0.0880      1.000 0.000 0.000 0.032 0.968 0.000
#> GSM125175     2  0.0000      0.968 0.000 1.000 0.000 0.000 0.000
#> GSM125177     3  0.4166      0.669 0.004 0.000 0.648 0.000 0.348
#> GSM125179     3  0.0833      0.784 0.004 0.000 0.976 0.004 0.016
#> GSM125181     3  0.2504      0.737 0.000 0.040 0.896 0.000 0.064
#> GSM125183     3  0.0613      0.785 0.004 0.000 0.984 0.004 0.008
#> GSM125185     3  0.0833      0.784 0.004 0.000 0.976 0.004 0.016
#> GSM125187     3  0.0727      0.785 0.004 0.004 0.980 0.000 0.012
#> GSM125189     2  0.0404      0.966 0.000 0.988 0.012 0.000 0.000
#> GSM125191     2  0.4354      0.415 0.000 0.624 0.368 0.000 0.008
#> GSM125193     3  0.4166      0.668 0.004 0.000 0.648 0.000 0.348
#> GSM125195     3  0.4276      0.636 0.004 0.000 0.616 0.000 0.380
#> GSM125197     2  0.0000      0.968 0.000 1.000 0.000 0.000 0.000
#> GSM125199     1  0.0794      0.827 0.972 0.000 0.000 0.000 0.028
#> GSM125201     2  0.0000      0.968 0.000 1.000 0.000 0.000 0.000
#> GSM125203     3  0.4166      0.669 0.004 0.000 0.648 0.000 0.348
#> GSM125205     2  0.0000      0.968 0.000 1.000 0.000 0.000 0.000
#> GSM125207     3  0.4819      0.646 0.004 0.000 0.620 0.024 0.352
#> GSM125209     3  0.0798      0.780 0.000 0.016 0.976 0.000 0.008
#> GSM125211     3  0.3840      0.738 0.000 0.008 0.772 0.012 0.208
#> GSM125213     2  0.1041      0.956 0.000 0.964 0.032 0.000 0.004
#> GSM125215     2  0.0000      0.968 0.000 1.000 0.000 0.000 0.000
#> GSM125217     2  0.0510      0.965 0.000 0.984 0.016 0.000 0.000
#> GSM125219     1  0.3990      0.684 0.688 0.000 0.000 0.004 0.308
#> GSM125221     3  0.0671      0.782 0.000 0.016 0.980 0.004 0.000
#> GSM125223     2  0.0000      0.968 0.000 1.000 0.000 0.000 0.000
#> GSM125225     2  0.0162      0.966 0.000 0.996 0.004 0.000 0.000
#> GSM125227     2  0.0000      0.968 0.000 1.000 0.000 0.000 0.000
#> GSM125229     3  0.3670      0.743 0.000 0.008 0.792 0.012 0.188
#> GSM125231     5  0.6002      0.981 0.228 0.000 0.084 0.044 0.644
#> GSM125233     1  0.3461      0.754 0.772 0.000 0.000 0.004 0.224
#> GSM125235     1  0.3885      0.739 0.724 0.000 0.000 0.008 0.268
#> GSM125237     1  0.0609      0.824 0.980 0.000 0.000 0.000 0.020
#> GSM125124     1  0.2561      0.801 0.856 0.000 0.000 0.000 0.144
#> GSM125126     1  0.2377      0.818 0.872 0.000 0.000 0.000 0.128
#> GSM125128     1  0.3612      0.698 0.764 0.000 0.000 0.008 0.228
#> GSM125130     1  0.3928      0.694 0.700 0.000 0.000 0.004 0.296
#> GSM125132     1  0.1608      0.813 0.928 0.000 0.000 0.000 0.072
#> GSM125134     1  0.3013      0.804 0.832 0.000 0.000 0.008 0.160
#> GSM125136     1  0.3988      0.650 0.732 0.000 0.000 0.016 0.252
#> GSM125138     1  0.2561      0.801 0.856 0.000 0.000 0.000 0.144
#> GSM125140     1  0.1341      0.825 0.944 0.000 0.000 0.000 0.056
#> GSM125142     1  0.0794      0.826 0.972 0.000 0.000 0.000 0.028
#> GSM125144     1  0.2966      0.779 0.816 0.000 0.000 0.000 0.184
#> GSM125146     1  0.3861      0.725 0.728 0.000 0.000 0.008 0.264
#> GSM125148     1  0.0794      0.825 0.972 0.000 0.000 0.000 0.028
#> GSM125150     1  0.0794      0.822 0.972 0.000 0.000 0.000 0.028
#> GSM125152     1  0.2719      0.804 0.852 0.000 0.000 0.004 0.144
#> GSM125154     1  0.2389      0.814 0.880 0.000 0.000 0.004 0.116
#> GSM125156     1  0.1195      0.824 0.960 0.000 0.000 0.012 0.028
#> GSM125158     1  0.0404      0.827 0.988 0.000 0.000 0.000 0.012
#> GSM125160     2  0.1041      0.956 0.000 0.964 0.032 0.000 0.004
#> GSM125162     1  0.3988      0.650 0.732 0.000 0.000 0.016 0.252
#> GSM125164     2  0.1041      0.956 0.000 0.964 0.032 0.000 0.004
#> GSM125166     2  0.1041      0.956 0.000 0.964 0.032 0.000 0.004
#> GSM125168     2  0.1571      0.931 0.000 0.936 0.060 0.000 0.004
#> GSM125170     2  0.0510      0.965 0.000 0.984 0.016 0.000 0.000
#> GSM125172     2  0.0000      0.968 0.000 1.000 0.000 0.000 0.000
#> GSM125174     4  0.0880      1.000 0.000 0.000 0.032 0.968 0.000
#> GSM125176     2  0.0000      0.968 0.000 1.000 0.000 0.000 0.000
#> GSM125178     3  0.4166      0.669 0.004 0.000 0.648 0.000 0.348
#> GSM125180     3  0.0833      0.784 0.004 0.000 0.976 0.004 0.016
#> GSM125182     3  0.2504      0.737 0.000 0.040 0.896 0.000 0.064
#> GSM125184     3  0.0613      0.785 0.004 0.000 0.984 0.004 0.008
#> GSM125186     3  0.0833      0.784 0.004 0.000 0.976 0.004 0.016
#> GSM125188     3  0.1981      0.755 0.000 0.016 0.920 0.000 0.064
#> GSM125190     2  0.0404      0.966 0.000 0.988 0.012 0.000 0.000
#> GSM125192     2  0.1041      0.956 0.000 0.964 0.032 0.000 0.004
#> GSM125194     3  0.4166      0.668 0.004 0.000 0.648 0.000 0.348
#> GSM125196     3  0.4276      0.636 0.004 0.000 0.616 0.000 0.380
#> GSM125198     2  0.0000      0.968 0.000 1.000 0.000 0.000 0.000
#> GSM125200     1  0.0794      0.827 0.972 0.000 0.000 0.000 0.028
#> GSM125202     2  0.0000      0.968 0.000 1.000 0.000 0.000 0.000
#> GSM125204     3  0.4166      0.669 0.004 0.000 0.648 0.000 0.348
#> GSM125206     3  0.4276      0.636 0.004 0.000 0.616 0.000 0.380
#> GSM125208     3  0.4819      0.646 0.004 0.000 0.620 0.024 0.352
#> GSM125210     3  0.0798      0.780 0.000 0.016 0.976 0.000 0.008
#> GSM125212     3  0.3840      0.738 0.000 0.008 0.772 0.012 0.208
#> GSM125214     2  0.1041      0.956 0.000 0.964 0.032 0.000 0.004
#> GSM125216     2  0.0000      0.968 0.000 1.000 0.000 0.000 0.000
#> GSM125218     2  0.0510      0.965 0.000 0.984 0.016 0.000 0.000
#> GSM125220     1  0.3783      0.750 0.740 0.000 0.000 0.008 0.252
#> GSM125222     3  0.0671      0.782 0.000 0.016 0.980 0.004 0.000
#> GSM125224     2  0.0000      0.968 0.000 1.000 0.000 0.000 0.000
#> GSM125226     2  0.1965      0.878 0.000 0.904 0.096 0.000 0.000
#> GSM125228     2  0.0000      0.968 0.000 1.000 0.000 0.000 0.000
#> GSM125230     3  0.4161      0.708 0.000 0.000 0.704 0.016 0.280
#> GSM125232     5  0.6001      0.981 0.236 0.000 0.080 0.044 0.640
#> GSM125234     1  0.4029      0.665 0.680 0.000 0.000 0.004 0.316
#> GSM125236     1  0.3885      0.739 0.724 0.000 0.000 0.008 0.268
#> GSM125238     1  0.0609      0.824 0.980 0.000 0.000 0.000 0.020

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM125123     1  0.2946     0.5111 0.824 0.000 0.012 0.004 0.160 0.000
#> GSM125125     1  0.2946     0.5111 0.824 0.000 0.012 0.004 0.160 0.000
#> GSM125127     1  0.4354    -0.8105 0.508 0.000 0.008 0.004 0.476 0.004
#> GSM125129     1  0.3999    -0.8599 0.500 0.000 0.000 0.004 0.496 0.000
#> GSM125131     1  0.1967     0.5598 0.904 0.000 0.012 0.000 0.084 0.000
#> GSM125133     1  0.4158    -0.0135 0.572 0.000 0.008 0.004 0.416 0.000
#> GSM125135     1  0.4389    -0.7472 0.512 0.000 0.016 0.004 0.468 0.000
#> GSM125137     1  0.4065     0.3251 0.672 0.000 0.028 0.000 0.300 0.000
#> GSM125139     1  0.1007     0.5617 0.956 0.000 0.000 0.000 0.044 0.000
#> GSM125141     1  0.0508     0.5822 0.984 0.000 0.004 0.000 0.012 0.000
#> GSM125143     1  0.3989    -0.8116 0.528 0.000 0.000 0.004 0.468 0.000
#> GSM125145     1  0.4268    -0.6634 0.556 0.000 0.012 0.004 0.428 0.000
#> GSM125147     1  0.0713     0.5837 0.972 0.000 0.000 0.000 0.028 0.000
#> GSM125149     1  0.0790     0.5830 0.968 0.000 0.000 0.000 0.032 0.000
#> GSM125151     1  0.3076     0.1838 0.760 0.000 0.000 0.000 0.240 0.000
#> GSM125153     1  0.2302     0.4915 0.872 0.000 0.008 0.000 0.120 0.000
#> GSM125155     1  0.1124     0.5757 0.956 0.000 0.008 0.000 0.036 0.000
#> GSM125157     1  0.0603     0.5837 0.980 0.000 0.004 0.000 0.016 0.000
#> GSM125159     2  0.0935     0.9546 0.000 0.964 0.032 0.004 0.000 0.000
#> GSM125161     1  0.4606     0.2765 0.604 0.000 0.052 0.000 0.344 0.000
#> GSM125163     2  0.0291     0.9653 0.000 0.992 0.004 0.004 0.000 0.000
#> GSM125165     4  0.5061     0.5337 0.000 0.076 0.352 0.568 0.000 0.004
#> GSM125167     2  0.1564     0.9316 0.000 0.936 0.040 0.024 0.000 0.000
#> GSM125169     2  0.0508     0.9642 0.000 0.984 0.012 0.004 0.000 0.000
#> GSM125171     2  0.0146     0.9664 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM125173     6  0.0363     1.0000 0.000 0.000 0.012 0.000 0.000 0.988
#> GSM125175     2  0.0146     0.9664 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM125177     4  0.0458     0.5067 0.000 0.000 0.000 0.984 0.016 0.000
#> GSM125179     4  0.4102     0.6087 0.000 0.000 0.356 0.628 0.012 0.004
#> GSM125181     4  0.4788     0.5383 0.000 0.036 0.424 0.532 0.008 0.000
#> GSM125183     4  0.3905     0.6102 0.000 0.000 0.356 0.636 0.004 0.004
#> GSM125185     4  0.4102     0.6087 0.000 0.000 0.356 0.628 0.012 0.004
#> GSM125187     4  0.4009     0.6101 0.000 0.004 0.356 0.632 0.008 0.000
#> GSM125189     2  0.0405     0.9650 0.000 0.988 0.008 0.004 0.000 0.000
#> GSM125191     2  0.5068     0.3889 0.000 0.624 0.240 0.136 0.000 0.000
#> GSM125193     4  0.0748     0.5038 0.004 0.000 0.004 0.976 0.016 0.000
#> GSM125195     4  0.3413     0.4149 0.000 0.000 0.080 0.812 0.108 0.000
#> GSM125197     2  0.0146     0.9664 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM125199     1  0.0777     0.5813 0.972 0.000 0.004 0.000 0.024 0.000
#> GSM125201     2  0.0146     0.9664 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM125203     4  0.0458     0.5067 0.000 0.000 0.000 0.984 0.016 0.000
#> GSM125205     2  0.0146     0.9664 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM125207     4  0.1176     0.4815 0.000 0.000 0.000 0.956 0.020 0.024
#> GSM125209     4  0.4099     0.6007 0.000 0.016 0.372 0.612 0.000 0.000
#> GSM125211     3  0.5038     0.9479 0.000 0.004 0.628 0.292 0.064 0.012
#> GSM125213     2  0.0935     0.9546 0.000 0.964 0.032 0.004 0.000 0.000
#> GSM125215     2  0.0146     0.9664 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM125217     2  0.0508     0.9642 0.000 0.984 0.012 0.004 0.000 0.000
#> GSM125219     5  0.3993     0.9205 0.476 0.000 0.000 0.004 0.520 0.000
#> GSM125221     4  0.4211     0.6040 0.000 0.016 0.364 0.616 0.000 0.004
#> GSM125223     2  0.0146     0.9664 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM125225     2  0.0146     0.9659 0.000 0.996 0.000 0.004 0.000 0.000
#> GSM125227     2  0.0146     0.9664 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM125229     3  0.4978     0.9263 0.000 0.004 0.648 0.268 0.068 0.012
#> GSM125231     4  0.7373    -0.2135 0.232 0.000 0.044 0.420 0.264 0.040
#> GSM125233     1  0.3699    -0.2567 0.660 0.000 0.000 0.004 0.336 0.000
#> GSM125235     1  0.4126    -0.7321 0.512 0.000 0.004 0.004 0.480 0.000
#> GSM125237     1  0.0547     0.5835 0.980 0.000 0.000 0.000 0.020 0.000
#> GSM125124     1  0.2219     0.4525 0.864 0.000 0.000 0.000 0.136 0.000
#> GSM125126     1  0.2946     0.5111 0.824 0.000 0.012 0.004 0.160 0.000
#> GSM125128     1  0.4184     0.1982 0.576 0.000 0.016 0.000 0.408 0.000
#> GSM125130     1  0.3999    -0.8599 0.500 0.000 0.000 0.004 0.496 0.000
#> GSM125132     1  0.1967     0.5598 0.904 0.000 0.012 0.000 0.084 0.000
#> GSM125134     1  0.3043     0.3304 0.796 0.000 0.004 0.000 0.196 0.004
#> GSM125136     1  0.4606     0.2765 0.604 0.000 0.052 0.000 0.344 0.000
#> GSM125138     1  0.2219     0.4525 0.864 0.000 0.000 0.000 0.136 0.000
#> GSM125140     1  0.1007     0.5617 0.956 0.000 0.000 0.000 0.044 0.000
#> GSM125142     1  0.0508     0.5822 0.984 0.000 0.004 0.000 0.012 0.000
#> GSM125144     1  0.2762     0.3373 0.804 0.000 0.000 0.000 0.196 0.000
#> GSM125146     1  0.4268    -0.6634 0.556 0.000 0.012 0.004 0.428 0.000
#> GSM125148     1  0.0713     0.5837 0.972 0.000 0.000 0.000 0.028 0.000
#> GSM125150     1  0.0790     0.5830 0.968 0.000 0.000 0.000 0.032 0.000
#> GSM125152     1  0.3076     0.1838 0.760 0.000 0.000 0.000 0.240 0.000
#> GSM125154     1  0.2053     0.5031 0.888 0.000 0.004 0.000 0.108 0.000
#> GSM125156     1  0.1124     0.5757 0.956 0.000 0.008 0.000 0.036 0.000
#> GSM125158     1  0.0603     0.5837 0.980 0.000 0.004 0.000 0.016 0.000
#> GSM125160     2  0.0935     0.9546 0.000 0.964 0.032 0.004 0.000 0.000
#> GSM125162     1  0.4606     0.2765 0.604 0.000 0.052 0.000 0.344 0.000
#> GSM125164     2  0.0935     0.9546 0.000 0.964 0.032 0.004 0.000 0.000
#> GSM125166     2  0.0935     0.9546 0.000 0.964 0.032 0.004 0.000 0.000
#> GSM125168     2  0.1564     0.9316 0.000 0.936 0.040 0.024 0.000 0.000
#> GSM125170     2  0.0508     0.9642 0.000 0.984 0.012 0.004 0.000 0.000
#> GSM125172     2  0.0146     0.9664 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM125174     6  0.0363     1.0000 0.000 0.000 0.012 0.000 0.000 0.988
#> GSM125176     2  0.0146     0.9664 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM125178     4  0.0458     0.5067 0.000 0.000 0.000 0.984 0.016 0.000
#> GSM125180     4  0.4102     0.6087 0.000 0.000 0.356 0.628 0.012 0.004
#> GSM125182     4  0.4788     0.5383 0.000 0.036 0.424 0.532 0.008 0.000
#> GSM125184     4  0.3905     0.6102 0.000 0.000 0.356 0.636 0.004 0.004
#> GSM125186     4  0.4102     0.6087 0.000 0.000 0.356 0.628 0.012 0.004
#> GSM125188     4  0.4364     0.5609 0.000 0.012 0.424 0.556 0.008 0.000
#> GSM125190     2  0.0405     0.9650 0.000 0.988 0.008 0.004 0.000 0.000
#> GSM125192     2  0.0935     0.9546 0.000 0.964 0.032 0.004 0.000 0.000
#> GSM125194     4  0.0748     0.5038 0.004 0.000 0.004 0.976 0.016 0.000
#> GSM125196     4  0.3413     0.4149 0.000 0.000 0.080 0.812 0.108 0.000
#> GSM125198     2  0.0146     0.9664 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM125200     1  0.0777     0.5813 0.972 0.000 0.004 0.000 0.024 0.000
#> GSM125202     2  0.0146     0.9664 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM125204     4  0.0458     0.5067 0.000 0.000 0.000 0.984 0.016 0.000
#> GSM125206     4  0.3413     0.4149 0.000 0.000 0.080 0.812 0.108 0.000
#> GSM125208     4  0.1176     0.4815 0.000 0.000 0.000 0.956 0.020 0.024
#> GSM125210     4  0.4099     0.6007 0.000 0.016 0.372 0.612 0.000 0.000
#> GSM125212     3  0.5038     0.9479 0.000 0.004 0.628 0.292 0.064 0.012
#> GSM125214     2  0.0935     0.9546 0.000 0.964 0.032 0.004 0.000 0.000
#> GSM125216     2  0.0146     0.9664 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM125218     2  0.0508     0.9642 0.000 0.984 0.012 0.004 0.000 0.000
#> GSM125220     1  0.4211    -0.7028 0.532 0.000 0.008 0.004 0.456 0.000
#> GSM125222     4  0.4211     0.6040 0.000 0.016 0.364 0.616 0.000 0.004
#> GSM125224     2  0.0146     0.9664 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM125226     2  0.2039     0.8814 0.000 0.904 0.020 0.076 0.000 0.000
#> GSM125228     2  0.0146     0.9664 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM125230     3  0.4988     0.8684 0.004 0.000 0.620 0.312 0.048 0.016
#> GSM125232     4  0.7398    -0.2109 0.240 0.000 0.044 0.412 0.264 0.040
#> GSM125234     5  0.3989     0.9228 0.468 0.000 0.000 0.004 0.528 0.000
#> GSM125236     1  0.4126    -0.7321 0.512 0.000 0.004 0.004 0.480 0.000
#> GSM125238     1  0.0547     0.5835 0.980 0.000 0.000 0.000 0.020 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 agent(p) individual(p) k
#> CV:hclust 114    1.000      7.66e-06 2
#> CV:hclust 111    0.989      8.88e-09 3
#> CV:hclust 113    0.999      7.89e-13 4
#> CV:hclust 115    1.000      5.47e-17 5
#> CV:hclust  84    1.000      2.62e-14 6

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


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

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

collect_plots(res)

plot of chunk CV-kmeans-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           0.991       0.995         0.4991 0.501   0.501
#> 3 3 0.916           0.961       0.960         0.3181 0.800   0.615
#> 4 4 0.775           0.584       0.814         0.1000 0.993   0.979
#> 5 5 0.724           0.714       0.766         0.0641 0.849   0.558
#> 6 6 0.695           0.679       0.764         0.0400 0.993   0.966

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
#> GSM125123     1   0.000      0.998 1.000 0.000
#> GSM125125     1   0.000      0.998 1.000 0.000
#> GSM125127     1   0.000      0.998 1.000 0.000
#> GSM125129     1   0.000      0.998 1.000 0.000
#> GSM125131     1   0.000      0.998 1.000 0.000
#> GSM125133     1   0.000      0.998 1.000 0.000
#> GSM125135     1   0.000      0.998 1.000 0.000
#> GSM125137     1   0.000      0.998 1.000 0.000
#> GSM125139     1   0.000      0.998 1.000 0.000
#> GSM125141     1   0.000      0.998 1.000 0.000
#> GSM125143     1   0.000      0.998 1.000 0.000
#> GSM125145     1   0.000      0.998 1.000 0.000
#> GSM125147     1   0.000      0.998 1.000 0.000
#> GSM125149     1   0.000      0.998 1.000 0.000
#> GSM125151     1   0.000      0.998 1.000 0.000
#> GSM125153     1   0.000      0.998 1.000 0.000
#> GSM125155     1   0.000      0.998 1.000 0.000
#> GSM125157     1   0.000      0.998 1.000 0.000
#> GSM125159     2   0.000      0.992 0.000 1.000
#> GSM125161     1   0.000      0.998 1.000 0.000
#> GSM125163     2   0.000      0.992 0.000 1.000
#> GSM125165     2   0.000      0.992 0.000 1.000
#> GSM125167     2   0.000      0.992 0.000 1.000
#> GSM125169     2   0.000      0.992 0.000 1.000
#> GSM125171     2   0.000      0.992 0.000 1.000
#> GSM125173     2   0.000      0.992 0.000 1.000
#> GSM125175     2   0.000      0.992 0.000 1.000
#> GSM125177     2   0.000      0.992 0.000 1.000
#> GSM125179     2   0.163      0.979 0.024 0.976
#> GSM125181     2   0.000      0.992 0.000 1.000
#> GSM125183     2   0.163      0.979 0.024 0.976
#> GSM125185     2   0.163      0.979 0.024 0.976
#> GSM125187     2   0.204      0.974 0.032 0.968
#> GSM125189     2   0.000      0.992 0.000 1.000
#> GSM125191     2   0.000      0.992 0.000 1.000
#> GSM125193     2   0.416      0.920 0.084 0.916
#> GSM125195     2   0.204      0.974 0.032 0.968
#> GSM125197     2   0.000      0.992 0.000 1.000
#> GSM125199     1   0.000      0.998 1.000 0.000
#> GSM125201     2   0.000      0.992 0.000 1.000
#> GSM125203     2   0.204      0.974 0.032 0.968
#> GSM125205     2   0.000      0.992 0.000 1.000
#> GSM125207     2   0.204      0.974 0.032 0.968
#> GSM125209     2   0.000      0.992 0.000 1.000
#> GSM125211     2   0.000      0.992 0.000 1.000
#> GSM125213     2   0.000      0.992 0.000 1.000
#> GSM125215     2   0.000      0.992 0.000 1.000
#> GSM125217     2   0.000      0.992 0.000 1.000
#> GSM125219     1   0.000      0.998 1.000 0.000
#> GSM125221     2   0.000      0.992 0.000 1.000
#> GSM125223     2   0.000      0.992 0.000 1.000
#> GSM125225     2   0.000      0.992 0.000 1.000
#> GSM125227     2   0.000      0.992 0.000 1.000
#> GSM125229     2   0.000      0.992 0.000 1.000
#> GSM125231     1   0.000      0.998 1.000 0.000
#> GSM125233     1   0.000      0.998 1.000 0.000
#> GSM125235     1   0.000      0.998 1.000 0.000
#> GSM125237     1   0.000      0.998 1.000 0.000
#> GSM125124     1   0.000      0.998 1.000 0.000
#> GSM125126     1   0.000      0.998 1.000 0.000
#> GSM125128     1   0.000      0.998 1.000 0.000
#> GSM125130     1   0.000      0.998 1.000 0.000
#> GSM125132     1   0.000      0.998 1.000 0.000
#> GSM125134     1   0.000      0.998 1.000 0.000
#> GSM125136     1   0.000      0.998 1.000 0.000
#> GSM125138     1   0.000      0.998 1.000 0.000
#> GSM125140     1   0.000      0.998 1.000 0.000
#> GSM125142     1   0.000      0.998 1.000 0.000
#> GSM125144     1   0.000      0.998 1.000 0.000
#> GSM125146     1   0.000      0.998 1.000 0.000
#> GSM125148     1   0.000      0.998 1.000 0.000
#> GSM125150     1   0.000      0.998 1.000 0.000
#> GSM125152     1   0.000      0.998 1.000 0.000
#> GSM125154     1   0.000      0.998 1.000 0.000
#> GSM125156     1   0.000      0.998 1.000 0.000
#> GSM125158     1   0.000      0.998 1.000 0.000
#> GSM125160     2   0.000      0.992 0.000 1.000
#> GSM125162     1   0.000      0.998 1.000 0.000
#> GSM125164     2   0.000      0.992 0.000 1.000
#> GSM125166     2   0.000      0.992 0.000 1.000
#> GSM125168     2   0.000      0.992 0.000 1.000
#> GSM125170     2   0.000      0.992 0.000 1.000
#> GSM125172     2   0.000      0.992 0.000 1.000
#> GSM125174     2   0.141      0.981 0.020 0.980
#> GSM125176     2   0.000      0.992 0.000 1.000
#> GSM125178     2   0.204      0.974 0.032 0.968
#> GSM125180     2   0.184      0.976 0.028 0.972
#> GSM125182     2   0.000      0.992 0.000 1.000
#> GSM125184     2   0.000      0.992 0.000 1.000
#> GSM125186     2   0.184      0.976 0.028 0.972
#> GSM125188     2   0.000      0.992 0.000 1.000
#> GSM125190     2   0.000      0.992 0.000 1.000
#> GSM125192     2   0.000      0.992 0.000 1.000
#> GSM125194     1   0.000      0.998 1.000 0.000
#> GSM125196     2   0.204      0.974 0.032 0.968
#> GSM125198     2   0.000      0.992 0.000 1.000
#> GSM125200     1   0.000      0.998 1.000 0.000
#> GSM125202     2   0.000      0.992 0.000 1.000
#> GSM125204     2   0.204      0.974 0.032 0.968
#> GSM125206     2   0.204      0.974 0.032 0.968
#> GSM125208     2   0.204      0.974 0.032 0.968
#> GSM125210     2   0.000      0.992 0.000 1.000
#> GSM125212     2   0.000      0.992 0.000 1.000
#> GSM125214     2   0.000      0.992 0.000 1.000
#> GSM125216     2   0.000      0.992 0.000 1.000
#> GSM125218     2   0.000      0.992 0.000 1.000
#> GSM125220     1   0.000      0.998 1.000 0.000
#> GSM125222     2   0.000      0.992 0.000 1.000
#> GSM125224     2   0.000      0.992 0.000 1.000
#> GSM125226     2   0.000      0.992 0.000 1.000
#> GSM125228     2   0.000      0.992 0.000 1.000
#> GSM125230     1   0.469      0.887 0.900 0.100
#> GSM125232     1   0.000      0.998 1.000 0.000
#> GSM125234     1   0.000      0.998 1.000 0.000
#> GSM125236     1   0.000      0.998 1.000 0.000
#> GSM125238     1   0.000      0.998 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
#> GSM125123     1  0.1860      0.972 0.948 0.000 0.052
#> GSM125125     1  0.0592      0.976 0.988 0.000 0.012
#> GSM125127     1  0.1964      0.972 0.944 0.000 0.056
#> GSM125129     1  0.1964      0.972 0.944 0.000 0.056
#> GSM125131     1  0.0237      0.975 0.996 0.000 0.004
#> GSM125133     1  0.0237      0.975 0.996 0.000 0.004
#> GSM125135     1  0.1964      0.972 0.944 0.000 0.056
#> GSM125137     1  0.0237      0.975 0.996 0.000 0.004
#> GSM125139     1  0.1964      0.972 0.944 0.000 0.056
#> GSM125141     1  0.0237      0.975 0.996 0.000 0.004
#> GSM125143     1  0.1964      0.972 0.944 0.000 0.056
#> GSM125145     1  0.1964      0.972 0.944 0.000 0.056
#> GSM125147     1  0.0237      0.975 0.996 0.000 0.004
#> GSM125149     1  0.0237      0.975 0.996 0.000 0.004
#> GSM125151     1  0.1964      0.972 0.944 0.000 0.056
#> GSM125153     1  0.1860      0.973 0.948 0.000 0.052
#> GSM125155     1  0.0237      0.975 0.996 0.000 0.004
#> GSM125157     1  0.0237      0.975 0.996 0.000 0.004
#> GSM125159     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125161     1  0.0237      0.975 0.996 0.000 0.004
#> GSM125163     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125165     3  0.2959      0.949 0.000 0.100 0.900
#> GSM125167     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125169     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125171     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125173     3  0.2959      0.949 0.000 0.100 0.900
#> GSM125175     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125177     3  0.2066      0.950 0.000 0.060 0.940
#> GSM125179     3  0.2959      0.949 0.000 0.100 0.900
#> GSM125181     3  0.2959      0.949 0.000 0.100 0.900
#> GSM125183     3  0.2959      0.949 0.000 0.100 0.900
#> GSM125185     3  0.2959      0.949 0.000 0.100 0.900
#> GSM125187     3  0.2959      0.949 0.000 0.100 0.900
#> GSM125189     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125191     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125193     3  0.1860      0.945 0.000 0.052 0.948
#> GSM125195     3  0.1860      0.945 0.000 0.052 0.948
#> GSM125197     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125199     1  0.0237      0.975 0.996 0.000 0.004
#> GSM125201     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125203     3  0.2066      0.950 0.000 0.060 0.940
#> GSM125205     2  0.1163      0.967 0.000 0.972 0.028
#> GSM125207     3  0.2066      0.950 0.000 0.060 0.940
#> GSM125209     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125211     3  0.2066      0.950 0.000 0.060 0.940
#> GSM125213     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125215     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125217     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125219     1  0.1964      0.972 0.944 0.000 0.056
#> GSM125221     3  0.2959      0.949 0.000 0.100 0.900
#> GSM125223     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125225     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125227     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125229     3  0.2066      0.950 0.000 0.060 0.940
#> GSM125231     3  0.0237      0.903 0.004 0.000 0.996
#> GSM125233     1  0.1964      0.972 0.944 0.000 0.056
#> GSM125235     1  0.0747      0.976 0.984 0.000 0.016
#> GSM125237     1  0.0237      0.975 0.996 0.000 0.004
#> GSM125124     1  0.1964      0.972 0.944 0.000 0.056
#> GSM125126     1  0.0000      0.975 1.000 0.000 0.000
#> GSM125128     1  0.0237      0.975 0.996 0.000 0.004
#> GSM125130     1  0.1964      0.972 0.944 0.000 0.056
#> GSM125132     1  0.0237      0.975 0.996 0.000 0.004
#> GSM125134     1  0.1964      0.972 0.944 0.000 0.056
#> GSM125136     1  0.0237      0.975 0.996 0.000 0.004
#> GSM125138     1  0.1964      0.972 0.944 0.000 0.056
#> GSM125140     1  0.1964      0.972 0.944 0.000 0.056
#> GSM125142     1  0.0892      0.975 0.980 0.000 0.020
#> GSM125144     1  0.1964      0.972 0.944 0.000 0.056
#> GSM125146     1  0.1964      0.972 0.944 0.000 0.056
#> GSM125148     1  0.0237      0.975 0.996 0.000 0.004
#> GSM125150     1  0.0000      0.975 1.000 0.000 0.000
#> GSM125152     1  0.1964      0.972 0.944 0.000 0.056
#> GSM125154     1  0.1964      0.972 0.944 0.000 0.056
#> GSM125156     1  0.0237      0.975 0.996 0.000 0.004
#> GSM125158     1  0.0237      0.975 0.996 0.000 0.004
#> GSM125160     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125162     1  0.0237      0.975 0.996 0.000 0.004
#> GSM125164     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125166     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125168     3  0.6309      0.183 0.000 0.500 0.500
#> GSM125170     2  0.1860      0.938 0.000 0.948 0.052
#> GSM125172     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125174     3  0.2878      0.950 0.000 0.096 0.904
#> GSM125176     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125178     3  0.2066      0.950 0.000 0.060 0.940
#> GSM125180     3  0.2959      0.949 0.000 0.100 0.900
#> GSM125182     3  0.5327      0.737 0.000 0.272 0.728
#> GSM125184     3  0.2959      0.949 0.000 0.100 0.900
#> GSM125186     3  0.2959      0.949 0.000 0.100 0.900
#> GSM125188     3  0.2959      0.949 0.000 0.100 0.900
#> GSM125190     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125192     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125194     3  0.0237      0.903 0.004 0.000 0.996
#> GSM125196     3  0.2066      0.950 0.000 0.060 0.940
#> GSM125198     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125200     1  0.0237      0.975 0.996 0.000 0.004
#> GSM125202     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125204     3  0.2066      0.950 0.000 0.060 0.940
#> GSM125206     3  0.2066      0.950 0.000 0.060 0.940
#> GSM125208     3  0.2066      0.950 0.000 0.060 0.940
#> GSM125210     3  0.2959      0.949 0.000 0.100 0.900
#> GSM125212     3  0.2066      0.950 0.000 0.060 0.940
#> GSM125214     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125216     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125218     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125220     1  0.0237      0.975 0.996 0.000 0.004
#> GSM125222     3  0.2959      0.949 0.000 0.100 0.900
#> GSM125224     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125226     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125228     2  0.0000      0.997 0.000 1.000 0.000
#> GSM125230     3  0.0237      0.903 0.004 0.000 0.996
#> GSM125232     3  0.0237      0.903 0.004 0.000 0.996
#> GSM125234     1  0.4750      0.788 0.784 0.000 0.216
#> GSM125236     1  0.1860      0.972 0.948 0.000 0.052
#> GSM125238     1  0.0237      0.975 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
#> GSM125123     1  0.4972     -0.449 0.544 0.000 0.000 0.456
#> GSM125125     1  0.3873      0.381 0.772 0.000 0.000 0.228
#> GSM125127     1  0.4992     -0.534 0.524 0.000 0.000 0.476
#> GSM125129     1  0.4981     -0.473 0.536 0.000 0.000 0.464
#> GSM125131     1  0.1557      0.552 0.944 0.000 0.000 0.056
#> GSM125133     1  0.3726      0.324 0.788 0.000 0.000 0.212
#> GSM125135     1  0.4843     -0.252 0.604 0.000 0.000 0.396
#> GSM125137     1  0.0000      0.582 1.000 0.000 0.000 0.000
#> GSM125139     1  0.4594      0.233 0.712 0.000 0.008 0.280
#> GSM125141     1  0.0000      0.582 1.000 0.000 0.000 0.000
#> GSM125143     1  0.4992     -0.534 0.524 0.000 0.000 0.476
#> GSM125145     1  0.4941     -0.402 0.564 0.000 0.000 0.436
#> GSM125147     1  0.0000      0.582 1.000 0.000 0.000 0.000
#> GSM125149     1  0.0000      0.582 1.000 0.000 0.000 0.000
#> GSM125151     1  0.4594      0.233 0.712 0.000 0.008 0.280
#> GSM125153     1  0.3032      0.514 0.868 0.000 0.008 0.124
#> GSM125155     1  0.1256      0.580 0.964 0.000 0.008 0.028
#> GSM125157     1  0.0000      0.582 1.000 0.000 0.000 0.000
#> GSM125159     2  0.0707      0.937 0.000 0.980 0.000 0.020
#> GSM125161     1  0.2408      0.506 0.896 0.000 0.000 0.104
#> GSM125163     2  0.0000      0.940 0.000 1.000 0.000 0.000
#> GSM125165     3  0.3828      0.750 0.000 0.084 0.848 0.068
#> GSM125167     2  0.1807      0.923 0.000 0.940 0.008 0.052
#> GSM125169     2  0.2048      0.921 0.000 0.928 0.008 0.064
#> GSM125171     2  0.1637      0.934 0.000 0.940 0.000 0.060
#> GSM125173     3  0.3239      0.771 0.000 0.052 0.880 0.068
#> GSM125175     2  0.1389      0.938 0.000 0.952 0.000 0.048
#> GSM125177     3  0.4814      0.787 0.000 0.008 0.676 0.316
#> GSM125179     3  0.2319      0.781 0.000 0.040 0.924 0.036
#> GSM125181     3  0.3421      0.751 0.000 0.088 0.868 0.044
#> GSM125183     3  0.2363      0.781 0.000 0.056 0.920 0.024
#> GSM125185     3  0.2142      0.782 0.000 0.056 0.928 0.016
#> GSM125187     3  0.2224      0.781 0.000 0.040 0.928 0.032
#> GSM125189     2  0.1661      0.926 0.000 0.944 0.004 0.052
#> GSM125191     2  0.5168      0.663 0.000 0.712 0.248 0.040
#> GSM125193     3  0.4643      0.780 0.000 0.000 0.656 0.344
#> GSM125195     3  0.4661      0.776 0.000 0.000 0.652 0.348
#> GSM125197     2  0.1022      0.939 0.000 0.968 0.000 0.032
#> GSM125199     1  0.0000      0.582 1.000 0.000 0.000 0.000
#> GSM125201     2  0.1302      0.936 0.000 0.956 0.000 0.044
#> GSM125203     3  0.4897      0.782 0.000 0.008 0.660 0.332
#> GSM125205     2  0.2586      0.903 0.000 0.912 0.040 0.048
#> GSM125207     3  0.4814      0.788 0.000 0.008 0.676 0.316
#> GSM125209     2  0.5678      0.551 0.000 0.640 0.316 0.044
#> GSM125211     3  0.5125      0.766 0.000 0.008 0.604 0.388
#> GSM125213     2  0.0592      0.938 0.000 0.984 0.000 0.016
#> GSM125215     2  0.0921      0.940 0.000 0.972 0.000 0.028
#> GSM125217     2  0.1970      0.922 0.000 0.932 0.008 0.060
#> GSM125219     1  0.5163     -0.565 0.516 0.000 0.004 0.480
#> GSM125221     3  0.3320      0.762 0.000 0.068 0.876 0.056
#> GSM125223     2  0.1022      0.939 0.000 0.968 0.000 0.032
#> GSM125225     2  0.0921      0.940 0.000 0.972 0.000 0.028
#> GSM125227     2  0.0921      0.940 0.000 0.972 0.000 0.028
#> GSM125229     3  0.5256      0.764 0.000 0.012 0.596 0.392
#> GSM125231     3  0.4713      0.774 0.000 0.000 0.640 0.360
#> GSM125233     1  0.4972     -0.449 0.544 0.000 0.000 0.456
#> GSM125235     1  0.4193      0.251 0.732 0.000 0.000 0.268
#> GSM125237     1  0.0000      0.582 1.000 0.000 0.000 0.000
#> GSM125124     1  0.4647      0.210 0.704 0.000 0.008 0.288
#> GSM125126     1  0.1022      0.580 0.968 0.000 0.000 0.032
#> GSM125128     1  0.3801      0.311 0.780 0.000 0.000 0.220
#> GSM125130     1  0.4992     -0.534 0.524 0.000 0.000 0.476
#> GSM125132     1  0.0000      0.582 1.000 0.000 0.000 0.000
#> GSM125134     1  0.4049      0.387 0.780 0.000 0.008 0.212
#> GSM125136     1  0.3486      0.365 0.812 0.000 0.000 0.188
#> GSM125138     1  0.4621      0.222 0.708 0.000 0.008 0.284
#> GSM125140     1  0.4452      0.284 0.732 0.000 0.008 0.260
#> GSM125142     1  0.2048      0.564 0.928 0.000 0.008 0.064
#> GSM125144     1  0.4647      0.210 0.704 0.000 0.008 0.288
#> GSM125146     1  0.4817     -0.222 0.612 0.000 0.000 0.388
#> GSM125148     1  0.0000      0.582 1.000 0.000 0.000 0.000
#> GSM125150     1  0.0000      0.582 1.000 0.000 0.000 0.000
#> GSM125152     1  0.4594      0.233 0.712 0.000 0.008 0.280
#> GSM125154     1  0.3300      0.490 0.848 0.000 0.008 0.144
#> GSM125156     1  0.1890      0.570 0.936 0.000 0.008 0.056
#> GSM125158     1  0.1302      0.578 0.956 0.000 0.000 0.044
#> GSM125160     2  0.0707      0.937 0.000 0.980 0.000 0.020
#> GSM125162     1  0.2408      0.506 0.896 0.000 0.000 0.104
#> GSM125164     2  0.0188      0.940 0.000 0.996 0.000 0.004
#> GSM125166     2  0.0000      0.940 0.000 1.000 0.000 0.000
#> GSM125168     3  0.6203      0.293 0.000 0.340 0.592 0.068
#> GSM125170     2  0.6171      0.474 0.000 0.588 0.348 0.064
#> GSM125172     2  0.1557      0.936 0.000 0.944 0.000 0.056
#> GSM125174     3  0.2670      0.783 0.000 0.052 0.908 0.040
#> GSM125176     2  0.1520      0.932 0.000 0.956 0.020 0.024
#> GSM125178     3  0.4814      0.787 0.000 0.008 0.676 0.316
#> GSM125180     3  0.2319      0.781 0.000 0.040 0.924 0.036
#> GSM125182     3  0.4951      0.594 0.000 0.212 0.744 0.044
#> GSM125184     3  0.2363      0.781 0.000 0.056 0.920 0.024
#> GSM125186     3  0.2224      0.781 0.000 0.040 0.928 0.032
#> GSM125188     3  0.3354      0.753 0.000 0.084 0.872 0.044
#> GSM125190     2  0.1807      0.924 0.000 0.940 0.008 0.052
#> GSM125192     2  0.0000      0.940 0.000 1.000 0.000 0.000
#> GSM125194     3  0.4661      0.780 0.000 0.000 0.652 0.348
#> GSM125196     3  0.4936      0.781 0.000 0.008 0.652 0.340
#> GSM125198     2  0.1022      0.939 0.000 0.968 0.000 0.032
#> GSM125200     1  0.1118      0.573 0.964 0.000 0.000 0.036
#> GSM125202     2  0.1302      0.936 0.000 0.956 0.000 0.044
#> GSM125204     3  0.4897      0.782 0.000 0.008 0.660 0.332
#> GSM125206     3  0.4936      0.781 0.000 0.008 0.652 0.340
#> GSM125208     3  0.4814      0.788 0.000 0.008 0.676 0.316
#> GSM125210     3  0.1890      0.781 0.000 0.056 0.936 0.008
#> GSM125212     3  0.5125      0.766 0.000 0.008 0.604 0.388
#> GSM125214     2  0.0817      0.940 0.000 0.976 0.000 0.024
#> GSM125216     2  0.0921      0.940 0.000 0.972 0.000 0.028
#> GSM125218     2  0.1824      0.924 0.000 0.936 0.004 0.060
#> GSM125220     1  0.4283      0.215 0.740 0.000 0.004 0.256
#> GSM125222     3  0.3320      0.762 0.000 0.068 0.876 0.056
#> GSM125224     2  0.0921      0.940 0.000 0.972 0.000 0.028
#> GSM125226     2  0.1807      0.924 0.000 0.940 0.008 0.052
#> GSM125228     2  0.0921      0.940 0.000 0.972 0.000 0.028
#> GSM125230     3  0.4817      0.763 0.000 0.000 0.612 0.388
#> GSM125232     3  0.4804      0.768 0.000 0.000 0.616 0.384
#> GSM125234     4  0.6187      0.000 0.432 0.000 0.052 0.516
#> GSM125236     1  0.4985     -0.489 0.532 0.000 0.000 0.468
#> GSM125238     1  0.0000      0.582 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
#> GSM125123     5  0.0451     0.6116 0.004 0.000 0.000 0.008 0.988
#> GSM125125     5  0.4288    -0.1706 0.384 0.000 0.000 0.004 0.612
#> GSM125127     5  0.0510     0.6100 0.000 0.000 0.016 0.000 0.984
#> GSM125129     5  0.0162     0.6113 0.004 0.000 0.000 0.000 0.996
#> GSM125131     1  0.4397     0.6400 0.564 0.000 0.000 0.004 0.432
#> GSM125133     5  0.4594     0.1960 0.284 0.000 0.000 0.036 0.680
#> GSM125135     5  0.2519     0.5406 0.100 0.000 0.000 0.016 0.884
#> GSM125137     1  0.4642     0.7993 0.660 0.000 0.000 0.032 0.308
#> GSM125139     5  0.5661     0.2244 0.272 0.000 0.000 0.120 0.608
#> GSM125141     1  0.3876     0.8139 0.684 0.000 0.000 0.000 0.316
#> GSM125143     5  0.0510     0.6100 0.000 0.000 0.016 0.000 0.984
#> GSM125145     5  0.1251     0.6057 0.036 0.000 0.000 0.008 0.956
#> GSM125147     1  0.3949     0.8172 0.668 0.000 0.000 0.000 0.332
#> GSM125149     1  0.3932     0.8186 0.672 0.000 0.000 0.000 0.328
#> GSM125151     5  0.5558     0.2293 0.268 0.000 0.000 0.112 0.620
#> GSM125153     1  0.5932     0.4327 0.456 0.000 0.000 0.104 0.440
#> GSM125155     1  0.5523     0.7100 0.572 0.000 0.000 0.080 0.348
#> GSM125157     1  0.4306     0.8143 0.660 0.000 0.000 0.012 0.328
#> GSM125159     2  0.2426     0.9110 0.036 0.900 0.000 0.064 0.000
#> GSM125161     1  0.5594     0.4548 0.492 0.000 0.000 0.072 0.436
#> GSM125163     2  0.1549     0.9210 0.016 0.944 0.000 0.040 0.000
#> GSM125165     4  0.5216     0.7811 0.036 0.032 0.252 0.680 0.000
#> GSM125167     2  0.3593     0.8707 0.060 0.824 0.000 0.116 0.000
#> GSM125169     2  0.3657     0.8706 0.064 0.820 0.000 0.116 0.000
#> GSM125171     2  0.1701     0.9193 0.048 0.936 0.000 0.016 0.000
#> GSM125173     4  0.5648     0.7775 0.060 0.024 0.288 0.628 0.000
#> GSM125175     2  0.1469     0.9205 0.036 0.948 0.000 0.016 0.000
#> GSM125177     3  0.0000     0.9347 0.000 0.000 1.000 0.000 0.000
#> GSM125179     4  0.5733     0.7825 0.036 0.024 0.336 0.596 0.008
#> GSM125181     4  0.5190     0.7838 0.032 0.032 0.260 0.676 0.000
#> GSM125183     4  0.5439     0.7858 0.036 0.024 0.328 0.612 0.000
#> GSM125185     4  0.5662     0.7840 0.032 0.024 0.336 0.600 0.008
#> GSM125187     4  0.5662     0.7840 0.032 0.024 0.336 0.600 0.008
#> GSM125189     2  0.3558     0.8766 0.064 0.828 0.000 0.108 0.000
#> GSM125191     4  0.5000     0.2773 0.036 0.388 0.000 0.576 0.000
#> GSM125193     3  0.0693     0.9356 0.000 0.000 0.980 0.008 0.012
#> GSM125195     3  0.1393     0.9280 0.024 0.000 0.956 0.012 0.008
#> GSM125197     2  0.1357     0.9146 0.048 0.948 0.000 0.004 0.000
#> GSM125199     1  0.4147     0.8143 0.676 0.000 0.000 0.008 0.316
#> GSM125201     2  0.1638     0.9089 0.064 0.932 0.000 0.004 0.000
#> GSM125203     3  0.0566     0.9363 0.004 0.000 0.984 0.000 0.012
#> GSM125205     2  0.2238     0.8943 0.064 0.912 0.020 0.004 0.000
#> GSM125207     3  0.0290     0.9341 0.008 0.000 0.992 0.000 0.000
#> GSM125209     4  0.4752     0.4551 0.036 0.316 0.000 0.648 0.000
#> GSM125211     3  0.2300     0.9031 0.052 0.000 0.908 0.040 0.000
#> GSM125213     2  0.2304     0.9207 0.044 0.908 0.000 0.048 0.000
#> GSM125215     2  0.1041     0.9203 0.032 0.964 0.000 0.004 0.000
#> GSM125217     2  0.3543     0.8757 0.060 0.828 0.000 0.112 0.000
#> GSM125219     5  0.1806     0.5996 0.016 0.000 0.016 0.028 0.940
#> GSM125221     4  0.4420     0.7985 0.000 0.028 0.280 0.692 0.000
#> GSM125223     2  0.1205     0.9183 0.040 0.956 0.000 0.004 0.000
#> GSM125225     2  0.1041     0.9203 0.032 0.964 0.000 0.004 0.000
#> GSM125227     2  0.1041     0.9203 0.032 0.964 0.000 0.004 0.000
#> GSM125229     3  0.2376     0.9001 0.052 0.000 0.904 0.044 0.000
#> GSM125231     3  0.0771     0.9316 0.000 0.000 0.976 0.020 0.004
#> GSM125233     5  0.0693     0.6112 0.008 0.000 0.000 0.012 0.980
#> GSM125235     5  0.3366     0.3729 0.212 0.000 0.000 0.004 0.784
#> GSM125237     1  0.3932     0.8186 0.672 0.000 0.000 0.000 0.328
#> GSM125124     5  0.5851     0.2058 0.288 0.000 0.000 0.132 0.580
#> GSM125126     1  0.4114     0.7789 0.624 0.000 0.000 0.000 0.376
#> GSM125128     5  0.4640     0.2479 0.256 0.000 0.000 0.048 0.696
#> GSM125130     5  0.0671     0.6097 0.000 0.000 0.016 0.004 0.980
#> GSM125132     1  0.3932     0.8186 0.672 0.000 0.000 0.000 0.328
#> GSM125134     5  0.5922    -0.0816 0.352 0.000 0.000 0.116 0.532
#> GSM125136     5  0.5459    -0.0857 0.360 0.000 0.000 0.072 0.568
#> GSM125138     5  0.5885     0.1863 0.296 0.000 0.000 0.132 0.572
#> GSM125140     5  0.5835     0.1075 0.312 0.000 0.000 0.120 0.568
#> GSM125142     1  0.5970     0.5848 0.524 0.000 0.000 0.120 0.356
#> GSM125144     5  0.5834     0.2044 0.284 0.000 0.000 0.132 0.584
#> GSM125146     5  0.2921     0.5403 0.124 0.000 0.000 0.020 0.856
#> GSM125148     1  0.4165     0.8092 0.672 0.000 0.000 0.008 0.320
#> GSM125150     1  0.3932     0.8186 0.672 0.000 0.000 0.000 0.328
#> GSM125152     5  0.5558     0.2293 0.268 0.000 0.000 0.112 0.620
#> GSM125154     1  0.6069     0.3555 0.448 0.000 0.000 0.120 0.432
#> GSM125156     1  0.5579     0.6758 0.552 0.000 0.000 0.080 0.368
#> GSM125158     1  0.5240     0.7159 0.584 0.000 0.000 0.056 0.360
#> GSM125160     2  0.2426     0.9110 0.036 0.900 0.000 0.064 0.000
#> GSM125162     1  0.5594     0.4548 0.492 0.000 0.000 0.072 0.436
#> GSM125164     2  0.1549     0.9210 0.016 0.944 0.000 0.040 0.000
#> GSM125166     2  0.1648     0.9205 0.020 0.940 0.000 0.040 0.000
#> GSM125168     4  0.6500     0.6697 0.060 0.156 0.160 0.624 0.000
#> GSM125170     4  0.5942     0.5066 0.064 0.276 0.040 0.620 0.000
#> GSM125172     2  0.1626     0.9195 0.044 0.940 0.000 0.016 0.000
#> GSM125174     4  0.5935     0.7649 0.072 0.024 0.316 0.588 0.000
#> GSM125176     2  0.2914     0.9032 0.052 0.872 0.000 0.076 0.000
#> GSM125178     3  0.0000     0.9347 0.000 0.000 1.000 0.000 0.000
#> GSM125180     4  0.5733     0.7825 0.036 0.024 0.336 0.596 0.008
#> GSM125182     4  0.5762     0.7599 0.032 0.076 0.240 0.652 0.000
#> GSM125184     4  0.5517     0.7888 0.036 0.028 0.328 0.608 0.000
#> GSM125186     4  0.5662     0.7840 0.032 0.024 0.336 0.600 0.008
#> GSM125188     4  0.5058     0.7882 0.028 0.028 0.264 0.680 0.000
#> GSM125190     2  0.3657     0.8706 0.064 0.820 0.000 0.116 0.000
#> GSM125192     2  0.1549     0.9210 0.016 0.944 0.000 0.040 0.000
#> GSM125194     3  0.0693     0.9356 0.000 0.000 0.980 0.008 0.012
#> GSM125196     3  0.1393     0.9280 0.024 0.000 0.956 0.012 0.008
#> GSM125198     2  0.1357     0.9146 0.048 0.948 0.000 0.004 0.000
#> GSM125200     1  0.4761     0.7609 0.616 0.000 0.000 0.028 0.356
#> GSM125202     2  0.1638     0.9089 0.064 0.932 0.000 0.004 0.000
#> GSM125204     3  0.0566     0.9363 0.004 0.000 0.984 0.000 0.012
#> GSM125206     3  0.1393     0.9280 0.024 0.000 0.956 0.012 0.008
#> GSM125208     3  0.0290     0.9341 0.008 0.000 0.992 0.000 0.000
#> GSM125210     4  0.5610     0.7886 0.032 0.028 0.332 0.604 0.004
#> GSM125212     3  0.2300     0.9031 0.052 0.000 0.908 0.040 0.000
#> GSM125214     2  0.1124     0.9197 0.036 0.960 0.000 0.004 0.000
#> GSM125216     2  0.1041     0.9203 0.032 0.964 0.000 0.004 0.000
#> GSM125218     2  0.3543     0.8757 0.060 0.828 0.000 0.112 0.000
#> GSM125220     5  0.4554     0.3579 0.216 0.000 0.016 0.032 0.736
#> GSM125222     4  0.4442     0.7987 0.000 0.028 0.284 0.688 0.000
#> GSM125224     2  0.1041     0.9203 0.032 0.964 0.000 0.004 0.000
#> GSM125226     2  0.3657     0.8706 0.064 0.820 0.000 0.116 0.000
#> GSM125228     2  0.1041     0.9203 0.032 0.964 0.000 0.004 0.000
#> GSM125230     3  0.2228     0.9051 0.048 0.000 0.912 0.040 0.000
#> GSM125232     3  0.5889     0.5944 0.068 0.000 0.688 0.148 0.096
#> GSM125234     5  0.2217     0.5731 0.024 0.000 0.044 0.012 0.920
#> GSM125236     5  0.0162     0.6120 0.000 0.000 0.004 0.000 0.996
#> GSM125238     1  0.3932     0.8186 0.672 0.000 0.000 0.000 0.328

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5 p6
#> GSM125123     5  0.1448   0.623382 0.012 0.000 0.000 0.016 0.948 NA
#> GSM125125     5  0.4730  -0.268650 0.468 0.000 0.000 0.016 0.496 NA
#> GSM125127     5  0.0665   0.624366 0.000 0.000 0.008 0.004 0.980 NA
#> GSM125129     5  0.0717   0.624880 0.008 0.000 0.000 0.000 0.976 NA
#> GSM125131     1  0.4281   0.692124 0.688 0.000 0.000 0.016 0.272 NA
#> GSM125133     5  0.4851   0.362993 0.268 0.000 0.000 0.020 0.656 NA
#> GSM125135     5  0.1989   0.606291 0.052 0.000 0.000 0.004 0.916 NA
#> GSM125137     1  0.4515   0.758314 0.724 0.000 0.000 0.024 0.192 NA
#> GSM125139     5  0.6019  -0.013206 0.300 0.000 0.000 0.004 0.464 NA
#> GSM125141     1  0.3200   0.780896 0.788 0.000 0.000 0.000 0.196 NA
#> GSM125143     5  0.0653   0.624937 0.004 0.000 0.012 0.000 0.980 NA
#> GSM125145     5  0.2563   0.600869 0.032 0.000 0.004 0.004 0.884 NA
#> GSM125147     1  0.2964   0.780569 0.792 0.000 0.000 0.000 0.204 NA
#> GSM125149     1  0.2933   0.780017 0.796 0.000 0.000 0.000 0.200 NA
#> GSM125151     5  0.6058   0.029858 0.284 0.000 0.000 0.008 0.480 NA
#> GSM125153     1  0.5918   0.481945 0.496 0.000 0.004 0.000 0.276 NA
#> GSM125155     1  0.5576   0.643940 0.572 0.000 0.000 0.004 0.220 NA
#> GSM125157     1  0.4006   0.772372 0.748 0.000 0.000 0.016 0.204 NA
#> GSM125159     2  0.3237   0.852331 0.008 0.836 0.000 0.056 0.000 NA
#> GSM125161     1  0.5928   0.476594 0.564 0.000 0.000 0.044 0.280 NA
#> GSM125163     2  0.2631   0.862693 0.004 0.876 0.000 0.044 0.000 NA
#> GSM125165     4  0.4933   0.771763 0.020 0.020 0.096 0.728 0.000 NA
#> GSM125167     2  0.4684   0.784076 0.012 0.704 0.000 0.096 0.000 NA
#> GSM125169     2  0.4682   0.783481 0.004 0.680 0.000 0.092 0.000 NA
#> GSM125171     2  0.3503   0.842027 0.016 0.808 0.000 0.032 0.000 NA
#> GSM125173     4  0.5768   0.729177 0.044 0.016 0.096 0.660 0.004 NA
#> GSM125175     2  0.2404   0.860986 0.000 0.872 0.000 0.016 0.000 NA
#> GSM125177     3  0.0790   0.892532 0.000 0.000 0.968 0.032 0.000 NA
#> GSM125179     4  0.3557   0.777611 0.004 0.016 0.188 0.784 0.004 NA
#> GSM125181     4  0.5099   0.774259 0.020 0.024 0.104 0.716 0.000 NA
#> GSM125183     4  0.3277   0.781061 0.000 0.016 0.188 0.792 0.000 NA
#> GSM125185     4  0.3764   0.777572 0.004 0.016 0.188 0.776 0.004 NA
#> GSM125187     4  0.3667   0.777678 0.004 0.016 0.188 0.780 0.004 NA
#> GSM125189     2  0.4402   0.794492 0.000 0.700 0.000 0.084 0.000 NA
#> GSM125191     4  0.5708   0.433538 0.016 0.300 0.000 0.552 0.000 NA
#> GSM125193     3  0.2247   0.886972 0.008 0.000 0.912 0.044 0.012 NA
#> GSM125195     3  0.2842   0.864805 0.032 0.000 0.876 0.020 0.004 NA
#> GSM125197     2  0.2149   0.839839 0.016 0.900 0.000 0.004 0.000 NA
#> GSM125199     1  0.4046   0.772857 0.748 0.000 0.000 0.016 0.200 NA
#> GSM125201     2  0.2365   0.842284 0.012 0.892 0.004 0.008 0.000 NA
#> GSM125203     3  0.1452   0.893313 0.004 0.000 0.948 0.032 0.008 NA
#> GSM125205     2  0.3331   0.808987 0.016 0.840 0.032 0.008 0.000 NA
#> GSM125207     3  0.1745   0.886417 0.000 0.000 0.924 0.056 0.000 NA
#> GSM125209     4  0.5391   0.617217 0.016 0.212 0.004 0.640 0.000 NA
#> GSM125211     3  0.3823   0.838203 0.060 0.000 0.812 0.028 0.004 NA
#> GSM125213     2  0.2862   0.858537 0.008 0.864 0.000 0.048 0.000 NA
#> GSM125215     2  0.1333   0.858323 0.008 0.944 0.000 0.000 0.000 NA
#> GSM125217     2  0.4549   0.787256 0.000 0.680 0.000 0.088 0.000 NA
#> GSM125219     5  0.2005   0.611041 0.020 0.000 0.016 0.004 0.924 NA
#> GSM125221     4  0.4233   0.793856 0.016 0.020 0.120 0.784 0.000 NA
#> GSM125223     2  0.1668   0.853880 0.008 0.928 0.000 0.004 0.000 NA
#> GSM125225     2  0.1333   0.858323 0.008 0.944 0.000 0.000 0.000 NA
#> GSM125227     2  0.1398   0.857353 0.008 0.940 0.000 0.000 0.000 NA
#> GSM125229     3  0.3929   0.833684 0.056 0.000 0.808 0.040 0.004 NA
#> GSM125231     3  0.2341   0.874719 0.008 0.000 0.908 0.016 0.024 NA
#> GSM125233     5  0.1149   0.623687 0.008 0.000 0.000 0.008 0.960 NA
#> GSM125235     5  0.3450   0.480784 0.208 0.000 0.000 0.012 0.772 NA
#> GSM125237     1  0.2793   0.780607 0.800 0.000 0.000 0.000 0.200 NA
#> GSM125124     5  0.6150  -0.030893 0.284 0.000 0.004 0.000 0.424 NA
#> GSM125126     1  0.3852   0.740992 0.720 0.000 0.000 0.016 0.256 NA
#> GSM125128     5  0.4861   0.404558 0.224 0.000 0.000 0.028 0.684 NA
#> GSM125130     5  0.0725   0.623773 0.000 0.000 0.012 0.000 0.976 NA
#> GSM125132     1  0.3691   0.774657 0.764 0.000 0.000 0.012 0.204 NA
#> GSM125134     1  0.6176   0.190442 0.372 0.000 0.004 0.000 0.368 NA
#> GSM125136     5  0.6227  -0.000105 0.380 0.000 0.000 0.056 0.464 NA
#> GSM125138     5  0.6181  -0.067388 0.300 0.000 0.004 0.000 0.408 NA
#> GSM125140     5  0.6076  -0.100453 0.328 0.000 0.000 0.004 0.436 NA
#> GSM125142     1  0.5908   0.514586 0.500 0.000 0.004 0.000 0.228 NA
#> GSM125144     5  0.6150  -0.030893 0.284 0.000 0.004 0.000 0.424 NA
#> GSM125146     5  0.3847   0.529767 0.136 0.000 0.004 0.000 0.780 NA
#> GSM125148     1  0.3534   0.771359 0.772 0.000 0.004 0.000 0.200 NA
#> GSM125150     1  0.3043   0.780697 0.792 0.000 0.000 0.000 0.200 NA
#> GSM125152     5  0.6058   0.029858 0.284 0.000 0.000 0.008 0.480 NA
#> GSM125154     1  0.6086   0.392934 0.448 0.000 0.004 0.000 0.288 NA
#> GSM125156     1  0.5675   0.617032 0.552 0.000 0.000 0.004 0.240 NA
#> GSM125158     1  0.5475   0.674556 0.596 0.000 0.000 0.008 0.236 NA
#> GSM125160     2  0.3237   0.852331 0.008 0.836 0.000 0.056 0.000 NA
#> GSM125162     1  0.5928   0.476594 0.564 0.000 0.000 0.044 0.280 NA
#> GSM125164     2  0.2631   0.861846 0.004 0.876 0.000 0.044 0.000 NA
#> GSM125166     2  0.2493   0.863256 0.004 0.884 0.000 0.036 0.000 NA
#> GSM125168     4  0.5779   0.667128 0.012 0.136 0.036 0.640 0.000 NA
#> GSM125170     4  0.5302   0.567081 0.004 0.172 0.000 0.616 0.000 NA
#> GSM125172     2  0.3809   0.840906 0.016 0.788 0.000 0.048 0.000 NA
#> GSM125174     4  0.5213   0.730109 0.044 0.016 0.152 0.716 0.004 NA
#> GSM125176     2  0.4074   0.826028 0.000 0.748 0.000 0.092 0.000 NA
#> GSM125178     3  0.0790   0.892532 0.000 0.000 0.968 0.032 0.000 NA
#> GSM125180     4  0.3557   0.777611 0.004 0.016 0.188 0.784 0.004 NA
#> GSM125182     4  0.5652   0.752789 0.020 0.072 0.088 0.684 0.000 NA
#> GSM125184     4  0.3329   0.783566 0.000 0.020 0.184 0.792 0.000 NA
#> GSM125186     4  0.3764   0.777572 0.004 0.016 0.188 0.776 0.004 NA
#> GSM125188     4  0.5027   0.777892 0.020 0.020 0.108 0.720 0.000 NA
#> GSM125190     2  0.4494   0.789954 0.000 0.692 0.000 0.092 0.000 NA
#> GSM125192     2  0.2263   0.865062 0.004 0.900 0.000 0.036 0.000 NA
#> GSM125194     3  0.2247   0.886972 0.008 0.000 0.912 0.044 0.012 NA
#> GSM125196     3  0.2842   0.864805 0.032 0.000 0.876 0.020 0.004 NA
#> GSM125198     2  0.2149   0.839839 0.016 0.900 0.000 0.004 0.000 NA
#> GSM125200     1  0.4903   0.738050 0.668 0.000 0.000 0.016 0.236 NA
#> GSM125202     2  0.2365   0.842284 0.012 0.892 0.004 0.008 0.000 NA
#> GSM125204     3  0.1452   0.893313 0.004 0.000 0.948 0.032 0.008 NA
#> GSM125206     3  0.2755   0.865021 0.032 0.000 0.880 0.016 0.004 NA
#> GSM125208     3  0.1745   0.886417 0.000 0.000 0.924 0.056 0.000 NA
#> GSM125210     4  0.3592   0.780529 0.000 0.016 0.184 0.784 0.004 NA
#> GSM125212     3  0.3823   0.838203 0.060 0.000 0.812 0.028 0.004 NA
#> GSM125214     2  0.0692   0.864796 0.000 0.976 0.000 0.004 0.000 NA
#> GSM125216     2  0.1333   0.858323 0.008 0.944 0.000 0.000 0.000 NA
#> GSM125218     2  0.4449   0.794425 0.000 0.696 0.000 0.088 0.000 NA
#> GSM125220     5  0.4750   0.471803 0.184 0.000 0.016 0.020 0.724 NA
#> GSM125222     4  0.4274   0.793667 0.016 0.020 0.124 0.780 0.000 NA
#> GSM125224     2  0.1398   0.857353 0.008 0.940 0.000 0.000 0.000 NA
#> GSM125226     2  0.4494   0.789954 0.000 0.692 0.000 0.092 0.000 NA
#> GSM125228     2  0.1398   0.857353 0.008 0.940 0.000 0.000 0.000 NA
#> GSM125230     3  0.3259   0.854874 0.052 0.000 0.848 0.016 0.004 NA
#> GSM125232     3  0.6770   0.450743 0.012 0.000 0.516 0.124 0.084 NA
#> GSM125234     5  0.2016   0.595387 0.000 0.000 0.040 0.016 0.920 NA
#> GSM125236     5  0.0984   0.624782 0.012 0.000 0.000 0.012 0.968 NA
#> GSM125238     1  0.2793   0.780607 0.800 0.000 0.000 0.000 0.200 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-kmeans-consensus-heatmap-1

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk CV-kmeans-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk CV-kmeans-collect-classes

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

test_to_known_factors(res)
#>             n agent(p) individual(p) k
#> CV:kmeans 116    0.852      1.91e-05 2
#> CV:kmeans 115    0.933      1.07e-08 3
#> CV:kmeans  87    0.884      1.89e-06 4
#> CV:kmeans  96    0.808      6.59e-11 5
#> CV:kmeans  96    0.869      6.24e-11 6

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


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

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

collect_plots(res)

plot of chunk CV-skmeans-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           0.990       0.995         0.5015 0.499   0.499
#> 3 3 0.914           0.935       0.969         0.2527 0.863   0.731
#> 4 4 0.988           0.947       0.968         0.1126 0.922   0.796
#> 5 5 0.792           0.723       0.868         0.0922 0.939   0.800
#> 6 6 0.752           0.641       0.804         0.0368 0.961   0.845

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
#> GSM125123     1  0.0000      0.998 1.000 0.000
#> GSM125125     1  0.0000      0.998 1.000 0.000
#> GSM125127     1  0.0000      0.998 1.000 0.000
#> GSM125129     1  0.0000      0.998 1.000 0.000
#> GSM125131     1  0.0000      0.998 1.000 0.000
#> GSM125133     1  0.0000      0.998 1.000 0.000
#> GSM125135     1  0.0000      0.998 1.000 0.000
#> GSM125137     1  0.0000      0.998 1.000 0.000
#> GSM125139     1  0.0000      0.998 1.000 0.000
#> GSM125141     1  0.0000      0.998 1.000 0.000
#> GSM125143     1  0.0000      0.998 1.000 0.000
#> GSM125145     1  0.0000      0.998 1.000 0.000
#> GSM125147     1  0.0000      0.998 1.000 0.000
#> GSM125149     1  0.0000      0.998 1.000 0.000
#> GSM125151     1  0.0000      0.998 1.000 0.000
#> GSM125153     1  0.0000      0.998 1.000 0.000
#> GSM125155     1  0.0000      0.998 1.000 0.000
#> GSM125157     1  0.0000      0.998 1.000 0.000
#> GSM125159     2  0.0000      0.993 0.000 1.000
#> GSM125161     1  0.0000      0.998 1.000 0.000
#> GSM125163     2  0.0000      0.993 0.000 1.000
#> GSM125165     2  0.0000      0.993 0.000 1.000
#> GSM125167     2  0.0000      0.993 0.000 1.000
#> GSM125169     2  0.0000      0.993 0.000 1.000
#> GSM125171     2  0.0000      0.993 0.000 1.000
#> GSM125173     2  0.0000      0.993 0.000 1.000
#> GSM125175     2  0.0000      0.993 0.000 1.000
#> GSM125177     2  0.0000      0.993 0.000 1.000
#> GSM125179     2  0.0000      0.993 0.000 1.000
#> GSM125181     2  0.0000      0.993 0.000 1.000
#> GSM125183     2  0.0000      0.993 0.000 1.000
#> GSM125185     2  0.0000      0.993 0.000 1.000
#> GSM125187     2  0.5842      0.839 0.140 0.860
#> GSM125189     2  0.0000      0.993 0.000 1.000
#> GSM125191     2  0.0000      0.993 0.000 1.000
#> GSM125193     1  0.5059      0.873 0.888 0.112
#> GSM125195     2  0.7453      0.735 0.212 0.788
#> GSM125197     2  0.0000      0.993 0.000 1.000
#> GSM125199     1  0.0000      0.998 1.000 0.000
#> GSM125201     2  0.0000      0.993 0.000 1.000
#> GSM125203     2  0.0376      0.990 0.004 0.996
#> GSM125205     2  0.0000      0.993 0.000 1.000
#> GSM125207     2  0.0000      0.993 0.000 1.000
#> GSM125209     2  0.0000      0.993 0.000 1.000
#> GSM125211     2  0.0000      0.993 0.000 1.000
#> GSM125213     2  0.0000      0.993 0.000 1.000
#> GSM125215     2  0.0000      0.993 0.000 1.000
#> GSM125217     2  0.0000      0.993 0.000 1.000
#> GSM125219     1  0.0000      0.998 1.000 0.000
#> GSM125221     2  0.0000      0.993 0.000 1.000
#> GSM125223     2  0.0000      0.993 0.000 1.000
#> GSM125225     2  0.0000      0.993 0.000 1.000
#> GSM125227     2  0.0000      0.993 0.000 1.000
#> GSM125229     2  0.0000      0.993 0.000 1.000
#> GSM125231     1  0.0000      0.998 1.000 0.000
#> GSM125233     1  0.0000      0.998 1.000 0.000
#> GSM125235     1  0.0000      0.998 1.000 0.000
#> GSM125237     1  0.0000      0.998 1.000 0.000
#> GSM125124     1  0.0000      0.998 1.000 0.000
#> GSM125126     1  0.0000      0.998 1.000 0.000
#> GSM125128     1  0.0000      0.998 1.000 0.000
#> GSM125130     1  0.0000      0.998 1.000 0.000
#> GSM125132     1  0.0000      0.998 1.000 0.000
#> GSM125134     1  0.0000      0.998 1.000 0.000
#> GSM125136     1  0.0000      0.998 1.000 0.000
#> GSM125138     1  0.0000      0.998 1.000 0.000
#> GSM125140     1  0.0000      0.998 1.000 0.000
#> GSM125142     1  0.0000      0.998 1.000 0.000
#> GSM125144     1  0.0000      0.998 1.000 0.000
#> GSM125146     1  0.0000      0.998 1.000 0.000
#> GSM125148     1  0.0000      0.998 1.000 0.000
#> GSM125150     1  0.0000      0.998 1.000 0.000
#> GSM125152     1  0.0000      0.998 1.000 0.000
#> GSM125154     1  0.0000      0.998 1.000 0.000
#> GSM125156     1  0.0000      0.998 1.000 0.000
#> GSM125158     1  0.0000      0.998 1.000 0.000
#> GSM125160     2  0.0000      0.993 0.000 1.000
#> GSM125162     1  0.0000      0.998 1.000 0.000
#> GSM125164     2  0.0000      0.993 0.000 1.000
#> GSM125166     2  0.0000      0.993 0.000 1.000
#> GSM125168     2  0.0000      0.993 0.000 1.000
#> GSM125170     2  0.0000      0.993 0.000 1.000
#> GSM125172     2  0.0000      0.993 0.000 1.000
#> GSM125174     2  0.0000      0.993 0.000 1.000
#> GSM125176     2  0.0000      0.993 0.000 1.000
#> GSM125178     2  0.0000      0.993 0.000 1.000
#> GSM125180     2  0.0000      0.993 0.000 1.000
#> GSM125182     2  0.0000      0.993 0.000 1.000
#> GSM125184     2  0.0000      0.993 0.000 1.000
#> GSM125186     2  0.0000      0.993 0.000 1.000
#> GSM125188     2  0.0000      0.993 0.000 1.000
#> GSM125190     2  0.0000      0.993 0.000 1.000
#> GSM125192     2  0.0000      0.993 0.000 1.000
#> GSM125194     1  0.0000      0.998 1.000 0.000
#> GSM125196     2  0.0376      0.990 0.004 0.996
#> GSM125198     2  0.0000      0.993 0.000 1.000
#> GSM125200     1  0.0000      0.998 1.000 0.000
#> GSM125202     2  0.0000      0.993 0.000 1.000
#> GSM125204     2  0.1843      0.968 0.028 0.972
#> GSM125206     2  0.0000      0.993 0.000 1.000
#> GSM125208     2  0.2603      0.952 0.044 0.956
#> GSM125210     2  0.0000      0.993 0.000 1.000
#> GSM125212     2  0.0000      0.993 0.000 1.000
#> GSM125214     2  0.0000      0.993 0.000 1.000
#> GSM125216     2  0.0000      0.993 0.000 1.000
#> GSM125218     2  0.0000      0.993 0.000 1.000
#> GSM125220     1  0.0000      0.998 1.000 0.000
#> GSM125222     2  0.0000      0.993 0.000 1.000
#> GSM125224     2  0.0000      0.993 0.000 1.000
#> GSM125226     2  0.0000      0.993 0.000 1.000
#> GSM125228     2  0.0000      0.993 0.000 1.000
#> GSM125230     1  0.0000      0.998 1.000 0.000
#> GSM125232     1  0.0000      0.998 1.000 0.000
#> GSM125234     1  0.0000      0.998 1.000 0.000
#> GSM125236     1  0.0000      0.998 1.000 0.000
#> GSM125238     1  0.0000      0.998 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
#> GSM125123     1   0.000      0.998 1.000 0.000 0.000
#> GSM125125     1   0.000      0.998 1.000 0.000 0.000
#> GSM125127     1   0.000      0.998 1.000 0.000 0.000
#> GSM125129     1   0.000      0.998 1.000 0.000 0.000
#> GSM125131     1   0.000      0.998 1.000 0.000 0.000
#> GSM125133     1   0.000      0.998 1.000 0.000 0.000
#> GSM125135     1   0.000      0.998 1.000 0.000 0.000
#> GSM125137     1   0.000      0.998 1.000 0.000 0.000
#> GSM125139     1   0.000      0.998 1.000 0.000 0.000
#> GSM125141     1   0.000      0.998 1.000 0.000 0.000
#> GSM125143     1   0.000      0.998 1.000 0.000 0.000
#> GSM125145     1   0.000      0.998 1.000 0.000 0.000
#> GSM125147     1   0.000      0.998 1.000 0.000 0.000
#> GSM125149     1   0.000      0.998 1.000 0.000 0.000
#> GSM125151     1   0.000      0.998 1.000 0.000 0.000
#> GSM125153     1   0.000      0.998 1.000 0.000 0.000
#> GSM125155     1   0.000      0.998 1.000 0.000 0.000
#> GSM125157     1   0.000      0.998 1.000 0.000 0.000
#> GSM125159     2   0.000      0.940 0.000 1.000 0.000
#> GSM125161     1   0.000      0.998 1.000 0.000 0.000
#> GSM125163     2   0.000      0.940 0.000 1.000 0.000
#> GSM125165     2   0.000      0.940 0.000 1.000 0.000
#> GSM125167     2   0.000      0.940 0.000 1.000 0.000
#> GSM125169     2   0.000      0.940 0.000 1.000 0.000
#> GSM125171     2   0.000      0.940 0.000 1.000 0.000
#> GSM125173     2   0.000      0.940 0.000 1.000 0.000
#> GSM125175     2   0.000      0.940 0.000 1.000 0.000
#> GSM125177     3   0.000      0.945 0.000 0.000 1.000
#> GSM125179     2   0.546      0.660 0.000 0.712 0.288
#> GSM125181     2   0.000      0.940 0.000 1.000 0.000
#> GSM125183     2   0.543      0.665 0.000 0.716 0.284
#> GSM125185     2   0.550      0.654 0.000 0.708 0.292
#> GSM125187     2   0.572      0.649 0.004 0.704 0.292
#> GSM125189     2   0.000      0.940 0.000 1.000 0.000
#> GSM125191     2   0.000      0.940 0.000 1.000 0.000
#> GSM125193     3   0.311      0.878 0.096 0.004 0.900
#> GSM125195     3   0.000      0.945 0.000 0.000 1.000
#> GSM125197     2   0.000      0.940 0.000 1.000 0.000
#> GSM125199     1   0.000      0.998 1.000 0.000 0.000
#> GSM125201     2   0.000      0.940 0.000 1.000 0.000
#> GSM125203     3   0.000      0.945 0.000 0.000 1.000
#> GSM125205     2   0.435      0.739 0.000 0.816 0.184
#> GSM125207     3   0.000      0.945 0.000 0.000 1.000
#> GSM125209     2   0.000      0.940 0.000 1.000 0.000
#> GSM125211     3   0.375      0.829 0.000 0.144 0.856
#> GSM125213     2   0.000      0.940 0.000 1.000 0.000
#> GSM125215     2   0.000      0.940 0.000 1.000 0.000
#> GSM125217     2   0.000      0.940 0.000 1.000 0.000
#> GSM125219     1   0.000      0.998 1.000 0.000 0.000
#> GSM125221     2   0.000      0.940 0.000 1.000 0.000
#> GSM125223     2   0.000      0.940 0.000 1.000 0.000
#> GSM125225     2   0.000      0.940 0.000 1.000 0.000
#> GSM125227     2   0.000      0.940 0.000 1.000 0.000
#> GSM125229     3   0.518      0.671 0.000 0.256 0.744
#> GSM125231     3   0.000      0.945 0.000 0.000 1.000
#> GSM125233     1   0.000      0.998 1.000 0.000 0.000
#> GSM125235     1   0.000      0.998 1.000 0.000 0.000
#> GSM125237     1   0.000      0.998 1.000 0.000 0.000
#> GSM125124     1   0.000      0.998 1.000 0.000 0.000
#> GSM125126     1   0.000      0.998 1.000 0.000 0.000
#> GSM125128     1   0.000      0.998 1.000 0.000 0.000
#> GSM125130     1   0.000      0.998 1.000 0.000 0.000
#> GSM125132     1   0.000      0.998 1.000 0.000 0.000
#> GSM125134     1   0.000      0.998 1.000 0.000 0.000
#> GSM125136     1   0.000      0.998 1.000 0.000 0.000
#> GSM125138     1   0.000      0.998 1.000 0.000 0.000
#> GSM125140     1   0.000      0.998 1.000 0.000 0.000
#> GSM125142     1   0.000      0.998 1.000 0.000 0.000
#> GSM125144     1   0.000      0.998 1.000 0.000 0.000
#> GSM125146     1   0.000      0.998 1.000 0.000 0.000
#> GSM125148     1   0.000      0.998 1.000 0.000 0.000
#> GSM125150     1   0.000      0.998 1.000 0.000 0.000
#> GSM125152     1   0.000      0.998 1.000 0.000 0.000
#> GSM125154     1   0.000      0.998 1.000 0.000 0.000
#> GSM125156     1   0.000      0.998 1.000 0.000 0.000
#> GSM125158     1   0.000      0.998 1.000 0.000 0.000
#> GSM125160     2   0.000      0.940 0.000 1.000 0.000
#> GSM125162     1   0.000      0.998 1.000 0.000 0.000
#> GSM125164     2   0.000      0.940 0.000 1.000 0.000
#> GSM125166     2   0.000      0.940 0.000 1.000 0.000
#> GSM125168     2   0.000      0.940 0.000 1.000 0.000
#> GSM125170     2   0.000      0.940 0.000 1.000 0.000
#> GSM125172     2   0.000      0.940 0.000 1.000 0.000
#> GSM125174     2   0.543      0.666 0.000 0.716 0.284
#> GSM125176     2   0.000      0.940 0.000 1.000 0.000
#> GSM125178     3   0.000      0.945 0.000 0.000 1.000
#> GSM125180     2   0.550      0.654 0.000 0.708 0.292
#> GSM125182     2   0.000      0.940 0.000 1.000 0.000
#> GSM125184     2   0.543      0.665 0.000 0.716 0.284
#> GSM125186     2   0.550      0.654 0.000 0.708 0.292
#> GSM125188     2   0.000      0.940 0.000 1.000 0.000
#> GSM125190     2   0.000      0.940 0.000 1.000 0.000
#> GSM125192     2   0.000      0.940 0.000 1.000 0.000
#> GSM125194     3   0.296      0.875 0.100 0.000 0.900
#> GSM125196     3   0.000      0.945 0.000 0.000 1.000
#> GSM125198     2   0.000      0.940 0.000 1.000 0.000
#> GSM125200     1   0.000      0.998 1.000 0.000 0.000
#> GSM125202     2   0.000      0.940 0.000 1.000 0.000
#> GSM125204     3   0.000      0.945 0.000 0.000 1.000
#> GSM125206     3   0.000      0.945 0.000 0.000 1.000
#> GSM125208     3   0.000      0.945 0.000 0.000 1.000
#> GSM125210     2   0.540      0.670 0.000 0.720 0.280
#> GSM125212     3   0.400      0.811 0.000 0.160 0.840
#> GSM125214     2   0.000      0.940 0.000 1.000 0.000
#> GSM125216     2   0.000      0.940 0.000 1.000 0.000
#> GSM125218     2   0.000      0.940 0.000 1.000 0.000
#> GSM125220     1   0.000      0.998 1.000 0.000 0.000
#> GSM125222     2   0.000      0.940 0.000 1.000 0.000
#> GSM125224     2   0.000      0.940 0.000 1.000 0.000
#> GSM125226     2   0.000      0.940 0.000 1.000 0.000
#> GSM125228     2   0.000      0.940 0.000 1.000 0.000
#> GSM125230     3   0.000      0.945 0.000 0.000 1.000
#> GSM125232     3   0.116      0.928 0.028 0.000 0.972
#> GSM125234     1   0.245      0.913 0.924 0.000 0.076
#> GSM125236     1   0.000      0.998 1.000 0.000 0.000
#> GSM125238     1   0.000      0.998 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
#> GSM125123     1  0.1022      0.979 0.968 0.000 0.000 0.032
#> GSM125125     1  0.0336      0.986 0.992 0.000 0.000 0.008
#> GSM125127     1  0.1118      0.978 0.964 0.000 0.000 0.036
#> GSM125129     1  0.1022      0.980 0.968 0.000 0.000 0.032
#> GSM125131     1  0.0592      0.985 0.984 0.000 0.000 0.016
#> GSM125133     1  0.0817      0.983 0.976 0.000 0.000 0.024
#> GSM125135     1  0.0707      0.983 0.980 0.000 0.000 0.020
#> GSM125137     1  0.0469      0.985 0.988 0.000 0.000 0.012
#> GSM125139     1  0.0817      0.981 0.976 0.000 0.000 0.024
#> GSM125141     1  0.0469      0.985 0.988 0.000 0.000 0.012
#> GSM125143     1  0.1211      0.981 0.960 0.000 0.000 0.040
#> GSM125145     1  0.1022      0.980 0.968 0.000 0.000 0.032
#> GSM125147     1  0.0469      0.985 0.988 0.000 0.000 0.012
#> GSM125149     1  0.0469      0.985 0.988 0.000 0.000 0.012
#> GSM125151     1  0.0921      0.979 0.972 0.000 0.000 0.028
#> GSM125153     1  0.0000      0.985 1.000 0.000 0.000 0.000
#> GSM125155     1  0.0336      0.985 0.992 0.000 0.000 0.008
#> GSM125157     1  0.0469      0.985 0.988 0.000 0.000 0.012
#> GSM125159     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125161     1  0.0592      0.985 0.984 0.000 0.000 0.016
#> GSM125163     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125165     4  0.3801      0.788 0.000 0.220 0.000 0.780
#> GSM125167     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125169     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125171     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125173     2  0.4382      0.538 0.000 0.704 0.000 0.296
#> GSM125175     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125177     3  0.0000      0.977 0.000 0.000 1.000 0.000
#> GSM125179     4  0.1118      0.924 0.000 0.036 0.000 0.964
#> GSM125181     4  0.4008      0.756 0.000 0.244 0.000 0.756
#> GSM125183     4  0.1474      0.928 0.000 0.052 0.000 0.948
#> GSM125185     4  0.1118      0.924 0.000 0.036 0.000 0.964
#> GSM125187     4  0.1151      0.910 0.008 0.024 0.000 0.968
#> GSM125189     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125191     2  0.2216      0.874 0.000 0.908 0.000 0.092
#> GSM125193     3  0.0336      0.972 0.000 0.000 0.992 0.008
#> GSM125195     3  0.0000      0.977 0.000 0.000 1.000 0.000
#> GSM125197     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125199     1  0.0469      0.985 0.988 0.000 0.000 0.012
#> GSM125201     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125203     3  0.0000      0.977 0.000 0.000 1.000 0.000
#> GSM125205     2  0.0592      0.948 0.000 0.984 0.016 0.000
#> GSM125207     3  0.0188      0.975 0.000 0.000 0.996 0.004
#> GSM125209     2  0.4830      0.279 0.000 0.608 0.000 0.392
#> GSM125211     3  0.0000      0.977 0.000 0.000 1.000 0.000
#> GSM125213     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125215     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125217     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125219     1  0.1302      0.974 0.956 0.000 0.000 0.044
#> GSM125221     4  0.1637      0.925 0.000 0.060 0.000 0.940
#> GSM125223     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125225     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125227     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125229     3  0.1389      0.923 0.000 0.048 0.952 0.000
#> GSM125231     3  0.0000      0.977 0.000 0.000 1.000 0.000
#> GSM125233     1  0.1302      0.974 0.956 0.000 0.000 0.044
#> GSM125235     1  0.0469      0.985 0.988 0.000 0.000 0.012
#> GSM125237     1  0.0469      0.985 0.988 0.000 0.000 0.012
#> GSM125124     1  0.0817      0.981 0.976 0.000 0.000 0.024
#> GSM125126     1  0.0469      0.985 0.988 0.000 0.000 0.012
#> GSM125128     1  0.1022      0.983 0.968 0.000 0.000 0.032
#> GSM125130     1  0.1302      0.974 0.956 0.000 0.000 0.044
#> GSM125132     1  0.0469      0.985 0.988 0.000 0.000 0.012
#> GSM125134     1  0.0336      0.985 0.992 0.000 0.000 0.008
#> GSM125136     1  0.0921      0.982 0.972 0.000 0.000 0.028
#> GSM125138     1  0.0707      0.982 0.980 0.000 0.000 0.020
#> GSM125140     1  0.0707      0.982 0.980 0.000 0.000 0.020
#> GSM125142     1  0.0188      0.985 0.996 0.000 0.000 0.004
#> GSM125144     1  0.0921      0.979 0.972 0.000 0.000 0.028
#> GSM125146     1  0.0336      0.985 0.992 0.000 0.000 0.008
#> GSM125148     1  0.0469      0.985 0.988 0.000 0.000 0.012
#> GSM125150     1  0.0336      0.985 0.992 0.000 0.000 0.008
#> GSM125152     1  0.0921      0.979 0.972 0.000 0.000 0.028
#> GSM125154     1  0.0000      0.985 1.000 0.000 0.000 0.000
#> GSM125156     1  0.0336      0.985 0.992 0.000 0.000 0.008
#> GSM125158     1  0.0188      0.985 0.996 0.000 0.000 0.004
#> GSM125160     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125162     1  0.0592      0.985 0.984 0.000 0.000 0.016
#> GSM125164     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125166     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125168     2  0.1792      0.903 0.000 0.932 0.000 0.068
#> GSM125170     2  0.0817      0.945 0.000 0.976 0.000 0.024
#> GSM125172     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125174     4  0.1398      0.925 0.000 0.040 0.004 0.956
#> GSM125176     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125178     3  0.0000      0.977 0.000 0.000 1.000 0.000
#> GSM125180     4  0.1022      0.920 0.000 0.032 0.000 0.968
#> GSM125182     2  0.4008      0.649 0.000 0.756 0.000 0.244
#> GSM125184     4  0.1557      0.927 0.000 0.056 0.000 0.944
#> GSM125186     4  0.1118      0.924 0.000 0.036 0.000 0.964
#> GSM125188     4  0.4164      0.723 0.000 0.264 0.000 0.736
#> GSM125190     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125192     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125194     3  0.0336      0.972 0.000 0.000 0.992 0.008
#> GSM125196     3  0.0000      0.977 0.000 0.000 1.000 0.000
#> GSM125198     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125200     1  0.0188      0.986 0.996 0.000 0.000 0.004
#> GSM125202     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125204     3  0.0000      0.977 0.000 0.000 1.000 0.000
#> GSM125206     3  0.0000      0.977 0.000 0.000 1.000 0.000
#> GSM125208     3  0.0188      0.975 0.000 0.000 0.996 0.004
#> GSM125210     4  0.1474      0.928 0.000 0.052 0.000 0.948
#> GSM125212     3  0.0000      0.977 0.000 0.000 1.000 0.000
#> GSM125214     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125216     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125218     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125220     1  0.0817      0.984 0.976 0.000 0.000 0.024
#> GSM125222     4  0.1557      0.927 0.000 0.056 0.000 0.944
#> GSM125224     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125226     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125228     2  0.0000      0.965 0.000 1.000 0.000 0.000
#> GSM125230     3  0.0000      0.977 0.000 0.000 1.000 0.000
#> GSM125232     3  0.5416      0.617 0.048 0.000 0.692 0.260
#> GSM125234     1  0.1389      0.971 0.952 0.000 0.000 0.048
#> GSM125236     1  0.1022      0.980 0.968 0.000 0.000 0.032
#> GSM125238     1  0.0469      0.985 0.988 0.000 0.000 0.012

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM125123     5  0.3932     0.6861 0.328 0.000 0.000 0.000 0.672
#> GSM125125     1  0.3561     0.5190 0.740 0.000 0.000 0.000 0.260
#> GSM125127     5  0.3395     0.7391 0.236 0.000 0.000 0.000 0.764
#> GSM125129     5  0.3796     0.7215 0.300 0.000 0.000 0.000 0.700
#> GSM125131     1  0.0963     0.6789 0.964 0.000 0.000 0.000 0.036
#> GSM125133     1  0.3424     0.4237 0.760 0.000 0.000 0.000 0.240
#> GSM125135     1  0.4451    -0.2045 0.504 0.000 0.000 0.004 0.492
#> GSM125137     1  0.0290     0.6810 0.992 0.000 0.000 0.000 0.008
#> GSM125139     1  0.4268     0.0143 0.556 0.000 0.000 0.000 0.444
#> GSM125141     1  0.0510     0.6847 0.984 0.000 0.000 0.000 0.016
#> GSM125143     5  0.4235     0.4986 0.424 0.000 0.000 0.000 0.576
#> GSM125145     5  0.4383     0.3845 0.424 0.000 0.000 0.004 0.572
#> GSM125147     1  0.0290     0.6844 0.992 0.000 0.000 0.000 0.008
#> GSM125149     1  0.0290     0.6798 0.992 0.000 0.000 0.000 0.008
#> GSM125151     1  0.4306    -0.1487 0.508 0.000 0.000 0.000 0.492
#> GSM125153     1  0.3123     0.6138 0.812 0.000 0.000 0.004 0.184
#> GSM125155     1  0.2377     0.6597 0.872 0.000 0.000 0.000 0.128
#> GSM125157     1  0.0404     0.6807 0.988 0.000 0.000 0.000 0.012
#> GSM125159     2  0.0290     0.9491 0.000 0.992 0.000 0.000 0.008
#> GSM125161     1  0.1478     0.6567 0.936 0.000 0.000 0.000 0.064
#> GSM125163     2  0.0290     0.9491 0.000 0.992 0.000 0.000 0.008
#> GSM125165     4  0.4619     0.7103 0.000 0.216 0.000 0.720 0.064
#> GSM125167     2  0.0794     0.9419 0.000 0.972 0.000 0.000 0.028
#> GSM125169     2  0.0794     0.9413 0.000 0.972 0.000 0.000 0.028
#> GSM125171     2  0.0290     0.9486 0.000 0.992 0.000 0.000 0.008
#> GSM125173     2  0.5092     0.5823 0.000 0.688 0.008 0.236 0.068
#> GSM125175     2  0.0000     0.9500 0.000 1.000 0.000 0.000 0.000
#> GSM125177     3  0.0510     0.9465 0.000 0.000 0.984 0.000 0.016
#> GSM125179     4  0.0771     0.9029 0.000 0.004 0.000 0.976 0.020
#> GSM125181     4  0.4615     0.6599 0.000 0.252 0.000 0.700 0.048
#> GSM125183     4  0.0865     0.9040 0.000 0.004 0.000 0.972 0.024
#> GSM125185     4  0.0162     0.9048 0.000 0.004 0.000 0.996 0.000
#> GSM125187     4  0.0451     0.9040 0.000 0.004 0.000 0.988 0.008
#> GSM125189     2  0.0404     0.9479 0.000 0.988 0.000 0.000 0.012
#> GSM125191     2  0.3012     0.8235 0.000 0.852 0.000 0.124 0.024
#> GSM125193     3  0.3276     0.8788 0.032 0.000 0.836 0.000 0.132
#> GSM125195     3  0.1341     0.9432 0.000 0.000 0.944 0.000 0.056
#> GSM125197     2  0.0000     0.9500 0.000 1.000 0.000 0.000 0.000
#> GSM125199     1  0.0609     0.6850 0.980 0.000 0.000 0.000 0.020
#> GSM125201     2  0.0290     0.9486 0.000 0.992 0.000 0.000 0.008
#> GSM125203     3  0.1121     0.9449 0.000 0.000 0.956 0.000 0.044
#> GSM125205     2  0.0671     0.9425 0.000 0.980 0.004 0.000 0.016
#> GSM125207     3  0.0798     0.9449 0.000 0.000 0.976 0.016 0.008
#> GSM125209     2  0.4996     0.1785 0.000 0.548 0.000 0.420 0.032
#> GSM125211     3  0.1502     0.9370 0.000 0.004 0.940 0.000 0.056
#> GSM125213     2  0.0404     0.9485 0.000 0.988 0.000 0.000 0.012
#> GSM125215     2  0.0000     0.9500 0.000 1.000 0.000 0.000 0.000
#> GSM125217     2  0.0510     0.9461 0.000 0.984 0.000 0.000 0.016
#> GSM125219     5  0.3684     0.7022 0.280 0.000 0.000 0.000 0.720
#> GSM125221     4  0.1444     0.8968 0.000 0.012 0.000 0.948 0.040
#> GSM125223     2  0.0000     0.9500 0.000 1.000 0.000 0.000 0.000
#> GSM125225     2  0.0000     0.9500 0.000 1.000 0.000 0.000 0.000
#> GSM125227     2  0.0000     0.9500 0.000 1.000 0.000 0.000 0.000
#> GSM125229     3  0.2795     0.8876 0.000 0.064 0.880 0.000 0.056
#> GSM125231     3  0.2877     0.8758 0.004 0.000 0.848 0.004 0.144
#> GSM125233     5  0.3561     0.7446 0.260 0.000 0.000 0.000 0.740
#> GSM125235     1  0.2329     0.6424 0.876 0.000 0.000 0.000 0.124
#> GSM125237     1  0.0404     0.6833 0.988 0.000 0.000 0.000 0.012
#> GSM125124     1  0.4451    -0.1016 0.504 0.000 0.000 0.004 0.492
#> GSM125126     1  0.1851     0.6780 0.912 0.000 0.000 0.000 0.088
#> GSM125128     1  0.3796     0.3204 0.700 0.000 0.000 0.000 0.300
#> GSM125130     5  0.3366     0.7447 0.232 0.000 0.000 0.000 0.768
#> GSM125132     1  0.0703     0.6845 0.976 0.000 0.000 0.000 0.024
#> GSM125134     1  0.4009     0.4398 0.684 0.000 0.000 0.004 0.312
#> GSM125136     1  0.2773     0.5526 0.836 0.000 0.000 0.000 0.164
#> GSM125138     1  0.4430     0.0329 0.540 0.000 0.000 0.004 0.456
#> GSM125140     1  0.4249     0.0616 0.568 0.000 0.000 0.000 0.432
#> GSM125142     1  0.2719     0.6484 0.852 0.000 0.000 0.004 0.144
#> GSM125144     1  0.4448    -0.0580 0.516 0.000 0.000 0.004 0.480
#> GSM125146     1  0.4009     0.4577 0.684 0.000 0.000 0.004 0.312
#> GSM125148     1  0.0880     0.6836 0.968 0.000 0.000 0.000 0.032
#> GSM125150     1  0.1341     0.6834 0.944 0.000 0.000 0.000 0.056
#> GSM125152     1  0.4307    -0.1652 0.504 0.000 0.000 0.000 0.496
#> GSM125154     1  0.3550     0.5645 0.760 0.000 0.000 0.004 0.236
#> GSM125156     1  0.3508     0.5384 0.748 0.000 0.000 0.000 0.252
#> GSM125158     1  0.3210     0.5860 0.788 0.000 0.000 0.000 0.212
#> GSM125160     2  0.0290     0.9491 0.000 0.992 0.000 0.000 0.008
#> GSM125162     1  0.1671     0.6477 0.924 0.000 0.000 0.000 0.076
#> GSM125164     2  0.0162     0.9496 0.000 0.996 0.000 0.000 0.004
#> GSM125166     2  0.0162     0.9496 0.000 0.996 0.000 0.000 0.004
#> GSM125168     2  0.3608     0.7837 0.000 0.812 0.000 0.148 0.040
#> GSM125170     2  0.2830     0.8621 0.000 0.876 0.000 0.080 0.044
#> GSM125172     2  0.0290     0.9486 0.000 0.992 0.000 0.000 0.008
#> GSM125174     4  0.1357     0.8943 0.000 0.004 0.000 0.948 0.048
#> GSM125176     2  0.0162     0.9496 0.000 0.996 0.000 0.000 0.004
#> GSM125178     3  0.0609     0.9460 0.000 0.000 0.980 0.000 0.020
#> GSM125180     4  0.0510     0.9007 0.000 0.000 0.000 0.984 0.016
#> GSM125182     2  0.4583     0.5322 0.000 0.672 0.000 0.296 0.032
#> GSM125184     4  0.0865     0.9026 0.000 0.004 0.000 0.972 0.024
#> GSM125186     4  0.0162     0.9048 0.000 0.004 0.000 0.996 0.000
#> GSM125188     4  0.4840     0.6268 0.000 0.268 0.000 0.676 0.056
#> GSM125190     2  0.0609     0.9452 0.000 0.980 0.000 0.000 0.020
#> GSM125192     2  0.0000     0.9500 0.000 1.000 0.000 0.000 0.000
#> GSM125194     3  0.3485     0.8709 0.048 0.000 0.828 0.000 0.124
#> GSM125196     3  0.1341     0.9432 0.000 0.000 0.944 0.000 0.056
#> GSM125198     2  0.0000     0.9500 0.000 1.000 0.000 0.000 0.000
#> GSM125200     1  0.3109     0.5933 0.800 0.000 0.000 0.000 0.200
#> GSM125202     2  0.0290     0.9486 0.000 0.992 0.000 0.000 0.008
#> GSM125204     3  0.1121     0.9449 0.000 0.000 0.956 0.000 0.044
#> GSM125206     3  0.1270     0.9439 0.000 0.000 0.948 0.000 0.052
#> GSM125208     3  0.0693     0.9456 0.000 0.000 0.980 0.012 0.008
#> GSM125210     4  0.0324     0.9047 0.000 0.004 0.000 0.992 0.004
#> GSM125212     3  0.1502     0.9370 0.000 0.004 0.940 0.000 0.056
#> GSM125214     2  0.0000     0.9500 0.000 1.000 0.000 0.000 0.000
#> GSM125216     2  0.0000     0.9500 0.000 1.000 0.000 0.000 0.000
#> GSM125218     2  0.0290     0.9487 0.000 0.992 0.000 0.000 0.008
#> GSM125220     1  0.3876     0.3069 0.684 0.000 0.000 0.000 0.316
#> GSM125222     4  0.1408     0.8980 0.000 0.008 0.000 0.948 0.044
#> GSM125224     2  0.0000     0.9500 0.000 1.000 0.000 0.000 0.000
#> GSM125226     2  0.0703     0.9431 0.000 0.976 0.000 0.000 0.024
#> GSM125228     2  0.0000     0.9500 0.000 1.000 0.000 0.000 0.000
#> GSM125230     3  0.1341     0.9378 0.000 0.000 0.944 0.000 0.056
#> GSM125232     5  0.7504    -0.0945 0.048 0.000 0.360 0.208 0.384
#> GSM125234     5  0.3613     0.6876 0.160 0.000 0.016 0.012 0.812
#> GSM125236     5  0.3752     0.7319 0.292 0.000 0.000 0.000 0.708
#> GSM125238     1  0.0162     0.6836 0.996 0.000 0.000 0.000 0.004

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM125123     6  0.3841     0.6472 0.256 0.000 0.000 0.000 0.028 0.716
#> GSM125125     1  0.4246     0.0186 0.580 0.000 0.000 0.000 0.020 0.400
#> GSM125127     6  0.3607     0.5591 0.112 0.000 0.000 0.000 0.092 0.796
#> GSM125129     6  0.3566     0.6496 0.224 0.000 0.000 0.000 0.024 0.752
#> GSM125131     1  0.1970     0.6560 0.912 0.000 0.000 0.000 0.028 0.060
#> GSM125133     1  0.4357     0.4207 0.700 0.000 0.000 0.000 0.076 0.224
#> GSM125135     6  0.4856     0.1837 0.464 0.000 0.000 0.000 0.056 0.480
#> GSM125137     1  0.1245     0.6704 0.952 0.000 0.000 0.000 0.016 0.032
#> GSM125139     6  0.4975     0.4007 0.428 0.000 0.000 0.000 0.068 0.504
#> GSM125141     1  0.0972     0.6697 0.964 0.000 0.000 0.000 0.008 0.028
#> GSM125143     6  0.4703     0.6019 0.312 0.000 0.000 0.000 0.068 0.620
#> GSM125145     6  0.5334     0.4553 0.344 0.000 0.000 0.000 0.120 0.536
#> GSM125147     1  0.0993     0.6712 0.964 0.000 0.000 0.000 0.012 0.024
#> GSM125149     1  0.0806     0.6651 0.972 0.000 0.000 0.000 0.020 0.008
#> GSM125151     6  0.4972     0.4811 0.392 0.000 0.000 0.000 0.072 0.536
#> GSM125153     1  0.4486     0.4785 0.704 0.000 0.000 0.000 0.112 0.184
#> GSM125155     1  0.3620     0.5471 0.772 0.000 0.000 0.000 0.044 0.184
#> GSM125157     1  0.1176     0.6631 0.956 0.000 0.000 0.000 0.020 0.024
#> GSM125159     2  0.1501     0.8956 0.000 0.924 0.000 0.000 0.076 0.000
#> GSM125161     1  0.2630     0.6128 0.872 0.000 0.000 0.000 0.064 0.064
#> GSM125163     2  0.0547     0.9086 0.000 0.980 0.000 0.000 0.020 0.000
#> GSM125165     4  0.6083     0.4612 0.000 0.184 0.000 0.456 0.348 0.012
#> GSM125167     2  0.2362     0.8624 0.000 0.860 0.000 0.000 0.136 0.004
#> GSM125169     2  0.2402     0.8626 0.000 0.856 0.000 0.000 0.140 0.004
#> GSM125171     2  0.0458     0.9080 0.000 0.984 0.000 0.000 0.016 0.000
#> GSM125173     2  0.6294     0.2795 0.000 0.516 0.012 0.188 0.268 0.016
#> GSM125175     2  0.0458     0.9075 0.000 0.984 0.000 0.000 0.016 0.000
#> GSM125177     3  0.0692     0.7829 0.000 0.000 0.976 0.000 0.020 0.004
#> GSM125179     4  0.0777     0.7731 0.000 0.000 0.000 0.972 0.024 0.004
#> GSM125181     4  0.5704     0.5083 0.000 0.164 0.000 0.520 0.312 0.004
#> GSM125183     4  0.2146     0.7657 0.000 0.000 0.000 0.880 0.116 0.004
#> GSM125185     4  0.0865     0.7766 0.000 0.000 0.000 0.964 0.036 0.000
#> GSM125187     4  0.1610     0.7748 0.000 0.000 0.000 0.916 0.084 0.000
#> GSM125189     2  0.1531     0.8997 0.000 0.928 0.000 0.000 0.068 0.004
#> GSM125191     2  0.4427     0.6782 0.000 0.716 0.000 0.148 0.136 0.000
#> GSM125193     3  0.5513     0.5175 0.044 0.000 0.600 0.004 0.296 0.056
#> GSM125195     3  0.2311     0.7537 0.000 0.000 0.880 0.000 0.104 0.016
#> GSM125197     2  0.0146     0.9078 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM125199     1  0.0891     0.6662 0.968 0.000 0.000 0.000 0.008 0.024
#> GSM125201     2  0.0260     0.9081 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM125203     3  0.1196     0.7800 0.000 0.000 0.952 0.000 0.040 0.008
#> GSM125205     2  0.2279     0.8514 0.000 0.900 0.048 0.000 0.048 0.004
#> GSM125207     3  0.2102     0.7740 0.000 0.000 0.908 0.012 0.068 0.012
#> GSM125209     2  0.5758     0.1096 0.000 0.476 0.000 0.340 0.184 0.000
#> GSM125211     3  0.3858     0.6892 0.000 0.004 0.724 0.000 0.248 0.024
#> GSM125213     2  0.1267     0.9012 0.000 0.940 0.000 0.000 0.060 0.000
#> GSM125215     2  0.0146     0.9085 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM125217     2  0.1753     0.8922 0.000 0.912 0.000 0.000 0.084 0.004
#> GSM125219     6  0.3523     0.5136 0.180 0.000 0.000 0.000 0.040 0.780
#> GSM125221     4  0.3023     0.7326 0.000 0.004 0.000 0.784 0.212 0.000
#> GSM125223     2  0.0146     0.9085 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM125225     2  0.0146     0.9085 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM125227     2  0.0146     0.9085 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM125229     3  0.4410     0.6648 0.000 0.052 0.724 0.000 0.204 0.020
#> GSM125231     3  0.4867     0.4440 0.008 0.000 0.684 0.004 0.208 0.096
#> GSM125233     6  0.2706     0.6223 0.160 0.000 0.000 0.000 0.008 0.832
#> GSM125235     1  0.3860     0.5188 0.728 0.000 0.000 0.000 0.036 0.236
#> GSM125237     1  0.0993     0.6693 0.964 0.000 0.000 0.000 0.012 0.024
#> GSM125124     6  0.5466     0.3644 0.404 0.000 0.000 0.000 0.124 0.472
#> GSM125126     1  0.3200     0.5747 0.788 0.000 0.000 0.000 0.016 0.196
#> GSM125128     1  0.4835     0.2466 0.592 0.000 0.000 0.000 0.072 0.336
#> GSM125130     6  0.2826     0.5786 0.128 0.000 0.000 0.000 0.028 0.844
#> GSM125132     1  0.1225     0.6707 0.952 0.000 0.000 0.000 0.012 0.036
#> GSM125134     1  0.5336     0.2037 0.572 0.000 0.000 0.000 0.144 0.284
#> GSM125136     1  0.3680     0.5362 0.784 0.000 0.000 0.000 0.072 0.144
#> GSM125138     1  0.5533    -0.2931 0.448 0.000 0.000 0.000 0.132 0.420
#> GSM125140     1  0.5034    -0.3455 0.472 0.000 0.000 0.000 0.072 0.456
#> GSM125142     1  0.4191     0.5167 0.732 0.000 0.000 0.000 0.088 0.180
#> GSM125144     6  0.5492     0.3705 0.400 0.000 0.000 0.000 0.128 0.472
#> GSM125146     1  0.5240     0.1229 0.544 0.000 0.000 0.000 0.108 0.348
#> GSM125148     1  0.2420     0.6450 0.884 0.000 0.000 0.000 0.040 0.076
#> GSM125150     1  0.2536     0.6319 0.864 0.000 0.000 0.000 0.020 0.116
#> GSM125152     6  0.4949     0.4983 0.380 0.000 0.000 0.000 0.072 0.548
#> GSM125154     1  0.5036     0.3479 0.632 0.000 0.000 0.000 0.140 0.228
#> GSM125156     1  0.4332     0.3615 0.672 0.000 0.000 0.000 0.052 0.276
#> GSM125158     1  0.3802     0.5061 0.748 0.000 0.000 0.000 0.044 0.208
#> GSM125160     2  0.1387     0.8989 0.000 0.932 0.000 0.000 0.068 0.000
#> GSM125162     1  0.2744     0.6064 0.864 0.000 0.000 0.000 0.064 0.072
#> GSM125164     2  0.0865     0.9069 0.000 0.964 0.000 0.000 0.036 0.000
#> GSM125166     2  0.0937     0.9053 0.000 0.960 0.000 0.000 0.040 0.000
#> GSM125168     2  0.4980     0.6361 0.000 0.660 0.000 0.144 0.192 0.004
#> GSM125170     2  0.4233     0.7548 0.000 0.740 0.000 0.088 0.168 0.004
#> GSM125172     2  0.0858     0.9053 0.000 0.968 0.000 0.000 0.028 0.004
#> GSM125174     4  0.3733     0.6899 0.000 0.012 0.036 0.800 0.144 0.008
#> GSM125176     2  0.0891     0.9092 0.000 0.968 0.000 0.008 0.024 0.000
#> GSM125178     3  0.1531     0.7788 0.000 0.000 0.928 0.000 0.068 0.004
#> GSM125180     4  0.0777     0.7731 0.000 0.000 0.000 0.972 0.024 0.004
#> GSM125182     2  0.5884     0.2984 0.000 0.508 0.000 0.236 0.252 0.004
#> GSM125184     4  0.1411     0.7684 0.000 0.000 0.000 0.936 0.060 0.004
#> GSM125186     4  0.0865     0.7766 0.000 0.000 0.000 0.964 0.036 0.000
#> GSM125188     4  0.5758     0.4687 0.000 0.200 0.000 0.496 0.304 0.000
#> GSM125190     2  0.1644     0.8978 0.000 0.920 0.000 0.000 0.076 0.004
#> GSM125192     2  0.0790     0.9066 0.000 0.968 0.000 0.000 0.032 0.000
#> GSM125194     3  0.5854     0.4437 0.080 0.000 0.572 0.000 0.288 0.060
#> GSM125196     3  0.2311     0.7537 0.000 0.000 0.880 0.000 0.104 0.016
#> GSM125198     2  0.0146     0.9078 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM125200     1  0.3483     0.5205 0.764 0.000 0.000 0.000 0.024 0.212
#> GSM125202     2  0.0260     0.9081 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM125204     3  0.1124     0.7775 0.000 0.000 0.956 0.000 0.036 0.008
#> GSM125206     3  0.2170     0.7572 0.000 0.000 0.888 0.000 0.100 0.012
#> GSM125208     3  0.2159     0.7734 0.000 0.000 0.904 0.012 0.072 0.012
#> GSM125210     4  0.1007     0.7807 0.000 0.000 0.000 0.956 0.044 0.000
#> GSM125212     3  0.3858     0.6887 0.000 0.004 0.724 0.000 0.248 0.024
#> GSM125214     2  0.0146     0.9085 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM125216     2  0.0146     0.9085 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM125218     2  0.1349     0.9021 0.000 0.940 0.000 0.000 0.056 0.004
#> GSM125220     1  0.4798     0.3062 0.612 0.000 0.000 0.000 0.076 0.312
#> GSM125222     4  0.2902     0.7423 0.000 0.004 0.000 0.800 0.196 0.000
#> GSM125224     2  0.0146     0.9085 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM125226     2  0.1531     0.8995 0.000 0.928 0.000 0.000 0.068 0.004
#> GSM125228     2  0.0146     0.9085 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM125230     3  0.3333     0.7226 0.000 0.000 0.784 0.000 0.192 0.024
#> GSM125232     5  0.8419     0.0000 0.052 0.000 0.260 0.184 0.272 0.232
#> GSM125234     6  0.2790     0.5379 0.088 0.000 0.012 0.000 0.032 0.868
#> GSM125236     6  0.3852     0.6131 0.176 0.000 0.000 0.000 0.064 0.760
#> GSM125238     1  0.0405     0.6701 0.988 0.000 0.000 0.000 0.004 0.008

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk CV-skmeans-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk CV-skmeans-collect-classes

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

test_to_known_factors(res)
#>              n agent(p) individual(p) k
#> CV:skmeans 116    1.000      1.12e-05 2
#> CV:skmeans 116    0.962      1.49e-09 3
#> CV:skmeans 115    0.997      1.96e-11 4
#> CV:skmeans  99    0.978      4.56e-11 5
#> CV:skmeans  90    0.929      1.24e-09 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 21168 rows and 116 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#>   Subgroups are detected by 'pam' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk CV-pam-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.928           0.936       0.974         0.5034 0.496   0.496
#> 3 3 0.872           0.887       0.948         0.2995 0.804   0.621
#> 4 4 0.808           0.842       0.917         0.1381 0.895   0.701
#> 5 5 0.821           0.831       0.918         0.0549 0.946   0.795
#> 6 6 0.803           0.752       0.851         0.0453 0.959   0.810

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

suggest_best_k(res)
#> [1] 2

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

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

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM125123     1  0.0000      0.974 1.000 0.000
#> GSM125125     1  0.0000      0.974 1.000 0.000
#> GSM125127     1  0.0000      0.974 1.000 0.000
#> GSM125129     1  0.0000      0.974 1.000 0.000
#> GSM125131     1  0.0000      0.974 1.000 0.000
#> GSM125133     1  0.0000      0.974 1.000 0.000
#> GSM125135     1  0.0000      0.974 1.000 0.000
#> GSM125137     1  0.0000      0.974 1.000 0.000
#> GSM125139     1  0.0000      0.974 1.000 0.000
#> GSM125141     1  0.0000      0.974 1.000 0.000
#> GSM125143     1  0.0000      0.974 1.000 0.000
#> GSM125145     1  0.0000      0.974 1.000 0.000
#> GSM125147     1  0.0000      0.974 1.000 0.000
#> GSM125149     1  0.0000      0.974 1.000 0.000
#> GSM125151     1  0.0000      0.974 1.000 0.000
#> GSM125153     1  0.0000      0.974 1.000 0.000
#> GSM125155     1  0.0000      0.974 1.000 0.000
#> GSM125157     1  0.0000      0.974 1.000 0.000
#> GSM125159     2  0.0000      0.970 0.000 1.000
#> GSM125161     1  0.0000      0.974 1.000 0.000
#> GSM125163     2  0.0000      0.970 0.000 1.000
#> GSM125165     2  0.0000      0.970 0.000 1.000
#> GSM125167     2  0.0000      0.970 0.000 1.000
#> GSM125169     2  0.0000      0.970 0.000 1.000
#> GSM125171     2  0.0000      0.970 0.000 1.000
#> GSM125173     2  0.0000      0.970 0.000 1.000
#> GSM125175     2  0.0000      0.970 0.000 1.000
#> GSM125177     2  0.0000      0.970 0.000 1.000
#> GSM125179     2  0.0376      0.967 0.004 0.996
#> GSM125181     2  0.0000      0.970 0.000 1.000
#> GSM125183     2  0.6148      0.817 0.152 0.848
#> GSM125185     2  0.0000      0.970 0.000 1.000
#> GSM125187     1  0.9833      0.255 0.576 0.424
#> GSM125189     2  0.0000      0.970 0.000 1.000
#> GSM125191     2  0.0000      0.970 0.000 1.000
#> GSM125193     1  0.8813      0.562 0.700 0.300
#> GSM125195     1  0.7219      0.739 0.800 0.200
#> GSM125197     2  0.0000      0.970 0.000 1.000
#> GSM125199     1  0.0000      0.974 1.000 0.000
#> GSM125201     2  0.0000      0.970 0.000 1.000
#> GSM125203     2  0.8763      0.588 0.296 0.704
#> GSM125205     2  0.0000      0.970 0.000 1.000
#> GSM125207     2  0.9580      0.397 0.380 0.620
#> GSM125209     2  0.0000      0.970 0.000 1.000
#> GSM125211     2  0.7139      0.758 0.196 0.804
#> GSM125213     2  0.0000      0.970 0.000 1.000
#> GSM125215     2  0.0000      0.970 0.000 1.000
#> GSM125217     2  0.0000      0.970 0.000 1.000
#> GSM125219     1  0.0000      0.974 1.000 0.000
#> GSM125221     2  0.0000      0.970 0.000 1.000
#> GSM125223     2  0.0000      0.970 0.000 1.000
#> GSM125225     2  0.0000      0.970 0.000 1.000
#> GSM125227     2  0.0000      0.970 0.000 1.000
#> GSM125229     2  0.0000      0.970 0.000 1.000
#> GSM125231     1  0.0376      0.971 0.996 0.004
#> GSM125233     1  0.0000      0.974 1.000 0.000
#> GSM125235     1  0.0000      0.974 1.000 0.000
#> GSM125237     1  0.0000      0.974 1.000 0.000
#> GSM125124     1  0.0000      0.974 1.000 0.000
#> GSM125126     1  0.0000      0.974 1.000 0.000
#> GSM125128     1  0.0000      0.974 1.000 0.000
#> GSM125130     1  0.0000      0.974 1.000 0.000
#> GSM125132     1  0.0000      0.974 1.000 0.000
#> GSM125134     1  0.0000      0.974 1.000 0.000
#> GSM125136     1  0.0000      0.974 1.000 0.000
#> GSM125138     1  0.0000      0.974 1.000 0.000
#> GSM125140     1  0.0000      0.974 1.000 0.000
#> GSM125142     1  0.0000      0.974 1.000 0.000
#> GSM125144     1  0.0000      0.974 1.000 0.000
#> GSM125146     1  0.0000      0.974 1.000 0.000
#> GSM125148     1  0.0000      0.974 1.000 0.000
#> GSM125150     1  0.0000      0.974 1.000 0.000
#> GSM125152     1  0.0000      0.974 1.000 0.000
#> GSM125154     1  0.0000      0.974 1.000 0.000
#> GSM125156     1  0.0000      0.974 1.000 0.000
#> GSM125158     1  0.0000      0.974 1.000 0.000
#> GSM125160     2  0.0000      0.970 0.000 1.000
#> GSM125162     1  0.0000      0.974 1.000 0.000
#> GSM125164     2  0.0000      0.970 0.000 1.000
#> GSM125166     2  0.0000      0.970 0.000 1.000
#> GSM125168     2  0.0000      0.970 0.000 1.000
#> GSM125170     2  0.0000      0.970 0.000 1.000
#> GSM125172     2  0.0000      0.970 0.000 1.000
#> GSM125174     2  0.0672      0.963 0.008 0.992
#> GSM125176     2  0.0000      0.970 0.000 1.000
#> GSM125178     2  0.8327      0.640 0.264 0.736
#> GSM125180     2  0.3733      0.906 0.072 0.928
#> GSM125182     2  0.0000      0.970 0.000 1.000
#> GSM125184     2  0.0000      0.970 0.000 1.000
#> GSM125186     2  0.3733      0.906 0.072 0.928
#> GSM125188     2  0.0000      0.970 0.000 1.000
#> GSM125190     2  0.0000      0.970 0.000 1.000
#> GSM125192     2  0.0000      0.970 0.000 1.000
#> GSM125194     1  0.0000      0.974 1.000 0.000
#> GSM125196     2  0.0000      0.970 0.000 1.000
#> GSM125198     2  0.0000      0.970 0.000 1.000
#> GSM125200     1  0.0000      0.974 1.000 0.000
#> GSM125202     2  0.0000      0.970 0.000 1.000
#> GSM125204     2  0.8327      0.649 0.264 0.736
#> GSM125206     2  0.0672      0.963 0.008 0.992
#> GSM125208     1  0.9732      0.310 0.596 0.404
#> GSM125210     2  0.0000      0.970 0.000 1.000
#> GSM125212     2  0.0000      0.970 0.000 1.000
#> GSM125214     2  0.0000      0.970 0.000 1.000
#> GSM125216     2  0.0000      0.970 0.000 1.000
#> GSM125218     2  0.0000      0.970 0.000 1.000
#> GSM125220     1  0.0000      0.974 1.000 0.000
#> GSM125222     2  0.0000      0.970 0.000 1.000
#> GSM125224     2  0.0000      0.970 0.000 1.000
#> GSM125226     2  0.0000      0.970 0.000 1.000
#> GSM125228     2  0.0000      0.970 0.000 1.000
#> GSM125230     1  0.0672      0.967 0.992 0.008
#> GSM125232     1  0.0376      0.971 0.996 0.004
#> GSM125234     1  0.0376      0.971 0.996 0.004
#> GSM125236     1  0.0000      0.974 1.000 0.000
#> GSM125238     1  0.0000      0.974 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
#> GSM125123     1  0.0747     0.9678 0.984 0.000 0.016
#> GSM125125     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125127     1  0.1289     0.9563 0.968 0.000 0.032
#> GSM125129     1  0.0892     0.9655 0.980 0.000 0.020
#> GSM125131     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125133     1  0.0747     0.9634 0.984 0.000 0.016
#> GSM125135     1  0.0424     0.9708 0.992 0.000 0.008
#> GSM125137     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125139     1  0.0747     0.9678 0.984 0.000 0.016
#> GSM125141     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125143     1  0.0747     0.9678 0.984 0.000 0.016
#> GSM125145     1  0.0592     0.9695 0.988 0.000 0.012
#> GSM125147     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125149     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125151     1  0.0747     0.9678 0.984 0.000 0.016
#> GSM125153     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125155     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125157     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125159     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125161     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125163     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125165     3  0.2165     0.8590 0.000 0.064 0.936
#> GSM125167     2  0.0424     0.9502 0.000 0.992 0.008
#> GSM125169     2  0.0424     0.9502 0.000 0.992 0.008
#> GSM125171     2  0.3619     0.8328 0.000 0.864 0.136
#> GSM125173     3  0.1753     0.8673 0.000 0.048 0.952
#> GSM125175     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125177     2  0.1860     0.9203 0.000 0.948 0.052
#> GSM125179     3  0.1031     0.8741 0.000 0.024 0.976
#> GSM125181     3  0.0747     0.8759 0.000 0.016 0.984
#> GSM125183     3  0.0848     0.8750 0.008 0.008 0.984
#> GSM125185     3  0.0000     0.8745 0.000 0.000 1.000
#> GSM125187     3  0.0000     0.8745 0.000 0.000 1.000
#> GSM125189     2  0.0237     0.9515 0.000 0.996 0.004
#> GSM125191     2  0.3816     0.8160 0.000 0.852 0.148
#> GSM125193     1  0.6235     0.1862 0.564 0.000 0.436
#> GSM125195     3  0.3359     0.8389 0.084 0.016 0.900
#> GSM125197     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125199     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125201     2  0.0747     0.9449 0.000 0.984 0.016
#> GSM125203     3  0.5791     0.7549 0.168 0.048 0.784
#> GSM125205     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125207     3  0.0000     0.8745 0.000 0.000 1.000
#> GSM125209     2  0.5216     0.6591 0.000 0.740 0.260
#> GSM125211     3  0.0424     0.8739 0.008 0.000 0.992
#> GSM125213     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125215     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125217     2  0.0592     0.9485 0.000 0.988 0.012
#> GSM125219     1  0.1529     0.9503 0.960 0.000 0.040
#> GSM125221     3  0.1860     0.8655 0.000 0.052 0.948
#> GSM125223     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125225     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125227     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125229     2  0.1411     0.9315 0.000 0.964 0.036
#> GSM125231     3  0.5706     0.5273 0.320 0.000 0.680
#> GSM125233     1  0.0747     0.9678 0.984 0.000 0.016
#> GSM125235     1  0.0237     0.9720 0.996 0.000 0.004
#> GSM125237     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125124     1  0.0892     0.9661 0.980 0.000 0.020
#> GSM125126     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125128     1  0.0747     0.9678 0.984 0.000 0.016
#> GSM125130     1  0.1529     0.9502 0.960 0.000 0.040
#> GSM125132     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125134     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125136     1  0.0424     0.9699 0.992 0.000 0.008
#> GSM125138     1  0.2537     0.8933 0.920 0.000 0.080
#> GSM125140     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125142     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125144     1  0.0747     0.9678 0.984 0.000 0.016
#> GSM125146     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125148     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125150     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125152     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125154     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125156     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125158     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125160     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125162     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125164     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125166     2  0.0237     0.9515 0.000 0.996 0.004
#> GSM125168     2  0.6154     0.2998 0.000 0.592 0.408
#> GSM125170     2  0.0747     0.9467 0.000 0.984 0.016
#> GSM125172     2  0.0237     0.9515 0.000 0.996 0.004
#> GSM125174     3  0.0747     0.8750 0.000 0.016 0.984
#> GSM125176     2  0.0424     0.9503 0.000 0.992 0.008
#> GSM125178     3  0.4796     0.7128 0.000 0.220 0.780
#> GSM125180     3  0.0000     0.8745 0.000 0.000 1.000
#> GSM125182     2  0.4178     0.7920 0.000 0.828 0.172
#> GSM125184     3  0.1643     0.8686 0.000 0.044 0.956
#> GSM125186     3  0.0000     0.8745 0.000 0.000 1.000
#> GSM125188     2  0.5948     0.4026 0.000 0.640 0.360
#> GSM125190     2  0.0237     0.9515 0.000 0.996 0.004
#> GSM125192     2  0.0237     0.9515 0.000 0.996 0.004
#> GSM125194     3  0.5835     0.4914 0.340 0.000 0.660
#> GSM125196     3  0.6505     0.0412 0.004 0.468 0.528
#> GSM125198     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125200     1  0.0000     0.9730 1.000 0.000 0.000
#> GSM125202     2  0.0237     0.9515 0.000 0.996 0.004
#> GSM125204     3  0.5331     0.7960 0.076 0.100 0.824
#> GSM125206     3  0.5397     0.6110 0.000 0.280 0.720
#> GSM125208     3  0.0000     0.8745 0.000 0.000 1.000
#> GSM125210     3  0.1031     0.8737 0.000 0.024 0.976
#> GSM125212     3  0.4002     0.7782 0.000 0.160 0.840
#> GSM125214     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125216     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125218     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125220     1  0.0592     0.9666 0.988 0.000 0.012
#> GSM125222     3  0.1031     0.8742 0.000 0.024 0.976
#> GSM125224     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125226     2  0.0892     0.9437 0.000 0.980 0.020
#> GSM125228     2  0.0000     0.9522 0.000 1.000 0.000
#> GSM125230     3  0.3267     0.8176 0.116 0.000 0.884
#> GSM125232     3  0.5810     0.4942 0.336 0.000 0.664
#> GSM125234     1  0.6008     0.3920 0.628 0.000 0.372
#> GSM125236     1  0.0747     0.9678 0.984 0.000 0.016
#> GSM125238     1  0.0000     0.9730 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
#> GSM125123     1  0.0921      0.883 0.972 0.000 0.000 0.028
#> GSM125125     4  0.1211      0.917 0.040 0.000 0.000 0.960
#> GSM125127     1  0.4365      0.786 0.784 0.000 0.028 0.188
#> GSM125129     4  0.3907      0.723 0.232 0.000 0.000 0.768
#> GSM125131     4  0.0000      0.939 0.000 0.000 0.000 1.000
#> GSM125133     4  0.0000      0.939 0.000 0.000 0.000 1.000
#> GSM125135     4  0.3610      0.765 0.200 0.000 0.000 0.800
#> GSM125137     4  0.2149      0.868 0.088 0.000 0.000 0.912
#> GSM125139     1  0.0707      0.882 0.980 0.000 0.000 0.020
#> GSM125141     4  0.0000      0.939 0.000 0.000 0.000 1.000
#> GSM125143     1  0.0817      0.883 0.976 0.000 0.000 0.024
#> GSM125145     1  0.2647      0.858 0.880 0.000 0.000 0.120
#> GSM125147     4  0.0000      0.939 0.000 0.000 0.000 1.000
#> GSM125149     4  0.0000      0.939 0.000 0.000 0.000 1.000
#> GSM125151     1  0.0707      0.882 0.980 0.000 0.000 0.020
#> GSM125153     1  0.2814      0.851 0.868 0.000 0.000 0.132
#> GSM125155     4  0.4477      0.457 0.312 0.000 0.000 0.688
#> GSM125157     4  0.0000      0.939 0.000 0.000 0.000 1.000
#> GSM125159     2  0.0469      0.940 0.000 0.988 0.012 0.000
#> GSM125161     4  0.0000      0.939 0.000 0.000 0.000 1.000
#> GSM125163     2  0.0469      0.940 0.000 0.988 0.012 0.000
#> GSM125165     3  0.1557      0.873 0.000 0.056 0.944 0.000
#> GSM125167     2  0.0707      0.938 0.000 0.980 0.020 0.000
#> GSM125169     2  0.0336      0.941 0.000 0.992 0.008 0.000
#> GSM125171     2  0.3266      0.788 0.000 0.832 0.168 0.000
#> GSM125173     3  0.1474      0.875 0.000 0.052 0.948 0.000
#> GSM125175     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM125177     2  0.2363      0.893 0.024 0.920 0.056 0.000
#> GSM125179     3  0.1004      0.877 0.004 0.024 0.972 0.000
#> GSM125181     3  0.0921      0.879 0.000 0.028 0.972 0.000
#> GSM125183     3  0.0376      0.875 0.004 0.000 0.992 0.004
#> GSM125185     3  0.1118      0.869 0.036 0.000 0.964 0.000
#> GSM125187     3  0.0336      0.875 0.008 0.000 0.992 0.000
#> GSM125189     2  0.0188      0.942 0.000 0.996 0.004 0.000
#> GSM125191     2  0.3400      0.781 0.000 0.820 0.180 0.000
#> GSM125193     4  0.4284      0.709 0.020 0.000 0.200 0.780
#> GSM125195     3  0.3862      0.827 0.080 0.016 0.860 0.044
#> GSM125197     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM125199     4  0.0188      0.938 0.004 0.000 0.000 0.996
#> GSM125201     2  0.1118      0.928 0.000 0.964 0.036 0.000
#> GSM125203     3  0.5885      0.708 0.028 0.064 0.728 0.180
#> GSM125205     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM125207     3  0.1022      0.873 0.032 0.000 0.968 0.000
#> GSM125209     2  0.4454      0.578 0.000 0.692 0.308 0.000
#> GSM125211     3  0.0672      0.875 0.008 0.000 0.984 0.008
#> GSM125213     2  0.0707      0.936 0.000 0.980 0.020 0.000
#> GSM125215     2  0.0592      0.938 0.000 0.984 0.016 0.000
#> GSM125217     2  0.1022      0.932 0.000 0.968 0.032 0.000
#> GSM125219     1  0.0707      0.877 0.980 0.000 0.000 0.020
#> GSM125221     3  0.1474      0.874 0.000 0.052 0.948 0.000
#> GSM125223     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM125225     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM125227     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM125229     2  0.1854      0.907 0.012 0.940 0.048 0.000
#> GSM125231     1  0.4761      0.413 0.628 0.000 0.372 0.000
#> GSM125233     1  0.0817      0.883 0.976 0.000 0.000 0.024
#> GSM125235     4  0.0921      0.925 0.028 0.000 0.000 0.972
#> GSM125237     4  0.0000      0.939 0.000 0.000 0.000 1.000
#> GSM125124     1  0.0707      0.882 0.980 0.000 0.000 0.020
#> GSM125126     4  0.0000      0.939 0.000 0.000 0.000 1.000
#> GSM125128     4  0.0188      0.937 0.004 0.000 0.000 0.996
#> GSM125130     1  0.0469      0.879 0.988 0.000 0.000 0.012
#> GSM125132     4  0.0592      0.932 0.016 0.000 0.000 0.984
#> GSM125134     1  0.2647      0.858 0.880 0.000 0.000 0.120
#> GSM125136     4  0.0336      0.935 0.000 0.000 0.008 0.992
#> GSM125138     1  0.2589      0.859 0.884 0.000 0.000 0.116
#> GSM125140     1  0.1118      0.882 0.964 0.000 0.000 0.036
#> GSM125142     1  0.3311      0.825 0.828 0.000 0.000 0.172
#> GSM125144     1  0.0707      0.882 0.980 0.000 0.000 0.020
#> GSM125146     1  0.3400      0.815 0.820 0.000 0.000 0.180
#> GSM125148     1  0.4866      0.472 0.596 0.000 0.000 0.404
#> GSM125150     4  0.2149      0.874 0.088 0.000 0.000 0.912
#> GSM125152     1  0.0817      0.882 0.976 0.000 0.000 0.024
#> GSM125154     1  0.2704      0.856 0.876 0.000 0.000 0.124
#> GSM125156     1  0.0817      0.882 0.976 0.000 0.000 0.024
#> GSM125158     1  0.4304      0.629 0.716 0.000 0.000 0.284
#> GSM125160     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM125162     4  0.0000      0.939 0.000 0.000 0.000 1.000
#> GSM125164     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM125166     2  0.0188      0.942 0.000 0.996 0.004 0.000
#> GSM125168     2  0.4907      0.251 0.000 0.580 0.420 0.000
#> GSM125170     2  0.0592      0.939 0.000 0.984 0.016 0.000
#> GSM125172     2  0.0188      0.942 0.000 0.996 0.004 0.000
#> GSM125174     3  0.1004      0.878 0.004 0.024 0.972 0.000
#> GSM125176     2  0.0336      0.941 0.000 0.992 0.008 0.000
#> GSM125178     3  0.4770      0.627 0.012 0.288 0.700 0.000
#> GSM125180     3  0.0469      0.875 0.012 0.000 0.988 0.000
#> GSM125182     2  0.3907      0.715 0.000 0.768 0.232 0.000
#> GSM125184     3  0.1557      0.874 0.000 0.056 0.944 0.000
#> GSM125186     3  0.1792      0.854 0.068 0.000 0.932 0.000
#> GSM125188     2  0.4713      0.404 0.000 0.640 0.360 0.000
#> GSM125190     2  0.0188      0.942 0.000 0.996 0.004 0.000
#> GSM125192     2  0.0188      0.942 0.000 0.996 0.004 0.000
#> GSM125194     3  0.5231      0.356 0.012 0.000 0.604 0.384
#> GSM125196     3  0.5716      0.194 0.028 0.420 0.552 0.000
#> GSM125198     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM125200     1  0.1211      0.881 0.960 0.000 0.000 0.040
#> GSM125202     2  0.0188      0.942 0.000 0.996 0.004 0.000
#> GSM125204     3  0.5794      0.773 0.064 0.080 0.764 0.092
#> GSM125206     3  0.5137      0.593 0.024 0.296 0.680 0.000
#> GSM125208     3  0.1389      0.870 0.048 0.000 0.952 0.000
#> GSM125210     3  0.0592      0.878 0.000 0.016 0.984 0.000
#> GSM125212     3  0.3810      0.758 0.008 0.188 0.804 0.000
#> GSM125214     2  0.0469      0.940 0.000 0.988 0.012 0.000
#> GSM125216     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM125218     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM125220     4  0.0336      0.937 0.008 0.000 0.000 0.992
#> GSM125222     3  0.0469      0.879 0.000 0.012 0.988 0.000
#> GSM125224     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM125226     2  0.0707      0.936 0.000 0.980 0.020 0.000
#> GSM125228     2  0.0000      0.942 0.000 1.000 0.000 0.000
#> GSM125230     3  0.3958      0.772 0.032 0.000 0.824 0.144
#> GSM125232     1  0.3688      0.726 0.792 0.000 0.208 0.000
#> GSM125234     1  0.1792      0.841 0.932 0.000 0.068 0.000
#> GSM125236     1  0.4972      0.251 0.544 0.000 0.000 0.456
#> GSM125238     4  0.0000      0.939 0.000 0.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM125123     5  0.0404     0.8614 0.012 0.000 0.000 0.000 0.988
#> GSM125125     1  0.1197     0.9103 0.952 0.000 0.000 0.000 0.048
#> GSM125127     5  0.4406     0.7458 0.128 0.000 0.108 0.000 0.764
#> GSM125129     1  0.3707     0.6383 0.716 0.000 0.000 0.000 0.284
#> GSM125131     1  0.0000     0.9371 1.000 0.000 0.000 0.000 0.000
#> GSM125133     1  0.0000     0.9371 1.000 0.000 0.000 0.000 0.000
#> GSM125135     1  0.3661     0.6517 0.724 0.000 0.000 0.000 0.276
#> GSM125137     1  0.1671     0.8820 0.924 0.000 0.000 0.000 0.076
#> GSM125139     5  0.0000     0.8614 0.000 0.000 0.000 0.000 1.000
#> GSM125141     1  0.0000     0.9371 1.000 0.000 0.000 0.000 0.000
#> GSM125143     5  0.0162     0.8622 0.004 0.000 0.000 0.000 0.996
#> GSM125145     5  0.2179     0.8395 0.112 0.000 0.000 0.000 0.888
#> GSM125147     1  0.0000     0.9371 1.000 0.000 0.000 0.000 0.000
#> GSM125149     1  0.0000     0.9371 1.000 0.000 0.000 0.000 0.000
#> GSM125151     5  0.0000     0.8614 0.000 0.000 0.000 0.000 1.000
#> GSM125153     5  0.2471     0.8269 0.136 0.000 0.000 0.000 0.864
#> GSM125155     1  0.3796     0.4960 0.700 0.000 0.000 0.000 0.300
#> GSM125157     1  0.0000     0.9371 1.000 0.000 0.000 0.000 0.000
#> GSM125159     2  0.2127     0.8864 0.000 0.892 0.000 0.108 0.000
#> GSM125161     1  0.0000     0.9371 1.000 0.000 0.000 0.000 0.000
#> GSM125163     2  0.2230     0.8815 0.000 0.884 0.000 0.116 0.000
#> GSM125165     4  0.0404     0.8546 0.000 0.012 0.000 0.988 0.000
#> GSM125167     2  0.1732     0.9038 0.000 0.920 0.000 0.080 0.000
#> GSM125169     2  0.0000     0.9360 0.000 1.000 0.000 0.000 0.000
#> GSM125171     2  0.0609     0.9298 0.000 0.980 0.000 0.020 0.000
#> GSM125173     4  0.0609     0.8539 0.000 0.020 0.000 0.980 0.000
#> GSM125175     2  0.0000     0.9360 0.000 1.000 0.000 0.000 0.000
#> GSM125177     3  0.0000     0.9062 0.000 0.000 1.000 0.000 0.000
#> GSM125179     4  0.0000     0.8553 0.000 0.000 0.000 1.000 0.000
#> GSM125181     4  0.0290     0.8549 0.000 0.008 0.000 0.992 0.000
#> GSM125183     4  0.0794     0.8529 0.000 0.000 0.028 0.972 0.000
#> GSM125185     4  0.0162     0.8554 0.000 0.000 0.000 0.996 0.004
#> GSM125187     4  0.0290     0.8555 0.000 0.000 0.008 0.992 0.000
#> GSM125189     2  0.0000     0.9360 0.000 1.000 0.000 0.000 0.000
#> GSM125191     2  0.3274     0.7966 0.000 0.780 0.000 0.220 0.000
#> GSM125193     3  0.4354     0.6055 0.256 0.000 0.712 0.032 0.000
#> GSM125195     3  0.0510     0.8989 0.000 0.000 0.984 0.016 0.000
#> GSM125197     2  0.0000     0.9360 0.000 1.000 0.000 0.000 0.000
#> GSM125199     1  0.0162     0.9355 0.996 0.000 0.000 0.000 0.004
#> GSM125201     2  0.2605     0.8606 0.000 0.852 0.000 0.148 0.000
#> GSM125203     3  0.0000     0.9062 0.000 0.000 1.000 0.000 0.000
#> GSM125205     2  0.0566     0.9313 0.000 0.984 0.012 0.004 0.000
#> GSM125207     3  0.1608     0.8544 0.000 0.000 0.928 0.072 0.000
#> GSM125209     2  0.3274     0.7987 0.000 0.780 0.000 0.220 0.000
#> GSM125211     4  0.3612     0.6592 0.000 0.000 0.268 0.732 0.000
#> GSM125213     2  0.2773     0.8474 0.000 0.836 0.000 0.164 0.000
#> GSM125215     2  0.2690     0.8543 0.000 0.844 0.000 0.156 0.000
#> GSM125217     2  0.2852     0.8422 0.000 0.828 0.000 0.172 0.000
#> GSM125219     5  0.4287     0.0696 0.000 0.000 0.460 0.000 0.540
#> GSM125221     4  0.0290     0.8556 0.000 0.008 0.000 0.992 0.000
#> GSM125223     2  0.0000     0.9360 0.000 1.000 0.000 0.000 0.000
#> GSM125225     2  0.0000     0.9360 0.000 1.000 0.000 0.000 0.000
#> GSM125227     2  0.0000     0.9360 0.000 1.000 0.000 0.000 0.000
#> GSM125229     3  0.1270     0.8620 0.000 0.052 0.948 0.000 0.000
#> GSM125231     3  0.5154     0.2901 0.000 0.000 0.580 0.048 0.372
#> GSM125233     5  0.0290     0.8617 0.008 0.000 0.000 0.000 0.992
#> GSM125235     1  0.1197     0.9103 0.952 0.000 0.000 0.000 0.048
#> GSM125237     1  0.0000     0.9371 1.000 0.000 0.000 0.000 0.000
#> GSM125124     5  0.0000     0.8614 0.000 0.000 0.000 0.000 1.000
#> GSM125126     1  0.0000     0.9371 1.000 0.000 0.000 0.000 0.000
#> GSM125128     1  0.0000     0.9371 1.000 0.000 0.000 0.000 0.000
#> GSM125130     5  0.0000     0.8614 0.000 0.000 0.000 0.000 1.000
#> GSM125132     1  0.0000     0.9371 1.000 0.000 0.000 0.000 0.000
#> GSM125134     5  0.2230     0.8383 0.116 0.000 0.000 0.000 0.884
#> GSM125136     1  0.0609     0.9238 0.980 0.000 0.020 0.000 0.000
#> GSM125138     5  0.2179     0.8395 0.112 0.000 0.000 0.000 0.888
#> GSM125140     5  0.0000     0.8614 0.000 0.000 0.000 0.000 1.000
#> GSM125142     5  0.2891     0.7966 0.176 0.000 0.000 0.000 0.824
#> GSM125144     5  0.0000     0.8614 0.000 0.000 0.000 0.000 1.000
#> GSM125146     5  0.2966     0.7896 0.184 0.000 0.000 0.000 0.816
#> GSM125148     5  0.4242     0.3841 0.428 0.000 0.000 0.000 0.572
#> GSM125150     1  0.1544     0.8911 0.932 0.000 0.000 0.000 0.068
#> GSM125152     5  0.0000     0.8614 0.000 0.000 0.000 0.000 1.000
#> GSM125154     5  0.2230     0.8380 0.116 0.000 0.000 0.000 0.884
#> GSM125156     5  0.0162     0.8618 0.004 0.000 0.000 0.000 0.996
#> GSM125158     5  0.3730     0.5974 0.288 0.000 0.000 0.000 0.712
#> GSM125160     2  0.0000     0.9360 0.000 1.000 0.000 0.000 0.000
#> GSM125162     1  0.0000     0.9371 1.000 0.000 0.000 0.000 0.000
#> GSM125164     2  0.0404     0.9333 0.000 0.988 0.000 0.012 0.000
#> GSM125166     2  0.0162     0.9353 0.000 0.996 0.000 0.004 0.000
#> GSM125168     2  0.3796     0.5469 0.000 0.700 0.000 0.300 0.000
#> GSM125170     2  0.0510     0.9302 0.000 0.984 0.000 0.016 0.000
#> GSM125172     2  0.0000     0.9360 0.000 1.000 0.000 0.000 0.000
#> GSM125174     4  0.3526     0.7732 0.000 0.072 0.096 0.832 0.000
#> GSM125176     2  0.0162     0.9353 0.000 0.996 0.000 0.004 0.000
#> GSM125178     3  0.0898     0.8938 0.000 0.008 0.972 0.020 0.000
#> GSM125180     4  0.1792     0.8245 0.000 0.000 0.084 0.916 0.000
#> GSM125182     2  0.3508     0.7586 0.000 0.748 0.000 0.252 0.000
#> GSM125184     4  0.2648     0.7525 0.000 0.152 0.000 0.848 0.000
#> GSM125186     4  0.1270     0.8320 0.000 0.000 0.000 0.948 0.052
#> GSM125188     4  0.4287    -0.0295 0.000 0.460 0.000 0.540 0.000
#> GSM125190     2  0.0000     0.9360 0.000 1.000 0.000 0.000 0.000
#> GSM125192     2  0.0162     0.9349 0.000 0.996 0.004 0.000 0.000
#> GSM125194     4  0.5017     0.6328 0.196 0.000 0.076 0.716 0.012
#> GSM125196     3  0.0000     0.9062 0.000 0.000 1.000 0.000 0.000
#> GSM125198     2  0.0000     0.9360 0.000 1.000 0.000 0.000 0.000
#> GSM125200     5  0.0290     0.8618 0.008 0.000 0.000 0.000 0.992
#> GSM125202     2  0.0162     0.9353 0.000 0.996 0.000 0.004 0.000
#> GSM125204     3  0.0000     0.9062 0.000 0.000 1.000 0.000 0.000
#> GSM125206     3  0.0000     0.9062 0.000 0.000 1.000 0.000 0.000
#> GSM125208     3  0.0000     0.9062 0.000 0.000 1.000 0.000 0.000
#> GSM125210     4  0.0000     0.8553 0.000 0.000 0.000 1.000 0.000
#> GSM125212     4  0.3715     0.6709 0.000 0.004 0.260 0.736 0.000
#> GSM125214     2  0.2605     0.8607 0.000 0.852 0.000 0.148 0.000
#> GSM125216     2  0.0000     0.9360 0.000 1.000 0.000 0.000 0.000
#> GSM125218     2  0.0000     0.9360 0.000 1.000 0.000 0.000 0.000
#> GSM125220     1  0.1671     0.8836 0.924 0.000 0.076 0.000 0.000
#> GSM125222     4  0.0955     0.8540 0.000 0.004 0.028 0.968 0.000
#> GSM125224     2  0.0000     0.9360 0.000 1.000 0.000 0.000 0.000
#> GSM125226     2  0.0290     0.9337 0.000 0.992 0.000 0.008 0.000
#> GSM125228     2  0.0000     0.9360 0.000 1.000 0.000 0.000 0.000
#> GSM125230     4  0.3983     0.5522 0.000 0.000 0.340 0.660 0.000
#> GSM125232     5  0.2873     0.7856 0.000 0.000 0.016 0.128 0.856
#> GSM125234     5  0.1211     0.8489 0.000 0.000 0.024 0.016 0.960
#> GSM125236     5  0.4283     0.2390 0.456 0.000 0.000 0.000 0.544
#> GSM125238     1  0.0000     0.9371 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
#> GSM125123     1  0.0363     0.8561 0.988 0.000 0.000 0.000 0.012 0.000
#> GSM125125     5  0.1075     0.9091 0.048 0.000 0.000 0.000 0.952 0.000
#> GSM125127     1  0.3977     0.7457 0.760 0.000 0.096 0.000 0.144 0.000
#> GSM125129     5  0.3351     0.6313 0.288 0.000 0.000 0.000 0.712 0.000
#> GSM125131     5  0.0000     0.9360 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125133     5  0.0000     0.9360 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125135     5  0.3288     0.6511 0.276 0.000 0.000 0.000 0.724 0.000
#> GSM125137     5  0.1501     0.8806 0.076 0.000 0.000 0.000 0.924 0.000
#> GSM125139     1  0.0000     0.8564 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125141     5  0.0000     0.9360 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125143     1  0.0000     0.8564 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125145     1  0.2048     0.8324 0.880 0.000 0.000 0.000 0.120 0.000
#> GSM125147     5  0.0000     0.9360 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125149     5  0.0000     0.9360 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125151     1  0.0000     0.8564 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125153     1  0.2260     0.8222 0.860 0.000 0.000 0.000 0.140 0.000
#> GSM125155     5  0.3409     0.4926 0.300 0.000 0.000 0.000 0.700 0.000
#> GSM125157     5  0.0000     0.9360 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125159     2  0.3624     0.6300 0.000 0.784 0.000 0.060 0.000 0.156
#> GSM125161     5  0.0000     0.9360 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125163     2  0.3681     0.6256 0.000 0.780 0.000 0.064 0.000 0.156
#> GSM125165     4  0.0717     0.8159 0.000 0.008 0.000 0.976 0.000 0.016
#> GSM125167     2  0.3318     0.6444 0.000 0.796 0.000 0.032 0.000 0.172
#> GSM125169     2  0.0260     0.7402 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM125171     2  0.1391     0.7353 0.000 0.944 0.000 0.040 0.000 0.016
#> GSM125173     4  0.0520     0.8156 0.000 0.008 0.000 0.984 0.000 0.008
#> GSM125175     2  0.1387     0.6906 0.000 0.932 0.000 0.000 0.000 0.068
#> GSM125177     3  0.0000     0.9064 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM125179     4  0.0146     0.8147 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM125181     4  0.4798     0.6194 0.000 0.080 0.000 0.620 0.000 0.300
#> GSM125183     4  0.0000     0.8145 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM125185     4  0.4408     0.6509 0.000 0.052 0.000 0.656 0.000 0.292
#> GSM125187     4  0.0508     0.8129 0.000 0.000 0.012 0.984 0.000 0.004
#> GSM125189     2  0.0260     0.7385 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM125191     2  0.5042     0.4891 0.000 0.592 0.000 0.100 0.000 0.308
#> GSM125193     3  0.4027     0.6536 0.000 0.008 0.736 0.028 0.224 0.004
#> GSM125195     3  0.0291     0.9035 0.000 0.000 0.992 0.004 0.000 0.004
#> GSM125197     6  0.3804     0.8051 0.000 0.424 0.000 0.000 0.000 0.576
#> GSM125199     5  0.0146     0.9344 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM125201     6  0.3384     0.5527 0.000 0.120 0.000 0.068 0.000 0.812
#> GSM125203     3  0.0000     0.9064 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM125205     6  0.4018     0.8020 0.000 0.412 0.008 0.000 0.000 0.580
#> GSM125207     3  0.1152     0.8767 0.000 0.000 0.952 0.004 0.000 0.044
#> GSM125209     2  0.4829     0.5032 0.000 0.612 0.000 0.080 0.000 0.308
#> GSM125211     4  0.4277     0.6829 0.000 0.000 0.144 0.732 0.000 0.124
#> GSM125213     2  0.4859     0.4704 0.000 0.584 0.000 0.072 0.000 0.344
#> GSM125215     6  0.3352     0.5573 0.000 0.112 0.000 0.072 0.000 0.816
#> GSM125217     2  0.4720     0.5108 0.000 0.624 0.000 0.072 0.000 0.304
#> GSM125219     1  0.3868    -0.0659 0.508 0.000 0.492 0.000 0.000 0.000
#> GSM125221     4  0.1265     0.8111 0.000 0.008 0.000 0.948 0.000 0.044
#> GSM125223     6  0.3810     0.8046 0.000 0.428 0.000 0.000 0.000 0.572
#> GSM125225     6  0.3862     0.7430 0.000 0.476 0.000 0.000 0.000 0.524
#> GSM125227     2  0.2092     0.6126 0.000 0.876 0.000 0.000 0.000 0.124
#> GSM125229     3  0.2999     0.8115 0.000 0.040 0.836 0.000 0.000 0.124
#> GSM125231     3  0.4493     0.3151 0.364 0.000 0.596 0.040 0.000 0.000
#> GSM125233     1  0.0260     0.8564 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM125235     5  0.1141     0.9058 0.052 0.000 0.000 0.000 0.948 0.000
#> GSM125237     5  0.0000     0.9360 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125124     1  0.0000     0.8564 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125126     5  0.0000     0.9360 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125128     5  0.0000     0.9360 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125130     1  0.0000     0.8564 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125132     5  0.0000     0.9360 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125134     1  0.2092     0.8307 0.876 0.000 0.000 0.000 0.124 0.000
#> GSM125136     5  0.0458     0.9251 0.000 0.000 0.016 0.000 0.984 0.000
#> GSM125138     1  0.2048     0.8324 0.880 0.000 0.000 0.000 0.120 0.000
#> GSM125140     1  0.0000     0.8564 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125142     1  0.2631     0.7926 0.820 0.000 0.000 0.000 0.180 0.000
#> GSM125144     1  0.0000     0.8564 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125146     1  0.2697     0.7856 0.812 0.000 0.000 0.000 0.188 0.000
#> GSM125148     1  0.3817     0.3776 0.568 0.000 0.000 0.000 0.432 0.000
#> GSM125150     5  0.1327     0.8938 0.064 0.000 0.000 0.000 0.936 0.000
#> GSM125152     1  0.0000     0.8564 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125154     1  0.2092     0.8307 0.876 0.000 0.000 0.000 0.124 0.000
#> GSM125156     1  0.0146     0.8566 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125158     1  0.3330     0.5982 0.716 0.000 0.000 0.000 0.284 0.000
#> GSM125160     2  0.0632     0.7334 0.000 0.976 0.000 0.000 0.000 0.024
#> GSM125162     5  0.0000     0.9360 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125164     2  0.1124     0.7380 0.000 0.956 0.000 0.008 0.000 0.036
#> GSM125166     2  0.1267     0.6985 0.000 0.940 0.000 0.000 0.000 0.060
#> GSM125168     2  0.3819     0.3771 0.000 0.652 0.000 0.340 0.000 0.008
#> GSM125170     2  0.0777     0.7407 0.000 0.972 0.000 0.024 0.000 0.004
#> GSM125172     2  0.1074     0.7312 0.000 0.960 0.000 0.028 0.000 0.012
#> GSM125174     4  0.1444     0.7711 0.000 0.072 0.000 0.928 0.000 0.000
#> GSM125176     2  0.0713     0.7410 0.000 0.972 0.000 0.028 0.000 0.000
#> GSM125178     3  0.1074     0.8862 0.000 0.012 0.960 0.028 0.000 0.000
#> GSM125180     4  0.0603     0.8154 0.004 0.000 0.000 0.980 0.000 0.016
#> GSM125182     2  0.4814     0.5050 0.000 0.616 0.000 0.080 0.000 0.304
#> GSM125184     4  0.1327     0.7787 0.000 0.064 0.000 0.936 0.000 0.000
#> GSM125186     4  0.3732     0.7257 0.024 0.004 0.000 0.744 0.000 0.228
#> GSM125188     4  0.6112     0.0648 0.000 0.332 0.000 0.368 0.000 0.300
#> GSM125190     2  0.1267     0.7159 0.000 0.940 0.000 0.060 0.000 0.000
#> GSM125192     2  0.0632     0.7309 0.000 0.976 0.000 0.000 0.000 0.024
#> GSM125194     4  0.4108     0.6644 0.008 0.000 0.072 0.756 0.164 0.000
#> GSM125196     3  0.0000     0.9064 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM125198     6  0.3817     0.8025 0.000 0.432 0.000 0.000 0.000 0.568
#> GSM125200     1  0.0260     0.8565 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM125202     6  0.3823     0.8026 0.000 0.436 0.000 0.000 0.000 0.564
#> GSM125204     3  0.0000     0.9064 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM125206     3  0.0000     0.9064 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM125208     3  0.0000     0.9064 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM125210     4  0.4443     0.6461 0.000 0.052 0.000 0.648 0.000 0.300
#> GSM125212     4  0.4593     0.6749 0.000 0.008 0.152 0.716 0.000 0.124
#> GSM125214     6  0.4176     0.5082 0.000 0.212 0.000 0.068 0.000 0.720
#> GSM125216     6  0.3838     0.7888 0.000 0.448 0.000 0.000 0.000 0.552
#> GSM125218     2  0.0260     0.7385 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM125220     5  0.1765     0.8630 0.000 0.000 0.096 0.000 0.904 0.000
#> GSM125222     4  0.0146     0.8145 0.000 0.000 0.004 0.996 0.000 0.000
#> GSM125224     6  0.3810     0.8046 0.000 0.428 0.000 0.000 0.000 0.572
#> GSM125226     2  0.1320     0.7284 0.000 0.948 0.000 0.036 0.000 0.016
#> GSM125228     2  0.1714     0.6642 0.000 0.908 0.000 0.000 0.000 0.092
#> GSM125230     4  0.4871     0.5934 0.000 0.000 0.224 0.652 0.000 0.124
#> GSM125232     1  0.2562     0.7610 0.828 0.000 0.000 0.172 0.000 0.000
#> GSM125234     1  0.1003     0.8442 0.964 0.000 0.028 0.004 0.000 0.004
#> GSM125236     1  0.3838     0.2595 0.552 0.000 0.000 0.000 0.448 0.000
#> GSM125238     5  0.0000     0.9360 0.000 0.000 0.000 0.000 1.000 0.000

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk CV-pam-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk CV-pam-collect-classes

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

test_to_known_factors(res)
#>          n agent(p) individual(p) k
#> CV:pam 113    1.000      2.89e-05 2
#> CV:pam 109    0.963      1.55e-06 3
#> CV:pam 108    0.292      5.35e-06 4
#> CV:pam 110    0.426      8.96e-09 5
#> CV:pam 107    0.532      9.03e-10 6

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


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

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

collect_plots(res)

plot of chunk CV-mclust-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.803           0.937       0.966         0.4923 0.511   0.511
#> 3 3 0.828           0.830       0.920         0.3111 0.839   0.684
#> 4 4 0.693           0.761       0.812         0.1030 0.939   0.829
#> 5 5 0.634           0.656       0.780         0.0761 0.901   0.682
#> 6 6 0.654           0.588       0.740         0.0417 0.964   0.851

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
#> GSM125123     1   0.000      0.996 1.000 0.000
#> GSM125125     1   0.000      0.996 1.000 0.000
#> GSM125127     1   0.000      0.996 1.000 0.000
#> GSM125129     1   0.000      0.996 1.000 0.000
#> GSM125131     1   0.000      0.996 1.000 0.000
#> GSM125133     1   0.000      0.996 1.000 0.000
#> GSM125135     1   0.000      0.996 1.000 0.000
#> GSM125137     1   0.000      0.996 1.000 0.000
#> GSM125139     1   0.000      0.996 1.000 0.000
#> GSM125141     1   0.000      0.996 1.000 0.000
#> GSM125143     1   0.000      0.996 1.000 0.000
#> GSM125145     1   0.000      0.996 1.000 0.000
#> GSM125147     1   0.000      0.996 1.000 0.000
#> GSM125149     1   0.000      0.996 1.000 0.000
#> GSM125151     1   0.000      0.996 1.000 0.000
#> GSM125153     1   0.000      0.996 1.000 0.000
#> GSM125155     1   0.000      0.996 1.000 0.000
#> GSM125157     1   0.000      0.996 1.000 0.000
#> GSM125159     2   0.000      0.943 0.000 1.000
#> GSM125161     1   0.000      0.996 1.000 0.000
#> GSM125163     2   0.000      0.943 0.000 1.000
#> GSM125165     2   0.000      0.943 0.000 1.000
#> GSM125167     2   0.000      0.943 0.000 1.000
#> GSM125169     2   0.000      0.943 0.000 1.000
#> GSM125171     2   0.000      0.943 0.000 1.000
#> GSM125173     2   0.000      0.943 0.000 1.000
#> GSM125175     2   0.000      0.943 0.000 1.000
#> GSM125177     2   0.689      0.814 0.184 0.816
#> GSM125179     2   0.000      0.943 0.000 1.000
#> GSM125181     2   0.000      0.943 0.000 1.000
#> GSM125183     2   0.000      0.943 0.000 1.000
#> GSM125185     2   0.000      0.943 0.000 1.000
#> GSM125187     2   0.000      0.943 0.000 1.000
#> GSM125189     2   0.000      0.943 0.000 1.000
#> GSM125191     2   0.000      0.943 0.000 1.000
#> GSM125193     2   0.781      0.760 0.232 0.768
#> GSM125195     2   0.909      0.617 0.324 0.676
#> GSM125197     2   0.000      0.943 0.000 1.000
#> GSM125199     1   0.000      0.996 1.000 0.000
#> GSM125201     2   0.000      0.943 0.000 1.000
#> GSM125203     2   0.886      0.653 0.304 0.696
#> GSM125205     2   0.634      0.836 0.160 0.840
#> GSM125207     2   0.697      0.810 0.188 0.812
#> GSM125209     2   0.000      0.943 0.000 1.000
#> GSM125211     2   0.469      0.881 0.100 0.900
#> GSM125213     2   0.000      0.943 0.000 1.000
#> GSM125215     2   0.000      0.943 0.000 1.000
#> GSM125217     2   0.000      0.943 0.000 1.000
#> GSM125219     1   0.000      0.996 1.000 0.000
#> GSM125221     2   0.000      0.943 0.000 1.000
#> GSM125223     2   0.000      0.943 0.000 1.000
#> GSM125225     2   0.000      0.943 0.000 1.000
#> GSM125227     2   0.000      0.943 0.000 1.000
#> GSM125229     2   0.714      0.802 0.196 0.804
#> GSM125231     2   0.821      0.728 0.256 0.744
#> GSM125233     1   0.000      0.996 1.000 0.000
#> GSM125235     1   0.000      0.996 1.000 0.000
#> GSM125237     1   0.000      0.996 1.000 0.000
#> GSM125124     1   0.000      0.996 1.000 0.000
#> GSM125126     1   0.000      0.996 1.000 0.000
#> GSM125128     1   0.000      0.996 1.000 0.000
#> GSM125130     1   0.000      0.996 1.000 0.000
#> GSM125132     1   0.000      0.996 1.000 0.000
#> GSM125134     1   0.000      0.996 1.000 0.000
#> GSM125136     1   0.000      0.996 1.000 0.000
#> GSM125138     1   0.000      0.996 1.000 0.000
#> GSM125140     1   0.000      0.996 1.000 0.000
#> GSM125142     1   0.000      0.996 1.000 0.000
#> GSM125144     1   0.000      0.996 1.000 0.000
#> GSM125146     1   0.000      0.996 1.000 0.000
#> GSM125148     1   0.000      0.996 1.000 0.000
#> GSM125150     1   0.000      0.996 1.000 0.000
#> GSM125152     1   0.000      0.996 1.000 0.000
#> GSM125154     1   0.000      0.996 1.000 0.000
#> GSM125156     1   0.000      0.996 1.000 0.000
#> GSM125158     1   0.000      0.996 1.000 0.000
#> GSM125160     2   0.000      0.943 0.000 1.000
#> GSM125162     1   0.000      0.996 1.000 0.000
#> GSM125164     2   0.000      0.943 0.000 1.000
#> GSM125166     2   0.000      0.943 0.000 1.000
#> GSM125168     2   0.000      0.943 0.000 1.000
#> GSM125170     2   0.000      0.943 0.000 1.000
#> GSM125172     2   0.000      0.943 0.000 1.000
#> GSM125174     2   0.000      0.943 0.000 1.000
#> GSM125176     2   0.000      0.943 0.000 1.000
#> GSM125178     2   0.680      0.818 0.180 0.820
#> GSM125180     2   0.000      0.943 0.000 1.000
#> GSM125182     2   0.000      0.943 0.000 1.000
#> GSM125184     2   0.000      0.943 0.000 1.000
#> GSM125186     2   0.000      0.943 0.000 1.000
#> GSM125188     2   0.000      0.943 0.000 1.000
#> GSM125190     2   0.000      0.943 0.000 1.000
#> GSM125192     2   0.000      0.943 0.000 1.000
#> GSM125194     2   0.697      0.811 0.188 0.812
#> GSM125196     2   0.821      0.728 0.256 0.744
#> GSM125198     2   0.000      0.943 0.000 1.000
#> GSM125200     1   0.000      0.996 1.000 0.000
#> GSM125202     2   0.000      0.943 0.000 1.000
#> GSM125204     2   0.891      0.646 0.308 0.692
#> GSM125206     2   0.814      0.734 0.252 0.748
#> GSM125208     2   0.706      0.806 0.192 0.808
#> GSM125210     2   0.000      0.943 0.000 1.000
#> GSM125212     2   0.416      0.892 0.084 0.916
#> GSM125214     2   0.000      0.943 0.000 1.000
#> GSM125216     2   0.000      0.943 0.000 1.000
#> GSM125218     2   0.000      0.943 0.000 1.000
#> GSM125220     1   0.000      0.996 1.000 0.000
#> GSM125222     2   0.000      0.943 0.000 1.000
#> GSM125224     2   0.000      0.943 0.000 1.000
#> GSM125226     2   0.000      0.943 0.000 1.000
#> GSM125228     2   0.000      0.943 0.000 1.000
#> GSM125230     2   0.697      0.810 0.188 0.812
#> GSM125232     2   0.605      0.845 0.148 0.852
#> GSM125234     1   0.671      0.761 0.824 0.176
#> GSM125236     1   0.000      0.996 1.000 0.000
#> GSM125238     1   0.000      0.996 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
#> GSM125123     1  0.1289     0.9699 0.968 0.000 0.032
#> GSM125125     1  0.1031     0.9727 0.976 0.000 0.024
#> GSM125127     1  0.1289     0.9699 0.968 0.000 0.032
#> GSM125129     1  0.1289     0.9699 0.968 0.000 0.032
#> GSM125131     1  0.0237     0.9744 0.996 0.000 0.004
#> GSM125133     1  0.0424     0.9744 0.992 0.000 0.008
#> GSM125135     1  0.0892     0.9734 0.980 0.000 0.020
#> GSM125137     1  0.0237     0.9744 0.996 0.000 0.004
#> GSM125139     1  0.1163     0.9723 0.972 0.000 0.028
#> GSM125141     1  0.0237     0.9744 0.996 0.000 0.004
#> GSM125143     1  0.1529     0.9652 0.960 0.000 0.040
#> GSM125145     1  0.1031     0.9727 0.976 0.000 0.024
#> GSM125147     1  0.0237     0.9744 0.996 0.000 0.004
#> GSM125149     1  0.0237     0.9744 0.996 0.000 0.004
#> GSM125151     1  0.1163     0.9723 0.972 0.000 0.028
#> GSM125153     1  0.0237     0.9744 0.996 0.000 0.004
#> GSM125155     1  0.0237     0.9744 0.996 0.000 0.004
#> GSM125157     1  0.0237     0.9744 0.996 0.000 0.004
#> GSM125159     2  0.0000     0.8880 0.000 1.000 0.000
#> GSM125161     1  0.0237     0.9744 0.996 0.000 0.004
#> GSM125163     2  0.0000     0.8880 0.000 1.000 0.000
#> GSM125165     2  0.4178     0.7465 0.000 0.828 0.172
#> GSM125167     2  0.0000     0.8880 0.000 1.000 0.000
#> GSM125169     2  0.4452     0.7186 0.000 0.808 0.192
#> GSM125171     3  0.5621     0.5848 0.000 0.308 0.692
#> GSM125173     2  0.5733     0.4762 0.000 0.676 0.324
#> GSM125175     2  0.3192     0.8071 0.000 0.888 0.112
#> GSM125177     3  0.0892     0.8096 0.000 0.020 0.980
#> GSM125179     3  0.6008     0.4772 0.000 0.372 0.628
#> GSM125181     2  0.4178     0.7485 0.000 0.828 0.172
#> GSM125183     2  0.6111     0.2829 0.000 0.604 0.396
#> GSM125185     3  0.6008     0.4773 0.000 0.372 0.628
#> GSM125187     3  0.5968     0.4978 0.000 0.364 0.636
#> GSM125189     2  0.0000     0.8880 0.000 1.000 0.000
#> GSM125191     2  0.0747     0.8819 0.000 0.984 0.016
#> GSM125193     3  0.2318     0.8036 0.028 0.028 0.944
#> GSM125195     3  0.1170     0.8085 0.008 0.016 0.976
#> GSM125197     2  0.0000     0.8880 0.000 1.000 0.000
#> GSM125199     1  0.0237     0.9744 0.996 0.000 0.004
#> GSM125201     2  0.0000     0.8880 0.000 1.000 0.000
#> GSM125203     3  0.2176     0.7980 0.032 0.020 0.948
#> GSM125205     3  0.5138     0.6280 0.000 0.252 0.748
#> GSM125207     3  0.1031     0.8093 0.000 0.024 0.976
#> GSM125209     2  0.0892     0.8805 0.000 0.980 0.020
#> GSM125211     3  0.6045     0.4259 0.000 0.380 0.620
#> GSM125213     2  0.0000     0.8880 0.000 1.000 0.000
#> GSM125215     2  0.0000     0.8880 0.000 1.000 0.000
#> GSM125217     2  0.0424     0.8856 0.000 0.992 0.008
#> GSM125219     1  0.1411     0.9679 0.964 0.000 0.036
#> GSM125221     2  0.5859     0.4505 0.000 0.656 0.344
#> GSM125223     2  0.0000     0.8880 0.000 1.000 0.000
#> GSM125225     2  0.0000     0.8880 0.000 1.000 0.000
#> GSM125227     2  0.0000     0.8880 0.000 1.000 0.000
#> GSM125229     3  0.2945     0.7806 0.004 0.088 0.908
#> GSM125231     3  0.0983     0.8091 0.004 0.016 0.980
#> GSM125233     1  0.1289     0.9699 0.968 0.000 0.032
#> GSM125235     1  0.0237     0.9744 0.996 0.000 0.004
#> GSM125237     1  0.0237     0.9744 0.996 0.000 0.004
#> GSM125124     1  0.1163     0.9723 0.972 0.000 0.028
#> GSM125126     1  0.0237     0.9744 0.996 0.000 0.004
#> GSM125128     1  0.0747     0.9745 0.984 0.000 0.016
#> GSM125130     1  0.1753     0.9593 0.952 0.000 0.048
#> GSM125132     1  0.0237     0.9744 0.996 0.000 0.004
#> GSM125134     1  0.0892     0.9734 0.980 0.000 0.020
#> GSM125136     1  0.0424     0.9744 0.992 0.000 0.008
#> GSM125138     1  0.1163     0.9723 0.972 0.000 0.028
#> GSM125140     1  0.1163     0.9723 0.972 0.000 0.028
#> GSM125142     1  0.0000     0.9745 1.000 0.000 0.000
#> GSM125144     1  0.1163     0.9723 0.972 0.000 0.028
#> GSM125146     1  0.0892     0.9734 0.980 0.000 0.020
#> GSM125148     1  0.0237     0.9744 0.996 0.000 0.004
#> GSM125150     1  0.0237     0.9744 0.996 0.000 0.004
#> GSM125152     1  0.1163     0.9723 0.972 0.000 0.028
#> GSM125154     1  0.1031     0.9727 0.976 0.000 0.024
#> GSM125156     1  0.0000     0.9745 1.000 0.000 0.000
#> GSM125158     1  0.0237     0.9744 0.996 0.000 0.004
#> GSM125160     2  0.0000     0.8880 0.000 1.000 0.000
#> GSM125162     1  0.0237     0.9744 0.996 0.000 0.004
#> GSM125164     2  0.0000     0.8880 0.000 1.000 0.000
#> GSM125166     2  0.0000     0.8880 0.000 1.000 0.000
#> GSM125168     2  0.2356     0.8498 0.000 0.928 0.072
#> GSM125170     2  0.4235     0.7497 0.000 0.824 0.176
#> GSM125172     2  0.0000     0.8880 0.000 1.000 0.000
#> GSM125174     3  0.6204     0.3486 0.000 0.424 0.576
#> GSM125176     2  0.5098     0.6280 0.000 0.752 0.248
#> GSM125178     3  0.0892     0.8096 0.000 0.020 0.980
#> GSM125180     3  0.5835     0.5334 0.000 0.340 0.660
#> GSM125182     2  0.1964     0.8617 0.000 0.944 0.056
#> GSM125184     2  0.6192     0.1792 0.000 0.580 0.420
#> GSM125186     3  0.5968     0.4935 0.000 0.364 0.636
#> GSM125188     2  0.4346     0.7376 0.000 0.816 0.184
#> GSM125190     2  0.1289     0.8739 0.000 0.968 0.032
#> GSM125192     2  0.0000     0.8880 0.000 1.000 0.000
#> GSM125194     3  0.2313     0.8015 0.032 0.024 0.944
#> GSM125196     3  0.0747     0.8086 0.000 0.016 0.984
#> GSM125198     2  0.0000     0.8880 0.000 1.000 0.000
#> GSM125200     1  0.0747     0.9745 0.984 0.000 0.016
#> GSM125202     2  0.0000     0.8880 0.000 1.000 0.000
#> GSM125204     3  0.1482     0.8083 0.012 0.020 0.968
#> GSM125206     3  0.0747     0.8086 0.000 0.016 0.984
#> GSM125208     3  0.0892     0.8096 0.000 0.020 0.980
#> GSM125210     3  0.6244     0.3001 0.000 0.440 0.560
#> GSM125212     2  0.6291     0.0134 0.000 0.532 0.468
#> GSM125214     2  0.0000     0.8880 0.000 1.000 0.000
#> GSM125216     2  0.0237     0.8857 0.000 0.996 0.004
#> GSM125218     2  0.0592     0.8840 0.000 0.988 0.012
#> GSM125220     1  0.5016     0.7128 0.760 0.000 0.240
#> GSM125222     2  0.5733     0.4972 0.000 0.676 0.324
#> GSM125224     2  0.0000     0.8880 0.000 1.000 0.000
#> GSM125226     2  0.0237     0.8869 0.000 0.996 0.004
#> GSM125228     2  0.0000     0.8880 0.000 1.000 0.000
#> GSM125230     3  0.1453     0.8096 0.008 0.024 0.968
#> GSM125232     3  0.2031     0.8082 0.016 0.032 0.952
#> GSM125234     1  0.6434     0.4381 0.612 0.008 0.380
#> GSM125236     1  0.1289     0.9699 0.968 0.000 0.032
#> GSM125238     1  0.0237     0.9744 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
#> GSM125123     1  0.5630      0.799 0.608 0.000 0.032 0.360
#> GSM125125     1  0.4008      0.837 0.756 0.000 0.000 0.244
#> GSM125127     1  0.5548      0.807 0.628 0.000 0.032 0.340
#> GSM125129     1  0.5630      0.799 0.608 0.000 0.032 0.360
#> GSM125131     1  0.0592      0.824 0.984 0.000 0.000 0.016
#> GSM125133     1  0.1118      0.821 0.964 0.000 0.000 0.036
#> GSM125135     1  0.4535      0.831 0.704 0.000 0.004 0.292
#> GSM125137     1  0.0921      0.818 0.972 0.000 0.000 0.028
#> GSM125139     1  0.4730      0.812 0.636 0.000 0.000 0.364
#> GSM125141     1  0.0921      0.818 0.972 0.000 0.000 0.028
#> GSM125143     1  0.5432      0.815 0.652 0.000 0.032 0.316
#> GSM125145     1  0.4564      0.822 0.672 0.000 0.000 0.328
#> GSM125147     1  0.0817      0.820 0.976 0.000 0.000 0.024
#> GSM125149     1  0.0921      0.818 0.972 0.000 0.000 0.028
#> GSM125151     1  0.4730      0.812 0.636 0.000 0.000 0.364
#> GSM125153     1  0.3400      0.841 0.820 0.000 0.000 0.180
#> GSM125155     1  0.1716      0.839 0.936 0.000 0.000 0.064
#> GSM125157     1  0.0921      0.818 0.972 0.000 0.000 0.028
#> GSM125159     2  0.0000      0.860 0.000 1.000 0.000 0.000
#> GSM125161     1  0.0921      0.818 0.972 0.000 0.000 0.028
#> GSM125163     2  0.0000      0.860 0.000 1.000 0.000 0.000
#> GSM125165     2  0.5674      0.526 0.000 0.720 0.132 0.148
#> GSM125167     2  0.0000      0.860 0.000 1.000 0.000 0.000
#> GSM125169     2  0.7480     -0.247 0.000 0.500 0.276 0.224
#> GSM125171     3  0.5151      0.552 0.000 0.140 0.760 0.100
#> GSM125173     4  0.7448      0.570 0.000 0.400 0.172 0.428
#> GSM125175     2  0.4399      0.604 0.000 0.768 0.212 0.020
#> GSM125177     3  0.0376      0.868 0.000 0.004 0.992 0.004
#> GSM125179     4  0.6856      0.789 0.000 0.140 0.284 0.576
#> GSM125181     2  0.5719      0.514 0.000 0.716 0.132 0.152
#> GSM125183     4  0.7145      0.790 0.000 0.252 0.192 0.556
#> GSM125185     4  0.6876      0.787 0.000 0.140 0.288 0.572
#> GSM125187     4  0.7031      0.785 0.000 0.152 0.296 0.552
#> GSM125189     2  0.1867      0.819 0.000 0.928 0.072 0.000
#> GSM125191     2  0.0469      0.857 0.000 0.988 0.012 0.000
#> GSM125193     3  0.1909      0.859 0.008 0.004 0.940 0.048
#> GSM125195     3  0.0657      0.865 0.000 0.004 0.984 0.012
#> GSM125197     2  0.0000      0.860 0.000 1.000 0.000 0.000
#> GSM125199     1  0.1022      0.821 0.968 0.000 0.000 0.032
#> GSM125201     2  0.0336      0.858 0.000 0.992 0.008 0.000
#> GSM125203     3  0.0967      0.862 0.004 0.004 0.976 0.016
#> GSM125205     3  0.2542      0.793 0.000 0.084 0.904 0.012
#> GSM125207     3  0.4539      0.583 0.000 0.008 0.720 0.272
#> GSM125209     2  0.0707      0.853 0.000 0.980 0.020 0.000
#> GSM125211     4  0.7684      0.421 0.000 0.216 0.388 0.396
#> GSM125213     2  0.0000      0.860 0.000 1.000 0.000 0.000
#> GSM125215     2  0.0000      0.860 0.000 1.000 0.000 0.000
#> GSM125217     2  0.2867      0.776 0.000 0.884 0.104 0.012
#> GSM125219     1  0.5728      0.798 0.600 0.000 0.036 0.364
#> GSM125221     4  0.7551      0.763 0.000 0.288 0.228 0.484
#> GSM125223     2  0.0188      0.859 0.000 0.996 0.000 0.004
#> GSM125225     2  0.0000      0.860 0.000 1.000 0.000 0.000
#> GSM125227     2  0.0000      0.860 0.000 1.000 0.000 0.000
#> GSM125229     3  0.1545      0.845 0.000 0.040 0.952 0.008
#> GSM125231     3  0.0844      0.868 0.004 0.004 0.980 0.012
#> GSM125233     1  0.5659      0.795 0.600 0.000 0.032 0.368
#> GSM125235     1  0.1022      0.823 0.968 0.000 0.000 0.032
#> GSM125237     1  0.0921      0.818 0.972 0.000 0.000 0.028
#> GSM125124     1  0.4643      0.817 0.656 0.000 0.000 0.344
#> GSM125126     1  0.2149      0.839 0.912 0.000 0.000 0.088
#> GSM125128     1  0.2214      0.817 0.928 0.000 0.028 0.044
#> GSM125130     1  0.5929      0.790 0.596 0.000 0.048 0.356
#> GSM125132     1  0.1637      0.837 0.940 0.000 0.000 0.060
#> GSM125134     1  0.4500      0.825 0.684 0.000 0.000 0.316
#> GSM125136     1  0.1584      0.820 0.952 0.000 0.012 0.036
#> GSM125138     1  0.4605      0.820 0.664 0.000 0.000 0.336
#> GSM125140     1  0.4730      0.812 0.636 0.000 0.000 0.364
#> GSM125142     1  0.2081      0.843 0.916 0.000 0.000 0.084
#> GSM125144     1  0.4730      0.812 0.636 0.000 0.000 0.364
#> GSM125146     1  0.4509      0.829 0.708 0.000 0.004 0.288
#> GSM125148     1  0.0188      0.828 0.996 0.000 0.000 0.004
#> GSM125150     1  0.1716      0.838 0.936 0.000 0.000 0.064
#> GSM125152     1  0.4730      0.812 0.636 0.000 0.000 0.364
#> GSM125154     1  0.4382      0.828 0.704 0.000 0.000 0.296
#> GSM125156     1  0.2589      0.843 0.884 0.000 0.000 0.116
#> GSM125158     1  0.2704      0.841 0.876 0.000 0.000 0.124
#> GSM125160     2  0.0000      0.860 0.000 1.000 0.000 0.000
#> GSM125162     1  0.0921      0.818 0.972 0.000 0.000 0.028
#> GSM125164     2  0.0000      0.860 0.000 1.000 0.000 0.000
#> GSM125166     2  0.0000      0.860 0.000 1.000 0.000 0.000
#> GSM125168     2  0.2313      0.817 0.000 0.924 0.044 0.032
#> GSM125170     4  0.7607      0.611 0.000 0.388 0.200 0.412
#> GSM125172     2  0.2662      0.795 0.000 0.900 0.084 0.016
#> GSM125174     4  0.6897      0.792 0.000 0.144 0.284 0.572
#> GSM125176     2  0.7439     -0.258 0.000 0.500 0.296 0.204
#> GSM125178     3  0.1109      0.865 0.000 0.004 0.968 0.028
#> GSM125180     4  0.6928      0.767 0.000 0.136 0.308 0.556
#> GSM125182     2  0.1722      0.834 0.000 0.944 0.048 0.008
#> GSM125184     4  0.7190      0.773 0.000 0.272 0.184 0.544
#> GSM125186     4  0.6876      0.787 0.000 0.140 0.288 0.572
#> GSM125188     2  0.7300     -0.402 0.000 0.472 0.156 0.372
#> GSM125190     2  0.3160      0.767 0.000 0.872 0.108 0.020
#> GSM125192     2  0.0000      0.860 0.000 1.000 0.000 0.000
#> GSM125194     3  0.3575      0.808 0.020 0.004 0.852 0.124
#> GSM125196     3  0.0376      0.867 0.000 0.004 0.992 0.004
#> GSM125198     2  0.0000      0.860 0.000 1.000 0.000 0.000
#> GSM125200     1  0.2589      0.840 0.884 0.000 0.000 0.116
#> GSM125202     2  0.2101      0.822 0.000 0.928 0.060 0.012
#> GSM125204     3  0.0895      0.863 0.000 0.004 0.976 0.020
#> GSM125206     3  0.0188      0.867 0.000 0.004 0.996 0.000
#> GSM125208     3  0.4262      0.657 0.000 0.008 0.756 0.236
#> GSM125210     4  0.6856      0.789 0.000 0.140 0.284 0.576
#> GSM125212     2  0.7735     -0.367 0.000 0.444 0.280 0.276
#> GSM125214     2  0.0000      0.860 0.000 1.000 0.000 0.000
#> GSM125216     2  0.0000      0.860 0.000 1.000 0.000 0.000
#> GSM125218     2  0.2593      0.783 0.000 0.892 0.104 0.004
#> GSM125220     1  0.5257      0.784 0.752 0.000 0.104 0.144
#> GSM125222     4  0.7336      0.790 0.000 0.256 0.216 0.528
#> GSM125224     2  0.0000      0.860 0.000 1.000 0.000 0.000
#> GSM125226     2  0.1716      0.829 0.000 0.936 0.064 0.000
#> GSM125228     2  0.0000      0.860 0.000 1.000 0.000 0.000
#> GSM125230     3  0.4612      0.746 0.020 0.012 0.780 0.188
#> GSM125232     3  0.4086      0.709 0.008 0.000 0.776 0.216
#> GSM125234     1  0.7795      0.384 0.404 0.000 0.344 0.252
#> GSM125236     1  0.5630      0.799 0.608 0.000 0.032 0.360
#> GSM125238     1  0.0921      0.818 0.972 0.000 0.000 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
#> GSM125123     5  0.1538     0.7610 0.036 0.000 0.008 0.008 0.948
#> GSM125125     5  0.3582     0.7063 0.224 0.000 0.000 0.008 0.768
#> GSM125127     5  0.2308     0.7484 0.048 0.000 0.036 0.004 0.912
#> GSM125129     5  0.1618     0.7626 0.040 0.000 0.008 0.008 0.944
#> GSM125131     1  0.3074     0.8376 0.804 0.000 0.000 0.000 0.196
#> GSM125133     1  0.2629     0.8682 0.860 0.000 0.004 0.000 0.136
#> GSM125135     5  0.3300     0.7416 0.204 0.000 0.004 0.000 0.792
#> GSM125137     1  0.2230     0.8717 0.884 0.000 0.000 0.000 0.116
#> GSM125139     5  0.2616     0.7750 0.076 0.000 0.000 0.036 0.888
#> GSM125141     1  0.2280     0.8745 0.880 0.000 0.000 0.000 0.120
#> GSM125143     5  0.4150     0.7016 0.180 0.000 0.044 0.004 0.772
#> GSM125145     5  0.3039     0.7501 0.192 0.000 0.000 0.000 0.808
#> GSM125147     1  0.2773     0.8638 0.836 0.000 0.000 0.000 0.164
#> GSM125149     1  0.2230     0.8731 0.884 0.000 0.000 0.000 0.116
#> GSM125151     5  0.2554     0.7738 0.072 0.000 0.000 0.036 0.892
#> GSM125153     5  0.4294     0.1768 0.468 0.000 0.000 0.000 0.532
#> GSM125155     5  0.4546     0.2252 0.460 0.000 0.000 0.008 0.532
#> GSM125157     1  0.2179     0.8716 0.888 0.000 0.000 0.000 0.112
#> GSM125159     2  0.1808     0.7898 0.012 0.936 0.008 0.044 0.000
#> GSM125161     1  0.2230     0.8712 0.884 0.000 0.000 0.000 0.116
#> GSM125163     2  0.0162     0.7911 0.000 0.996 0.000 0.004 0.000
#> GSM125165     2  0.6476     0.2644 0.024 0.544 0.124 0.308 0.000
#> GSM125167     2  0.1498     0.7924 0.016 0.952 0.008 0.024 0.000
#> GSM125169     2  0.6741     0.1786 0.024 0.540 0.236 0.200 0.000
#> GSM125171     3  0.5583     0.3263 0.024 0.200 0.680 0.096 0.000
#> GSM125173     4  0.7212     0.4014 0.040 0.336 0.176 0.448 0.000
#> GSM125175     2  0.6313     0.4833 0.056 0.636 0.192 0.116 0.000
#> GSM125177     3  0.0968     0.8148 0.000 0.004 0.972 0.012 0.012
#> GSM125179     4  0.5845     0.5308 0.020 0.064 0.344 0.572 0.000
#> GSM125181     2  0.6169     0.3815 0.020 0.608 0.136 0.236 0.000
#> GSM125183     4  0.6350     0.5874 0.016 0.220 0.180 0.584 0.000
#> GSM125185     4  0.5729     0.5345 0.020 0.064 0.312 0.604 0.000
#> GSM125187     4  0.6636     0.5116 0.024 0.120 0.396 0.460 0.000
#> GSM125189     2  0.2958     0.7624 0.020 0.880 0.024 0.076 0.000
#> GSM125191     2  0.1949     0.7779 0.012 0.932 0.040 0.016 0.000
#> GSM125193     3  0.3606     0.7848 0.036 0.004 0.852 0.080 0.028
#> GSM125195     3  0.1484     0.8133 0.000 0.000 0.944 0.008 0.048
#> GSM125197     2  0.3176     0.7564 0.048 0.868 0.012 0.072 0.000
#> GSM125199     1  0.2583     0.8730 0.864 0.000 0.000 0.004 0.132
#> GSM125201     2  0.3175     0.7745 0.044 0.872 0.020 0.064 0.000
#> GSM125203     3  0.0865     0.8166 0.000 0.000 0.972 0.004 0.024
#> GSM125205     3  0.4281     0.5897 0.016 0.152 0.784 0.048 0.000
#> GSM125207     3  0.4953     0.5800 0.024 0.000 0.688 0.260 0.028
#> GSM125209     2  0.2339     0.7651 0.008 0.912 0.052 0.028 0.000
#> GSM125211     4  0.7309     0.2585 0.048 0.168 0.356 0.428 0.000
#> GSM125213     2  0.0324     0.7910 0.004 0.992 0.000 0.004 0.000
#> GSM125215     2  0.2491     0.7630 0.036 0.896 0.000 0.068 0.000
#> GSM125217     2  0.3926     0.7205 0.020 0.820 0.048 0.112 0.000
#> GSM125219     5  0.1405     0.7412 0.016 0.000 0.020 0.008 0.956
#> GSM125221     4  0.7419     0.3822 0.036 0.356 0.232 0.376 0.000
#> GSM125223     2  0.3176     0.7589 0.048 0.868 0.012 0.072 0.000
#> GSM125225     2  0.1300     0.7835 0.016 0.956 0.000 0.028 0.000
#> GSM125227     2  0.2514     0.7640 0.044 0.896 0.000 0.060 0.000
#> GSM125229     3  0.4789     0.6746 0.028 0.044 0.756 0.168 0.004
#> GSM125231     3  0.1205     0.8169 0.000 0.000 0.956 0.004 0.040
#> GSM125233     5  0.1329     0.7605 0.032 0.000 0.008 0.004 0.956
#> GSM125235     1  0.2852     0.8622 0.828 0.000 0.000 0.000 0.172
#> GSM125237     1  0.2813     0.8607 0.832 0.000 0.000 0.000 0.168
#> GSM125124     5  0.2905     0.7748 0.096 0.000 0.000 0.036 0.868
#> GSM125126     1  0.4517     0.3055 0.556 0.000 0.000 0.008 0.436
#> GSM125128     1  0.3160     0.8387 0.808 0.000 0.004 0.000 0.188
#> GSM125130     5  0.1280     0.7395 0.008 0.000 0.024 0.008 0.960
#> GSM125132     1  0.4046     0.6836 0.696 0.000 0.000 0.008 0.296
#> GSM125134     5  0.3242     0.7347 0.216 0.000 0.000 0.000 0.784
#> GSM125136     1  0.2763     0.8538 0.848 0.000 0.004 0.000 0.148
#> GSM125138     5  0.3098     0.7648 0.148 0.000 0.000 0.016 0.836
#> GSM125140     5  0.2616     0.7745 0.076 0.000 0.000 0.036 0.888
#> GSM125142     5  0.4451     0.0994 0.492 0.000 0.000 0.004 0.504
#> GSM125144     5  0.2850     0.7751 0.092 0.000 0.000 0.036 0.872
#> GSM125146     5  0.3661     0.6680 0.276 0.000 0.000 0.000 0.724
#> GSM125148     1  0.3333     0.8173 0.788 0.000 0.000 0.004 0.208
#> GSM125150     1  0.4464     0.3357 0.584 0.000 0.000 0.008 0.408
#> GSM125152     5  0.2554     0.7738 0.072 0.000 0.000 0.036 0.892
#> GSM125154     5  0.3661     0.6672 0.276 0.000 0.000 0.000 0.724
#> GSM125156     5  0.4367     0.4901 0.372 0.000 0.000 0.008 0.620
#> GSM125158     5  0.4183     0.5644 0.324 0.000 0.000 0.008 0.668
#> GSM125160     2  0.0451     0.7911 0.008 0.988 0.000 0.004 0.000
#> GSM125162     1  0.2230     0.8712 0.884 0.000 0.000 0.000 0.116
#> GSM125164     2  0.0854     0.7909 0.008 0.976 0.004 0.012 0.000
#> GSM125166     2  0.0566     0.7915 0.012 0.984 0.000 0.004 0.000
#> GSM125168     2  0.4129     0.6828 0.016 0.808 0.076 0.100 0.000
#> GSM125170     2  0.7431    -0.2682 0.040 0.416 0.232 0.312 0.000
#> GSM125172     2  0.4173     0.7264 0.040 0.816 0.060 0.084 0.000
#> GSM125174     4  0.5430     0.5667 0.016 0.064 0.268 0.652 0.000
#> GSM125176     2  0.7202    -0.1615 0.040 0.444 0.344 0.172 0.000
#> GSM125178     3  0.1605     0.8118 0.004 0.000 0.944 0.040 0.012
#> GSM125180     4  0.5950     0.5218 0.024 0.064 0.352 0.560 0.000
#> GSM125182     2  0.3459     0.7094 0.004 0.844 0.072 0.080 0.000
#> GSM125184     4  0.5736     0.5874 0.024 0.156 0.144 0.676 0.000
#> GSM125186     4  0.5729     0.5345 0.020 0.064 0.312 0.604 0.000
#> GSM125188     2  0.7262    -0.0960 0.044 0.456 0.180 0.320 0.000
#> GSM125190     2  0.5018     0.6258 0.020 0.736 0.088 0.156 0.000
#> GSM125192     2  0.0324     0.7911 0.004 0.992 0.000 0.004 0.000
#> GSM125194     3  0.3232     0.7854 0.016 0.000 0.864 0.084 0.036
#> GSM125196     3  0.1251     0.8163 0.000 0.000 0.956 0.008 0.036
#> GSM125198     2  0.2426     0.7657 0.036 0.900 0.000 0.064 0.000
#> GSM125200     5  0.4327     0.4705 0.360 0.000 0.000 0.008 0.632
#> GSM125202     2  0.3923     0.7419 0.040 0.832 0.052 0.076 0.000
#> GSM125204     3  0.0703     0.8168 0.000 0.000 0.976 0.000 0.024
#> GSM125206     3  0.1168     0.8164 0.000 0.000 0.960 0.008 0.032
#> GSM125208     3  0.4080     0.6606 0.016 0.000 0.760 0.212 0.012
#> GSM125210     4  0.5484     0.5462 0.008 0.068 0.308 0.616 0.000
#> GSM125212     4  0.7521     0.4225 0.048 0.252 0.272 0.428 0.000
#> GSM125214     2  0.0566     0.7913 0.000 0.984 0.004 0.012 0.000
#> GSM125216     2  0.2125     0.7735 0.024 0.920 0.004 0.052 0.000
#> GSM125218     2  0.3666     0.7359 0.020 0.840 0.048 0.092 0.000
#> GSM125220     1  0.5698     0.5958 0.668 0.000 0.116 0.020 0.196
#> GSM125222     4  0.7468     0.4345 0.044 0.328 0.220 0.408 0.000
#> GSM125224     2  0.2645     0.7621 0.044 0.888 0.000 0.068 0.000
#> GSM125226     2  0.3149     0.7569 0.012 0.868 0.040 0.080 0.000
#> GSM125228     2  0.2747     0.7622 0.048 0.888 0.004 0.060 0.000
#> GSM125230     3  0.4625     0.5907 0.020 0.004 0.652 0.324 0.000
#> GSM125232     3  0.4356     0.6640 0.024 0.000 0.756 0.200 0.020
#> GSM125234     5  0.4675     0.2105 0.000 0.000 0.380 0.020 0.600
#> GSM125236     5  0.1200     0.7470 0.016 0.000 0.012 0.008 0.964
#> GSM125238     1  0.2648     0.8693 0.848 0.000 0.000 0.000 0.152

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5 p6
#> GSM125123     1  0.1320    0.72972 0.948 0.000 0.036 0.000 0.016 NA
#> GSM125125     1  0.4302    0.63889 0.668 0.000 0.004 0.000 0.292 NA
#> GSM125127     1  0.2320    0.71683 0.892 0.000 0.080 0.000 0.024 NA
#> GSM125129     1  0.1408    0.72835 0.944 0.000 0.036 0.000 0.020 NA
#> GSM125131     5  0.2678    0.79258 0.116 0.000 0.000 0.004 0.860 NA
#> GSM125133     5  0.1964    0.82603 0.056 0.000 0.008 0.004 0.920 NA
#> GSM125135     1  0.4133    0.67557 0.720 0.000 0.012 0.000 0.236 NA
#> GSM125137     5  0.0717    0.82800 0.008 0.000 0.000 0.000 0.976 NA
#> GSM125139     1  0.4511    0.72618 0.752 0.000 0.000 0.060 0.052 NA
#> GSM125141     5  0.0806    0.83007 0.008 0.000 0.000 0.000 0.972 NA
#> GSM125143     1  0.4244    0.67282 0.744 0.000 0.080 0.000 0.168 NA
#> GSM125145     1  0.3221    0.70028 0.772 0.000 0.004 0.000 0.220 NA
#> GSM125147     5  0.1858    0.80635 0.092 0.000 0.000 0.000 0.904 NA
#> GSM125149     5  0.0363    0.82707 0.000 0.000 0.000 0.000 0.988 NA
#> GSM125151     1  0.4632    0.71901 0.736 0.000 0.000 0.060 0.048 NA
#> GSM125153     5  0.4401   -0.16155 0.464 0.000 0.000 0.000 0.512 NA
#> GSM125155     1  0.4632    0.36032 0.520 0.000 0.000 0.000 0.440 NA
#> GSM125157     5  0.0363    0.82707 0.000 0.000 0.000 0.000 0.988 NA
#> GSM125159     2  0.0790    0.67689 0.000 0.968 0.000 0.000 0.000 NA
#> GSM125161     5  0.1053    0.82517 0.012 0.000 0.000 0.004 0.964 NA
#> GSM125163     2  0.1765    0.66953 0.000 0.904 0.000 0.000 0.000 NA
#> GSM125165     2  0.7305    0.18890 0.004 0.448 0.160 0.172 0.000 NA
#> GSM125167     2  0.0891    0.67580 0.000 0.968 0.000 0.008 0.000 NA
#> GSM125169     2  0.5805    0.43452 0.000 0.608 0.212 0.044 0.000 NA
#> GSM125171     3  0.5013    0.43810 0.000 0.192 0.688 0.032 0.000 NA
#> GSM125173     2  0.7617    0.00411 0.004 0.380 0.212 0.200 0.000 NA
#> GSM125175     2  0.5414    0.54894 0.004 0.612 0.128 0.008 0.000 NA
#> GSM125177     3  0.1194    0.70912 0.000 0.004 0.956 0.032 0.000 NA
#> GSM125179     4  0.3854    0.77257 0.000 0.048 0.188 0.760 0.000 NA
#> GSM125181     2  0.6947    0.26851 0.004 0.512 0.172 0.136 0.000 NA
#> GSM125183     4  0.7583    0.34377 0.004 0.244 0.200 0.380 0.000 NA
#> GSM125185     4  0.3651    0.76809 0.000 0.048 0.180 0.772 0.000 NA
#> GSM125187     4  0.5888    0.53506 0.000 0.176 0.316 0.500 0.000 NA
#> GSM125189     2  0.1285    0.67611 0.000 0.944 0.004 0.000 0.000 NA
#> GSM125191     2  0.4163    0.58837 0.004 0.784 0.084 0.024 0.000 NA
#> GSM125193     3  0.2743    0.69602 0.020 0.008 0.888 0.060 0.004 NA
#> GSM125195     3  0.1909    0.69672 0.024 0.000 0.920 0.052 0.000 NA
#> GSM125197     2  0.3857    0.47496 0.000 0.532 0.000 0.000 0.000 NA
#> GSM125199     5  0.1418    0.82537 0.032 0.000 0.000 0.000 0.944 NA
#> GSM125201     2  0.2664    0.64820 0.000 0.816 0.000 0.000 0.000 NA
#> GSM125203     3  0.0891    0.70945 0.024 0.000 0.968 0.008 0.000 NA
#> GSM125205     3  0.4964    0.49091 0.000 0.168 0.704 0.040 0.000 NA
#> GSM125207     3  0.3737    0.31106 0.000 0.000 0.608 0.392 0.000 NA
#> GSM125209     2  0.4452    0.57171 0.004 0.764 0.092 0.032 0.000 NA
#> GSM125211     3  0.7375    0.14495 0.004 0.136 0.424 0.216 0.000 NA
#> GSM125213     2  0.1285    0.67712 0.004 0.944 0.000 0.000 0.000 NA
#> GSM125215     2  0.3838    0.48052 0.000 0.552 0.000 0.000 0.000 NA
#> GSM125217     2  0.2652    0.65524 0.000 0.868 0.020 0.008 0.000 NA
#> GSM125219     1  0.1434    0.72309 0.940 0.000 0.048 0.000 0.012 NA
#> GSM125221     2  0.7534    0.00373 0.004 0.384 0.252 0.152 0.000 NA
#> GSM125223     2  0.3989    0.47385 0.000 0.528 0.004 0.000 0.000 NA
#> GSM125225     2  0.2597    0.64285 0.000 0.824 0.000 0.000 0.000 NA
#> GSM125227     2  0.3810    0.49153 0.000 0.572 0.000 0.000 0.000 NA
#> GSM125229     3  0.4731    0.61885 0.000 0.044 0.736 0.120 0.000 NA
#> GSM125231     3  0.1261    0.70780 0.024 0.000 0.952 0.024 0.000 NA
#> GSM125233     1  0.1577    0.73046 0.940 0.000 0.036 0.000 0.016 NA
#> GSM125235     5  0.2350    0.80004 0.100 0.000 0.000 0.000 0.880 NA
#> GSM125237     5  0.1700    0.81478 0.080 0.000 0.000 0.000 0.916 NA
#> GSM125124     1  0.4831    0.72072 0.728 0.000 0.004 0.060 0.052 NA
#> GSM125126     5  0.4470    0.26889 0.356 0.000 0.000 0.000 0.604 NA
#> GSM125128     5  0.2290    0.80257 0.084 0.000 0.020 0.004 0.892 NA
#> GSM125130     1  0.1429    0.72007 0.940 0.000 0.052 0.000 0.004 NA
#> GSM125132     5  0.3139    0.73098 0.160 0.000 0.000 0.000 0.812 NA
#> GSM125134     1  0.3695    0.67000 0.712 0.000 0.000 0.000 0.272 NA
#> GSM125136     5  0.1881    0.80794 0.052 0.000 0.004 0.004 0.924 NA
#> GSM125138     1  0.5014    0.71935 0.708 0.000 0.000 0.044 0.112 NA
#> GSM125140     1  0.4562    0.72239 0.744 0.000 0.000 0.060 0.048 NA
#> GSM125142     1  0.4592    0.30315 0.496 0.000 0.000 0.000 0.468 NA
#> GSM125144     1  0.4632    0.71901 0.736 0.000 0.000 0.060 0.048 NA
#> GSM125146     1  0.4074    0.59916 0.656 0.000 0.004 0.000 0.324 NA
#> GSM125148     5  0.2538    0.77139 0.124 0.000 0.000 0.000 0.860 NA
#> GSM125150     5  0.4584    0.02498 0.404 0.000 0.000 0.000 0.556 NA
#> GSM125152     1  0.4736    0.72231 0.736 0.000 0.004 0.060 0.048 NA
#> GSM125154     1  0.5033    0.61212 0.608 0.000 0.000 0.012 0.312 NA
#> GSM125156     1  0.4524    0.59516 0.628 0.000 0.000 0.000 0.320 NA
#> GSM125158     1  0.4480    0.56817 0.616 0.000 0.000 0.000 0.340 NA
#> GSM125160     2  0.0937    0.67721 0.000 0.960 0.000 0.000 0.000 NA
#> GSM125162     5  0.1148    0.82350 0.016 0.000 0.000 0.004 0.960 NA
#> GSM125164     2  0.1899    0.66903 0.004 0.928 0.028 0.008 0.000 NA
#> GSM125166     2  0.0405    0.67506 0.000 0.988 0.000 0.008 0.000 NA
#> GSM125168     2  0.5465    0.45280 0.000 0.664 0.152 0.052 0.000 NA
#> GSM125170     2  0.7220    0.11935 0.004 0.436 0.252 0.108 0.000 NA
#> GSM125172     2  0.3053    0.66213 0.000 0.812 0.012 0.004 0.000 NA
#> GSM125174     4  0.4597    0.73288 0.004 0.048 0.220 0.708 0.000 NA
#> GSM125176     2  0.6497    0.29491 0.004 0.520 0.272 0.060 0.000 NA
#> GSM125178     3  0.1462    0.69656 0.000 0.000 0.936 0.056 0.000 NA
#> GSM125180     4  0.3892    0.76117 0.000 0.048 0.212 0.740 0.000 NA
#> GSM125182     2  0.5451    0.48498 0.004 0.672 0.148 0.044 0.000 NA
#> GSM125184     4  0.6017    0.61696 0.004 0.108 0.160 0.628 0.000 NA
#> GSM125186     4  0.3651    0.76809 0.000 0.048 0.180 0.772 0.000 NA
#> GSM125188     2  0.6871    0.27107 0.000 0.500 0.176 0.120 0.000 NA
#> GSM125190     2  0.4236    0.60124 0.000 0.772 0.088 0.028 0.000 NA
#> GSM125192     2  0.1007    0.67537 0.000 0.956 0.000 0.000 0.000 NA
#> GSM125194     3  0.2939    0.68133 0.024 0.000 0.868 0.084 0.012 NA
#> GSM125196     3  0.1738    0.70091 0.016 0.000 0.928 0.052 0.000 NA
#> GSM125198     2  0.3823    0.49183 0.000 0.564 0.000 0.000 0.000 NA
#> GSM125200     1  0.4538    0.56498 0.612 0.000 0.000 0.000 0.340 NA
#> GSM125202     2  0.2706    0.66445 0.000 0.832 0.008 0.000 0.000 NA
#> GSM125204     3  0.0972    0.70878 0.028 0.000 0.964 0.008 0.000 NA
#> GSM125206     3  0.1296    0.70498 0.004 0.000 0.948 0.044 0.000 NA
#> GSM125208     3  0.3515    0.42490 0.000 0.000 0.676 0.324 0.000 NA
#> GSM125210     4  0.3746    0.77261 0.000 0.048 0.192 0.760 0.000 NA
#> GSM125212     3  0.7520   -0.01259 0.000 0.276 0.344 0.156 0.000 NA
#> GSM125214     2  0.2093    0.67485 0.004 0.900 0.004 0.004 0.000 NA
#> GSM125216     2  0.3954    0.59123 0.004 0.684 0.016 0.000 0.000 NA
#> GSM125218     2  0.2393    0.66271 0.000 0.884 0.020 0.004 0.000 NA
#> GSM125220     5  0.4050    0.67409 0.100 0.000 0.104 0.000 0.780 NA
#> GSM125222     2  0.7619   -0.03959 0.004 0.368 0.248 0.172 0.000 NA
#> GSM125224     2  0.3854    0.47577 0.000 0.536 0.000 0.000 0.000 NA
#> GSM125226     2  0.2240    0.65993 0.000 0.904 0.032 0.008 0.000 NA
#> GSM125228     2  0.3797    0.49985 0.000 0.580 0.000 0.000 0.000 NA
#> GSM125230     3  0.5190    0.52116 0.000 0.000 0.632 0.256 0.016 NA
#> GSM125232     3  0.4892    0.37129 0.032 0.000 0.620 0.324 0.008 NA
#> GSM125234     1  0.5234    0.09013 0.532 0.000 0.392 0.060 0.000 NA
#> GSM125236     1  0.1297    0.72562 0.948 0.000 0.040 0.000 0.012 NA
#> GSM125238     5  0.0717    0.83147 0.016 0.000 0.000 0.000 0.976 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 agent(p) individual(p) k
#> CV:mclust 116    1.000      6.52e-06 2
#> CV:mclust 102    0.976      5.06e-08 3
#> CV:mclust 110    0.985      1.80e-11 4
#> CV:mclust  95    0.891      2.21e-08 5
#> CV:mclust  84    0.817      4.91e-06 6

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


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

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

collect_plots(res)

plot of chunk CV-NMF-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.963           0.942       0.976         0.5035 0.496   0.496
#> 3 3 0.799           0.837       0.917         0.2866 0.820   0.651
#> 4 4 0.621           0.596       0.783         0.1141 0.891   0.713
#> 5 5 0.676           0.638       0.789         0.0483 0.921   0.752
#> 6 6 0.671           0.597       0.773         0.0453 0.939   0.778

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
#> GSM125123     1   0.000     0.9840 1.000 0.000
#> GSM125125     1   0.000     0.9840 1.000 0.000
#> GSM125127     1   0.000     0.9840 1.000 0.000
#> GSM125129     1   0.000     0.9840 1.000 0.000
#> GSM125131     1   0.000     0.9840 1.000 0.000
#> GSM125133     1   0.000     0.9840 1.000 0.000
#> GSM125135     1   0.000     0.9840 1.000 0.000
#> GSM125137     1   0.000     0.9840 1.000 0.000
#> GSM125139     1   0.000     0.9840 1.000 0.000
#> GSM125141     1   0.000     0.9840 1.000 0.000
#> GSM125143     1   0.000     0.9840 1.000 0.000
#> GSM125145     1   0.000     0.9840 1.000 0.000
#> GSM125147     1   0.000     0.9840 1.000 0.000
#> GSM125149     1   0.000     0.9840 1.000 0.000
#> GSM125151     1   0.000     0.9840 1.000 0.000
#> GSM125153     1   0.000     0.9840 1.000 0.000
#> GSM125155     1   0.000     0.9840 1.000 0.000
#> GSM125157     1   0.000     0.9840 1.000 0.000
#> GSM125159     2   0.000     0.9662 0.000 1.000
#> GSM125161     1   0.000     0.9840 1.000 0.000
#> GSM125163     2   0.000     0.9662 0.000 1.000
#> GSM125165     2   0.000     0.9662 0.000 1.000
#> GSM125167     2   0.000     0.9662 0.000 1.000
#> GSM125169     2   0.000     0.9662 0.000 1.000
#> GSM125171     2   0.000     0.9662 0.000 1.000
#> GSM125173     2   0.000     0.9662 0.000 1.000
#> GSM125175     2   0.000     0.9662 0.000 1.000
#> GSM125177     2   0.000     0.9662 0.000 1.000
#> GSM125179     2   0.224     0.9362 0.036 0.964
#> GSM125181     2   0.000     0.9662 0.000 1.000
#> GSM125183     2   0.388     0.8986 0.076 0.924
#> GSM125185     2   0.000     0.9662 0.000 1.000
#> GSM125187     1   0.204     0.9541 0.968 0.032
#> GSM125189     2   0.000     0.9662 0.000 1.000
#> GSM125191     2   0.000     0.9662 0.000 1.000
#> GSM125193     1   0.242     0.9460 0.960 0.040
#> GSM125195     1   0.913     0.4946 0.672 0.328
#> GSM125197     2   0.000     0.9662 0.000 1.000
#> GSM125199     1   0.000     0.9840 1.000 0.000
#> GSM125201     2   0.000     0.9662 0.000 1.000
#> GSM125203     2   0.767     0.7141 0.224 0.776
#> GSM125205     2   0.000     0.9662 0.000 1.000
#> GSM125207     2   0.000     0.9662 0.000 1.000
#> GSM125209     2   0.000     0.9662 0.000 1.000
#> GSM125211     2   0.000     0.9662 0.000 1.000
#> GSM125213     2   0.000     0.9662 0.000 1.000
#> GSM125215     2   0.000     0.9662 0.000 1.000
#> GSM125217     2   0.000     0.9662 0.000 1.000
#> GSM125219     1   0.000     0.9840 1.000 0.000
#> GSM125221     2   0.000     0.9662 0.000 1.000
#> GSM125223     2   0.000     0.9662 0.000 1.000
#> GSM125225     2   0.000     0.9662 0.000 1.000
#> GSM125227     2   0.000     0.9662 0.000 1.000
#> GSM125229     2   0.000     0.9662 0.000 1.000
#> GSM125231     1   0.000     0.9840 1.000 0.000
#> GSM125233     1   0.000     0.9840 1.000 0.000
#> GSM125235     1   0.000     0.9840 1.000 0.000
#> GSM125237     1   0.000     0.9840 1.000 0.000
#> GSM125124     1   0.000     0.9840 1.000 0.000
#> GSM125126     1   0.000     0.9840 1.000 0.000
#> GSM125128     1   0.000     0.9840 1.000 0.000
#> GSM125130     1   0.000     0.9840 1.000 0.000
#> GSM125132     1   0.000     0.9840 1.000 0.000
#> GSM125134     1   0.000     0.9840 1.000 0.000
#> GSM125136     1   0.000     0.9840 1.000 0.000
#> GSM125138     1   0.000     0.9840 1.000 0.000
#> GSM125140     1   0.000     0.9840 1.000 0.000
#> GSM125142     1   0.000     0.9840 1.000 0.000
#> GSM125144     1   0.000     0.9840 1.000 0.000
#> GSM125146     1   0.000     0.9840 1.000 0.000
#> GSM125148     1   0.000     0.9840 1.000 0.000
#> GSM125150     1   0.000     0.9840 1.000 0.000
#> GSM125152     1   0.000     0.9840 1.000 0.000
#> GSM125154     1   0.000     0.9840 1.000 0.000
#> GSM125156     1   0.000     0.9840 1.000 0.000
#> GSM125158     1   0.000     0.9840 1.000 0.000
#> GSM125160     2   0.000     0.9662 0.000 1.000
#> GSM125162     1   0.000     0.9840 1.000 0.000
#> GSM125164     2   0.000     0.9662 0.000 1.000
#> GSM125166     2   0.000     0.9662 0.000 1.000
#> GSM125168     2   0.000     0.9662 0.000 1.000
#> GSM125170     2   0.000     0.9662 0.000 1.000
#> GSM125172     2   0.000     0.9662 0.000 1.000
#> GSM125174     2   0.000     0.9662 0.000 1.000
#> GSM125176     2   0.000     0.9662 0.000 1.000
#> GSM125178     1   0.881     0.5564 0.700 0.300
#> GSM125180     1   0.615     0.8119 0.848 0.152
#> GSM125182     2   0.000     0.9662 0.000 1.000
#> GSM125184     2   0.000     0.9662 0.000 1.000
#> GSM125186     2   0.917     0.5184 0.332 0.668
#> GSM125188     2   0.000     0.9662 0.000 1.000
#> GSM125190     2   0.000     0.9662 0.000 1.000
#> GSM125192     2   0.000     0.9662 0.000 1.000
#> GSM125194     1   0.000     0.9840 1.000 0.000
#> GSM125196     2   0.855     0.6224 0.280 0.720
#> GSM125198     2   0.000     0.9662 0.000 1.000
#> GSM125200     1   0.000     0.9840 1.000 0.000
#> GSM125202     2   0.000     0.9662 0.000 1.000
#> GSM125204     2   0.973     0.3453 0.404 0.596
#> GSM125206     2   0.373     0.9022 0.072 0.928
#> GSM125208     2   0.999     0.0851 0.484 0.516
#> GSM125210     2   0.000     0.9662 0.000 1.000
#> GSM125212     2   0.000     0.9662 0.000 1.000
#> GSM125214     2   0.000     0.9662 0.000 1.000
#> GSM125216     2   0.000     0.9662 0.000 1.000
#> GSM125218     2   0.000     0.9662 0.000 1.000
#> GSM125220     1   0.000     0.9840 1.000 0.000
#> GSM125222     2   0.000     0.9662 0.000 1.000
#> GSM125224     2   0.000     0.9662 0.000 1.000
#> GSM125226     2   0.000     0.9662 0.000 1.000
#> GSM125228     2   0.000     0.9662 0.000 1.000
#> GSM125230     1   0.000     0.9840 1.000 0.000
#> GSM125232     1   0.000     0.9840 1.000 0.000
#> GSM125234     1   0.000     0.9840 1.000 0.000
#> GSM125236     1   0.000     0.9840 1.000 0.000
#> GSM125238     1   0.000     0.9840 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
#> GSM125123     1  0.1860     0.9101 0.948 0.000 0.052
#> GSM125125     1  0.0237     0.9405 0.996 0.000 0.004
#> GSM125127     1  0.1529     0.9292 0.960 0.000 0.040
#> GSM125129     1  0.0592     0.9377 0.988 0.000 0.012
#> GSM125131     1  0.0892     0.9355 0.980 0.000 0.020
#> GSM125133     1  0.1163     0.9311 0.972 0.000 0.028
#> GSM125135     1  0.0424     0.9405 0.992 0.000 0.008
#> GSM125137     1  0.0592     0.9377 0.988 0.000 0.012
#> GSM125139     1  0.4452     0.7395 0.808 0.000 0.192
#> GSM125141     1  0.0000     0.9404 1.000 0.000 0.000
#> GSM125143     1  0.2261     0.8957 0.932 0.000 0.068
#> GSM125145     1  0.0237     0.9405 0.996 0.000 0.004
#> GSM125147     1  0.0747     0.9371 0.984 0.000 0.016
#> GSM125149     1  0.0747     0.9367 0.984 0.000 0.016
#> GSM125151     3  0.6299     0.1645 0.476 0.000 0.524
#> GSM125153     1  0.0237     0.9405 0.996 0.000 0.004
#> GSM125155     1  0.0237     0.9405 0.996 0.000 0.004
#> GSM125157     1  0.0592     0.9377 0.988 0.000 0.012
#> GSM125159     2  0.0424     0.9238 0.000 0.992 0.008
#> GSM125161     1  0.1031     0.9335 0.976 0.000 0.024
#> GSM125163     2  0.0000     0.9238 0.000 1.000 0.000
#> GSM125165     2  0.4346     0.8004 0.000 0.816 0.184
#> GSM125167     2  0.0424     0.9234 0.000 0.992 0.008
#> GSM125169     2  0.0829     0.9195 0.004 0.984 0.012
#> GSM125171     2  0.0592     0.9226 0.000 0.988 0.012
#> GSM125173     2  0.1031     0.9200 0.000 0.976 0.024
#> GSM125175     2  0.0424     0.9224 0.000 0.992 0.008
#> GSM125177     2  0.2356     0.8962 0.000 0.928 0.072
#> GSM125179     3  0.1267     0.8360 0.004 0.024 0.972
#> GSM125181     2  0.6280     0.3125 0.000 0.540 0.460
#> GSM125183     3  0.1860     0.8234 0.000 0.052 0.948
#> GSM125185     3  0.1289     0.8321 0.000 0.032 0.968
#> GSM125187     3  0.1482     0.8367 0.020 0.012 0.968
#> GSM125189     2  0.0237     0.9233 0.000 0.996 0.004
#> GSM125191     2  0.3116     0.8718 0.000 0.892 0.108
#> GSM125193     1  0.1491     0.9257 0.968 0.016 0.016
#> GSM125195     3  0.3325     0.8135 0.076 0.020 0.904
#> GSM125197     2  0.0424     0.9236 0.000 0.992 0.008
#> GSM125199     1  0.0424     0.9391 0.992 0.000 0.008
#> GSM125201     2  0.0424     0.9236 0.000 0.992 0.008
#> GSM125203     2  0.6488     0.6619 0.192 0.744 0.064
#> GSM125205     2  0.0892     0.9192 0.000 0.980 0.020
#> GSM125207     3  0.1163     0.8343 0.000 0.028 0.972
#> GSM125209     2  0.5058     0.7325 0.000 0.756 0.244
#> GSM125211     2  0.3028     0.8862 0.048 0.920 0.032
#> GSM125213     2  0.1031     0.9190 0.000 0.976 0.024
#> GSM125215     2  0.0424     0.9236 0.000 0.992 0.008
#> GSM125217     2  0.0424     0.9223 0.000 0.992 0.008
#> GSM125219     1  0.2448     0.8989 0.924 0.000 0.076
#> GSM125221     2  0.3272     0.8740 0.004 0.892 0.104
#> GSM125223     2  0.0747     0.9211 0.000 0.984 0.016
#> GSM125225     2  0.0000     0.9238 0.000 1.000 0.000
#> GSM125227     2  0.0237     0.9234 0.000 0.996 0.004
#> GSM125229     2  0.2903     0.8770 0.048 0.924 0.028
#> GSM125231     3  0.5254     0.6635 0.264 0.000 0.736
#> GSM125233     1  0.2625     0.8792 0.916 0.000 0.084
#> GSM125235     1  0.0424     0.9405 0.992 0.000 0.008
#> GSM125237     1  0.0592     0.9382 0.988 0.000 0.012
#> GSM125124     3  0.4291     0.7426 0.180 0.000 0.820
#> GSM125126     1  0.0237     0.9405 0.996 0.000 0.004
#> GSM125128     1  0.1031     0.9335 0.976 0.000 0.024
#> GSM125130     1  0.6008     0.3523 0.628 0.000 0.372
#> GSM125132     1  0.0000     0.9404 1.000 0.000 0.000
#> GSM125134     1  0.0424     0.9394 0.992 0.000 0.008
#> GSM125136     1  0.1031     0.9335 0.976 0.000 0.024
#> GSM125138     1  0.5591     0.5159 0.696 0.000 0.304
#> GSM125140     1  0.5291     0.6050 0.732 0.000 0.268
#> GSM125142     1  0.0237     0.9405 0.996 0.000 0.004
#> GSM125144     1  0.6267     0.0718 0.548 0.000 0.452
#> GSM125146     1  0.0237     0.9405 0.996 0.000 0.004
#> GSM125148     1  0.0424     0.9405 0.992 0.000 0.008
#> GSM125150     1  0.0237     0.9405 0.996 0.000 0.004
#> GSM125152     3  0.6244     0.2805 0.440 0.000 0.560
#> GSM125154     1  0.1529     0.9204 0.960 0.000 0.040
#> GSM125156     1  0.0424     0.9394 0.992 0.000 0.008
#> GSM125158     1  0.0237     0.9405 0.996 0.000 0.004
#> GSM125160     2  0.0237     0.9238 0.000 0.996 0.004
#> GSM125162     1  0.1031     0.9335 0.976 0.000 0.024
#> GSM125164     2  0.1289     0.9174 0.000 0.968 0.032
#> GSM125166     2  0.0592     0.9227 0.000 0.988 0.012
#> GSM125168     2  0.5706     0.6216 0.000 0.680 0.320
#> GSM125170     2  0.2261     0.8967 0.000 0.932 0.068
#> GSM125172     2  0.0000     0.9238 0.000 1.000 0.000
#> GSM125174     3  0.2711     0.7894 0.000 0.088 0.912
#> GSM125176     2  0.2448     0.8927 0.000 0.924 0.076
#> GSM125178     3  0.6858     0.7156 0.188 0.084 0.728
#> GSM125180     3  0.1315     0.8371 0.008 0.020 0.972
#> GSM125182     2  0.6180     0.4262 0.000 0.584 0.416
#> GSM125184     3  0.1753     0.8238 0.000 0.048 0.952
#> GSM125186     3  0.1315     0.8371 0.008 0.020 0.972
#> GSM125188     2  0.5529     0.6606 0.000 0.704 0.296
#> GSM125190     2  0.0424     0.9237 0.000 0.992 0.008
#> GSM125192     2  0.0424     0.9238 0.000 0.992 0.008
#> GSM125194     3  0.6274     0.2736 0.456 0.000 0.544
#> GSM125196     3  0.1129     0.8361 0.004 0.020 0.976
#> GSM125198     2  0.0424     0.9236 0.000 0.992 0.008
#> GSM125200     1  0.0237     0.9405 0.996 0.000 0.004
#> GSM125202     2  0.0237     0.9239 0.000 0.996 0.004
#> GSM125204     3  0.6446     0.6474 0.052 0.212 0.736
#> GSM125206     2  0.5180     0.7965 0.032 0.812 0.156
#> GSM125208     3  0.1315     0.8371 0.008 0.020 0.972
#> GSM125210     3  0.1753     0.8241 0.000 0.048 0.952
#> GSM125212     2  0.1031     0.9211 0.000 0.976 0.024
#> GSM125214     2  0.0424     0.9238 0.000 0.992 0.008
#> GSM125216     2  0.0237     0.9239 0.000 0.996 0.004
#> GSM125218     2  0.0747     0.9199 0.000 0.984 0.016
#> GSM125220     1  0.0892     0.9356 0.980 0.000 0.020
#> GSM125222     2  0.5859     0.5688 0.000 0.656 0.344
#> GSM125224     2  0.0424     0.9236 0.000 0.992 0.008
#> GSM125226     2  0.0237     0.9238 0.000 0.996 0.004
#> GSM125228     2  0.0237     0.9234 0.000 0.996 0.004
#> GSM125230     3  0.6095     0.4382 0.392 0.000 0.608
#> GSM125232     3  0.1289     0.8327 0.032 0.000 0.968
#> GSM125234     3  0.5397     0.6219 0.280 0.000 0.720
#> GSM125236     1  0.0892     0.9385 0.980 0.000 0.020
#> GSM125238     1  0.0424     0.9388 0.992 0.000 0.008

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM125123     1  0.4839     0.7307 0.756 0.000 0.200 0.044
#> GSM125125     1  0.1022     0.8564 0.968 0.000 0.032 0.000
#> GSM125127     1  0.5344     0.6298 0.668 0.000 0.300 0.032
#> GSM125129     1  0.3836     0.7850 0.816 0.000 0.168 0.016
#> GSM125131     1  0.0469     0.8594 0.988 0.000 0.012 0.000
#> GSM125133     1  0.0707     0.8587 0.980 0.000 0.020 0.000
#> GSM125135     1  0.2281     0.8416 0.904 0.000 0.096 0.000
#> GSM125137     1  0.3688     0.7220 0.792 0.000 0.208 0.000
#> GSM125139     1  0.4127     0.7935 0.824 0.000 0.124 0.052
#> GSM125141     1  0.1716     0.8483 0.936 0.000 0.064 0.000
#> GSM125143     1  0.4114     0.7982 0.828 0.000 0.112 0.060
#> GSM125145     1  0.2216     0.8378 0.908 0.000 0.092 0.000
#> GSM125147     1  0.0817     0.8575 0.976 0.000 0.024 0.000
#> GSM125149     1  0.1940     0.8374 0.924 0.000 0.076 0.000
#> GSM125151     1  0.7776     0.0993 0.412 0.000 0.248 0.340
#> GSM125153     1  0.1022     0.8603 0.968 0.000 0.032 0.000
#> GSM125155     1  0.0817     0.8605 0.976 0.000 0.024 0.000
#> GSM125157     1  0.2149     0.8305 0.912 0.000 0.088 0.000
#> GSM125159     2  0.5229     0.7259 0.000 0.748 0.084 0.168
#> GSM125161     1  0.3219     0.7745 0.836 0.000 0.164 0.000
#> GSM125163     2  0.0592     0.8005 0.000 0.984 0.000 0.016
#> GSM125165     3  0.7839    -0.0656 0.000 0.264 0.384 0.352
#> GSM125167     2  0.4459     0.7407 0.000 0.780 0.032 0.188
#> GSM125169     2  0.3993     0.7822 0.004 0.844 0.060 0.092
#> GSM125171     2  0.1557     0.7779 0.000 0.944 0.056 0.000
#> GSM125173     2  0.6281     0.6170 0.000 0.656 0.128 0.216
#> GSM125175     2  0.0921     0.7907 0.000 0.972 0.028 0.000
#> GSM125177     3  0.6141     0.2887 0.004 0.428 0.528 0.040
#> GSM125179     4  0.2021     0.4880 0.000 0.040 0.024 0.936
#> GSM125181     4  0.7834     0.0192 0.000 0.320 0.276 0.404
#> GSM125183     4  0.6084     0.2713 0.004 0.080 0.252 0.664
#> GSM125185     4  0.1489     0.4882 0.000 0.004 0.044 0.952
#> GSM125187     4  0.3764     0.4261 0.000 0.072 0.076 0.852
#> GSM125189     2  0.2174     0.8028 0.000 0.928 0.020 0.052
#> GSM125191     2  0.5130     0.6219 0.000 0.668 0.020 0.312
#> GSM125193     3  0.6319     0.0286 0.436 0.000 0.504 0.060
#> GSM125195     3  0.6312     0.1216 0.048 0.016 0.616 0.320
#> GSM125197     2  0.2149     0.7459 0.000 0.912 0.088 0.000
#> GSM125199     1  0.2011     0.8363 0.920 0.000 0.080 0.000
#> GSM125201     2  0.2081     0.7491 0.000 0.916 0.084 0.000
#> GSM125203     3  0.7010     0.3861 0.036 0.328 0.576 0.060
#> GSM125205     2  0.3975     0.5147 0.000 0.760 0.240 0.000
#> GSM125207     4  0.4898     0.1396 0.000 0.000 0.416 0.584
#> GSM125209     2  0.5713     0.5311 0.000 0.604 0.036 0.360
#> GSM125211     3  0.7700     0.2823 0.056 0.140 0.600 0.204
#> GSM125213     2  0.4248     0.7272 0.000 0.768 0.012 0.220
#> GSM125215     2  0.1118     0.7873 0.000 0.964 0.036 0.000
#> GSM125217     2  0.4224     0.7756 0.000 0.824 0.076 0.100
#> GSM125219     1  0.5664     0.6928 0.716 0.004 0.200 0.080
#> GSM125221     2  0.7642     0.3000 0.004 0.472 0.192 0.332
#> GSM125223     2  0.1637     0.7719 0.000 0.940 0.060 0.000
#> GSM125225     2  0.0672     0.7995 0.000 0.984 0.008 0.008
#> GSM125227     2  0.1118     0.7880 0.000 0.964 0.036 0.000
#> GSM125229     3  0.5703     0.1413 0.012 0.480 0.500 0.008
#> GSM125231     3  0.5489     0.1202 0.040 0.000 0.664 0.296
#> GSM125233     1  0.6027     0.6246 0.664 0.000 0.244 0.092
#> GSM125235     1  0.0336     0.8599 0.992 0.000 0.008 0.000
#> GSM125237     1  0.1022     0.8557 0.968 0.000 0.032 0.000
#> GSM125124     4  0.6653     0.1858 0.104 0.000 0.328 0.568
#> GSM125126     1  0.0000     0.8598 1.000 0.000 0.000 0.000
#> GSM125128     1  0.1302     0.8579 0.956 0.000 0.044 0.000
#> GSM125130     1  0.7596     0.2450 0.456 0.000 0.332 0.212
#> GSM125132     1  0.0707     0.8581 0.980 0.000 0.020 0.000
#> GSM125134     1  0.2197     0.8417 0.916 0.000 0.080 0.004
#> GSM125136     1  0.1716     0.8475 0.936 0.000 0.064 0.000
#> GSM125138     1  0.6934     0.4739 0.572 0.000 0.276 0.152
#> GSM125140     1  0.4586     0.7750 0.796 0.000 0.136 0.068
#> GSM125142     1  0.0921     0.8602 0.972 0.000 0.028 0.000
#> GSM125144     1  0.7636     0.2649 0.468 0.000 0.284 0.248
#> GSM125146     1  0.1557     0.8495 0.944 0.000 0.056 0.000
#> GSM125148     1  0.0469     0.8600 0.988 0.000 0.012 0.000
#> GSM125150     1  0.0188     0.8600 0.996 0.000 0.004 0.000
#> GSM125152     4  0.7866     0.0269 0.328 0.000 0.284 0.388
#> GSM125154     1  0.3161     0.8246 0.864 0.000 0.124 0.012
#> GSM125156     1  0.0469     0.8613 0.988 0.000 0.012 0.000
#> GSM125158     1  0.0469     0.8594 0.988 0.000 0.012 0.000
#> GSM125160     2  0.3160     0.7919 0.000 0.872 0.020 0.108
#> GSM125162     1  0.2868     0.7979 0.864 0.000 0.136 0.000
#> GSM125164     2  0.3583     0.7628 0.000 0.816 0.004 0.180
#> GSM125166     2  0.3300     0.7800 0.000 0.848 0.008 0.144
#> GSM125168     2  0.6650     0.2800 0.000 0.484 0.084 0.432
#> GSM125170     2  0.5512     0.6160 0.000 0.660 0.040 0.300
#> GSM125172     2  0.0921     0.7906 0.000 0.972 0.028 0.000
#> GSM125174     4  0.3015     0.4696 0.000 0.024 0.092 0.884
#> GSM125176     2  0.2334     0.7994 0.000 0.908 0.004 0.088
#> GSM125178     3  0.5729     0.2305 0.016 0.024 0.656 0.304
#> GSM125180     4  0.2973     0.4317 0.000 0.000 0.144 0.856
#> GSM125182     4  0.7001    -0.1687 0.000 0.420 0.116 0.464
#> GSM125184     4  0.3247     0.4483 0.000 0.060 0.060 0.880
#> GSM125186     4  0.1389     0.4826 0.000 0.000 0.048 0.952
#> GSM125188     2  0.7564     0.1542 0.000 0.420 0.192 0.388
#> GSM125190     2  0.4578     0.7517 0.000 0.788 0.052 0.160
#> GSM125192     2  0.1474     0.8027 0.000 0.948 0.000 0.052
#> GSM125194     3  0.6717     0.1460 0.108 0.000 0.560 0.332
#> GSM125196     3  0.5735    -0.0355 0.020 0.004 0.540 0.436
#> GSM125198     2  0.1474     0.7779 0.000 0.948 0.052 0.000
#> GSM125200     1  0.0336     0.8611 0.992 0.000 0.008 0.000
#> GSM125202     2  0.1389     0.7810 0.000 0.952 0.048 0.000
#> GSM125204     3  0.6712     0.2282 0.028 0.076 0.640 0.256
#> GSM125206     3  0.6736     0.3749 0.032 0.288 0.620 0.060
#> GSM125208     4  0.4746     0.1827 0.000 0.000 0.368 0.632
#> GSM125210     4  0.1833     0.4899 0.000 0.024 0.032 0.944
#> GSM125212     3  0.7152     0.3131 0.004 0.264 0.568 0.164
#> GSM125214     2  0.1305     0.8031 0.000 0.960 0.004 0.036
#> GSM125216     2  0.0921     0.7909 0.000 0.972 0.028 0.000
#> GSM125218     2  0.2124     0.8039 0.000 0.932 0.028 0.040
#> GSM125220     1  0.1118     0.8539 0.964 0.000 0.036 0.000
#> GSM125222     4  0.7679    -0.0852 0.000 0.376 0.216 0.408
#> GSM125224     2  0.1474     0.7777 0.000 0.948 0.052 0.000
#> GSM125226     2  0.3659     0.7780 0.000 0.840 0.024 0.136
#> GSM125228     2  0.1118     0.7876 0.000 0.964 0.036 0.000
#> GSM125230     3  0.5908     0.2191 0.048 0.004 0.636 0.312
#> GSM125232     4  0.4560     0.3259 0.004 0.000 0.296 0.700
#> GSM125234     4  0.7555     0.0507 0.164 0.004 0.396 0.436
#> GSM125236     1  0.3545     0.7947 0.828 0.000 0.164 0.008
#> GSM125238     1  0.1637     0.8487 0.940 0.000 0.060 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
#> GSM125123     1  0.4217     0.7207 0.740 0.000 0.020 0.008 0.232
#> GSM125125     1  0.1478     0.8511 0.936 0.000 0.000 0.000 0.064
#> GSM125127     1  0.5362     0.6361 0.672 0.000 0.080 0.012 0.236
#> GSM125129     1  0.3795     0.7942 0.808 0.000 0.044 0.004 0.144
#> GSM125131     1  0.0404     0.8602 0.988 0.000 0.000 0.012 0.000
#> GSM125133     1  0.0703     0.8580 0.976 0.000 0.000 0.024 0.000
#> GSM125135     1  0.3120     0.8349 0.864 0.000 0.048 0.004 0.084
#> GSM125137     1  0.4575     0.5329 0.648 0.000 0.024 0.328 0.000
#> GSM125139     1  0.3010     0.8060 0.824 0.000 0.004 0.000 0.172
#> GSM125141     1  0.2011     0.8405 0.908 0.000 0.000 0.088 0.004
#> GSM125143     1  0.3489     0.7939 0.820 0.000 0.036 0.000 0.144
#> GSM125145     1  0.2783     0.8288 0.868 0.000 0.012 0.004 0.116
#> GSM125147     1  0.0671     0.8608 0.980 0.000 0.000 0.016 0.004
#> GSM125149     1  0.2127     0.8256 0.892 0.000 0.000 0.108 0.000
#> GSM125151     5  0.4726     0.2577 0.376 0.000 0.016 0.004 0.604
#> GSM125153     1  0.3405     0.8287 0.848 0.000 0.012 0.036 0.104
#> GSM125155     1  0.1197     0.8553 0.952 0.000 0.000 0.048 0.000
#> GSM125157     1  0.2471     0.8042 0.864 0.000 0.000 0.136 0.000
#> GSM125159     2  0.4204     0.6932 0.000 0.756 0.048 0.196 0.000
#> GSM125161     1  0.4054     0.6777 0.748 0.000 0.028 0.224 0.000
#> GSM125163     2  0.0771     0.8080 0.000 0.976 0.000 0.020 0.004
#> GSM125165     4  0.3843     0.4612 0.000 0.184 0.012 0.788 0.016
#> GSM125167     2  0.2674     0.7744 0.000 0.856 0.000 0.140 0.004
#> GSM125169     2  0.2233     0.7938 0.000 0.892 0.000 0.104 0.004
#> GSM125171     2  0.1956     0.7843 0.000 0.928 0.052 0.012 0.008
#> GSM125173     2  0.5374     0.4852 0.000 0.640 0.052 0.292 0.016
#> GSM125175     2  0.0693     0.8004 0.000 0.980 0.012 0.008 0.000
#> GSM125177     3  0.2067     0.6938 0.000 0.028 0.924 0.044 0.004
#> GSM125179     5  0.4455     0.4316 0.000 0.036 0.000 0.260 0.704
#> GSM125181     4  0.5442     0.3241 0.000 0.352 0.020 0.592 0.036
#> GSM125183     4  0.5218     0.1407 0.000 0.084 0.004 0.672 0.240
#> GSM125185     5  0.4618     0.4234 0.000 0.024 0.016 0.248 0.712
#> GSM125187     5  0.6335     0.0823 0.000 0.104 0.016 0.396 0.484
#> GSM125189     2  0.1697     0.8083 0.000 0.932 0.008 0.060 0.000
#> GSM125191     2  0.3750     0.6767 0.000 0.756 0.000 0.232 0.012
#> GSM125193     4  0.5616    -0.2828 0.080 0.000 0.384 0.536 0.000
#> GSM125195     3  0.3284     0.6678 0.000 0.000 0.828 0.024 0.148
#> GSM125197     2  0.3183     0.6851 0.000 0.828 0.156 0.016 0.000
#> GSM125199     1  0.2020     0.8305 0.900 0.000 0.000 0.100 0.000
#> GSM125201     2  0.3419     0.6524 0.000 0.804 0.180 0.016 0.000
#> GSM125203     3  0.1413     0.6967 0.000 0.020 0.956 0.012 0.012
#> GSM125205     3  0.4577     0.3671 0.000 0.296 0.676 0.024 0.004
#> GSM125207     3  0.5878     0.4931 0.000 0.000 0.548 0.116 0.336
#> GSM125209     2  0.4754     0.5330 0.000 0.664 0.012 0.304 0.020
#> GSM125211     3  0.4811     0.4146 0.008 0.004 0.548 0.436 0.004
#> GSM125213     2  0.2930     0.7568 0.000 0.832 0.000 0.164 0.004
#> GSM125215     2  0.1894     0.7747 0.000 0.920 0.072 0.008 0.000
#> GSM125217     2  0.3525     0.7573 0.004 0.816 0.024 0.156 0.000
#> GSM125219     1  0.4792     0.6834 0.712 0.000 0.052 0.008 0.228
#> GSM125221     2  0.4956     0.2717 0.008 0.548 0.000 0.428 0.016
#> GSM125223     2  0.2069     0.7690 0.000 0.912 0.076 0.012 0.000
#> GSM125225     2  0.0324     0.8046 0.000 0.992 0.004 0.004 0.000
#> GSM125227     2  0.1638     0.7834 0.000 0.932 0.064 0.004 0.000
#> GSM125229     3  0.4100     0.6493 0.016 0.028 0.784 0.172 0.000
#> GSM125231     3  0.4455     0.6189 0.000 0.000 0.744 0.068 0.188
#> GSM125233     1  0.4598     0.6592 0.700 0.000 0.028 0.008 0.264
#> GSM125235     1  0.0451     0.8611 0.988 0.000 0.000 0.008 0.004
#> GSM125237     1  0.1121     0.8531 0.956 0.000 0.000 0.044 0.000
#> GSM125124     5  0.3980     0.5004 0.080 0.000 0.012 0.092 0.816
#> GSM125126     1  0.0566     0.8612 0.984 0.000 0.000 0.004 0.012
#> GSM125128     1  0.1300     0.8584 0.956 0.000 0.016 0.028 0.000
#> GSM125130     5  0.5937     0.2158 0.368 0.004 0.068 0.012 0.548
#> GSM125132     1  0.0771     0.8599 0.976 0.000 0.000 0.020 0.004
#> GSM125134     1  0.3689     0.8024 0.816 0.000 0.008 0.032 0.144
#> GSM125136     1  0.2470     0.8173 0.884 0.000 0.012 0.104 0.000
#> GSM125138     5  0.6156     0.1866 0.388 0.000 0.012 0.096 0.504
#> GSM125140     1  0.3160     0.7943 0.808 0.000 0.000 0.004 0.188
#> GSM125142     1  0.3702     0.8186 0.832 0.000 0.008 0.080 0.080
#> GSM125144     5  0.5659     0.1578 0.404 0.000 0.008 0.060 0.528
#> GSM125146     1  0.3070     0.8296 0.860 0.000 0.012 0.016 0.112
#> GSM125148     1  0.0912     0.8619 0.972 0.000 0.000 0.016 0.012
#> GSM125150     1  0.0880     0.8587 0.968 0.000 0.000 0.000 0.032
#> GSM125152     5  0.3720     0.4958 0.228 0.000 0.012 0.000 0.760
#> GSM125154     1  0.5656     0.6337 0.672 0.000 0.016 0.136 0.176
#> GSM125156     1  0.1605     0.8606 0.944 0.000 0.004 0.012 0.040
#> GSM125158     1  0.1270     0.8544 0.948 0.000 0.000 0.000 0.052
#> GSM125160     2  0.2295     0.8006 0.000 0.900 0.008 0.088 0.004
#> GSM125162     1  0.3449     0.7528 0.812 0.000 0.024 0.164 0.000
#> GSM125164     2  0.2612     0.7811 0.000 0.868 0.000 0.124 0.008
#> GSM125166     2  0.2358     0.7921 0.000 0.888 0.000 0.104 0.008
#> GSM125168     2  0.5131     0.3743 0.000 0.588 0.000 0.364 0.048
#> GSM125170     2  0.3977     0.6916 0.000 0.764 0.000 0.204 0.032
#> GSM125172     2  0.1082     0.7957 0.000 0.964 0.028 0.008 0.000
#> GSM125174     5  0.5453     0.3740 0.000 0.048 0.016 0.324 0.612
#> GSM125176     2  0.1549     0.8083 0.000 0.944 0.000 0.040 0.016
#> GSM125178     3  0.3829     0.6478 0.000 0.000 0.776 0.196 0.028
#> GSM125180     5  0.3167     0.4870 0.000 0.008 0.008 0.148 0.836
#> GSM125182     2  0.7544    -0.2623 0.000 0.400 0.116 0.384 0.100
#> GSM125184     5  0.5902     0.2200 0.000 0.080 0.008 0.400 0.512
#> GSM125186     5  0.4125     0.4427 0.000 0.004 0.020 0.236 0.740
#> GSM125188     4  0.5780     0.3176 0.000 0.352 0.024 0.572 0.052
#> GSM125190     2  0.2798     0.7767 0.000 0.852 0.000 0.140 0.008
#> GSM125192     2  0.1282     0.8073 0.000 0.952 0.000 0.044 0.004
#> GSM125194     4  0.5094    -0.3381 0.024 0.000 0.412 0.556 0.008
#> GSM125196     3  0.3821     0.6356 0.000 0.000 0.764 0.020 0.216
#> GSM125198     2  0.2017     0.7687 0.000 0.912 0.080 0.008 0.000
#> GSM125200     1  0.1012     0.8620 0.968 0.000 0.000 0.012 0.020
#> GSM125202     2  0.1628     0.7854 0.000 0.936 0.056 0.008 0.000
#> GSM125204     3  0.3120     0.6796 0.000 0.012 0.856 0.016 0.116
#> GSM125206     3  0.2165     0.6862 0.000 0.036 0.924 0.024 0.016
#> GSM125208     3  0.6130     0.5023 0.000 0.000 0.556 0.264 0.180
#> GSM125210     5  0.4828     0.4187 0.000 0.036 0.016 0.244 0.704
#> GSM125212     3  0.4683     0.5237 0.008 0.012 0.624 0.356 0.000
#> GSM125214     2  0.0955     0.8085 0.000 0.968 0.000 0.028 0.004
#> GSM125216     2  0.1281     0.7968 0.000 0.956 0.032 0.012 0.000
#> GSM125218     2  0.1041     0.8084 0.000 0.964 0.004 0.032 0.000
#> GSM125220     1  0.1205     0.8545 0.956 0.000 0.004 0.040 0.000
#> GSM125222     2  0.5296     0.0666 0.000 0.484 0.000 0.468 0.048
#> GSM125224     2  0.1894     0.7741 0.000 0.920 0.072 0.008 0.000
#> GSM125226     2  0.2233     0.7936 0.000 0.892 0.000 0.104 0.004
#> GSM125228     2  0.1638     0.7826 0.000 0.932 0.064 0.004 0.000
#> GSM125230     3  0.4829     0.5022 0.008 0.000 0.604 0.372 0.016
#> GSM125232     5  0.4400     0.4474 0.000 0.000 0.060 0.196 0.744
#> GSM125234     5  0.5365     0.4276 0.176 0.004 0.104 0.012 0.704
#> GSM125236     1  0.4316     0.7741 0.780 0.000 0.056 0.012 0.152
#> GSM125238     1  0.1732     0.8416 0.920 0.000 0.000 0.080 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM125123     1  0.3928     0.7169 0.764 0.000 0.012 0.192 0.024 0.008
#> GSM125125     1  0.1549     0.8467 0.944 0.000 0.004 0.024 0.024 0.004
#> GSM125127     1  0.6285     0.5267 0.620 0.000 0.108 0.148 0.108 0.016
#> GSM125129     1  0.3800     0.7605 0.800 0.000 0.020 0.140 0.032 0.008
#> GSM125131     1  0.0665     0.8507 0.980 0.000 0.004 0.000 0.008 0.008
#> GSM125133     1  0.0692     0.8491 0.976 0.000 0.000 0.000 0.004 0.020
#> GSM125135     1  0.2985     0.8262 0.872 0.000 0.032 0.048 0.044 0.004
#> GSM125137     1  0.5095     0.5694 0.632 0.000 0.000 0.008 0.104 0.256
#> GSM125139     1  0.3030     0.8159 0.848 0.000 0.000 0.056 0.092 0.004
#> GSM125141     1  0.3253     0.8091 0.832 0.000 0.000 0.004 0.096 0.068
#> GSM125143     1  0.3087     0.7682 0.820 0.000 0.004 0.160 0.012 0.004
#> GSM125145     1  0.3812     0.7846 0.812 0.000 0.016 0.036 0.116 0.020
#> GSM125147     1  0.2250     0.8370 0.888 0.000 0.000 0.000 0.092 0.020
#> GSM125149     1  0.2697     0.8272 0.864 0.000 0.000 0.000 0.044 0.092
#> GSM125151     4  0.4540     0.3833 0.324 0.000 0.000 0.632 0.036 0.008
#> GSM125153     5  0.4004     0.4214 0.328 0.000 0.004 0.000 0.656 0.012
#> GSM125155     1  0.1492     0.8513 0.940 0.000 0.000 0.000 0.036 0.024
#> GSM125157     1  0.2302     0.8156 0.872 0.000 0.000 0.000 0.008 0.120
#> GSM125159     2  0.4394     0.4490 0.000 0.608 0.020 0.008 0.000 0.364
#> GSM125161     1  0.3851     0.6913 0.740 0.000 0.012 0.004 0.012 0.232
#> GSM125163     2  0.0893     0.7883 0.000 0.972 0.004 0.004 0.004 0.016
#> GSM125165     6  0.5706     0.4025 0.000 0.296 0.004 0.032 0.088 0.580
#> GSM125167     2  0.3043     0.7091 0.000 0.796 0.000 0.004 0.004 0.196
#> GSM125169     2  0.2234     0.7655 0.000 0.872 0.000 0.004 0.000 0.124
#> GSM125171     2  0.3679     0.6887 0.000 0.816 0.120 0.008 0.028 0.028
#> GSM125173     5  0.7063    -0.1415 0.000 0.368 0.084 0.004 0.376 0.168
#> GSM125175     2  0.1065     0.7793 0.000 0.964 0.020 0.000 0.008 0.008
#> GSM125177     3  0.1753     0.6663 0.000 0.000 0.912 0.000 0.004 0.084
#> GSM125179     4  0.6509     0.2847 0.000 0.064 0.000 0.500 0.284 0.152
#> GSM125181     6  0.5136     0.4947 0.000 0.228 0.000 0.124 0.008 0.640
#> GSM125183     5  0.4899     0.2050 0.000 0.036 0.000 0.020 0.588 0.356
#> GSM125185     4  0.3386     0.4138 0.000 0.008 0.000 0.788 0.016 0.188
#> GSM125187     4  0.6223    -0.1722 0.000 0.128 0.000 0.468 0.040 0.364
#> GSM125189     2  0.2261     0.7782 0.000 0.884 0.008 0.004 0.000 0.104
#> GSM125191     2  0.4505     0.5462 0.000 0.668 0.000 0.056 0.004 0.272
#> GSM125193     6  0.5363    -0.2356 0.064 0.000 0.280 0.032 0.004 0.620
#> GSM125195     3  0.2909     0.6227 0.000 0.000 0.836 0.136 0.028 0.000
#> GSM125197     2  0.3566     0.6406 0.000 0.780 0.192 0.004 0.012 0.012
#> GSM125199     1  0.1588     0.8388 0.924 0.000 0.000 0.000 0.004 0.072
#> GSM125201     2  0.3624     0.6467 0.000 0.780 0.188 0.004 0.012 0.016
#> GSM125203     3  0.1829     0.6677 0.000 0.000 0.920 0.024 0.000 0.056
#> GSM125205     3  0.4306     0.3438 0.000 0.248 0.708 0.012 0.008 0.024
#> GSM125207     3  0.5437     0.4133 0.000 0.000 0.484 0.416 0.008 0.092
#> GSM125209     2  0.5572     0.2764 0.000 0.548 0.000 0.152 0.004 0.296
#> GSM125211     3  0.5016     0.4895 0.000 0.000 0.488 0.012 0.044 0.456
#> GSM125213     2  0.3956     0.6147 0.000 0.712 0.000 0.036 0.000 0.252
#> GSM125215     2  0.1555     0.7711 0.000 0.932 0.060 0.004 0.000 0.004
#> GSM125217     2  0.3426     0.6518 0.000 0.720 0.000 0.000 0.004 0.276
#> GSM125219     1  0.4593     0.3306 0.584 0.000 0.016 0.384 0.012 0.004
#> GSM125221     2  0.4973     0.3016 0.012 0.548 0.000 0.036 0.004 0.400
#> GSM125223     2  0.2368     0.7477 0.000 0.888 0.092 0.004 0.008 0.008
#> GSM125225     2  0.0363     0.7843 0.000 0.988 0.012 0.000 0.000 0.000
#> GSM125227     2  0.1908     0.7562 0.000 0.900 0.096 0.000 0.000 0.004
#> GSM125229     3  0.4466     0.6002 0.004 0.004 0.640 0.008 0.016 0.328
#> GSM125231     5  0.4795     0.1084 0.000 0.000 0.400 0.016 0.556 0.028
#> GSM125233     4  0.4579    -0.0713 0.476 0.000 0.012 0.496 0.016 0.000
#> GSM125235     1  0.0972     0.8506 0.964 0.000 0.000 0.008 0.028 0.000
#> GSM125237     1  0.1010     0.8484 0.960 0.000 0.000 0.000 0.004 0.036
#> GSM125124     5  0.3739     0.5150 0.056 0.000 0.000 0.176 0.768 0.000
#> GSM125126     1  0.0551     0.8503 0.984 0.000 0.000 0.004 0.008 0.004
#> GSM125128     1  0.1801     0.8419 0.932 0.000 0.012 0.004 0.012 0.040
#> GSM125130     4  0.3901     0.4694 0.188 0.000 0.024 0.764 0.024 0.000
#> GSM125132     1  0.0458     0.8500 0.984 0.000 0.000 0.000 0.000 0.016
#> GSM125134     5  0.4523     0.2229 0.416 0.000 0.000 0.016 0.556 0.012
#> GSM125136     1  0.2500     0.8097 0.868 0.000 0.004 0.000 0.012 0.116
#> GSM125138     5  0.2563     0.5756 0.076 0.000 0.004 0.040 0.880 0.000
#> GSM125140     1  0.3295     0.7994 0.816 0.000 0.000 0.056 0.128 0.000
#> GSM125142     5  0.3707     0.4402 0.312 0.000 0.000 0.000 0.680 0.008
#> GSM125144     5  0.4250     0.5116 0.144 0.000 0.000 0.108 0.744 0.004
#> GSM125146     1  0.4797     0.0934 0.512 0.000 0.008 0.012 0.452 0.016
#> GSM125148     1  0.3311     0.7539 0.780 0.000 0.000 0.004 0.204 0.012
#> GSM125150     1  0.1296     0.8493 0.948 0.000 0.000 0.004 0.044 0.004
#> GSM125152     4  0.5027     0.3805 0.272 0.000 0.000 0.624 0.100 0.004
#> GSM125154     5  0.2554     0.5785 0.092 0.000 0.004 0.000 0.876 0.028
#> GSM125156     1  0.1477     0.8527 0.940 0.000 0.000 0.004 0.048 0.008
#> GSM125158     1  0.0993     0.8481 0.964 0.000 0.000 0.012 0.024 0.000
#> GSM125160     2  0.2932     0.7563 0.000 0.836 0.020 0.004 0.000 0.140
#> GSM125162     1  0.3437     0.7404 0.788 0.000 0.004 0.008 0.012 0.188
#> GSM125164     2  0.2346     0.7631 0.000 0.868 0.000 0.008 0.000 0.124
#> GSM125166     2  0.1701     0.7831 0.000 0.920 0.000 0.008 0.000 0.072
#> GSM125168     2  0.5955     0.4008 0.000 0.576 0.008 0.020 0.156 0.240
#> GSM125170     2  0.4197     0.6762 0.000 0.752 0.000 0.016 0.060 0.172
#> GSM125172     2  0.2136     0.7646 0.000 0.908 0.064 0.000 0.012 0.016
#> GSM125174     5  0.4303     0.5045 0.000 0.052 0.008 0.084 0.788 0.068
#> GSM125176     2  0.0603     0.7883 0.000 0.980 0.000 0.004 0.000 0.016
#> GSM125178     3  0.4665     0.6141 0.000 0.000 0.660 0.008 0.060 0.272
#> GSM125180     4  0.5012     0.3778 0.000 0.008 0.000 0.640 0.256 0.096
#> GSM125182     6  0.6839     0.3887 0.000 0.232 0.044 0.304 0.004 0.416
#> GSM125184     5  0.5155     0.4421 0.000 0.064 0.004 0.096 0.712 0.124
#> GSM125186     4  0.3202     0.4320 0.000 0.000 0.000 0.800 0.024 0.176
#> GSM125188     6  0.5629     0.4454 0.004 0.184 0.000 0.228 0.004 0.580
#> GSM125190     2  0.2544     0.7652 0.000 0.864 0.000 0.004 0.012 0.120
#> GSM125192     2  0.1285     0.7863 0.000 0.944 0.000 0.004 0.000 0.052
#> GSM125194     6  0.6391    -0.3782 0.004 0.000 0.344 0.016 0.208 0.428
#> GSM125196     3  0.3088     0.6126 0.000 0.000 0.808 0.172 0.020 0.000
#> GSM125198     2  0.2518     0.7455 0.000 0.884 0.088 0.004 0.012 0.012
#> GSM125200     1  0.0951     0.8504 0.968 0.000 0.000 0.008 0.020 0.004
#> GSM125202     2  0.2554     0.7465 0.000 0.880 0.088 0.000 0.012 0.020
#> GSM125204     3  0.2930     0.6486 0.000 0.000 0.840 0.124 0.000 0.036
#> GSM125206     3  0.1760     0.6480 0.000 0.012 0.936 0.020 0.028 0.004
#> GSM125208     3  0.6217     0.4137 0.000 0.000 0.432 0.272 0.008 0.288
#> GSM125210     4  0.4943     0.3458 0.000 0.048 0.000 0.688 0.052 0.212
#> GSM125212     3  0.4627     0.5255 0.000 0.000 0.532 0.012 0.020 0.436
#> GSM125214     2  0.1147     0.7889 0.000 0.960 0.004 0.004 0.004 0.028
#> GSM125216     2  0.1003     0.7801 0.000 0.964 0.028 0.004 0.000 0.004
#> GSM125218     2  0.1349     0.7870 0.000 0.940 0.000 0.004 0.000 0.056
#> GSM125220     1  0.1728     0.8394 0.924 0.000 0.000 0.004 0.008 0.064
#> GSM125222     2  0.5931     0.2184 0.000 0.516 0.000 0.048 0.084 0.352
#> GSM125224     2  0.2068     0.7571 0.000 0.904 0.080 0.000 0.008 0.008
#> GSM125226     2  0.2856     0.7589 0.000 0.844 0.004 0.004 0.012 0.136
#> GSM125228     2  0.1957     0.7619 0.000 0.912 0.072 0.000 0.008 0.008
#> GSM125230     3  0.5344     0.5278 0.000 0.000 0.528 0.008 0.088 0.376
#> GSM125232     5  0.3360     0.5280 0.000 0.000 0.032 0.084 0.840 0.044
#> GSM125234     4  0.3971     0.4707 0.088 0.000 0.024 0.808 0.068 0.012
#> GSM125236     1  0.4088     0.7813 0.804 0.000 0.028 0.096 0.052 0.020
#> GSM125238     1  0.2401     0.8380 0.892 0.000 0.000 0.004 0.060 0.044

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk CV-NMF-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk CV-NMF-collect-classes

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

test_to_known_factors(res)
#>          n agent(p) individual(p) k
#> CV:NMF 113   0.7784      1.13e-04 2
#> CV:NMF 108   0.3500      5.57e-06 3
#> CV:NMF  76   1.0000      1.02e-03 4
#> CV:NMF  87   0.5994      8.94e-05 5
#> CV:NMF  81   0.0605      1.32e-05 6

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


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

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

collect_plots(res)

plot of chunk MAD-hclust-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           0.973       0.986         0.4941 0.505   0.505
#> 3 3 0.829           0.929       0.933         0.3069 0.837   0.677
#> 4 4 0.829           0.865       0.915         0.0713 0.991   0.974
#> 5 5 0.766           0.726       0.856         0.0659 0.945   0.834
#> 6 6 0.761           0.710       0.833         0.0437 0.939   0.789

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
#> GSM125123     1  0.0000      0.986 1.000 0.000
#> GSM125125     1  0.0000      0.986 1.000 0.000
#> GSM125127     1  0.0000      0.986 1.000 0.000
#> GSM125129     1  0.0000      0.986 1.000 0.000
#> GSM125131     1  0.0000      0.986 1.000 0.000
#> GSM125133     1  0.0000      0.986 1.000 0.000
#> GSM125135     1  0.0000      0.986 1.000 0.000
#> GSM125137     1  0.0000      0.986 1.000 0.000
#> GSM125139     1  0.0000      0.986 1.000 0.000
#> GSM125141     1  0.0000      0.986 1.000 0.000
#> GSM125143     1  0.0000      0.986 1.000 0.000
#> GSM125145     1  0.0000      0.986 1.000 0.000
#> GSM125147     1  0.0000      0.986 1.000 0.000
#> GSM125149     1  0.0000      0.986 1.000 0.000
#> GSM125151     1  0.0000      0.986 1.000 0.000
#> GSM125153     1  0.0000      0.986 1.000 0.000
#> GSM125155     1  0.0000      0.986 1.000 0.000
#> GSM125157     1  0.0000      0.986 1.000 0.000
#> GSM125159     2  0.0000      0.986 0.000 1.000
#> GSM125161     1  0.0000      0.986 1.000 0.000
#> GSM125163     2  0.0000      0.986 0.000 1.000
#> GSM125165     2  0.0000      0.986 0.000 1.000
#> GSM125167     2  0.0000      0.986 0.000 1.000
#> GSM125169     2  0.0000      0.986 0.000 1.000
#> GSM125171     2  0.0000      0.986 0.000 1.000
#> GSM125173     2  0.2603      0.963 0.044 0.956
#> GSM125175     2  0.0000      0.986 0.000 1.000
#> GSM125177     2  0.2423      0.967 0.040 0.960
#> GSM125179     2  0.1633      0.977 0.024 0.976
#> GSM125181     2  0.0000      0.986 0.000 1.000
#> GSM125183     2  0.0938      0.983 0.012 0.988
#> GSM125185     2  0.1633      0.977 0.024 0.976
#> GSM125187     2  0.1633      0.977 0.024 0.976
#> GSM125189     2  0.0000      0.986 0.000 1.000
#> GSM125191     2  0.0000      0.986 0.000 1.000
#> GSM125193     2  0.2423      0.967 0.040 0.960
#> GSM125195     2  0.4022      0.929 0.080 0.920
#> GSM125197     2  0.0000      0.986 0.000 1.000
#> GSM125199     1  0.0000      0.986 1.000 0.000
#> GSM125201     2  0.0000      0.986 0.000 1.000
#> GSM125203     2  0.2423      0.967 0.040 0.960
#> GSM125205     2  0.0000      0.986 0.000 1.000
#> GSM125207     2  0.2423      0.967 0.040 0.960
#> GSM125209     2  0.0000      0.986 0.000 1.000
#> GSM125211     2  0.1843      0.973 0.028 0.972
#> GSM125213     2  0.0000      0.986 0.000 1.000
#> GSM125215     2  0.0000      0.986 0.000 1.000
#> GSM125217     2  0.0000      0.986 0.000 1.000
#> GSM125219     1  0.0000      0.986 1.000 0.000
#> GSM125221     2  0.0672      0.984 0.008 0.992
#> GSM125223     2  0.0000      0.986 0.000 1.000
#> GSM125225     2  0.0000      0.986 0.000 1.000
#> GSM125227     2  0.0000      0.986 0.000 1.000
#> GSM125229     2  0.1843      0.973 0.028 0.972
#> GSM125231     1  0.9580      0.374 0.620 0.380
#> GSM125233     1  0.0000      0.986 1.000 0.000
#> GSM125235     1  0.0000      0.986 1.000 0.000
#> GSM125237     1  0.0000      0.986 1.000 0.000
#> GSM125124     1  0.0000      0.986 1.000 0.000
#> GSM125126     1  0.0000      0.986 1.000 0.000
#> GSM125128     1  0.0000      0.986 1.000 0.000
#> GSM125130     1  0.0000      0.986 1.000 0.000
#> GSM125132     1  0.0000      0.986 1.000 0.000
#> GSM125134     1  0.0000      0.986 1.000 0.000
#> GSM125136     1  0.0000      0.986 1.000 0.000
#> GSM125138     1  0.0000      0.986 1.000 0.000
#> GSM125140     1  0.0000      0.986 1.000 0.000
#> GSM125142     1  0.0000      0.986 1.000 0.000
#> GSM125144     1  0.0000      0.986 1.000 0.000
#> GSM125146     1  0.0000      0.986 1.000 0.000
#> GSM125148     1  0.0000      0.986 1.000 0.000
#> GSM125150     1  0.0000      0.986 1.000 0.000
#> GSM125152     1  0.0000      0.986 1.000 0.000
#> GSM125154     1  0.0000      0.986 1.000 0.000
#> GSM125156     1  0.0000      0.986 1.000 0.000
#> GSM125158     1  0.0000      0.986 1.000 0.000
#> GSM125160     2  0.0000      0.986 0.000 1.000
#> GSM125162     1  0.0000      0.986 1.000 0.000
#> GSM125164     2  0.0000      0.986 0.000 1.000
#> GSM125166     2  0.0000      0.986 0.000 1.000
#> GSM125168     2  0.0000      0.986 0.000 1.000
#> GSM125170     2  0.0000      0.986 0.000 1.000
#> GSM125172     2  0.0000      0.986 0.000 1.000
#> GSM125174     2  0.2603      0.963 0.044 0.956
#> GSM125176     2  0.0000      0.986 0.000 1.000
#> GSM125178     2  0.2423      0.967 0.040 0.960
#> GSM125180     2  0.1633      0.977 0.024 0.976
#> GSM125182     2  0.0000      0.986 0.000 1.000
#> GSM125184     2  0.0938      0.983 0.012 0.988
#> GSM125186     2  0.1633      0.977 0.024 0.976
#> GSM125188     2  0.0000      0.986 0.000 1.000
#> GSM125190     2  0.0000      0.986 0.000 1.000
#> GSM125192     2  0.0000      0.986 0.000 1.000
#> GSM125194     2  0.2423      0.967 0.040 0.960
#> GSM125196     2  0.4022      0.929 0.080 0.920
#> GSM125198     2  0.0000      0.986 0.000 1.000
#> GSM125200     1  0.0000      0.986 1.000 0.000
#> GSM125202     2  0.0000      0.986 0.000 1.000
#> GSM125204     2  0.2423      0.967 0.040 0.960
#> GSM125206     2  0.4022      0.929 0.080 0.920
#> GSM125208     2  0.2423      0.967 0.040 0.960
#> GSM125210     2  0.0000      0.986 0.000 1.000
#> GSM125212     2  0.1843      0.973 0.028 0.972
#> GSM125214     2  0.0000      0.986 0.000 1.000
#> GSM125216     2  0.0000      0.986 0.000 1.000
#> GSM125218     2  0.0000      0.986 0.000 1.000
#> GSM125220     1  0.0000      0.986 1.000 0.000
#> GSM125222     2  0.0672      0.984 0.008 0.992
#> GSM125224     2  0.0000      0.986 0.000 1.000
#> GSM125226     2  0.0000      0.986 0.000 1.000
#> GSM125228     2  0.0000      0.986 0.000 1.000
#> GSM125230     2  0.2236      0.967 0.036 0.964
#> GSM125232     1  0.8813      0.561 0.700 0.300
#> GSM125234     1  0.0000      0.986 1.000 0.000
#> GSM125236     1  0.0000      0.986 1.000 0.000
#> GSM125238     1  0.0000      0.986 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
#> GSM125123     1  0.0592      0.969 0.988 0.000 0.012
#> GSM125125     1  0.0592      0.969 0.988 0.000 0.012
#> GSM125127     1  0.2165      0.950 0.936 0.000 0.064
#> GSM125129     1  0.2165      0.950 0.936 0.000 0.064
#> GSM125131     1  0.0000      0.970 1.000 0.000 0.000
#> GSM125133     1  0.0592      0.969 0.988 0.000 0.012
#> GSM125135     1  0.2165      0.950 0.936 0.000 0.064
#> GSM125137     1  0.0000      0.970 1.000 0.000 0.000
#> GSM125139     1  0.0000      0.970 1.000 0.000 0.000
#> GSM125141     1  0.0000      0.970 1.000 0.000 0.000
#> GSM125143     1  0.2165      0.950 0.936 0.000 0.064
#> GSM125145     1  0.1289      0.964 0.968 0.000 0.032
#> GSM125147     1  0.0000      0.970 1.000 0.000 0.000
#> GSM125149     1  0.0000      0.970 1.000 0.000 0.000
#> GSM125151     1  0.0000      0.970 1.000 0.000 0.000
#> GSM125153     1  0.1031      0.966 0.976 0.000 0.024
#> GSM125155     1  0.0237      0.970 0.996 0.000 0.004
#> GSM125157     1  0.0000      0.970 1.000 0.000 0.000
#> GSM125159     2  0.1163      0.961 0.000 0.972 0.028
#> GSM125161     1  0.0237      0.969 0.996 0.000 0.004
#> GSM125163     2  0.0747      0.964 0.000 0.984 0.016
#> GSM125165     3  0.6140      0.558 0.000 0.404 0.596
#> GSM125167     2  0.3038      0.895 0.000 0.896 0.104
#> GSM125169     2  0.2711      0.912 0.000 0.912 0.088
#> GSM125171     2  0.0424      0.964 0.000 0.992 0.008
#> GSM125173     3  0.1643      0.870 0.000 0.044 0.956
#> GSM125175     2  0.0000      0.962 0.000 1.000 0.000
#> GSM125177     3  0.3375      0.917 0.008 0.100 0.892
#> GSM125179     3  0.4862      0.917 0.020 0.160 0.820
#> GSM125181     3  0.4842      0.872 0.000 0.224 0.776
#> GSM125183     3  0.4291      0.919 0.008 0.152 0.840
#> GSM125185     3  0.4862      0.917 0.020 0.160 0.820
#> GSM125187     3  0.4862      0.917 0.020 0.160 0.820
#> GSM125189     2  0.1031      0.962 0.000 0.976 0.024
#> GSM125191     2  0.4291      0.755 0.000 0.820 0.180
#> GSM125193     3  0.3375      0.917 0.008 0.100 0.892
#> GSM125195     3  0.2116      0.874 0.012 0.040 0.948
#> GSM125197     2  0.0000      0.962 0.000 1.000 0.000
#> GSM125199     1  0.0000      0.970 1.000 0.000 0.000
#> GSM125201     2  0.0747      0.963 0.000 0.984 0.016
#> GSM125203     3  0.3375      0.917 0.008 0.100 0.892
#> GSM125205     2  0.0747      0.963 0.000 0.984 0.016
#> GSM125207     3  0.3375      0.917 0.008 0.100 0.892
#> GSM125209     3  0.4750      0.880 0.000 0.216 0.784
#> GSM125211     3  0.4615      0.914 0.020 0.144 0.836
#> GSM125213     2  0.0892      0.963 0.000 0.980 0.020
#> GSM125215     2  0.0000      0.962 0.000 1.000 0.000
#> GSM125217     2  0.2356      0.927 0.000 0.928 0.072
#> GSM125219     1  0.1529      0.961 0.960 0.000 0.040
#> GSM125221     3  0.5480      0.826 0.004 0.264 0.732
#> GSM125223     2  0.0000      0.962 0.000 1.000 0.000
#> GSM125225     2  0.1289      0.958 0.000 0.968 0.032
#> GSM125227     2  0.0000      0.962 0.000 1.000 0.000
#> GSM125229     3  0.4615      0.914 0.020 0.144 0.836
#> GSM125231     1  0.6468      0.333 0.552 0.004 0.444
#> GSM125233     1  0.1860      0.956 0.948 0.000 0.052
#> GSM125235     1  0.1753      0.959 0.952 0.000 0.048
#> GSM125237     1  0.0000      0.970 1.000 0.000 0.000
#> GSM125124     1  0.1163      0.965 0.972 0.000 0.028
#> GSM125126     1  0.0592      0.969 0.988 0.000 0.012
#> GSM125128     1  0.0237      0.969 0.996 0.000 0.004
#> GSM125130     1  0.2165      0.950 0.936 0.000 0.064
#> GSM125132     1  0.0000      0.970 1.000 0.000 0.000
#> GSM125134     1  0.1529      0.962 0.960 0.000 0.040
#> GSM125136     1  0.0237      0.969 0.996 0.000 0.004
#> GSM125138     1  0.1163      0.965 0.972 0.000 0.028
#> GSM125140     1  0.0000      0.970 1.000 0.000 0.000
#> GSM125142     1  0.0000      0.970 1.000 0.000 0.000
#> GSM125144     1  0.0892      0.967 0.980 0.000 0.020
#> GSM125146     1  0.1289      0.964 0.968 0.000 0.032
#> GSM125148     1  0.0000      0.970 1.000 0.000 0.000
#> GSM125150     1  0.0000      0.970 1.000 0.000 0.000
#> GSM125152     1  0.0000      0.970 1.000 0.000 0.000
#> GSM125154     1  0.1031      0.966 0.976 0.000 0.024
#> GSM125156     1  0.0237      0.970 0.996 0.000 0.004
#> GSM125158     1  0.0000      0.970 1.000 0.000 0.000
#> GSM125160     2  0.1163      0.961 0.000 0.972 0.028
#> GSM125162     1  0.0237      0.969 0.996 0.000 0.004
#> GSM125164     2  0.1031      0.962 0.000 0.976 0.024
#> GSM125166     2  0.0892      0.964 0.000 0.980 0.020
#> GSM125168     2  0.3038      0.895 0.000 0.896 0.104
#> GSM125170     2  0.2711      0.912 0.000 0.912 0.088
#> GSM125172     2  0.0424      0.964 0.000 0.992 0.008
#> GSM125174     3  0.1643      0.870 0.000 0.044 0.956
#> GSM125176     2  0.0000      0.962 0.000 1.000 0.000
#> GSM125178     3  0.3375      0.917 0.008 0.100 0.892
#> GSM125180     3  0.4862      0.917 0.020 0.160 0.820
#> GSM125182     3  0.4842      0.872 0.000 0.224 0.776
#> GSM125184     3  0.4291      0.919 0.008 0.152 0.840
#> GSM125186     3  0.4862      0.917 0.020 0.160 0.820
#> GSM125188     3  0.4399      0.900 0.000 0.188 0.812
#> GSM125190     2  0.1031      0.962 0.000 0.976 0.024
#> GSM125192     2  0.0892      0.964 0.000 0.980 0.020
#> GSM125194     3  0.3375      0.917 0.008 0.100 0.892
#> GSM125196     3  0.2116      0.874 0.012 0.040 0.948
#> GSM125198     2  0.0000      0.962 0.000 1.000 0.000
#> GSM125200     1  0.0000      0.970 1.000 0.000 0.000
#> GSM125202     2  0.0747      0.963 0.000 0.984 0.016
#> GSM125204     3  0.3375      0.917 0.008 0.100 0.892
#> GSM125206     3  0.2116      0.874 0.012 0.040 0.948
#> GSM125208     3  0.3375      0.917 0.008 0.100 0.892
#> GSM125210     3  0.4750      0.880 0.000 0.216 0.784
#> GSM125212     3  0.4615      0.914 0.020 0.144 0.836
#> GSM125214     2  0.0892      0.963 0.000 0.980 0.020
#> GSM125216     2  0.0000      0.962 0.000 1.000 0.000
#> GSM125218     2  0.2356      0.927 0.000 0.928 0.072
#> GSM125220     1  0.1529      0.961 0.960 0.000 0.040
#> GSM125222     3  0.5480      0.826 0.004 0.264 0.732
#> GSM125224     2  0.0000      0.962 0.000 1.000 0.000
#> GSM125226     2  0.1289      0.958 0.000 0.968 0.032
#> GSM125228     2  0.0000      0.962 0.000 1.000 0.000
#> GSM125230     3  0.4485      0.913 0.020 0.136 0.844
#> GSM125232     1  0.5988      0.524 0.632 0.000 0.368
#> GSM125234     1  0.2165      0.950 0.936 0.000 0.064
#> GSM125236     1  0.1753      0.959 0.952 0.000 0.048
#> GSM125238     1  0.0000      0.970 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
#> GSM125123     1  0.0779      0.930 0.980 0.000 0.004 0.016
#> GSM125125     1  0.0779      0.930 0.980 0.000 0.004 0.016
#> GSM125127     1  0.3443      0.883 0.848 0.000 0.016 0.136
#> GSM125129     1  0.3547      0.876 0.840 0.000 0.016 0.144
#> GSM125131     1  0.0707      0.928 0.980 0.000 0.000 0.020
#> GSM125133     1  0.1576      0.925 0.948 0.000 0.004 0.048
#> GSM125135     1  0.3547      0.875 0.840 0.000 0.016 0.144
#> GSM125137     1  0.0592      0.929 0.984 0.000 0.000 0.016
#> GSM125139     1  0.0188      0.930 0.996 0.000 0.000 0.004
#> GSM125141     1  0.0336      0.930 0.992 0.000 0.000 0.008
#> GSM125143     1  0.3495      0.879 0.844 0.000 0.016 0.140
#> GSM125145     1  0.2859      0.898 0.880 0.000 0.008 0.112
#> GSM125147     1  0.0469      0.930 0.988 0.000 0.000 0.012
#> GSM125149     1  0.0707      0.928 0.980 0.000 0.000 0.020
#> GSM125151     1  0.0921      0.930 0.972 0.000 0.000 0.028
#> GSM125153     1  0.1807      0.923 0.940 0.000 0.008 0.052
#> GSM125155     1  0.0592      0.931 0.984 0.000 0.000 0.016
#> GSM125157     1  0.0592      0.929 0.984 0.000 0.000 0.016
#> GSM125159     2  0.1174      0.957 0.000 0.968 0.012 0.020
#> GSM125161     1  0.1302      0.919 0.956 0.000 0.000 0.044
#> GSM125163     2  0.0804      0.959 0.000 0.980 0.012 0.008
#> GSM125165     3  0.5339      0.389 0.000 0.272 0.688 0.040
#> GSM125167     2  0.3013      0.899 0.000 0.888 0.080 0.032
#> GSM125169     2  0.2699      0.912 0.000 0.904 0.068 0.028
#> GSM125171     2  0.0469      0.958 0.000 0.988 0.000 0.012
#> GSM125173     4  0.4193      1.000 0.000 0.000 0.268 0.732
#> GSM125175     2  0.0000      0.958 0.000 1.000 0.000 0.000
#> GSM125177     3  0.2546      0.796 0.000 0.008 0.900 0.092
#> GSM125179     3  0.2101      0.803 0.000 0.012 0.928 0.060
#> GSM125181     3  0.3548      0.768 0.000 0.068 0.864 0.068
#> GSM125183     3  0.2748      0.806 0.004 0.020 0.904 0.072
#> GSM125185     3  0.2101      0.803 0.000 0.012 0.928 0.060
#> GSM125187     3  0.2101      0.803 0.000 0.012 0.928 0.060
#> GSM125189     2  0.1182      0.957 0.000 0.968 0.016 0.016
#> GSM125191     2  0.4290      0.691 0.000 0.772 0.212 0.016
#> GSM125193     3  0.2546      0.796 0.000 0.008 0.900 0.092
#> GSM125195     3  0.4543      0.358 0.000 0.000 0.676 0.324
#> GSM125197     2  0.0000      0.958 0.000 1.000 0.000 0.000
#> GSM125199     1  0.0336      0.930 0.992 0.000 0.000 0.008
#> GSM125201     2  0.1411      0.946 0.000 0.960 0.020 0.020
#> GSM125203     3  0.2546      0.796 0.000 0.008 0.900 0.092
#> GSM125205     2  0.1411      0.946 0.000 0.960 0.020 0.020
#> GSM125207     3  0.2342      0.799 0.000 0.008 0.912 0.080
#> GSM125209     3  0.3081      0.781 0.000 0.064 0.888 0.048
#> GSM125211     3  0.3142      0.772 0.000 0.008 0.860 0.132
#> GSM125213     2  0.0927      0.957 0.000 0.976 0.016 0.008
#> GSM125215     2  0.0000      0.958 0.000 1.000 0.000 0.000
#> GSM125217     2  0.2256      0.932 0.000 0.924 0.056 0.020
#> GSM125219     1  0.2329      0.918 0.916 0.000 0.012 0.072
#> GSM125221     3  0.3731      0.711 0.000 0.120 0.844 0.036
#> GSM125223     2  0.0000      0.958 0.000 1.000 0.000 0.000
#> GSM125225     2  0.1452      0.950 0.000 0.956 0.036 0.008
#> GSM125227     2  0.0000      0.958 0.000 1.000 0.000 0.000
#> GSM125229     3  0.3142      0.772 0.000 0.008 0.860 0.132
#> GSM125231     1  0.7007      0.123 0.452 0.000 0.116 0.432
#> GSM125233     1  0.3108      0.896 0.872 0.000 0.016 0.112
#> GSM125235     1  0.2593      0.912 0.904 0.000 0.016 0.080
#> GSM125237     1  0.0592      0.929 0.984 0.000 0.000 0.016
#> GSM125124     1  0.2831      0.896 0.876 0.000 0.004 0.120
#> GSM125126     1  0.0779      0.930 0.980 0.000 0.004 0.016
#> GSM125128     1  0.1474      0.921 0.948 0.000 0.000 0.052
#> GSM125130     1  0.3547      0.876 0.840 0.000 0.016 0.144
#> GSM125132     1  0.0707      0.928 0.980 0.000 0.000 0.020
#> GSM125134     1  0.2480      0.913 0.904 0.000 0.008 0.088
#> GSM125136     1  0.1302      0.919 0.956 0.000 0.000 0.044
#> GSM125138     1  0.2831      0.896 0.876 0.000 0.004 0.120
#> GSM125140     1  0.0188      0.930 0.996 0.000 0.000 0.004
#> GSM125142     1  0.0336      0.930 0.992 0.000 0.000 0.008
#> GSM125144     1  0.2216      0.912 0.908 0.000 0.000 0.092
#> GSM125146     1  0.2859      0.898 0.880 0.000 0.008 0.112
#> GSM125148     1  0.0469      0.930 0.988 0.000 0.000 0.012
#> GSM125150     1  0.0707      0.928 0.980 0.000 0.000 0.020
#> GSM125152     1  0.0921      0.930 0.972 0.000 0.000 0.028
#> GSM125154     1  0.1807      0.923 0.940 0.000 0.008 0.052
#> GSM125156     1  0.0592      0.931 0.984 0.000 0.000 0.016
#> GSM125158     1  0.0592      0.929 0.984 0.000 0.000 0.016
#> GSM125160     2  0.1174      0.957 0.000 0.968 0.012 0.020
#> GSM125162     1  0.1302      0.919 0.956 0.000 0.000 0.044
#> GSM125164     2  0.1042      0.958 0.000 0.972 0.020 0.008
#> GSM125166     2  0.0927      0.959 0.000 0.976 0.016 0.008
#> GSM125168     2  0.3013      0.899 0.000 0.888 0.080 0.032
#> GSM125170     2  0.2699      0.912 0.000 0.904 0.068 0.028
#> GSM125172     2  0.0469      0.958 0.000 0.988 0.000 0.012
#> GSM125174     4  0.4193      1.000 0.000 0.000 0.268 0.732
#> GSM125176     2  0.0000      0.958 0.000 1.000 0.000 0.000
#> GSM125178     3  0.2546      0.796 0.000 0.008 0.900 0.092
#> GSM125180     3  0.2101      0.803 0.000 0.012 0.928 0.060
#> GSM125182     3  0.3548      0.768 0.000 0.068 0.864 0.068
#> GSM125184     3  0.2748      0.806 0.004 0.020 0.904 0.072
#> GSM125186     3  0.2101      0.803 0.000 0.012 0.928 0.060
#> GSM125188     3  0.3013      0.789 0.000 0.032 0.888 0.080
#> GSM125190     2  0.1182      0.957 0.000 0.968 0.016 0.016
#> GSM125192     2  0.0927      0.959 0.000 0.976 0.016 0.008
#> GSM125194     3  0.2546      0.796 0.000 0.008 0.900 0.092
#> GSM125196     3  0.4543      0.358 0.000 0.000 0.676 0.324
#> GSM125198     2  0.0000      0.958 0.000 1.000 0.000 0.000
#> GSM125200     1  0.0336      0.930 0.992 0.000 0.000 0.008
#> GSM125202     2  0.1411      0.946 0.000 0.960 0.020 0.020
#> GSM125204     3  0.2546      0.796 0.000 0.008 0.900 0.092
#> GSM125206     3  0.4543      0.358 0.000 0.000 0.676 0.324
#> GSM125208     3  0.2342      0.799 0.000 0.008 0.912 0.080
#> GSM125210     3  0.3081      0.781 0.000 0.064 0.888 0.048
#> GSM125212     3  0.3142      0.772 0.000 0.008 0.860 0.132
#> GSM125214     2  0.0927      0.957 0.000 0.976 0.016 0.008
#> GSM125216     2  0.0000      0.958 0.000 1.000 0.000 0.000
#> GSM125218     2  0.2256      0.932 0.000 0.924 0.056 0.020
#> GSM125220     1  0.2329      0.918 0.916 0.000 0.012 0.072
#> GSM125222     3  0.3731      0.711 0.000 0.120 0.844 0.036
#> GSM125224     2  0.0000      0.958 0.000 1.000 0.000 0.000
#> GSM125226     2  0.1452      0.950 0.000 0.956 0.036 0.008
#> GSM125228     2  0.0000      0.958 0.000 1.000 0.000 0.000
#> GSM125230     3  0.2814      0.765 0.000 0.000 0.868 0.132
#> GSM125232     1  0.6407      0.347 0.520 0.000 0.068 0.412
#> GSM125234     1  0.3695      0.867 0.828 0.000 0.016 0.156
#> GSM125236     1  0.2593      0.912 0.904 0.000 0.016 0.080
#> GSM125238     1  0.0592      0.929 0.984 0.000 0.000 0.016

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM125123     1  0.2488     0.7165 0.872 0.000 0.004 0.000 0.124
#> GSM125125     1  0.2488     0.7165 0.872 0.000 0.004 0.000 0.124
#> GSM125127     5  0.4504     0.6540 0.428 0.000 0.008 0.000 0.564
#> GSM125129     5  0.4657     0.7368 0.380 0.000 0.008 0.008 0.604
#> GSM125131     1  0.0703     0.7358 0.976 0.000 0.000 0.000 0.024
#> GSM125133     1  0.1864     0.7117 0.924 0.000 0.004 0.004 0.068
#> GSM125135     5  0.4403     0.7298 0.384 0.000 0.008 0.000 0.608
#> GSM125137     1  0.1121     0.7394 0.956 0.000 0.000 0.000 0.044
#> GSM125139     1  0.2377     0.7088 0.872 0.000 0.000 0.000 0.128
#> GSM125141     1  0.1270     0.7451 0.948 0.000 0.000 0.000 0.052
#> GSM125143     5  0.4668     0.7326 0.384 0.000 0.008 0.008 0.600
#> GSM125145     1  0.4449    -0.3998 0.512 0.000 0.004 0.000 0.484
#> GSM125147     1  0.1043     0.7474 0.960 0.000 0.000 0.000 0.040
#> GSM125149     1  0.0510     0.7403 0.984 0.000 0.000 0.000 0.016
#> GSM125151     1  0.3395     0.5835 0.764 0.000 0.000 0.000 0.236
#> GSM125153     1  0.3906     0.4001 0.704 0.000 0.004 0.000 0.292
#> GSM125155     1  0.1792     0.7356 0.916 0.000 0.000 0.000 0.084
#> GSM125157     1  0.0609     0.7474 0.980 0.000 0.000 0.000 0.020
#> GSM125159     2  0.1299     0.9458 0.000 0.960 0.008 0.020 0.012
#> GSM125161     1  0.1410     0.7089 0.940 0.000 0.000 0.000 0.060
#> GSM125163     2  0.1200     0.9465 0.000 0.964 0.008 0.016 0.012
#> GSM125165     3  0.5887     0.4880 0.000 0.232 0.644 0.096 0.028
#> GSM125167     2  0.3427     0.8809 0.000 0.860 0.048 0.064 0.028
#> GSM125169     2  0.2980     0.8990 0.000 0.884 0.036 0.056 0.024
#> GSM125171     2  0.0807     0.9464 0.000 0.976 0.000 0.012 0.012
#> GSM125173     4  0.1544     1.0000 0.000 0.000 0.068 0.932 0.000
#> GSM125175     2  0.0290     0.9474 0.000 0.992 0.000 0.000 0.008
#> GSM125177     3  0.1753     0.8274 0.000 0.000 0.936 0.032 0.032
#> GSM125179     3  0.2193     0.8317 0.000 0.000 0.912 0.060 0.028
#> GSM125181     3  0.3949     0.8028 0.000 0.036 0.828 0.088 0.048
#> GSM125183     3  0.3044     0.8127 0.000 0.004 0.840 0.148 0.008
#> GSM125185     3  0.2193     0.8317 0.000 0.000 0.912 0.060 0.028
#> GSM125187     3  0.2193     0.8317 0.000 0.000 0.912 0.060 0.028
#> GSM125189     2  0.1483     0.9434 0.000 0.952 0.012 0.028 0.008
#> GSM125191     2  0.4444     0.6726 0.000 0.752 0.200 0.024 0.024
#> GSM125193     3  0.1753     0.8274 0.000 0.000 0.936 0.032 0.032
#> GSM125195     3  0.4550     0.5671 0.000 0.000 0.688 0.036 0.276
#> GSM125197     2  0.0290     0.9474 0.000 0.992 0.000 0.000 0.008
#> GSM125199     1  0.0880     0.7496 0.968 0.000 0.000 0.000 0.032
#> GSM125201     2  0.1399     0.9356 0.000 0.952 0.020 0.000 0.028
#> GSM125203     3  0.1753     0.8274 0.000 0.000 0.936 0.032 0.032
#> GSM125205     2  0.1399     0.9356 0.000 0.952 0.020 0.000 0.028
#> GSM125207     3  0.1668     0.8298 0.000 0.000 0.940 0.028 0.032
#> GSM125209     3  0.3405     0.8146 0.000 0.040 0.860 0.072 0.028
#> GSM125211     3  0.3471     0.7857 0.000 0.000 0.836 0.072 0.092
#> GSM125213     2  0.0798     0.9471 0.000 0.976 0.016 0.000 0.008
#> GSM125215     2  0.0290     0.9474 0.000 0.992 0.000 0.000 0.008
#> GSM125217     2  0.2825     0.9085 0.000 0.892 0.048 0.040 0.020
#> GSM125219     1  0.4338     0.3739 0.684 0.000 0.008 0.008 0.300
#> GSM125221     3  0.4281     0.7616 0.000 0.080 0.800 0.100 0.020
#> GSM125223     2  0.0290     0.9474 0.000 0.992 0.000 0.000 0.008
#> GSM125225     2  0.1787     0.9355 0.000 0.940 0.032 0.016 0.012
#> GSM125227     2  0.0290     0.9474 0.000 0.992 0.000 0.000 0.008
#> GSM125229     3  0.3471     0.7857 0.000 0.000 0.836 0.072 0.092
#> GSM125231     5  0.5445     0.2557 0.088 0.000 0.132 0.056 0.724
#> GSM125233     5  0.4787     0.5906 0.444 0.000 0.008 0.008 0.540
#> GSM125235     1  0.4751    -0.1159 0.564 0.000 0.008 0.008 0.420
#> GSM125237     1  0.0290     0.7479 0.992 0.000 0.000 0.000 0.008
#> GSM125124     1  0.4201     0.0246 0.592 0.000 0.000 0.000 0.408
#> GSM125126     1  0.2488     0.7165 0.872 0.000 0.004 0.000 0.124
#> GSM125128     1  0.1956     0.7071 0.916 0.000 0.000 0.008 0.076
#> GSM125130     5  0.4657     0.7368 0.380 0.000 0.008 0.008 0.604
#> GSM125132     1  0.0703     0.7358 0.976 0.000 0.000 0.000 0.024
#> GSM125134     1  0.4331    -0.0224 0.596 0.000 0.004 0.000 0.400
#> GSM125136     1  0.1410     0.7089 0.940 0.000 0.000 0.000 0.060
#> GSM125138     1  0.4201     0.0246 0.592 0.000 0.000 0.000 0.408
#> GSM125140     1  0.2377     0.7088 0.872 0.000 0.000 0.000 0.128
#> GSM125142     1  0.1270     0.7451 0.948 0.000 0.000 0.000 0.052
#> GSM125144     1  0.3966     0.3370 0.664 0.000 0.000 0.000 0.336
#> GSM125146     1  0.4449    -0.3998 0.512 0.000 0.004 0.000 0.484
#> GSM125148     1  0.1043     0.7474 0.960 0.000 0.000 0.000 0.040
#> GSM125150     1  0.0510     0.7403 0.984 0.000 0.000 0.000 0.016
#> GSM125152     1  0.3395     0.5835 0.764 0.000 0.000 0.000 0.236
#> GSM125154     1  0.3906     0.4001 0.704 0.000 0.004 0.000 0.292
#> GSM125156     1  0.1792     0.7356 0.916 0.000 0.000 0.000 0.084
#> GSM125158     1  0.0609     0.7474 0.980 0.000 0.000 0.000 0.020
#> GSM125160     2  0.1299     0.9458 0.000 0.960 0.008 0.020 0.012
#> GSM125162     1  0.1410     0.7089 0.940 0.000 0.000 0.000 0.060
#> GSM125164     2  0.1419     0.9448 0.000 0.956 0.016 0.016 0.012
#> GSM125166     2  0.0807     0.9485 0.000 0.976 0.012 0.000 0.012
#> GSM125168     2  0.3427     0.8809 0.000 0.860 0.048 0.064 0.028
#> GSM125170     2  0.2980     0.8990 0.000 0.884 0.036 0.056 0.024
#> GSM125172     2  0.0807     0.9464 0.000 0.976 0.000 0.012 0.012
#> GSM125174     4  0.1544     1.0000 0.000 0.000 0.068 0.932 0.000
#> GSM125176     2  0.0290     0.9474 0.000 0.992 0.000 0.000 0.008
#> GSM125178     3  0.1753     0.8274 0.000 0.000 0.936 0.032 0.032
#> GSM125180     3  0.2193     0.8317 0.000 0.000 0.912 0.060 0.028
#> GSM125182     3  0.3949     0.8028 0.000 0.036 0.828 0.088 0.048
#> GSM125184     3  0.3044     0.8127 0.000 0.004 0.840 0.148 0.008
#> GSM125186     3  0.2193     0.8317 0.000 0.000 0.912 0.060 0.028
#> GSM125188     3  0.3412     0.8153 0.000 0.008 0.848 0.096 0.048
#> GSM125190     2  0.1483     0.9434 0.000 0.952 0.012 0.028 0.008
#> GSM125192     2  0.0807     0.9485 0.000 0.976 0.012 0.000 0.012
#> GSM125194     3  0.1753     0.8274 0.000 0.000 0.936 0.032 0.032
#> GSM125196     3  0.4550     0.5671 0.000 0.000 0.688 0.036 0.276
#> GSM125198     2  0.0290     0.9474 0.000 0.992 0.000 0.000 0.008
#> GSM125200     1  0.0880     0.7496 0.968 0.000 0.000 0.000 0.032
#> GSM125202     2  0.1399     0.9356 0.000 0.952 0.020 0.000 0.028
#> GSM125204     3  0.1753     0.8274 0.000 0.000 0.936 0.032 0.032
#> GSM125206     3  0.4550     0.5671 0.000 0.000 0.688 0.036 0.276
#> GSM125208     3  0.1668     0.8298 0.000 0.000 0.940 0.028 0.032
#> GSM125210     3  0.3405     0.8146 0.000 0.040 0.860 0.072 0.028
#> GSM125212     3  0.3471     0.7857 0.000 0.000 0.836 0.072 0.092
#> GSM125214     2  0.0798     0.9471 0.000 0.976 0.016 0.000 0.008
#> GSM125216     2  0.0290     0.9474 0.000 0.992 0.000 0.000 0.008
#> GSM125218     2  0.2825     0.9085 0.000 0.892 0.048 0.040 0.020
#> GSM125220     1  0.4338     0.3739 0.684 0.000 0.008 0.008 0.300
#> GSM125222     3  0.4281     0.7616 0.000 0.080 0.800 0.100 0.020
#> GSM125224     2  0.0290     0.9474 0.000 0.992 0.000 0.000 0.008
#> GSM125226     2  0.1787     0.9355 0.000 0.940 0.032 0.016 0.012
#> GSM125228     2  0.0290     0.9474 0.000 0.992 0.000 0.000 0.008
#> GSM125230     3  0.3579     0.7813 0.000 0.000 0.828 0.072 0.100
#> GSM125232     5  0.4233     0.3718 0.092 0.000 0.072 0.028 0.808
#> GSM125234     5  0.4594     0.7314 0.360 0.000 0.008 0.008 0.624
#> GSM125236     1  0.4758    -0.1370 0.560 0.000 0.008 0.008 0.424
#> GSM125238     1  0.0290     0.7479 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
#> GSM125123     1  0.2805     0.7237 0.812 0.000 0.000 0.000 0.184 0.004
#> GSM125125     1  0.2805     0.7237 0.812 0.000 0.000 0.000 0.184 0.004
#> GSM125127     5  0.2879     0.7298 0.176 0.000 0.004 0.000 0.816 0.004
#> GSM125129     5  0.2178     0.7290 0.132 0.000 0.000 0.000 0.868 0.000
#> GSM125131     1  0.0363     0.7954 0.988 0.000 0.000 0.000 0.012 0.000
#> GSM125133     1  0.1700     0.7529 0.916 0.000 0.004 0.000 0.080 0.000
#> GSM125135     5  0.2462     0.7256 0.132 0.000 0.004 0.000 0.860 0.004
#> GSM125137     1  0.0865     0.7959 0.964 0.000 0.000 0.000 0.036 0.000
#> GSM125139     1  0.2558     0.7501 0.840 0.000 0.000 0.000 0.156 0.004
#> GSM125141     1  0.1501     0.7975 0.924 0.000 0.000 0.000 0.076 0.000
#> GSM125143     5  0.2219     0.7307 0.136 0.000 0.000 0.000 0.864 0.000
#> GSM125145     5  0.3996     0.5518 0.352 0.000 0.004 0.000 0.636 0.008
#> GSM125147     1  0.1327     0.8013 0.936 0.000 0.000 0.000 0.064 0.000
#> GSM125149     1  0.0146     0.7989 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125151     1  0.3728     0.4536 0.652 0.000 0.000 0.000 0.344 0.004
#> GSM125153     1  0.3841     0.2720 0.616 0.000 0.000 0.000 0.380 0.004
#> GSM125155     1  0.2558     0.7425 0.840 0.000 0.000 0.000 0.156 0.004
#> GSM125157     1  0.0713     0.8051 0.972 0.000 0.000 0.000 0.028 0.000
#> GSM125159     2  0.1768     0.9297 0.000 0.932 0.044 0.012 0.008 0.004
#> GSM125161     1  0.1285     0.7570 0.944 0.000 0.004 0.000 0.052 0.000
#> GSM125163     2  0.1768     0.9286 0.000 0.932 0.044 0.012 0.008 0.004
#> GSM125165     4  0.5672     0.1313 0.000 0.212 0.072 0.644 0.008 0.064
#> GSM125167     2  0.3649     0.8688 0.000 0.828 0.092 0.036 0.008 0.036
#> GSM125169     2  0.3003     0.8930 0.000 0.868 0.068 0.028 0.004 0.032
#> GSM125171     2  0.1464     0.9232 0.000 0.944 0.036 0.000 0.004 0.016
#> GSM125173     6  0.1075     1.0000 0.000 0.000 0.000 0.048 0.000 0.952
#> GSM125175     2  0.0508     0.9343 0.000 0.984 0.012 0.000 0.004 0.000
#> GSM125177     4  0.3023     0.6181 0.000 0.000 0.232 0.768 0.000 0.000
#> GSM125179     4  0.0508     0.6372 0.000 0.000 0.000 0.984 0.012 0.004
#> GSM125181     4  0.2874     0.5494 0.000 0.020 0.072 0.876 0.012 0.020
#> GSM125183     4  0.3509     0.5266 0.000 0.004 0.060 0.816 0.004 0.116
#> GSM125185     4  0.0508     0.6372 0.000 0.000 0.000 0.984 0.012 0.004
#> GSM125187     4  0.0508     0.6372 0.000 0.000 0.000 0.984 0.012 0.004
#> GSM125189     2  0.1873     0.9263 0.000 0.924 0.048 0.020 0.000 0.008
#> GSM125191     2  0.3933     0.6818 0.000 0.740 0.032 0.220 0.008 0.000
#> GSM125193     4  0.3023     0.6181 0.000 0.000 0.232 0.768 0.000 0.000
#> GSM125195     4  0.4531     0.2868 0.000 0.000 0.464 0.504 0.032 0.000
#> GSM125197     2  0.0405     0.9336 0.000 0.988 0.008 0.000 0.004 0.000
#> GSM125199     1  0.1010     0.8062 0.960 0.000 0.000 0.000 0.036 0.004
#> GSM125201     2  0.1757     0.9046 0.000 0.916 0.076 0.000 0.008 0.000
#> GSM125203     4  0.3023     0.6181 0.000 0.000 0.232 0.768 0.000 0.000
#> GSM125205     2  0.1757     0.9046 0.000 0.916 0.076 0.000 0.008 0.000
#> GSM125207     4  0.2883     0.6262 0.000 0.000 0.212 0.788 0.000 0.000
#> GSM125209     4  0.2037     0.5987 0.000 0.028 0.028 0.924 0.008 0.012
#> GSM125211     3  0.4912     0.9937 0.000 0.000 0.516 0.432 0.008 0.044
#> GSM125213     2  0.1078     0.9332 0.000 0.964 0.012 0.016 0.008 0.000
#> GSM125215     2  0.0508     0.9339 0.000 0.984 0.012 0.000 0.004 0.000
#> GSM125217     2  0.3090     0.8923 0.000 0.856 0.092 0.024 0.004 0.024
#> GSM125219     5  0.3868     0.1999 0.496 0.000 0.000 0.000 0.504 0.000
#> GSM125221     4  0.4001     0.4455 0.000 0.056 0.084 0.800 0.000 0.060
#> GSM125223     2  0.0405     0.9336 0.000 0.988 0.008 0.000 0.004 0.000
#> GSM125225     2  0.2202     0.9200 0.000 0.908 0.052 0.028 0.000 0.012
#> GSM125227     2  0.0405     0.9336 0.000 0.988 0.008 0.000 0.004 0.000
#> GSM125229     3  0.4912     0.9937 0.000 0.000 0.516 0.432 0.008 0.044
#> GSM125231     5  0.6013     0.2507 0.040 0.000 0.336 0.056 0.544 0.024
#> GSM125233     5  0.2762     0.7190 0.196 0.000 0.000 0.000 0.804 0.000
#> GSM125235     5  0.3578     0.5797 0.340 0.000 0.000 0.000 0.660 0.000
#> GSM125237     1  0.0790     0.8052 0.968 0.000 0.000 0.000 0.032 0.000
#> GSM125124     1  0.4310    -0.0529 0.512 0.000 0.004 0.000 0.472 0.012
#> GSM125126     1  0.2805     0.7237 0.812 0.000 0.000 0.000 0.184 0.004
#> GSM125128     1  0.1644     0.7509 0.920 0.000 0.004 0.000 0.076 0.000
#> GSM125130     5  0.2178     0.7290 0.132 0.000 0.000 0.000 0.868 0.000
#> GSM125132     1  0.0363     0.7954 0.988 0.000 0.000 0.000 0.012 0.000
#> GSM125134     5  0.4033     0.4766 0.404 0.000 0.004 0.000 0.588 0.004
#> GSM125136     1  0.1285     0.7570 0.944 0.000 0.004 0.000 0.052 0.000
#> GSM125138     1  0.4310    -0.0529 0.512 0.000 0.004 0.000 0.472 0.012
#> GSM125140     1  0.2558     0.7501 0.840 0.000 0.000 0.000 0.156 0.004
#> GSM125142     1  0.1501     0.7975 0.924 0.000 0.000 0.000 0.076 0.000
#> GSM125144     1  0.3907     0.2575 0.588 0.000 0.000 0.000 0.408 0.004
#> GSM125146     5  0.3996     0.5518 0.352 0.000 0.004 0.000 0.636 0.008
#> GSM125148     1  0.1327     0.8013 0.936 0.000 0.000 0.000 0.064 0.000
#> GSM125150     1  0.0146     0.7989 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125152     1  0.3728     0.4536 0.652 0.000 0.000 0.000 0.344 0.004
#> GSM125154     1  0.3841     0.2720 0.616 0.000 0.000 0.000 0.380 0.004
#> GSM125156     1  0.2558     0.7425 0.840 0.000 0.000 0.000 0.156 0.004
#> GSM125158     1  0.0713     0.8051 0.972 0.000 0.000 0.000 0.028 0.000
#> GSM125160     2  0.1768     0.9297 0.000 0.932 0.044 0.012 0.008 0.004
#> GSM125162     1  0.1285     0.7570 0.944 0.000 0.004 0.000 0.052 0.000
#> GSM125164     2  0.1950     0.9269 0.000 0.924 0.044 0.020 0.008 0.004
#> GSM125166     2  0.0881     0.9353 0.000 0.972 0.008 0.012 0.008 0.000
#> GSM125168     2  0.3649     0.8688 0.000 0.828 0.092 0.036 0.008 0.036
#> GSM125170     2  0.3003     0.8930 0.000 0.868 0.068 0.028 0.004 0.032
#> GSM125172     2  0.1464     0.9232 0.000 0.944 0.036 0.000 0.004 0.016
#> GSM125174     6  0.1075     1.0000 0.000 0.000 0.000 0.048 0.000 0.952
#> GSM125176     2  0.0508     0.9343 0.000 0.984 0.012 0.000 0.004 0.000
#> GSM125178     4  0.3023     0.6181 0.000 0.000 0.232 0.768 0.000 0.000
#> GSM125180     4  0.0508     0.6372 0.000 0.000 0.000 0.984 0.012 0.004
#> GSM125182     4  0.2874     0.5494 0.000 0.020 0.072 0.876 0.012 0.020
#> GSM125184     4  0.3509     0.5266 0.000 0.004 0.060 0.816 0.004 0.116
#> GSM125186     4  0.0508     0.6372 0.000 0.000 0.000 0.984 0.012 0.004
#> GSM125188     4  0.2007     0.5906 0.000 0.008 0.040 0.924 0.012 0.016
#> GSM125190     2  0.1873     0.9263 0.000 0.924 0.048 0.020 0.000 0.008
#> GSM125192     2  0.0881     0.9353 0.000 0.972 0.008 0.012 0.008 0.000
#> GSM125194     4  0.3023     0.6181 0.000 0.000 0.232 0.768 0.000 0.000
#> GSM125196     4  0.4531     0.2868 0.000 0.000 0.464 0.504 0.032 0.000
#> GSM125198     2  0.0405     0.9336 0.000 0.988 0.008 0.000 0.004 0.000
#> GSM125200     1  0.1010     0.8062 0.960 0.000 0.000 0.000 0.036 0.004
#> GSM125202     2  0.1757     0.9046 0.000 0.916 0.076 0.000 0.008 0.000
#> GSM125204     4  0.3023     0.6181 0.000 0.000 0.232 0.768 0.000 0.000
#> GSM125206     4  0.4531     0.2868 0.000 0.000 0.464 0.504 0.032 0.000
#> GSM125208     4  0.2883     0.6262 0.000 0.000 0.212 0.788 0.000 0.000
#> GSM125210     4  0.2037     0.5987 0.000 0.028 0.028 0.924 0.008 0.012
#> GSM125212     3  0.4912     0.9937 0.000 0.000 0.516 0.432 0.008 0.044
#> GSM125214     2  0.1078     0.9332 0.000 0.964 0.012 0.016 0.008 0.000
#> GSM125216     2  0.0508     0.9339 0.000 0.984 0.012 0.000 0.004 0.000
#> GSM125218     2  0.3090     0.8923 0.000 0.856 0.092 0.024 0.004 0.024
#> GSM125220     5  0.3868     0.1999 0.496 0.000 0.000 0.000 0.504 0.000
#> GSM125222     4  0.4001     0.4455 0.000 0.056 0.084 0.800 0.000 0.060
#> GSM125224     2  0.0405     0.9336 0.000 0.988 0.008 0.000 0.004 0.000
#> GSM125226     2  0.2202     0.9200 0.000 0.908 0.052 0.028 0.000 0.012
#> GSM125228     2  0.0405     0.9336 0.000 0.988 0.008 0.000 0.004 0.000
#> GSM125230     3  0.4903     0.9813 0.000 0.000 0.524 0.424 0.008 0.044
#> GSM125232     5  0.5499     0.3490 0.040 0.000 0.276 0.040 0.624 0.020
#> GSM125234     5  0.1910     0.7069 0.108 0.000 0.000 0.000 0.892 0.000
#> GSM125236     5  0.3563     0.5863 0.336 0.000 0.000 0.000 0.664 0.000
#> GSM125238     1  0.0790     0.8052 0.968 0.000 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-MAD-hclust-consensus-heatmap-1

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk MAD-hclust-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk MAD-hclust-collect-classes

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

test_to_known_factors(res)
#>              n agent(p) individual(p) k
#> MAD:hclust 115    1.000      8.53e-06 2
#> MAD:hclust 115    0.994      4.62e-09 3
#> MAD:hclust 110    1.000      4.34e-13 4
#> MAD:hclust 101    0.867      1.75e-12 5
#> MAD:hclust  98    0.983      1.05e-15 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 21168 rows and 116 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           0.999       1.000         0.4975 0.503   0.503
#> 3 3 0.798           0.949       0.938         0.3169 0.806   0.626
#> 4 4 0.735           0.724       0.800         0.1046 0.981   0.943
#> 5 5 0.706           0.607       0.735         0.0695 0.884   0.641
#> 6 6 0.691           0.670       0.727         0.0406 0.952   0.792

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
#> GSM125123     1  0.0000      1.000 1.000 0.000
#> GSM125125     1  0.0000      1.000 1.000 0.000
#> GSM125127     1  0.0000      1.000 1.000 0.000
#> GSM125129     1  0.0000      1.000 1.000 0.000
#> GSM125131     1  0.0000      1.000 1.000 0.000
#> GSM125133     1  0.0000      1.000 1.000 0.000
#> GSM125135     1  0.0000      1.000 1.000 0.000
#> GSM125137     1  0.0000      1.000 1.000 0.000
#> GSM125139     1  0.0000      1.000 1.000 0.000
#> GSM125141     1  0.0000      1.000 1.000 0.000
#> GSM125143     1  0.0000      1.000 1.000 0.000
#> GSM125145     1  0.0000      1.000 1.000 0.000
#> GSM125147     1  0.0000      1.000 1.000 0.000
#> GSM125149     1  0.0000      1.000 1.000 0.000
#> GSM125151     1  0.0000      1.000 1.000 0.000
#> GSM125153     1  0.0000      1.000 1.000 0.000
#> GSM125155     1  0.0000      1.000 1.000 0.000
#> GSM125157     1  0.0000      1.000 1.000 0.000
#> GSM125159     2  0.0000      1.000 0.000 1.000
#> GSM125161     1  0.0000      1.000 1.000 0.000
#> GSM125163     2  0.0000      1.000 0.000 1.000
#> GSM125165     2  0.0000      1.000 0.000 1.000
#> GSM125167     2  0.0000      1.000 0.000 1.000
#> GSM125169     2  0.0000      1.000 0.000 1.000
#> GSM125171     2  0.0000      1.000 0.000 1.000
#> GSM125173     2  0.0000      1.000 0.000 1.000
#> GSM125175     2  0.0000      1.000 0.000 1.000
#> GSM125177     2  0.0000      1.000 0.000 1.000
#> GSM125179     2  0.0000      1.000 0.000 1.000
#> GSM125181     2  0.0000      1.000 0.000 1.000
#> GSM125183     2  0.0000      1.000 0.000 1.000
#> GSM125185     2  0.0000      1.000 0.000 1.000
#> GSM125187     2  0.0376      0.996 0.004 0.996
#> GSM125189     2  0.0000      1.000 0.000 1.000
#> GSM125191     2  0.0000      1.000 0.000 1.000
#> GSM125193     2  0.0000      1.000 0.000 1.000
#> GSM125195     2  0.0000      1.000 0.000 1.000
#> GSM125197     2  0.0000      1.000 0.000 1.000
#> GSM125199     1  0.0000      1.000 1.000 0.000
#> GSM125201     2  0.0000      1.000 0.000 1.000
#> GSM125203     2  0.0000      1.000 0.000 1.000
#> GSM125205     2  0.0000      1.000 0.000 1.000
#> GSM125207     2  0.0000      1.000 0.000 1.000
#> GSM125209     2  0.0000      1.000 0.000 1.000
#> GSM125211     2  0.0000      1.000 0.000 1.000
#> GSM125213     2  0.0000      1.000 0.000 1.000
#> GSM125215     2  0.0000      1.000 0.000 1.000
#> GSM125217     2  0.0000      1.000 0.000 1.000
#> GSM125219     1  0.0000      1.000 1.000 0.000
#> GSM125221     2  0.0000      1.000 0.000 1.000
#> GSM125223     2  0.0000      1.000 0.000 1.000
#> GSM125225     2  0.0000      1.000 0.000 1.000
#> GSM125227     2  0.0000      1.000 0.000 1.000
#> GSM125229     2  0.0000      1.000 0.000 1.000
#> GSM125231     1  0.0000      1.000 1.000 0.000
#> GSM125233     1  0.0000      1.000 1.000 0.000
#> GSM125235     1  0.0000      1.000 1.000 0.000
#> GSM125237     1  0.0000      1.000 1.000 0.000
#> GSM125124     1  0.0000      1.000 1.000 0.000
#> GSM125126     1  0.0000      1.000 1.000 0.000
#> GSM125128     1  0.0000      1.000 1.000 0.000
#> GSM125130     1  0.0000      1.000 1.000 0.000
#> GSM125132     1  0.0000      1.000 1.000 0.000
#> GSM125134     1  0.0000      1.000 1.000 0.000
#> GSM125136     1  0.0000      1.000 1.000 0.000
#> GSM125138     1  0.0000      1.000 1.000 0.000
#> GSM125140     1  0.0000      1.000 1.000 0.000
#> GSM125142     1  0.0000      1.000 1.000 0.000
#> GSM125144     1  0.0000      1.000 1.000 0.000
#> GSM125146     1  0.0000      1.000 1.000 0.000
#> GSM125148     1  0.0000      1.000 1.000 0.000
#> GSM125150     1  0.0000      1.000 1.000 0.000
#> GSM125152     1  0.0000      1.000 1.000 0.000
#> GSM125154     1  0.0000      1.000 1.000 0.000
#> GSM125156     1  0.0000      1.000 1.000 0.000
#> GSM125158     1  0.0000      1.000 1.000 0.000
#> GSM125160     2  0.0000      1.000 0.000 1.000
#> GSM125162     1  0.0000      1.000 1.000 0.000
#> GSM125164     2  0.0000      1.000 0.000 1.000
#> GSM125166     2  0.0000      1.000 0.000 1.000
#> GSM125168     2  0.0000      1.000 0.000 1.000
#> GSM125170     2  0.0000      1.000 0.000 1.000
#> GSM125172     2  0.0000      1.000 0.000 1.000
#> GSM125174     2  0.0000      1.000 0.000 1.000
#> GSM125176     2  0.0000      1.000 0.000 1.000
#> GSM125178     2  0.0000      1.000 0.000 1.000
#> GSM125180     2  0.0000      1.000 0.000 1.000
#> GSM125182     2  0.0000      1.000 0.000 1.000
#> GSM125184     2  0.0000      1.000 0.000 1.000
#> GSM125186     2  0.0000      1.000 0.000 1.000
#> GSM125188     2  0.0000      1.000 0.000 1.000
#> GSM125190     2  0.0000      1.000 0.000 1.000
#> GSM125192     2  0.0000      1.000 0.000 1.000
#> GSM125194     1  0.1633      0.975 0.976 0.024
#> GSM125196     2  0.0000      1.000 0.000 1.000
#> GSM125198     2  0.0000      1.000 0.000 1.000
#> GSM125200     1  0.0000      1.000 1.000 0.000
#> GSM125202     2  0.0000      1.000 0.000 1.000
#> GSM125204     2  0.0000      1.000 0.000 1.000
#> GSM125206     2  0.0000      1.000 0.000 1.000
#> GSM125208     2  0.0000      1.000 0.000 1.000
#> GSM125210     2  0.0000      1.000 0.000 1.000
#> GSM125212     2  0.0000      1.000 0.000 1.000
#> GSM125214     2  0.0000      1.000 0.000 1.000
#> GSM125216     2  0.0000      1.000 0.000 1.000
#> GSM125218     2  0.0000      1.000 0.000 1.000
#> GSM125220     1  0.0000      1.000 1.000 0.000
#> GSM125222     2  0.0000      1.000 0.000 1.000
#> GSM125224     2  0.0000      1.000 0.000 1.000
#> GSM125226     2  0.0000      1.000 0.000 1.000
#> GSM125228     2  0.0000      1.000 0.000 1.000
#> GSM125230     2  0.0672      0.992 0.008 0.992
#> GSM125232     1  0.0000      1.000 1.000 0.000
#> GSM125234     1  0.0000      1.000 1.000 0.000
#> GSM125236     1  0.0000      1.000 1.000 0.000
#> GSM125238     1  0.0000      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
#> GSM125123     1  0.2796      0.956 0.908 0.000 0.092
#> GSM125125     1  0.0747      0.959 0.984 0.000 0.016
#> GSM125127     1  0.2796      0.956 0.908 0.000 0.092
#> GSM125129     1  0.2796      0.956 0.908 0.000 0.092
#> GSM125131     1  0.1163      0.959 0.972 0.000 0.028
#> GSM125133     1  0.1411      0.958 0.964 0.000 0.036
#> GSM125135     1  0.2796      0.956 0.908 0.000 0.092
#> GSM125137     1  0.1031      0.959 0.976 0.000 0.024
#> GSM125139     1  0.2537      0.957 0.920 0.000 0.080
#> GSM125141     1  0.1031      0.959 0.976 0.000 0.024
#> GSM125143     1  0.2796      0.956 0.908 0.000 0.092
#> GSM125145     1  0.2959      0.956 0.900 0.000 0.100
#> GSM125147     1  0.0892      0.959 0.980 0.000 0.020
#> GSM125149     1  0.0892      0.959 0.980 0.000 0.020
#> GSM125151     1  0.2537      0.957 0.920 0.000 0.080
#> GSM125153     1  0.2356      0.960 0.928 0.000 0.072
#> GSM125155     1  0.1031      0.959 0.976 0.000 0.024
#> GSM125157     1  0.0892      0.959 0.980 0.000 0.020
#> GSM125159     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125161     1  0.1289      0.958 0.968 0.000 0.032
#> GSM125163     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125165     3  0.3551      0.950 0.000 0.132 0.868
#> GSM125167     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125169     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125171     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125173     3  0.3340      0.960 0.000 0.120 0.880
#> GSM125175     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125177     3  0.3267      0.962 0.000 0.116 0.884
#> GSM125179     3  0.3192      0.960 0.000 0.112 0.888
#> GSM125181     3  0.3412      0.957 0.000 0.124 0.876
#> GSM125183     3  0.3267      0.962 0.000 0.116 0.884
#> GSM125185     3  0.3267      0.962 0.000 0.116 0.884
#> GSM125187     3  0.3192      0.960 0.000 0.112 0.888
#> GSM125189     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125191     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125193     3  0.2537      0.933 0.000 0.080 0.920
#> GSM125195     3  0.3192      0.960 0.000 0.112 0.888
#> GSM125197     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125199     1  0.0892      0.959 0.980 0.000 0.020
#> GSM125201     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125203     3  0.3267      0.962 0.000 0.116 0.884
#> GSM125205     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125207     3  0.3267      0.962 0.000 0.116 0.884
#> GSM125209     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125211     3  0.3267      0.962 0.000 0.116 0.884
#> GSM125213     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125215     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125217     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125219     1  0.2796      0.956 0.908 0.000 0.092
#> GSM125221     3  0.3267      0.962 0.000 0.116 0.884
#> GSM125223     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125225     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125227     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125229     3  0.3340      0.960 0.000 0.120 0.880
#> GSM125231     3  0.1267      0.854 0.024 0.004 0.972
#> GSM125233     1  0.2796      0.956 0.908 0.000 0.092
#> GSM125235     1  0.1411      0.958 0.964 0.000 0.036
#> GSM125237     1  0.0892      0.959 0.980 0.000 0.020
#> GSM125124     1  0.2537      0.957 0.920 0.000 0.080
#> GSM125126     1  0.0747      0.959 0.984 0.000 0.016
#> GSM125128     1  0.1289      0.958 0.968 0.000 0.032
#> GSM125130     1  0.2796      0.956 0.908 0.000 0.092
#> GSM125132     1  0.0747      0.959 0.984 0.000 0.016
#> GSM125134     1  0.2625      0.958 0.916 0.000 0.084
#> GSM125136     1  0.1411      0.958 0.964 0.000 0.036
#> GSM125138     1  0.2625      0.958 0.916 0.000 0.084
#> GSM125140     1  0.2537      0.957 0.920 0.000 0.080
#> GSM125142     1  0.1529      0.962 0.960 0.000 0.040
#> GSM125144     1  0.2537      0.957 0.920 0.000 0.080
#> GSM125146     1  0.2625      0.958 0.916 0.000 0.084
#> GSM125148     1  0.1031      0.959 0.976 0.000 0.024
#> GSM125150     1  0.0892      0.959 0.980 0.000 0.020
#> GSM125152     1  0.2537      0.957 0.920 0.000 0.080
#> GSM125154     1  0.2537      0.959 0.920 0.000 0.080
#> GSM125156     1  0.1860      0.962 0.948 0.000 0.052
#> GSM125158     1  0.1289      0.962 0.968 0.000 0.032
#> GSM125160     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125162     1  0.1289      0.958 0.968 0.000 0.032
#> GSM125164     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125166     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125168     3  0.6111      0.535 0.000 0.396 0.604
#> GSM125170     2  0.6126      0.137 0.000 0.600 0.400
#> GSM125172     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125174     3  0.3267      0.962 0.000 0.116 0.884
#> GSM125176     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125178     3  0.3267      0.962 0.000 0.116 0.884
#> GSM125180     3  0.3192      0.960 0.000 0.112 0.888
#> GSM125182     3  0.6126      0.527 0.000 0.400 0.600
#> GSM125184     3  0.3267      0.962 0.000 0.116 0.884
#> GSM125186     3  0.3192      0.960 0.000 0.112 0.888
#> GSM125188     3  0.3412      0.957 0.000 0.124 0.876
#> GSM125190     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125192     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125194     3  0.0237      0.858 0.000 0.004 0.996
#> GSM125196     3  0.3267      0.962 0.000 0.116 0.884
#> GSM125198     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125200     1  0.0000      0.961 1.000 0.000 0.000
#> GSM125202     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125204     3  0.3267      0.962 0.000 0.116 0.884
#> GSM125206     3  0.3267      0.962 0.000 0.116 0.884
#> GSM125208     3  0.3267      0.962 0.000 0.116 0.884
#> GSM125210     3  0.3267      0.962 0.000 0.116 0.884
#> GSM125212     3  0.3340      0.960 0.000 0.120 0.880
#> GSM125214     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125216     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125218     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125220     1  0.1411      0.958 0.964 0.000 0.036
#> GSM125222     3  0.3267      0.962 0.000 0.116 0.884
#> GSM125224     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125226     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125228     2  0.0000      0.986 0.000 1.000 0.000
#> GSM125230     3  0.2796      0.944 0.000 0.092 0.908
#> GSM125232     3  0.1289      0.849 0.032 0.000 0.968
#> GSM125234     1  0.2878      0.955 0.904 0.000 0.096
#> GSM125236     1  0.2796      0.956 0.908 0.000 0.092
#> GSM125238     1  0.0892      0.959 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
#> GSM125123     1  0.4907      0.808 0.580 0.000 0.000 0.420
#> GSM125125     1  0.2408      0.840 0.896 0.000 0.000 0.104
#> GSM125127     1  0.4916      0.807 0.576 0.000 0.000 0.424
#> GSM125129     1  0.4907      0.808 0.580 0.000 0.000 0.420
#> GSM125131     1  0.1022      0.823 0.968 0.000 0.000 0.032
#> GSM125133     1  0.3032      0.803 0.868 0.000 0.008 0.124
#> GSM125135     1  0.4916      0.807 0.576 0.000 0.000 0.424
#> GSM125137     1  0.0188      0.822 0.996 0.000 0.000 0.004
#> GSM125139     1  0.4746      0.827 0.688 0.000 0.008 0.304
#> GSM125141     1  0.0188      0.822 0.996 0.000 0.000 0.004
#> GSM125143     1  0.4907      0.808 0.580 0.000 0.000 0.420
#> GSM125145     1  0.5498      0.809 0.576 0.000 0.020 0.404
#> GSM125147     1  0.0188      0.822 0.996 0.000 0.000 0.004
#> GSM125149     1  0.0000      0.823 1.000 0.000 0.000 0.000
#> GSM125151     1  0.4792      0.826 0.680 0.000 0.008 0.312
#> GSM125153     1  0.4139      0.842 0.800 0.000 0.024 0.176
#> GSM125155     1  0.2053      0.838 0.924 0.000 0.004 0.072
#> GSM125157     1  0.0000      0.823 1.000 0.000 0.000 0.000
#> GSM125159     2  0.2973      0.855 0.000 0.856 0.000 0.144
#> GSM125161     1  0.2271      0.812 0.916 0.000 0.008 0.076
#> GSM125163     2  0.1302      0.900 0.000 0.956 0.000 0.044
#> GSM125165     4  0.6082      0.272 0.000 0.044 0.476 0.480
#> GSM125167     2  0.3726      0.818 0.000 0.788 0.000 0.212
#> GSM125169     2  0.4134      0.762 0.000 0.740 0.000 0.260
#> GSM125171     2  0.1118      0.900 0.000 0.964 0.000 0.036
#> GSM125173     3  0.5712      0.167 0.000 0.032 0.584 0.384
#> GSM125175     2  0.1211      0.899 0.000 0.960 0.000 0.040
#> GSM125177     3  0.1488      0.661 0.000 0.032 0.956 0.012
#> GSM125179     3  0.5222      0.458 0.000 0.032 0.688 0.280
#> GSM125181     3  0.6077     -0.393 0.000 0.044 0.496 0.460
#> GSM125183     3  0.5432      0.391 0.000 0.032 0.652 0.316
#> GSM125185     3  0.5222      0.458 0.000 0.032 0.688 0.280
#> GSM125187     3  0.5222      0.458 0.000 0.032 0.688 0.280
#> GSM125189     2  0.3444      0.840 0.000 0.816 0.000 0.184
#> GSM125191     2  0.4222      0.673 0.000 0.728 0.000 0.272
#> GSM125193     3  0.1771      0.650 0.004 0.012 0.948 0.036
#> GSM125195     3  0.1837      0.658 0.000 0.028 0.944 0.028
#> GSM125197     2  0.0336      0.900 0.000 0.992 0.000 0.008
#> GSM125199     1  0.0000      0.823 1.000 0.000 0.000 0.000
#> GSM125201     2  0.0469      0.899 0.000 0.988 0.000 0.012
#> GSM125203     3  0.1610      0.661 0.000 0.032 0.952 0.016
#> GSM125205     2  0.0817      0.894 0.000 0.976 0.000 0.024
#> GSM125207     3  0.1356      0.662 0.000 0.032 0.960 0.008
#> GSM125209     2  0.5203      0.304 0.000 0.576 0.008 0.416
#> GSM125211     3  0.3581      0.579 0.000 0.032 0.852 0.116
#> GSM125213     2  0.1389      0.899 0.000 0.952 0.000 0.048
#> GSM125215     2  0.0000      0.902 0.000 1.000 0.000 0.000
#> GSM125217     2  0.3726      0.820 0.000 0.788 0.000 0.212
#> GSM125219     1  0.5236      0.802 0.560 0.000 0.008 0.432
#> GSM125221     3  0.5827     -0.138 0.000 0.032 0.532 0.436
#> GSM125223     2  0.0707      0.901 0.000 0.980 0.000 0.020
#> GSM125225     2  0.0592      0.904 0.000 0.984 0.000 0.016
#> GSM125227     2  0.0592      0.902 0.000 0.984 0.000 0.016
#> GSM125229     3  0.3598      0.572 0.000 0.028 0.848 0.124
#> GSM125231     3  0.1637      0.615 0.000 0.000 0.940 0.060
#> GSM125233     1  0.4907      0.808 0.580 0.000 0.000 0.420
#> GSM125235     1  0.2714      0.815 0.884 0.000 0.004 0.112
#> GSM125237     1  0.0000      0.823 1.000 0.000 0.000 0.000
#> GSM125124     1  0.5206      0.823 0.668 0.000 0.024 0.308
#> GSM125126     1  0.1557      0.834 0.944 0.000 0.000 0.056
#> GSM125128     1  0.3088      0.803 0.864 0.000 0.008 0.128
#> GSM125130     1  0.5337      0.801 0.564 0.000 0.012 0.424
#> GSM125132     1  0.0000      0.823 1.000 0.000 0.000 0.000
#> GSM125134     1  0.5161      0.826 0.676 0.000 0.024 0.300
#> GSM125136     1  0.3032      0.803 0.868 0.000 0.008 0.124
#> GSM125138     1  0.5206      0.823 0.668 0.000 0.024 0.308
#> GSM125140     1  0.4722      0.829 0.692 0.000 0.008 0.300
#> GSM125142     1  0.3659      0.842 0.840 0.000 0.024 0.136
#> GSM125144     1  0.5206      0.823 0.668 0.000 0.024 0.308
#> GSM125146     1  0.5252      0.828 0.644 0.000 0.020 0.336
#> GSM125148     1  0.0188      0.822 0.996 0.000 0.000 0.004
#> GSM125150     1  0.0188      0.822 0.996 0.000 0.000 0.004
#> GSM125152     1  0.4792      0.826 0.680 0.000 0.008 0.312
#> GSM125154     1  0.4267      0.842 0.788 0.000 0.024 0.188
#> GSM125156     1  0.4401      0.835 0.724 0.000 0.004 0.272
#> GSM125158     1  0.4372      0.836 0.728 0.000 0.004 0.268
#> GSM125160     2  0.2704      0.868 0.000 0.876 0.000 0.124
#> GSM125162     1  0.2271      0.812 0.916 0.000 0.008 0.076
#> GSM125164     2  0.1302      0.900 0.000 0.956 0.000 0.044
#> GSM125166     2  0.1716      0.899 0.000 0.936 0.000 0.064
#> GSM125168     4  0.7323      0.734 0.000 0.164 0.352 0.484
#> GSM125170     4  0.7516      0.643 0.000 0.240 0.264 0.496
#> GSM125172     2  0.1118      0.900 0.000 0.964 0.000 0.036
#> GSM125174     3  0.5247      0.446 0.000 0.032 0.684 0.284
#> GSM125176     2  0.2888      0.868 0.000 0.872 0.004 0.124
#> GSM125178     3  0.1488      0.661 0.000 0.032 0.956 0.012
#> GSM125180     3  0.5222      0.458 0.000 0.032 0.688 0.280
#> GSM125182     4  0.7480      0.721 0.000 0.180 0.376 0.444
#> GSM125184     3  0.5321      0.428 0.000 0.032 0.672 0.296
#> GSM125186     3  0.5222      0.458 0.000 0.032 0.688 0.280
#> GSM125188     3  0.5850     -0.308 0.000 0.032 0.512 0.456
#> GSM125190     2  0.3726      0.818 0.000 0.788 0.000 0.212
#> GSM125192     2  0.0921      0.902 0.000 0.972 0.000 0.028
#> GSM125194     3  0.1209      0.643 0.004 0.000 0.964 0.032
#> GSM125196     3  0.1833      0.658 0.000 0.032 0.944 0.024
#> GSM125198     2  0.0336      0.900 0.000 0.992 0.000 0.008
#> GSM125200     1  0.3494      0.846 0.824 0.000 0.004 0.172
#> GSM125202     2  0.0469      0.899 0.000 0.988 0.000 0.012
#> GSM125204     3  0.1610      0.661 0.000 0.032 0.952 0.016
#> GSM125206     3  0.1488      0.659 0.000 0.032 0.956 0.012
#> GSM125208     3  0.1356      0.662 0.000 0.032 0.960 0.008
#> GSM125210     3  0.5222      0.458 0.000 0.032 0.688 0.280
#> GSM125212     3  0.3581      0.579 0.000 0.032 0.852 0.116
#> GSM125214     2  0.0000      0.902 0.000 1.000 0.000 0.000
#> GSM125216     2  0.0000      0.902 0.000 1.000 0.000 0.000
#> GSM125218     2  0.3726      0.820 0.000 0.788 0.000 0.212
#> GSM125220     1  0.3088      0.801 0.864 0.000 0.008 0.128
#> GSM125222     3  0.5800     -0.044 0.000 0.032 0.548 0.420
#> GSM125224     2  0.0592      0.902 0.000 0.984 0.000 0.016
#> GSM125226     2  0.3726      0.818 0.000 0.788 0.000 0.212
#> GSM125228     2  0.0592      0.902 0.000 0.984 0.000 0.016
#> GSM125230     3  0.1545      0.643 0.000 0.008 0.952 0.040
#> GSM125232     3  0.2081      0.579 0.000 0.000 0.916 0.084
#> GSM125234     1  0.6050      0.772 0.524 0.000 0.044 0.432
#> GSM125236     1  0.4916      0.807 0.576 0.000 0.000 0.424
#> GSM125238     1  0.0188      0.822 0.996 0.000 0.000 0.004

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM125123     5  0.4679     0.6439 0.136 0.000 0.000 0.124 0.740
#> GSM125125     5  0.4917    -0.5719 0.416 0.000 0.000 0.028 0.556
#> GSM125127     5  0.4717     0.6450 0.144 0.000 0.000 0.120 0.736
#> GSM125129     5  0.4624     0.6436 0.144 0.000 0.000 0.112 0.744
#> GSM125131     1  0.4415     0.8154 0.604 0.000 0.000 0.008 0.388
#> GSM125133     1  0.4983     0.6511 0.664 0.000 0.000 0.064 0.272
#> GSM125135     5  0.4671     0.6460 0.144 0.000 0.000 0.116 0.740
#> GSM125137     1  0.4397     0.8344 0.564 0.000 0.000 0.004 0.432
#> GSM125139     5  0.0865     0.6283 0.024 0.000 0.000 0.004 0.972
#> GSM125141     1  0.4262     0.8304 0.560 0.000 0.000 0.000 0.440
#> GSM125143     5  0.4577     0.6447 0.144 0.000 0.000 0.108 0.748
#> GSM125145     5  0.5388     0.6333 0.152 0.000 0.004 0.164 0.680
#> GSM125147     1  0.4256     0.8335 0.564 0.000 0.000 0.000 0.436
#> GSM125149     1  0.4249     0.8353 0.568 0.000 0.000 0.000 0.432
#> GSM125151     5  0.0566     0.6403 0.004 0.000 0.000 0.012 0.984
#> GSM125153     5  0.4682     0.2419 0.212 0.000 0.004 0.060 0.724
#> GSM125155     5  0.4288    -0.4897 0.384 0.000 0.000 0.004 0.612
#> GSM125157     1  0.4256     0.8356 0.564 0.000 0.000 0.000 0.436
#> GSM125159     2  0.3910     0.7899 0.032 0.772 0.000 0.196 0.000
#> GSM125161     1  0.5080     0.7669 0.604 0.000 0.000 0.048 0.348
#> GSM125163     2  0.1740     0.8692 0.012 0.932 0.000 0.056 0.000
#> GSM125165     4  0.4993     0.6798 0.032 0.020 0.268 0.680 0.000
#> GSM125167     2  0.4924     0.7113 0.060 0.668 0.000 0.272 0.000
#> GSM125169     2  0.5302     0.6034 0.064 0.592 0.000 0.344 0.000
#> GSM125171     2  0.2775     0.8562 0.076 0.884 0.004 0.036 0.000
#> GSM125173     4  0.6016     0.4057 0.092 0.008 0.388 0.512 0.000
#> GSM125175     2  0.1893     0.8651 0.048 0.928 0.000 0.024 0.000
#> GSM125177     3  0.0613     0.6761 0.008 0.004 0.984 0.004 0.000
#> GSM125179     3  0.5934    -0.0941 0.068 0.008 0.496 0.424 0.004
#> GSM125181     4  0.5110     0.6643 0.032 0.016 0.308 0.644 0.000
#> GSM125183     4  0.5706     0.2000 0.060 0.008 0.448 0.484 0.000
#> GSM125185     3  0.5965    -0.0752 0.072 0.008 0.508 0.408 0.004
#> GSM125187     3  0.5965    -0.0752 0.072 0.008 0.508 0.408 0.004
#> GSM125189     2  0.4272     0.7824 0.052 0.752 0.000 0.196 0.000
#> GSM125191     2  0.5033     0.3487 0.024 0.524 0.004 0.448 0.000
#> GSM125193     3  0.1399     0.6708 0.020 0.000 0.952 0.028 0.000
#> GSM125195     3  0.1059     0.6748 0.020 0.004 0.968 0.008 0.000
#> GSM125197     2  0.0880     0.8641 0.032 0.968 0.000 0.000 0.000
#> GSM125199     1  0.4262     0.8333 0.560 0.000 0.000 0.000 0.440
#> GSM125201     2  0.1041     0.8647 0.032 0.964 0.000 0.004 0.000
#> GSM125203     3  0.0854     0.6762 0.012 0.004 0.976 0.008 0.000
#> GSM125205     2  0.1830     0.8469 0.052 0.932 0.012 0.004 0.000
#> GSM125207     3  0.0833     0.6756 0.004 0.004 0.976 0.016 0.000
#> GSM125209     4  0.5527     0.3197 0.032 0.312 0.036 0.620 0.000
#> GSM125211     3  0.3893     0.5652 0.052 0.004 0.804 0.140 0.000
#> GSM125213     2  0.2236     0.8615 0.024 0.908 0.000 0.068 0.000
#> GSM125215     2  0.0162     0.8702 0.004 0.996 0.000 0.000 0.000
#> GSM125217     2  0.4972     0.7214 0.068 0.672 0.000 0.260 0.000
#> GSM125219     5  0.5083     0.6161 0.160 0.000 0.000 0.140 0.700
#> GSM125221     4  0.5497     0.5942 0.056 0.012 0.328 0.604 0.000
#> GSM125223     2  0.0404     0.8687 0.012 0.988 0.000 0.000 0.000
#> GSM125225     2  0.0798     0.8732 0.016 0.976 0.000 0.008 0.000
#> GSM125227     2  0.0162     0.8704 0.004 0.996 0.000 0.000 0.000
#> GSM125229     3  0.3758     0.5656 0.052 0.004 0.816 0.128 0.000
#> GSM125231     3  0.3043     0.6150 0.020 0.000 0.872 0.088 0.020
#> GSM125233     5  0.4535     0.6462 0.140 0.000 0.000 0.108 0.752
#> GSM125235     1  0.4823     0.6694 0.644 0.000 0.000 0.040 0.316
#> GSM125237     1  0.4256     0.8356 0.564 0.000 0.000 0.000 0.436
#> GSM125124     5  0.1731     0.6250 0.004 0.000 0.004 0.060 0.932
#> GSM125126     1  0.4905     0.7522 0.500 0.000 0.000 0.024 0.476
#> GSM125128     1  0.5598     0.5600 0.612 0.000 0.000 0.112 0.276
#> GSM125130     5  0.4732     0.6435 0.144 0.000 0.004 0.108 0.744
#> GSM125132     1  0.4403     0.8353 0.560 0.000 0.000 0.004 0.436
#> GSM125134     5  0.2172     0.6134 0.020 0.000 0.004 0.060 0.916
#> GSM125136     1  0.4983     0.6518 0.664 0.000 0.000 0.064 0.272
#> GSM125138     5  0.1731     0.6250 0.004 0.000 0.004 0.060 0.932
#> GSM125140     5  0.1121     0.6113 0.044 0.000 0.000 0.000 0.956
#> GSM125142     5  0.4769     0.0520 0.256 0.000 0.000 0.056 0.688
#> GSM125144     5  0.1731     0.6250 0.004 0.000 0.004 0.060 0.932
#> GSM125146     5  0.5581     0.5769 0.192 0.000 0.004 0.148 0.656
#> GSM125148     1  0.4268     0.8264 0.556 0.000 0.000 0.000 0.444
#> GSM125150     1  0.4291     0.8014 0.536 0.000 0.000 0.000 0.464
#> GSM125152     5  0.0566     0.6403 0.004 0.000 0.000 0.012 0.984
#> GSM125154     5  0.4555     0.2809 0.196 0.000 0.004 0.060 0.740
#> GSM125156     5  0.2286     0.5386 0.108 0.000 0.000 0.004 0.888
#> GSM125158     5  0.2338     0.5316 0.112 0.000 0.000 0.004 0.884
#> GSM125160     2  0.3876     0.7929 0.032 0.776 0.000 0.192 0.000
#> GSM125162     1  0.5080     0.7669 0.604 0.000 0.000 0.048 0.348
#> GSM125164     2  0.1670     0.8693 0.012 0.936 0.000 0.052 0.000
#> GSM125166     2  0.2074     0.8659 0.036 0.920 0.000 0.044 0.000
#> GSM125168     4  0.5894     0.6527 0.044 0.084 0.212 0.660 0.000
#> GSM125170     4  0.6092     0.5795 0.048 0.160 0.132 0.660 0.000
#> GSM125172     2  0.2473     0.8610 0.072 0.896 0.000 0.032 0.000
#> GSM125174     3  0.6100    -0.1534 0.096 0.008 0.472 0.424 0.000
#> GSM125176     2  0.3779     0.8123 0.056 0.816 0.004 0.124 0.000
#> GSM125178     3  0.0854     0.6742 0.008 0.004 0.976 0.012 0.000
#> GSM125180     3  0.5934    -0.0941 0.068 0.008 0.496 0.424 0.004
#> GSM125182     4  0.5834     0.6644 0.032 0.076 0.252 0.640 0.000
#> GSM125184     3  0.5710    -0.2031 0.060 0.008 0.472 0.460 0.000
#> GSM125186     3  0.5965    -0.0752 0.072 0.008 0.508 0.408 0.004
#> GSM125188     4  0.4906     0.6499 0.028 0.008 0.324 0.640 0.000
#> GSM125190     2  0.4840     0.7303 0.064 0.688 0.000 0.248 0.000
#> GSM125192     2  0.0566     0.8720 0.004 0.984 0.000 0.012 0.000
#> GSM125194     3  0.1117     0.6734 0.016 0.000 0.964 0.020 0.000
#> GSM125196     3  0.1059     0.6748 0.020 0.004 0.968 0.008 0.000
#> GSM125198     2  0.0880     0.8641 0.032 0.968 0.000 0.000 0.000
#> GSM125200     5  0.3707    -0.0333 0.284 0.000 0.000 0.000 0.716
#> GSM125202     2  0.1041     0.8647 0.032 0.964 0.000 0.004 0.000
#> GSM125204     3  0.0854     0.6762 0.012 0.004 0.976 0.008 0.000
#> GSM125206     3  0.0932     0.6753 0.020 0.004 0.972 0.004 0.000
#> GSM125208     3  0.0833     0.6756 0.004 0.004 0.976 0.016 0.000
#> GSM125210     3  0.5979    -0.1159 0.072 0.008 0.496 0.420 0.004
#> GSM125212     3  0.3936     0.5598 0.052 0.004 0.800 0.144 0.000
#> GSM125214     2  0.0324     0.8710 0.004 0.992 0.000 0.004 0.000
#> GSM125216     2  0.0162     0.8702 0.004 0.996 0.000 0.000 0.000
#> GSM125218     2  0.4923     0.7253 0.068 0.680 0.000 0.252 0.000
#> GSM125220     1  0.5265     0.6089 0.636 0.000 0.000 0.080 0.284
#> GSM125222     4  0.5540     0.5746 0.056 0.012 0.340 0.592 0.000
#> GSM125224     2  0.0404     0.8687 0.012 0.988 0.000 0.000 0.000
#> GSM125226     2  0.4914     0.7186 0.064 0.676 0.000 0.260 0.000
#> GSM125228     2  0.0000     0.8706 0.000 1.000 0.000 0.000 0.000
#> GSM125230     3  0.2228     0.6496 0.040 0.000 0.912 0.048 0.000
#> GSM125232     3  0.5622     0.4993 0.076 0.000 0.712 0.136 0.076
#> GSM125234     5  0.5315     0.6189 0.152 0.000 0.024 0.108 0.716
#> GSM125236     5  0.4720     0.6411 0.140 0.000 0.000 0.124 0.736
#> GSM125238     1  0.4249     0.8353 0.568 0.000 0.000 0.000 0.432

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5 p6
#> GSM125123     1  0.5316     0.6159 0.600 0.000 0.000 0.012 0.104 NA
#> GSM125125     5  0.5102     0.5940 0.428 0.000 0.000 0.012 0.508 NA
#> GSM125127     1  0.5008     0.6193 0.612 0.000 0.000 0.000 0.108 NA
#> GSM125129     1  0.5042     0.6181 0.604 0.000 0.000 0.000 0.108 NA
#> GSM125131     5  0.3468     0.8183 0.284 0.000 0.000 0.000 0.712 NA
#> GSM125133     5  0.5223     0.6643 0.188 0.000 0.000 0.044 0.676 NA
#> GSM125135     1  0.5011     0.6219 0.616 0.000 0.000 0.000 0.112 NA
#> GSM125137     5  0.3835     0.8261 0.320 0.000 0.000 0.012 0.668 NA
#> GSM125139     1  0.1718     0.6010 0.932 0.000 0.000 0.008 0.044 NA
#> GSM125141     5  0.3668     0.8218 0.328 0.000 0.000 0.004 0.668 NA
#> GSM125143     1  0.5042     0.6176 0.604 0.000 0.000 0.000 0.108 NA
#> GSM125145     1  0.5231     0.6108 0.612 0.000 0.000 0.008 0.112 NA
#> GSM125147     5  0.3684     0.8215 0.332 0.000 0.000 0.004 0.664 NA
#> GSM125149     5  0.3482     0.8271 0.316 0.000 0.000 0.000 0.684 NA
#> GSM125151     1  0.1821     0.6194 0.928 0.000 0.000 0.008 0.024 NA
#> GSM125153     1  0.4205     0.3504 0.728 0.000 0.000 0.004 0.204 NA
#> GSM125155     1  0.3672    -0.2273 0.632 0.000 0.000 0.000 0.368 NA
#> GSM125157     5  0.3619     0.8273 0.316 0.000 0.000 0.000 0.680 NA
#> GSM125159     2  0.5015     0.7259 0.000 0.692 0.000 0.140 0.024 NA
#> GSM125161     5  0.5064     0.7425 0.232 0.000 0.000 0.044 0.668 NA
#> GSM125163     2  0.2895     0.8161 0.000 0.868 0.000 0.052 0.016 NA
#> GSM125165     4  0.5563     0.6240 0.000 0.008 0.124 0.632 0.020 NA
#> GSM125167     2  0.5917     0.5809 0.000 0.508 0.000 0.168 0.012 NA
#> GSM125169     2  0.6110     0.4399 0.000 0.416 0.000 0.236 0.004 NA
#> GSM125171     2  0.3578     0.7946 0.000 0.796 0.000 0.016 0.028 NA
#> GSM125173     4  0.6274     0.5950 0.000 0.004 0.200 0.564 0.048 NA
#> GSM125175     2  0.2810     0.8048 0.000 0.832 0.000 0.004 0.008 NA
#> GSM125177     3  0.0622     0.8531 0.000 0.000 0.980 0.012 0.000 NA
#> GSM125179     4  0.3756     0.6112 0.000 0.004 0.316 0.676 0.000 NA
#> GSM125181     4  0.5884     0.6115 0.000 0.012 0.140 0.620 0.032 NA
#> GSM125183     4  0.4244     0.6248 0.000 0.004 0.280 0.684 0.004 NA
#> GSM125185     4  0.3861     0.6112 0.000 0.004 0.316 0.672 0.000 NA
#> GSM125187     4  0.3741     0.6046 0.000 0.000 0.320 0.672 0.000 NA
#> GSM125189     2  0.4954     0.7078 0.000 0.628 0.000 0.112 0.000 NA
#> GSM125191     4  0.6153    -0.1448 0.000 0.408 0.000 0.420 0.024 NA
#> GSM125193     3  0.2521     0.8355 0.000 0.000 0.892 0.056 0.020 NA
#> GSM125195     3  0.2045     0.8415 0.000 0.000 0.920 0.024 0.028 NA
#> GSM125197     2  0.1858     0.8018 0.000 0.924 0.000 0.012 0.012 NA
#> GSM125199     5  0.3684     0.8228 0.332 0.000 0.000 0.000 0.664 NA
#> GSM125201     2  0.2247     0.7998 0.000 0.904 0.000 0.012 0.024 NA
#> GSM125203     3  0.1353     0.8486 0.000 0.000 0.952 0.024 0.012 NA
#> GSM125205     2  0.3115     0.7781 0.000 0.864 0.016 0.016 0.032 NA
#> GSM125207     3  0.1296     0.8495 0.000 0.000 0.952 0.032 0.004 NA
#> GSM125209     4  0.5907     0.4497 0.000 0.192 0.004 0.600 0.032 NA
#> GSM125211     3  0.4930     0.7133 0.000 0.000 0.728 0.088 0.084 NA
#> GSM125213     2  0.3515     0.8008 0.000 0.828 0.000 0.064 0.024 NA
#> GSM125215     2  0.1297     0.8218 0.000 0.948 0.000 0.000 0.012 NA
#> GSM125217     2  0.5720     0.6359 0.000 0.548 0.000 0.148 0.012 NA
#> GSM125219     1  0.5479     0.5900 0.552 0.000 0.000 0.008 0.116 NA
#> GSM125221     4  0.4464     0.6589 0.000 0.004 0.172 0.732 0.008 NA
#> GSM125223     2  0.1082     0.8206 0.000 0.956 0.000 0.000 0.004 NA
#> GSM125225     2  0.1625     0.8235 0.000 0.928 0.000 0.000 0.012 NA
#> GSM125227     2  0.1010     0.8211 0.000 0.960 0.000 0.000 0.004 NA
#> GSM125229     3  0.4786     0.7247 0.000 0.000 0.740 0.096 0.088 NA
#> GSM125231     3  0.3878     0.7631 0.056 0.000 0.824 0.036 0.020 NA
#> GSM125233     1  0.5241     0.6169 0.600 0.000 0.000 0.008 0.104 NA
#> GSM125235     5  0.4760     0.7081 0.232 0.000 0.000 0.020 0.684 NA
#> GSM125237     5  0.3515     0.8268 0.324 0.000 0.000 0.000 0.676 NA
#> GSM125124     1  0.1615     0.6023 0.928 0.000 0.000 0.004 0.004 NA
#> GSM125126     5  0.4468     0.7723 0.364 0.000 0.000 0.008 0.604 NA
#> GSM125128     5  0.6239     0.4647 0.188 0.000 0.000 0.044 0.544 NA
#> GSM125130     1  0.5160     0.6179 0.604 0.000 0.004 0.000 0.108 NA
#> GSM125132     5  0.3668     0.8246 0.328 0.000 0.000 0.000 0.668 NA
#> GSM125134     1  0.1745     0.5980 0.920 0.000 0.000 0.000 0.012 NA
#> GSM125136     5  0.5223     0.6643 0.188 0.000 0.000 0.044 0.676 NA
#> GSM125138     1  0.1728     0.6005 0.924 0.000 0.000 0.004 0.008 NA
#> GSM125140     1  0.2013     0.5748 0.908 0.000 0.000 0.008 0.076 NA
#> GSM125142     1  0.4117     0.3504 0.740 0.000 0.000 0.004 0.192 NA
#> GSM125144     1  0.1615     0.6023 0.928 0.000 0.000 0.004 0.004 NA
#> GSM125146     1  0.5194     0.5896 0.632 0.000 0.000 0.008 0.128 NA
#> GSM125148     5  0.3864     0.8088 0.344 0.000 0.000 0.004 0.648 NA
#> GSM125150     5  0.3672     0.7876 0.368 0.000 0.000 0.000 0.632 NA
#> GSM125152     1  0.1821     0.6194 0.928 0.000 0.000 0.008 0.024 NA
#> GSM125154     1  0.3959     0.3964 0.760 0.000 0.000 0.004 0.172 NA
#> GSM125156     1  0.2597     0.4555 0.824 0.000 0.000 0.000 0.176 NA
#> GSM125158     1  0.2772     0.4517 0.816 0.000 0.000 0.000 0.180 NA
#> GSM125160     2  0.4713     0.7460 0.000 0.720 0.000 0.120 0.020 NA
#> GSM125162     5  0.5064     0.7425 0.232 0.000 0.000 0.044 0.668 NA
#> GSM125164     2  0.2895     0.8161 0.000 0.868 0.000 0.052 0.016 NA
#> GSM125166     2  0.3275     0.8103 0.000 0.828 0.000 0.044 0.008 NA
#> GSM125168     4  0.6057     0.5886 0.000 0.048 0.080 0.580 0.016 NA
#> GSM125170     4  0.5838     0.5625 0.000 0.060 0.060 0.564 0.004 NA
#> GSM125172     2  0.3542     0.7974 0.000 0.800 0.000 0.016 0.028 NA
#> GSM125174     4  0.5219     0.5867 0.000 0.004 0.268 0.636 0.024 NA
#> GSM125176     2  0.5102     0.7194 0.000 0.668 0.004 0.140 0.008 NA
#> GSM125178     3  0.0717     0.8523 0.000 0.000 0.976 0.016 0.000 NA
#> GSM125180     4  0.3756     0.6112 0.000 0.004 0.316 0.676 0.000 NA
#> GSM125182     4  0.6393     0.5996 0.000 0.060 0.112 0.604 0.032 NA
#> GSM125184     4  0.4040     0.6167 0.000 0.004 0.304 0.676 0.004 NA
#> GSM125186     4  0.3861     0.6112 0.000 0.004 0.316 0.672 0.000 NA
#> GSM125188     4  0.5688     0.6184 0.000 0.008 0.144 0.640 0.032 NA
#> GSM125190     2  0.5563     0.6250 0.000 0.528 0.000 0.136 0.004 NA
#> GSM125192     2  0.1562     0.8236 0.000 0.940 0.000 0.024 0.004 NA
#> GSM125194     3  0.2328     0.8397 0.000 0.000 0.904 0.044 0.020 NA
#> GSM125196     3  0.2045     0.8415 0.000 0.000 0.920 0.024 0.028 NA
#> GSM125198     2  0.1858     0.8018 0.000 0.924 0.000 0.012 0.012 NA
#> GSM125200     1  0.3864    -0.0176 0.648 0.000 0.000 0.004 0.344 NA
#> GSM125202     2  0.2247     0.7998 0.000 0.904 0.000 0.012 0.024 NA
#> GSM125204     3  0.1353     0.8486 0.000 0.000 0.952 0.024 0.012 NA
#> GSM125206     3  0.1794     0.8452 0.000 0.000 0.932 0.016 0.028 NA
#> GSM125208     3  0.1296     0.8495 0.000 0.000 0.952 0.032 0.004 NA
#> GSM125210     4  0.3844     0.6149 0.000 0.004 0.312 0.676 0.000 NA
#> GSM125212     3  0.4930     0.7133 0.000 0.000 0.728 0.088 0.084 NA
#> GSM125214     2  0.0984     0.8194 0.000 0.968 0.000 0.008 0.012 NA
#> GSM125216     2  0.1225     0.8214 0.000 0.952 0.000 0.000 0.012 NA
#> GSM125218     2  0.5688     0.6410 0.000 0.548 0.000 0.140 0.012 NA
#> GSM125220     5  0.5873     0.5796 0.188 0.000 0.000 0.048 0.608 NA
#> GSM125222     4  0.4479     0.6587 0.000 0.004 0.180 0.728 0.008 NA
#> GSM125224     2  0.1082     0.8206 0.000 0.956 0.000 0.000 0.004 NA
#> GSM125226     2  0.5771     0.6126 0.000 0.520 0.000 0.140 0.012 NA
#> GSM125228     2  0.0865     0.8208 0.000 0.964 0.000 0.000 0.000 NA
#> GSM125230     3  0.3508     0.7985 0.000 0.000 0.832 0.036 0.080 NA
#> GSM125232     3  0.7200     0.2405 0.200 0.000 0.464 0.244 0.020 NA
#> GSM125234     1  0.5798     0.6001 0.576 0.000 0.012 0.020 0.100 NA
#> GSM125236     1  0.5241     0.6155 0.600 0.000 0.000 0.008 0.104 NA
#> GSM125238     5  0.3531     0.8225 0.328 0.000 0.000 0.000 0.672 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-MAD-kmeans-consensus-heatmap-1

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk MAD-kmeans-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk MAD-kmeans-collect-classes

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

test_to_known_factors(res)
#>              n agent(p) individual(p) k
#> MAD:kmeans 116    1.000      1.12e-05 2
#> MAD:kmeans 115    0.826      2.49e-08 3
#> MAD:kmeans 100    0.370      7.98e-08 4
#> MAD:kmeans  97    0.924      7.87e-08 5
#> MAD:kmeans 104    0.912      2.93e-10 6

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


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 21168 rows and 116 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.992       0.997         0.5011 0.499   0.499
#> 3 3 0.922           0.967       0.982         0.2836 0.829   0.667
#> 4 4 0.954           0.931       0.950         0.0796 0.941   0.837
#> 5 5 0.799           0.769       0.824         0.0881 0.917   0.737
#> 6 6 0.732           0.659       0.808         0.0508 0.941   0.766

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
#> GSM125123     1  0.0000      0.997 1.000 0.000
#> GSM125125     1  0.0000      0.997 1.000 0.000
#> GSM125127     1  0.0000      0.997 1.000 0.000
#> GSM125129     1  0.0000      0.997 1.000 0.000
#> GSM125131     1  0.0000      0.997 1.000 0.000
#> GSM125133     1  0.0000      0.997 1.000 0.000
#> GSM125135     1  0.0000      0.997 1.000 0.000
#> GSM125137     1  0.0000      0.997 1.000 0.000
#> GSM125139     1  0.0000      0.997 1.000 0.000
#> GSM125141     1  0.0000      0.997 1.000 0.000
#> GSM125143     1  0.0000      0.997 1.000 0.000
#> GSM125145     1  0.0000      0.997 1.000 0.000
#> GSM125147     1  0.0000      0.997 1.000 0.000
#> GSM125149     1  0.0000      0.997 1.000 0.000
#> GSM125151     1  0.0000      0.997 1.000 0.000
#> GSM125153     1  0.0000      0.997 1.000 0.000
#> GSM125155     1  0.0000      0.997 1.000 0.000
#> GSM125157     1  0.0000      0.997 1.000 0.000
#> GSM125159     2  0.0000      0.996 0.000 1.000
#> GSM125161     1  0.0000      0.997 1.000 0.000
#> GSM125163     2  0.0000      0.996 0.000 1.000
#> GSM125165     2  0.0000      0.996 0.000 1.000
#> GSM125167     2  0.0000      0.996 0.000 1.000
#> GSM125169     2  0.0000      0.996 0.000 1.000
#> GSM125171     2  0.0000      0.996 0.000 1.000
#> GSM125173     2  0.0000      0.996 0.000 1.000
#> GSM125175     2  0.0000      0.996 0.000 1.000
#> GSM125177     2  0.0000      0.996 0.000 1.000
#> GSM125179     2  0.0672      0.989 0.008 0.992
#> GSM125181     2  0.0000      0.996 0.000 1.000
#> GSM125183     2  0.0000      0.996 0.000 1.000
#> GSM125185     2  0.0000      0.996 0.000 1.000
#> GSM125187     2  0.7299      0.744 0.204 0.796
#> GSM125189     2  0.0000      0.996 0.000 1.000
#> GSM125191     2  0.0000      0.996 0.000 1.000
#> GSM125193     1  0.5178      0.870 0.884 0.116
#> GSM125195     2  0.0000      0.996 0.000 1.000
#> GSM125197     2  0.0000      0.996 0.000 1.000
#> GSM125199     1  0.0000      0.997 1.000 0.000
#> GSM125201     2  0.0000      0.996 0.000 1.000
#> GSM125203     2  0.0000      0.996 0.000 1.000
#> GSM125205     2  0.0000      0.996 0.000 1.000
#> GSM125207     2  0.0000      0.996 0.000 1.000
#> GSM125209     2  0.0000      0.996 0.000 1.000
#> GSM125211     2  0.0000      0.996 0.000 1.000
#> GSM125213     2  0.0000      0.996 0.000 1.000
#> GSM125215     2  0.0000      0.996 0.000 1.000
#> GSM125217     2  0.0000      0.996 0.000 1.000
#> GSM125219     1  0.0000      0.997 1.000 0.000
#> GSM125221     2  0.0000      0.996 0.000 1.000
#> GSM125223     2  0.0000      0.996 0.000 1.000
#> GSM125225     2  0.0000      0.996 0.000 1.000
#> GSM125227     2  0.0000      0.996 0.000 1.000
#> GSM125229     2  0.0000      0.996 0.000 1.000
#> GSM125231     1  0.0000      0.997 1.000 0.000
#> GSM125233     1  0.0000      0.997 1.000 0.000
#> GSM125235     1  0.0000      0.997 1.000 0.000
#> GSM125237     1  0.0000      0.997 1.000 0.000
#> GSM125124     1  0.0000      0.997 1.000 0.000
#> GSM125126     1  0.0000      0.997 1.000 0.000
#> GSM125128     1  0.0000      0.997 1.000 0.000
#> GSM125130     1  0.0000      0.997 1.000 0.000
#> GSM125132     1  0.0000      0.997 1.000 0.000
#> GSM125134     1  0.0000      0.997 1.000 0.000
#> GSM125136     1  0.0000      0.997 1.000 0.000
#> GSM125138     1  0.0000      0.997 1.000 0.000
#> GSM125140     1  0.0000      0.997 1.000 0.000
#> GSM125142     1  0.0000      0.997 1.000 0.000
#> GSM125144     1  0.0000      0.997 1.000 0.000
#> GSM125146     1  0.0000      0.997 1.000 0.000
#> GSM125148     1  0.0000      0.997 1.000 0.000
#> GSM125150     1  0.0000      0.997 1.000 0.000
#> GSM125152     1  0.0000      0.997 1.000 0.000
#> GSM125154     1  0.0000      0.997 1.000 0.000
#> GSM125156     1  0.0000      0.997 1.000 0.000
#> GSM125158     1  0.0000      0.997 1.000 0.000
#> GSM125160     2  0.0000      0.996 0.000 1.000
#> GSM125162     1  0.0000      0.997 1.000 0.000
#> GSM125164     2  0.0000      0.996 0.000 1.000
#> GSM125166     2  0.0000      0.996 0.000 1.000
#> GSM125168     2  0.0000      0.996 0.000 1.000
#> GSM125170     2  0.0000      0.996 0.000 1.000
#> GSM125172     2  0.0000      0.996 0.000 1.000
#> GSM125174     2  0.0000      0.996 0.000 1.000
#> GSM125176     2  0.0000      0.996 0.000 1.000
#> GSM125178     2  0.0000      0.996 0.000 1.000
#> GSM125180     2  0.0672      0.989 0.008 0.992
#> GSM125182     2  0.0000      0.996 0.000 1.000
#> GSM125184     2  0.0000      0.996 0.000 1.000
#> GSM125186     2  0.0376      0.993 0.004 0.996
#> GSM125188     2  0.0000      0.996 0.000 1.000
#> GSM125190     2  0.0000      0.996 0.000 1.000
#> GSM125192     2  0.0000      0.996 0.000 1.000
#> GSM125194     1  0.0000      0.997 1.000 0.000
#> GSM125196     2  0.0000      0.996 0.000 1.000
#> GSM125198     2  0.0000      0.996 0.000 1.000
#> GSM125200     1  0.0000      0.997 1.000 0.000
#> GSM125202     2  0.0000      0.996 0.000 1.000
#> GSM125204     2  0.0000      0.996 0.000 1.000
#> GSM125206     2  0.0000      0.996 0.000 1.000
#> GSM125208     2  0.0000      0.996 0.000 1.000
#> GSM125210     2  0.0000      0.996 0.000 1.000
#> GSM125212     2  0.0000      0.996 0.000 1.000
#> GSM125214     2  0.0000      0.996 0.000 1.000
#> GSM125216     2  0.0000      0.996 0.000 1.000
#> GSM125218     2  0.0000      0.996 0.000 1.000
#> GSM125220     1  0.0000      0.997 1.000 0.000
#> GSM125222     2  0.0000      0.996 0.000 1.000
#> GSM125224     2  0.0000      0.996 0.000 1.000
#> GSM125226     2  0.0000      0.996 0.000 1.000
#> GSM125228     2  0.0000      0.996 0.000 1.000
#> GSM125230     1  0.3431      0.932 0.936 0.064
#> GSM125232     1  0.0000      0.997 1.000 0.000
#> GSM125234     1  0.0000      0.997 1.000 0.000
#> GSM125236     1  0.0000      0.997 1.000 0.000
#> GSM125238     1  0.0000      0.997 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
#> GSM125123     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125125     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125127     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125129     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125131     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125133     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125135     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125137     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125139     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125141     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125143     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125145     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125147     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125149     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125151     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125153     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125155     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125157     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125159     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125161     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125163     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125165     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125167     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125169     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125171     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125173     2  0.0237      0.975 0.000 0.996 0.004
#> GSM125175     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125177     3  0.0237      0.942 0.000 0.004 0.996
#> GSM125179     3  0.3038      0.918 0.000 0.104 0.896
#> GSM125181     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125183     3  0.3267      0.909 0.000 0.116 0.884
#> GSM125185     3  0.3038      0.918 0.000 0.104 0.896
#> GSM125187     3  0.3193      0.920 0.004 0.100 0.896
#> GSM125189     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125191     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125193     3  0.3528      0.878 0.092 0.016 0.892
#> GSM125195     3  0.0000      0.943 0.000 0.000 1.000
#> GSM125197     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125199     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125201     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125203     3  0.0000      0.943 0.000 0.000 1.000
#> GSM125205     2  0.1529      0.942 0.000 0.960 0.040
#> GSM125207     3  0.0000      0.943 0.000 0.000 1.000
#> GSM125209     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125211     2  0.5968      0.465 0.000 0.636 0.364
#> GSM125213     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125215     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125217     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125219     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125221     2  0.0747      0.965 0.000 0.984 0.016
#> GSM125223     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125225     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125227     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125229     2  0.3116      0.871 0.000 0.892 0.108
#> GSM125231     3  0.0892      0.935 0.020 0.000 0.980
#> GSM125233     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125235     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125237     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125124     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125126     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125128     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125130     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125132     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125134     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125136     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125138     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125140     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125142     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125144     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125146     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125148     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125150     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125152     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125154     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125156     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125158     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125160     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125162     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125164     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125166     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125168     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125170     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125172     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125174     3  0.3038      0.918 0.000 0.104 0.896
#> GSM125176     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125178     3  0.0000      0.943 0.000 0.000 1.000
#> GSM125180     3  0.3038      0.918 0.000 0.104 0.896
#> GSM125182     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125184     3  0.3267      0.909 0.000 0.116 0.884
#> GSM125186     3  0.3038      0.918 0.000 0.104 0.896
#> GSM125188     2  0.0592      0.968 0.000 0.988 0.012
#> GSM125190     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125192     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125194     3  0.2796      0.882 0.092 0.000 0.908
#> GSM125196     3  0.0000      0.943 0.000 0.000 1.000
#> GSM125198     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125200     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125202     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125204     3  0.0000      0.943 0.000 0.000 1.000
#> GSM125206     3  0.0000      0.943 0.000 0.000 1.000
#> GSM125208     3  0.0000      0.943 0.000 0.000 1.000
#> GSM125210     3  0.3116      0.915 0.000 0.108 0.892
#> GSM125212     2  0.5254      0.669 0.000 0.736 0.264
#> GSM125214     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125216     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125218     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125220     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125222     2  0.3686      0.826 0.000 0.860 0.140
#> GSM125224     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125226     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125228     2  0.0000      0.978 0.000 1.000 0.000
#> GSM125230     3  0.0000      0.943 0.000 0.000 1.000
#> GSM125232     3  0.0237      0.942 0.004 0.000 0.996
#> GSM125234     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125236     1  0.0000      1.000 1.000 0.000 0.000
#> GSM125238     1  0.0000      1.000 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
#> GSM125123     1  0.0657      0.965 0.984 0.000 0.012 0.004
#> GSM125125     1  0.1209      0.969 0.964 0.000 0.032 0.004
#> GSM125127     1  0.0657      0.965 0.984 0.000 0.012 0.004
#> GSM125129     1  0.0657      0.965 0.984 0.000 0.012 0.004
#> GSM125131     1  0.2048      0.961 0.928 0.000 0.064 0.008
#> GSM125133     1  0.2198      0.960 0.920 0.000 0.072 0.008
#> GSM125135     1  0.0188      0.968 0.996 0.000 0.004 0.000
#> GSM125137     1  0.2048      0.961 0.928 0.000 0.064 0.008
#> GSM125139     1  0.0376      0.967 0.992 0.000 0.004 0.004
#> GSM125141     1  0.2048      0.961 0.928 0.000 0.064 0.008
#> GSM125143     1  0.0469      0.967 0.988 0.000 0.012 0.000
#> GSM125145     1  0.0336      0.967 0.992 0.000 0.008 0.000
#> GSM125147     1  0.1970      0.962 0.932 0.000 0.060 0.008
#> GSM125149     1  0.2048      0.961 0.928 0.000 0.064 0.008
#> GSM125151     1  0.0376      0.967 0.992 0.000 0.004 0.004
#> GSM125153     1  0.0779      0.970 0.980 0.000 0.016 0.004
#> GSM125155     1  0.1151      0.969 0.968 0.000 0.024 0.008
#> GSM125157     1  0.2048      0.961 0.928 0.000 0.064 0.008
#> GSM125159     2  0.0188      0.957 0.000 0.996 0.000 0.004
#> GSM125161     1  0.2048      0.961 0.928 0.000 0.064 0.008
#> GSM125163     2  0.0000      0.959 0.000 1.000 0.000 0.000
#> GSM125165     2  0.4331      0.644 0.000 0.712 0.000 0.288
#> GSM125167     2  0.0188      0.957 0.000 0.996 0.000 0.004
#> GSM125169     2  0.0188      0.957 0.000 0.996 0.000 0.004
#> GSM125171     2  0.0000      0.959 0.000 1.000 0.000 0.000
#> GSM125173     2  0.3718      0.802 0.000 0.820 0.012 0.168
#> GSM125175     2  0.0000      0.959 0.000 1.000 0.000 0.000
#> GSM125177     3  0.2334      0.933 0.000 0.004 0.908 0.088
#> GSM125179     4  0.1305      0.922 0.000 0.004 0.036 0.960
#> GSM125181     2  0.4482      0.674 0.000 0.728 0.008 0.264
#> GSM125183     4  0.0937      0.911 0.000 0.012 0.012 0.976
#> GSM125185     4  0.1305      0.922 0.000 0.004 0.036 0.960
#> GSM125187     4  0.1118      0.920 0.000 0.000 0.036 0.964
#> GSM125189     2  0.0000      0.959 0.000 1.000 0.000 0.000
#> GSM125191     2  0.0921      0.942 0.000 0.972 0.000 0.028
#> GSM125193     3  0.1584      0.864 0.012 0.000 0.952 0.036
#> GSM125195     3  0.2281      0.932 0.000 0.000 0.904 0.096
#> GSM125197     2  0.0000      0.959 0.000 1.000 0.000 0.000
#> GSM125199     1  0.2048      0.961 0.928 0.000 0.064 0.008
#> GSM125201     2  0.0000      0.959 0.000 1.000 0.000 0.000
#> GSM125203     3  0.2216      0.933 0.000 0.000 0.908 0.092
#> GSM125205     2  0.0592      0.948 0.000 0.984 0.016 0.000
#> GSM125207     3  0.2281      0.931 0.000 0.000 0.904 0.096
#> GSM125209     2  0.3528      0.782 0.000 0.808 0.000 0.192
#> GSM125211     3  0.3239      0.862 0.000 0.068 0.880 0.052
#> GSM125213     2  0.0000      0.959 0.000 1.000 0.000 0.000
#> GSM125215     2  0.0000      0.959 0.000 1.000 0.000 0.000
#> GSM125217     2  0.0376      0.956 0.000 0.992 0.004 0.004
#> GSM125219     1  0.1004      0.968 0.972 0.000 0.024 0.004
#> GSM125221     4  0.3495      0.772 0.000 0.140 0.016 0.844
#> GSM125223     2  0.0000      0.959 0.000 1.000 0.000 0.000
#> GSM125225     2  0.0000      0.959 0.000 1.000 0.000 0.000
#> GSM125227     2  0.0000      0.959 0.000 1.000 0.000 0.000
#> GSM125229     3  0.3450      0.756 0.000 0.156 0.836 0.008
#> GSM125231     3  0.2871      0.909 0.032 0.000 0.896 0.072
#> GSM125233     1  0.0657      0.965 0.984 0.000 0.012 0.004
#> GSM125235     1  0.2124      0.962 0.924 0.000 0.068 0.008
#> GSM125237     1  0.1970      0.962 0.932 0.000 0.060 0.008
#> GSM125124     1  0.0376      0.967 0.992 0.000 0.004 0.004
#> GSM125126     1  0.1722      0.967 0.944 0.000 0.048 0.008
#> GSM125128     1  0.2198      0.960 0.920 0.000 0.072 0.008
#> GSM125130     1  0.0657      0.965 0.984 0.000 0.012 0.004
#> GSM125132     1  0.1807      0.965 0.940 0.000 0.052 0.008
#> GSM125134     1  0.0188      0.968 0.996 0.000 0.004 0.000
#> GSM125136     1  0.2124      0.961 0.924 0.000 0.068 0.008
#> GSM125138     1  0.0376      0.967 0.992 0.000 0.004 0.004
#> GSM125140     1  0.0188      0.968 0.996 0.000 0.004 0.000
#> GSM125142     1  0.1109      0.969 0.968 0.000 0.028 0.004
#> GSM125144     1  0.0376      0.967 0.992 0.000 0.004 0.004
#> GSM125146     1  0.0336      0.967 0.992 0.000 0.008 0.000
#> GSM125148     1  0.1890      0.964 0.936 0.000 0.056 0.008
#> GSM125150     1  0.1545      0.967 0.952 0.000 0.040 0.008
#> GSM125152     1  0.0376      0.967 0.992 0.000 0.004 0.004
#> GSM125154     1  0.0376      0.969 0.992 0.000 0.004 0.004
#> GSM125156     1  0.0000      0.968 1.000 0.000 0.000 0.000
#> GSM125158     1  0.0188      0.969 0.996 0.000 0.004 0.000
#> GSM125160     2  0.0188      0.957 0.000 0.996 0.000 0.004
#> GSM125162     1  0.2048      0.961 0.928 0.000 0.064 0.008
#> GSM125164     2  0.0000      0.959 0.000 1.000 0.000 0.000
#> GSM125166     2  0.0000      0.959 0.000 1.000 0.000 0.000
#> GSM125168     2  0.1637      0.920 0.000 0.940 0.000 0.060
#> GSM125170     2  0.2216      0.894 0.000 0.908 0.000 0.092
#> GSM125172     2  0.0000      0.959 0.000 1.000 0.000 0.000
#> GSM125174     4  0.1356      0.917 0.000 0.008 0.032 0.960
#> GSM125176     2  0.0000      0.959 0.000 1.000 0.000 0.000
#> GSM125178     3  0.2081      0.932 0.000 0.000 0.916 0.084
#> GSM125180     4  0.1305      0.922 0.000 0.004 0.036 0.960
#> GSM125182     2  0.1940      0.907 0.000 0.924 0.000 0.076
#> GSM125184     4  0.1174      0.915 0.000 0.012 0.020 0.968
#> GSM125186     4  0.1305      0.922 0.000 0.004 0.036 0.960
#> GSM125188     2  0.5233      0.528 0.000 0.648 0.020 0.332
#> GSM125190     2  0.0000      0.959 0.000 1.000 0.000 0.000
#> GSM125192     2  0.0000      0.959 0.000 1.000 0.000 0.000
#> GSM125194     3  0.1854      0.878 0.012 0.000 0.940 0.048
#> GSM125196     3  0.2281      0.932 0.000 0.000 0.904 0.096
#> GSM125198     2  0.0000      0.959 0.000 1.000 0.000 0.000
#> GSM125200     1  0.0524      0.970 0.988 0.000 0.008 0.004
#> GSM125202     2  0.0000      0.959 0.000 1.000 0.000 0.000
#> GSM125204     3  0.2216      0.933 0.000 0.000 0.908 0.092
#> GSM125206     3  0.2281      0.932 0.000 0.000 0.904 0.096
#> GSM125208     3  0.2216      0.932 0.000 0.000 0.908 0.092
#> GSM125210     4  0.1545      0.922 0.000 0.008 0.040 0.952
#> GSM125212     3  0.3399      0.833 0.000 0.092 0.868 0.040
#> GSM125214     2  0.0000      0.959 0.000 1.000 0.000 0.000
#> GSM125216     2  0.0000      0.959 0.000 1.000 0.000 0.000
#> GSM125218     2  0.0376      0.956 0.000 0.992 0.004 0.004
#> GSM125220     1  0.2124      0.961 0.924 0.000 0.068 0.008
#> GSM125222     4  0.3166      0.805 0.000 0.116 0.016 0.868
#> GSM125224     2  0.0000      0.959 0.000 1.000 0.000 0.000
#> GSM125226     2  0.0000      0.959 0.000 1.000 0.000 0.000
#> GSM125228     2  0.0000      0.959 0.000 1.000 0.000 0.000
#> GSM125230     3  0.2281      0.923 0.000 0.000 0.904 0.096
#> GSM125232     4  0.4678      0.661 0.024 0.000 0.232 0.744
#> GSM125234     1  0.1297      0.954 0.964 0.000 0.016 0.020
#> GSM125236     1  0.0657      0.965 0.984 0.000 0.012 0.004
#> GSM125238     1  0.1970      0.962 0.932 0.000 0.060 0.008

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM125123     5  0.2127     0.7085 0.108 0.000 0.000 0.000 0.892
#> GSM125125     5  0.4182    -0.2932 0.400 0.000 0.000 0.000 0.600
#> GSM125127     5  0.1732     0.6932 0.080 0.000 0.000 0.000 0.920
#> GSM125129     5  0.2179     0.7070 0.112 0.000 0.000 0.000 0.888
#> GSM125131     1  0.4201     0.9003 0.592 0.000 0.000 0.000 0.408
#> GSM125133     1  0.3983     0.8664 0.660 0.000 0.000 0.000 0.340
#> GSM125135     5  0.1908     0.7184 0.092 0.000 0.000 0.000 0.908
#> GSM125137     1  0.4171     0.9038 0.604 0.000 0.000 0.000 0.396
#> GSM125139     5  0.1965     0.7028 0.096 0.000 0.000 0.000 0.904
#> GSM125141     1  0.4192     0.9022 0.596 0.000 0.000 0.000 0.404
#> GSM125143     5  0.2732     0.6935 0.160 0.000 0.000 0.000 0.840
#> GSM125145     5  0.1908     0.7060 0.092 0.000 0.000 0.000 0.908
#> GSM125147     1  0.4201     0.8988 0.592 0.000 0.000 0.000 0.408
#> GSM125149     1  0.4138     0.9108 0.616 0.000 0.000 0.000 0.384
#> GSM125151     5  0.1341     0.7197 0.056 0.000 0.000 0.000 0.944
#> GSM125153     5  0.4047     0.2013 0.320 0.000 0.004 0.000 0.676
#> GSM125155     5  0.4227    -0.3800 0.420 0.000 0.000 0.000 0.580
#> GSM125157     1  0.4171     0.9121 0.604 0.000 0.000 0.000 0.396
#> GSM125159     2  0.0794     0.9155 0.028 0.972 0.000 0.000 0.000
#> GSM125161     1  0.4060     0.8950 0.640 0.000 0.000 0.000 0.360
#> GSM125163     2  0.0404     0.9178 0.012 0.988 0.000 0.000 0.000
#> GSM125165     2  0.6071     0.4669 0.140 0.568 0.004 0.288 0.000
#> GSM125167     2  0.1608     0.8988 0.072 0.928 0.000 0.000 0.000
#> GSM125169     2  0.1608     0.8985 0.072 0.928 0.000 0.000 0.000
#> GSM125171     2  0.0290     0.9175 0.008 0.992 0.000 0.000 0.000
#> GSM125173     2  0.5604     0.6537 0.116 0.680 0.020 0.184 0.000
#> GSM125175     2  0.0162     0.9179 0.004 0.996 0.000 0.000 0.000
#> GSM125177     3  0.0162     0.9114 0.000 0.000 0.996 0.004 0.000
#> GSM125179     4  0.0162     0.9234 0.000 0.000 0.000 0.996 0.004
#> GSM125181     2  0.6191     0.3770 0.164 0.528 0.000 0.308 0.000
#> GSM125183     4  0.1557     0.9140 0.052 0.000 0.008 0.940 0.000
#> GSM125185     4  0.0671     0.9233 0.016 0.000 0.000 0.980 0.004
#> GSM125187     4  0.1205     0.9186 0.040 0.000 0.000 0.956 0.004
#> GSM125189     2  0.0794     0.9144 0.028 0.972 0.000 0.000 0.000
#> GSM125191     2  0.2067     0.8868 0.032 0.920 0.000 0.048 0.000
#> GSM125193     3  0.3210     0.8461 0.212 0.000 0.788 0.000 0.000
#> GSM125195     3  0.2110     0.9058 0.072 0.000 0.912 0.016 0.000
#> GSM125197     2  0.0162     0.9177 0.004 0.996 0.000 0.000 0.000
#> GSM125199     1  0.4182     0.9113 0.600 0.000 0.000 0.000 0.400
#> GSM125201     2  0.0290     0.9175 0.008 0.992 0.000 0.000 0.000
#> GSM125203     3  0.1845     0.9086 0.056 0.000 0.928 0.016 0.000
#> GSM125205     2  0.1493     0.8952 0.028 0.948 0.024 0.000 0.000
#> GSM125207     3  0.1117     0.9112 0.016 0.000 0.964 0.020 0.000
#> GSM125209     2  0.4769     0.6340 0.056 0.688 0.000 0.256 0.000
#> GSM125211     3  0.2932     0.8775 0.112 0.020 0.864 0.004 0.000
#> GSM125213     2  0.0609     0.9165 0.020 0.980 0.000 0.000 0.000
#> GSM125215     2  0.0162     0.9179 0.004 0.996 0.000 0.000 0.000
#> GSM125217     2  0.1478     0.9056 0.064 0.936 0.000 0.000 0.000
#> GSM125219     5  0.3274     0.6138 0.220 0.000 0.000 0.000 0.780
#> GSM125221     4  0.3161     0.8576 0.092 0.044 0.004 0.860 0.000
#> GSM125223     2  0.0162     0.9179 0.004 0.996 0.000 0.000 0.000
#> GSM125225     2  0.0290     0.9180 0.008 0.992 0.000 0.000 0.000
#> GSM125227     2  0.0290     0.9179 0.008 0.992 0.000 0.000 0.000
#> GSM125229     3  0.3176     0.8538 0.080 0.064 0.856 0.000 0.000
#> GSM125231     3  0.5330     0.6379 0.068 0.000 0.684 0.020 0.228
#> GSM125233     5  0.2074     0.7072 0.104 0.000 0.000 0.000 0.896
#> GSM125235     1  0.4201     0.8968 0.592 0.000 0.000 0.000 0.408
#> GSM125237     1  0.4192     0.9109 0.596 0.000 0.000 0.000 0.404
#> GSM125124     5  0.1357     0.7075 0.048 0.000 0.004 0.000 0.948
#> GSM125126     5  0.4307    -0.6857 0.496 0.000 0.000 0.000 0.504
#> GSM125128     1  0.4088     0.7811 0.632 0.000 0.000 0.000 0.368
#> GSM125130     5  0.1671     0.6946 0.076 0.000 0.000 0.000 0.924
#> GSM125132     1  0.4268     0.8447 0.556 0.000 0.000 0.000 0.444
#> GSM125134     5  0.2719     0.6580 0.144 0.000 0.004 0.000 0.852
#> GSM125136     1  0.3966     0.8604 0.664 0.000 0.000 0.000 0.336
#> GSM125138     5  0.1768     0.7056 0.072 0.000 0.004 0.000 0.924
#> GSM125140     5  0.2471     0.6767 0.136 0.000 0.000 0.000 0.864
#> GSM125142     5  0.4126    -0.0785 0.380 0.000 0.000 0.000 0.620
#> GSM125144     5  0.1430     0.7078 0.052 0.000 0.004 0.000 0.944
#> GSM125146     5  0.2970     0.6311 0.168 0.000 0.004 0.000 0.828
#> GSM125148     1  0.4242     0.8661 0.572 0.000 0.000 0.000 0.428
#> GSM125150     1  0.4300     0.7489 0.524 0.000 0.000 0.000 0.476
#> GSM125152     5  0.1121     0.7221 0.044 0.000 0.000 0.000 0.956
#> GSM125154     5  0.3814     0.3790 0.276 0.000 0.004 0.000 0.720
#> GSM125156     5  0.3242     0.5569 0.216 0.000 0.000 0.000 0.784
#> GSM125158     5  0.3395     0.5019 0.236 0.000 0.000 0.000 0.764
#> GSM125160     2  0.0703     0.9162 0.024 0.976 0.000 0.000 0.000
#> GSM125162     1  0.4060     0.8950 0.640 0.000 0.000 0.000 0.360
#> GSM125164     2  0.0290     0.9181 0.008 0.992 0.000 0.000 0.000
#> GSM125166     2  0.0162     0.9179 0.004 0.996 0.000 0.000 0.000
#> GSM125168     2  0.4179     0.7739 0.072 0.776 0.000 0.152 0.000
#> GSM125170     2  0.4847     0.6850 0.080 0.704 0.000 0.216 0.000
#> GSM125172     2  0.0290     0.9175 0.008 0.992 0.000 0.000 0.000
#> GSM125174     4  0.1444     0.9134 0.040 0.000 0.012 0.948 0.000
#> GSM125176     2  0.0451     0.9175 0.004 0.988 0.000 0.008 0.000
#> GSM125178     3  0.0451     0.9110 0.008 0.000 0.988 0.004 0.000
#> GSM125180     4  0.0162     0.9234 0.000 0.000 0.000 0.996 0.004
#> GSM125182     2  0.4334     0.7654 0.092 0.768 0.000 0.140 0.000
#> GSM125184     4  0.0833     0.9215 0.016 0.004 0.004 0.976 0.000
#> GSM125186     4  0.0671     0.9233 0.016 0.000 0.000 0.980 0.004
#> GSM125188     2  0.7054     0.2063 0.140 0.468 0.044 0.348 0.000
#> GSM125190     2  0.1197     0.9079 0.048 0.952 0.000 0.000 0.000
#> GSM125192     2  0.0000     0.9180 0.000 1.000 0.000 0.000 0.000
#> GSM125194     3  0.3874     0.8379 0.200 0.000 0.776 0.008 0.016
#> GSM125196     3  0.2110     0.9058 0.072 0.000 0.912 0.016 0.000
#> GSM125198     2  0.0162     0.9177 0.004 0.996 0.000 0.000 0.000
#> GSM125200     5  0.3876     0.2443 0.316 0.000 0.000 0.000 0.684
#> GSM125202     2  0.0290     0.9175 0.008 0.992 0.000 0.000 0.000
#> GSM125204     3  0.1845     0.9086 0.056 0.000 0.928 0.016 0.000
#> GSM125206     3  0.1942     0.9076 0.068 0.000 0.920 0.012 0.000
#> GSM125208     3  0.1117     0.9112 0.016 0.000 0.964 0.020 0.000
#> GSM125210     4  0.0510     0.9237 0.016 0.000 0.000 0.984 0.000
#> GSM125212     3  0.2932     0.8775 0.112 0.020 0.864 0.004 0.000
#> GSM125214     2  0.0162     0.9177 0.004 0.996 0.000 0.000 0.000
#> GSM125216     2  0.0162     0.9179 0.004 0.996 0.000 0.000 0.000
#> GSM125218     2  0.1341     0.9058 0.056 0.944 0.000 0.000 0.000
#> GSM125220     1  0.3983     0.8561 0.660 0.000 0.000 0.000 0.340
#> GSM125222     4  0.2835     0.8739 0.080 0.036 0.004 0.880 0.000
#> GSM125224     2  0.0162     0.9179 0.004 0.996 0.000 0.000 0.000
#> GSM125226     2  0.1270     0.9068 0.052 0.948 0.000 0.000 0.000
#> GSM125228     2  0.0162     0.9179 0.004 0.996 0.000 0.000 0.000
#> GSM125230     3  0.1638     0.9017 0.064 0.000 0.932 0.004 0.000
#> GSM125232     4  0.6853     0.4321 0.044 0.000 0.148 0.544 0.264
#> GSM125234     5  0.2046     0.6732 0.068 0.000 0.000 0.016 0.916
#> GSM125236     5  0.1908     0.7031 0.092 0.000 0.000 0.000 0.908
#> GSM125238     1  0.4182     0.9059 0.600 0.000 0.000 0.000 0.400

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM125123     1  0.4044     0.7061 0.704 0.000 0.000 0.000 0.256 0.040
#> GSM125125     5  0.3934     0.3686 0.304 0.000 0.000 0.000 0.676 0.020
#> GSM125127     1  0.2948     0.7130 0.848 0.000 0.000 0.000 0.092 0.060
#> GSM125129     1  0.3612     0.7355 0.764 0.000 0.000 0.000 0.200 0.036
#> GSM125131     5  0.1700     0.7691 0.048 0.000 0.000 0.000 0.928 0.024
#> GSM125133     5  0.2328     0.7299 0.056 0.000 0.000 0.000 0.892 0.052
#> GSM125135     1  0.3802     0.7536 0.748 0.000 0.000 0.000 0.208 0.044
#> GSM125137     5  0.0520     0.7723 0.008 0.000 0.000 0.000 0.984 0.008
#> GSM125139     1  0.4155     0.6586 0.616 0.000 0.000 0.000 0.364 0.020
#> GSM125141     5  0.0692     0.7716 0.020 0.000 0.000 0.000 0.976 0.004
#> GSM125143     1  0.3727     0.7473 0.748 0.000 0.000 0.000 0.216 0.036
#> GSM125145     1  0.4428     0.7018 0.684 0.000 0.000 0.000 0.244 0.072
#> GSM125147     5  0.0891     0.7711 0.024 0.000 0.000 0.000 0.968 0.008
#> GSM125149     5  0.0717     0.7719 0.008 0.000 0.000 0.000 0.976 0.016
#> GSM125151     1  0.3802     0.7173 0.676 0.000 0.000 0.000 0.312 0.012
#> GSM125153     5  0.4974     0.1573 0.324 0.000 0.000 0.000 0.588 0.088
#> GSM125155     5  0.3398     0.5122 0.252 0.000 0.000 0.000 0.740 0.008
#> GSM125157     5  0.0603     0.7704 0.004 0.000 0.000 0.000 0.980 0.016
#> GSM125159     2  0.2300     0.7405 0.000 0.856 0.000 0.000 0.000 0.144
#> GSM125161     5  0.1780     0.7464 0.028 0.000 0.000 0.000 0.924 0.048
#> GSM125163     2  0.0790     0.8034 0.000 0.968 0.000 0.000 0.000 0.032
#> GSM125165     2  0.5996    -0.6899 0.004 0.408 0.000 0.196 0.000 0.392
#> GSM125167     2  0.3337     0.5854 0.004 0.736 0.000 0.000 0.000 0.260
#> GSM125169     2  0.3547     0.5249 0.004 0.696 0.000 0.000 0.000 0.300
#> GSM125171     2  0.0865     0.7981 0.000 0.964 0.000 0.000 0.000 0.036
#> GSM125173     2  0.6322    -0.4545 0.016 0.460 0.016 0.140 0.000 0.368
#> GSM125175     2  0.1007     0.7986 0.000 0.956 0.000 0.000 0.000 0.044
#> GSM125177     3  0.0820     0.8216 0.012 0.000 0.972 0.000 0.000 0.016
#> GSM125179     4  0.0000     0.8457 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM125181     6  0.6182     0.8258 0.004 0.316 0.008 0.208 0.000 0.464
#> GSM125183     4  0.2100     0.8051 0.004 0.000 0.000 0.884 0.000 0.112
#> GSM125185     4  0.0603     0.8457 0.000 0.000 0.004 0.980 0.000 0.016
#> GSM125187     4  0.1010     0.8421 0.000 0.000 0.004 0.960 0.000 0.036
#> GSM125189     2  0.2135     0.7574 0.000 0.872 0.000 0.000 0.000 0.128
#> GSM125191     2  0.2912     0.7064 0.000 0.844 0.000 0.040 0.000 0.116
#> GSM125193     3  0.5459     0.6315 0.036 0.000 0.528 0.000 0.052 0.384
#> GSM125195     3  0.2214     0.8077 0.016 0.000 0.888 0.000 0.000 0.096
#> GSM125197     2  0.0146     0.8032 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM125199     5  0.0603     0.7735 0.016 0.000 0.000 0.000 0.980 0.004
#> GSM125201     2  0.0865     0.7945 0.000 0.964 0.000 0.000 0.000 0.036
#> GSM125203     3  0.1462     0.8182 0.008 0.000 0.936 0.000 0.000 0.056
#> GSM125205     2  0.2144     0.7404 0.004 0.908 0.040 0.000 0.000 0.048
#> GSM125207     3  0.2151     0.8190 0.008 0.000 0.904 0.016 0.000 0.072
#> GSM125209     2  0.5095     0.1193 0.000 0.632 0.000 0.180 0.000 0.188
#> GSM125211     3  0.4827     0.6796 0.048 0.012 0.612 0.000 0.000 0.328
#> GSM125213     2  0.1444     0.7858 0.000 0.928 0.000 0.000 0.000 0.072
#> GSM125215     2  0.0363     0.8056 0.000 0.988 0.000 0.000 0.000 0.012
#> GSM125217     2  0.3175     0.6109 0.000 0.744 0.000 0.000 0.000 0.256
#> GSM125219     1  0.4617     0.5734 0.664 0.000 0.000 0.000 0.252 0.084
#> GSM125221     4  0.3927     0.5949 0.004 0.024 0.000 0.712 0.000 0.260
#> GSM125223     2  0.0363     0.8039 0.000 0.988 0.000 0.000 0.000 0.012
#> GSM125225     2  0.1007     0.8021 0.000 0.956 0.000 0.000 0.000 0.044
#> GSM125227     2  0.0260     0.8041 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM125229     3  0.4897     0.7150 0.040 0.052 0.684 0.000 0.000 0.224
#> GSM125231     3  0.6137     0.5216 0.236 0.000 0.568 0.020 0.016 0.160
#> GSM125233     1  0.3344     0.7156 0.804 0.000 0.000 0.000 0.152 0.044
#> GSM125235     5  0.2868     0.7119 0.132 0.000 0.000 0.000 0.840 0.028
#> GSM125237     5  0.0622     0.7733 0.012 0.000 0.000 0.000 0.980 0.008
#> GSM125124     1  0.4544     0.7113 0.668 0.000 0.000 0.000 0.256 0.076
#> GSM125126     5  0.2841     0.6551 0.164 0.000 0.000 0.000 0.824 0.012
#> GSM125128     5  0.3790     0.6189 0.156 0.000 0.000 0.000 0.772 0.072
#> GSM125130     1  0.2934     0.7096 0.844 0.000 0.000 0.000 0.112 0.044
#> GSM125132     5  0.1757     0.7513 0.076 0.000 0.000 0.000 0.916 0.008
#> GSM125134     1  0.5063     0.5430 0.544 0.000 0.000 0.000 0.372 0.084
#> GSM125136     5  0.2680     0.7099 0.076 0.000 0.000 0.000 0.868 0.056
#> GSM125138     1  0.4705     0.7023 0.652 0.000 0.000 0.000 0.260 0.088
#> GSM125140     1  0.4310     0.6064 0.580 0.000 0.000 0.000 0.396 0.024
#> GSM125142     5  0.4527     0.3625 0.272 0.000 0.000 0.000 0.660 0.068
#> GSM125144     1  0.4592     0.7092 0.664 0.000 0.000 0.000 0.256 0.080
#> GSM125146     1  0.5086     0.4970 0.532 0.000 0.000 0.000 0.384 0.084
#> GSM125148     5  0.1926     0.7492 0.068 0.000 0.000 0.000 0.912 0.020
#> GSM125150     5  0.2558     0.6792 0.156 0.000 0.000 0.000 0.840 0.004
#> GSM125152     1  0.3766     0.7229 0.684 0.000 0.000 0.000 0.304 0.012
#> GSM125154     5  0.5157    -0.1881 0.404 0.000 0.000 0.000 0.508 0.088
#> GSM125156     1  0.4246     0.4785 0.532 0.000 0.000 0.000 0.452 0.016
#> GSM125158     5  0.4152    -0.2267 0.440 0.000 0.000 0.000 0.548 0.012
#> GSM125160     2  0.1863     0.7708 0.000 0.896 0.000 0.000 0.000 0.104
#> GSM125162     5  0.1780     0.7464 0.028 0.000 0.000 0.000 0.924 0.048
#> GSM125164     2  0.0632     0.8050 0.000 0.976 0.000 0.000 0.000 0.024
#> GSM125166     2  0.0632     0.8048 0.000 0.976 0.000 0.000 0.000 0.024
#> GSM125168     2  0.5049     0.2510 0.004 0.624 0.000 0.104 0.000 0.268
#> GSM125170     2  0.5468     0.0803 0.004 0.572 0.000 0.148 0.000 0.276
#> GSM125172     2  0.1075     0.7971 0.000 0.952 0.000 0.000 0.000 0.048
#> GSM125174     4  0.2264     0.8106 0.012 0.000 0.004 0.888 0.000 0.096
#> GSM125176     2  0.1461     0.7935 0.000 0.940 0.000 0.016 0.000 0.044
#> GSM125178     3  0.1442     0.8208 0.012 0.000 0.944 0.004 0.000 0.040
#> GSM125180     4  0.0000     0.8457 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM125182     2  0.5230     0.0962 0.004 0.592 0.008 0.080 0.000 0.316
#> GSM125184     4  0.0865     0.8402 0.000 0.000 0.000 0.964 0.000 0.036
#> GSM125186     4  0.0603     0.8457 0.000 0.000 0.004 0.980 0.000 0.016
#> GSM125188     6  0.7019     0.8293 0.008 0.292 0.048 0.252 0.000 0.400
#> GSM125190     2  0.2805     0.7014 0.004 0.812 0.000 0.000 0.000 0.184
#> GSM125192     2  0.0260     0.8042 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM125194     3  0.5991     0.6227 0.060 0.000 0.516 0.000 0.076 0.348
#> GSM125196     3  0.2163     0.8085 0.016 0.000 0.892 0.000 0.000 0.092
#> GSM125198     2  0.0000     0.8034 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125200     5  0.3547     0.3726 0.300 0.000 0.000 0.000 0.696 0.004
#> GSM125202     2  0.0790     0.7952 0.000 0.968 0.000 0.000 0.000 0.032
#> GSM125204     3  0.1398     0.8175 0.008 0.000 0.940 0.000 0.000 0.052
#> GSM125206     3  0.2112     0.8094 0.016 0.000 0.896 0.000 0.000 0.088
#> GSM125208     3  0.1957     0.8197 0.008 0.000 0.912 0.008 0.000 0.072
#> GSM125210     4  0.0692     0.8449 0.000 0.000 0.004 0.976 0.000 0.020
#> GSM125212     3  0.4841     0.6764 0.048 0.012 0.608 0.000 0.000 0.332
#> GSM125214     2  0.0260     0.8037 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM125216     2  0.0260     0.8047 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM125218     2  0.2823     0.6820 0.000 0.796 0.000 0.000 0.000 0.204
#> GSM125220     5  0.3686     0.6393 0.124 0.000 0.000 0.000 0.788 0.088
#> GSM125222     4  0.3656     0.6308 0.004 0.012 0.000 0.728 0.000 0.256
#> GSM125224     2  0.0260     0.8041 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM125226     2  0.2838     0.6943 0.004 0.808 0.000 0.000 0.000 0.188
#> GSM125228     2  0.0260     0.8041 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM125230     3  0.3422     0.7898 0.040 0.000 0.792 0.000 0.000 0.168
#> GSM125232     4  0.7372     0.2135 0.260 0.000 0.176 0.428 0.008 0.128
#> GSM125234     1  0.3004     0.6999 0.860 0.000 0.004 0.008 0.080 0.048
#> GSM125236     1  0.3624     0.7106 0.784 0.000 0.000 0.000 0.156 0.060
#> GSM125238     5  0.0603     0.7721 0.016 0.000 0.000 0.000 0.980 0.004

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk MAD-skmeans-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk MAD-skmeans-collect-classes

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

test_to_known_factors(res)
#>               n agent(p) individual(p) k
#> MAD:skmeans 116    1.000      1.12e-05 2
#> MAD:skmeans 115    0.789      9.02e-08 3
#> MAD:skmeans 116    0.933      1.12e-10 4
#> MAD:skmeans 105    0.943      1.90e-09 5
#> MAD:skmeans 101    0.994      3.09e-09 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 21168 rows and 116 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#>   Subgroups are detected by 'pam' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk MAD-pam-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.893           0.926       0.969         0.5025 0.496   0.496
#> 3 3 0.833           0.845       0.924         0.2994 0.797   0.610
#> 4 4 0.667           0.731       0.856         0.1369 0.877   0.656
#> 5 5 0.807           0.761       0.875         0.0598 0.927   0.731
#> 6 6 0.778           0.570       0.790         0.0474 0.927   0.688

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
#> GSM125123     1  0.0000     0.9632 1.000 0.000
#> GSM125125     1  0.0000     0.9632 1.000 0.000
#> GSM125127     1  0.0000     0.9632 1.000 0.000
#> GSM125129     1  0.0000     0.9632 1.000 0.000
#> GSM125131     1  0.0000     0.9632 1.000 0.000
#> GSM125133     1  0.0000     0.9632 1.000 0.000
#> GSM125135     1  0.0000     0.9632 1.000 0.000
#> GSM125137     1  0.0000     0.9632 1.000 0.000
#> GSM125139     1  0.0000     0.9632 1.000 0.000
#> GSM125141     1  0.0000     0.9632 1.000 0.000
#> GSM125143     1  0.0000     0.9632 1.000 0.000
#> GSM125145     1  0.0000     0.9632 1.000 0.000
#> GSM125147     1  0.0000     0.9632 1.000 0.000
#> GSM125149     1  0.0000     0.9632 1.000 0.000
#> GSM125151     1  0.0000     0.9632 1.000 0.000
#> GSM125153     1  0.0000     0.9632 1.000 0.000
#> GSM125155     1  0.0000     0.9632 1.000 0.000
#> GSM125157     1  0.0000     0.9632 1.000 0.000
#> GSM125159     2  0.0000     0.9707 0.000 1.000
#> GSM125161     1  0.0000     0.9632 1.000 0.000
#> GSM125163     2  0.0000     0.9707 0.000 1.000
#> GSM125165     2  0.0000     0.9707 0.000 1.000
#> GSM125167     2  0.0000     0.9707 0.000 1.000
#> GSM125169     2  0.0000     0.9707 0.000 1.000
#> GSM125171     2  0.0000     0.9707 0.000 1.000
#> GSM125173     2  0.1184     0.9595 0.016 0.984
#> GSM125175     2  0.0000     0.9707 0.000 1.000
#> GSM125177     2  0.0000     0.9707 0.000 1.000
#> GSM125179     2  0.3733     0.9102 0.072 0.928
#> GSM125181     2  0.0000     0.9707 0.000 1.000
#> GSM125183     2  0.4298     0.8931 0.088 0.912
#> GSM125185     2  0.2423     0.9399 0.040 0.960
#> GSM125187     1  0.6712     0.7800 0.824 0.176
#> GSM125189     2  0.0000     0.9707 0.000 1.000
#> GSM125191     2  0.0000     0.9707 0.000 1.000
#> GSM125193     1  0.6247     0.8064 0.844 0.156
#> GSM125195     1  1.0000     0.0173 0.504 0.496
#> GSM125197     2  0.0000     0.9707 0.000 1.000
#> GSM125199     1  0.0000     0.9632 1.000 0.000
#> GSM125201     2  0.0000     0.9707 0.000 1.000
#> GSM125203     2  0.9491     0.4173 0.368 0.632
#> GSM125205     2  0.0000     0.9707 0.000 1.000
#> GSM125207     2  0.7453     0.7302 0.212 0.788
#> GSM125209     2  0.0000     0.9707 0.000 1.000
#> GSM125211     2  0.3431     0.9174 0.064 0.936
#> GSM125213     2  0.0000     0.9707 0.000 1.000
#> GSM125215     2  0.0000     0.9707 0.000 1.000
#> GSM125217     2  0.0000     0.9707 0.000 1.000
#> GSM125219     1  0.0000     0.9632 1.000 0.000
#> GSM125221     2  0.0000     0.9707 0.000 1.000
#> GSM125223     2  0.0000     0.9707 0.000 1.000
#> GSM125225     2  0.0000     0.9707 0.000 1.000
#> GSM125227     2  0.0000     0.9707 0.000 1.000
#> GSM125229     2  0.0000     0.9707 0.000 1.000
#> GSM125231     1  0.8327     0.6463 0.736 0.264
#> GSM125233     1  0.0000     0.9632 1.000 0.000
#> GSM125235     1  0.0000     0.9632 1.000 0.000
#> GSM125237     1  0.0000     0.9632 1.000 0.000
#> GSM125124     1  0.0000     0.9632 1.000 0.000
#> GSM125126     1  0.0000     0.9632 1.000 0.000
#> GSM125128     1  0.0000     0.9632 1.000 0.000
#> GSM125130     1  0.0000     0.9632 1.000 0.000
#> GSM125132     1  0.0000     0.9632 1.000 0.000
#> GSM125134     1  0.0000     0.9632 1.000 0.000
#> GSM125136     1  0.0000     0.9632 1.000 0.000
#> GSM125138     1  0.0000     0.9632 1.000 0.000
#> GSM125140     1  0.0000     0.9632 1.000 0.000
#> GSM125142     1  0.0000     0.9632 1.000 0.000
#> GSM125144     1  0.0000     0.9632 1.000 0.000
#> GSM125146     1  0.0000     0.9632 1.000 0.000
#> GSM125148     1  0.0000     0.9632 1.000 0.000
#> GSM125150     1  0.0000     0.9632 1.000 0.000
#> GSM125152     1  0.0000     0.9632 1.000 0.000
#> GSM125154     1  0.0000     0.9632 1.000 0.000
#> GSM125156     1  0.0000     0.9632 1.000 0.000
#> GSM125158     1  0.0000     0.9632 1.000 0.000
#> GSM125160     2  0.0000     0.9707 0.000 1.000
#> GSM125162     1  0.0000     0.9632 1.000 0.000
#> GSM125164     2  0.0000     0.9707 0.000 1.000
#> GSM125166     2  0.0000     0.9707 0.000 1.000
#> GSM125168     2  0.0000     0.9707 0.000 1.000
#> GSM125170     2  0.0000     0.9707 0.000 1.000
#> GSM125172     2  0.0000     0.9707 0.000 1.000
#> GSM125174     2  0.0376     0.9680 0.004 0.996
#> GSM125176     2  0.0000     0.9707 0.000 1.000
#> GSM125178     2  0.1633     0.9528 0.024 0.976
#> GSM125180     2  0.5294     0.8581 0.120 0.880
#> GSM125182     2  0.0000     0.9707 0.000 1.000
#> GSM125184     2  0.0000     0.9707 0.000 1.000
#> GSM125186     2  0.7139     0.7580 0.196 0.804
#> GSM125188     2  0.0000     0.9707 0.000 1.000
#> GSM125190     2  0.0000     0.9707 0.000 1.000
#> GSM125192     2  0.0000     0.9707 0.000 1.000
#> GSM125194     1  0.0672     0.9565 0.992 0.008
#> GSM125196     2  0.0672     0.9654 0.008 0.992
#> GSM125198     2  0.0000     0.9707 0.000 1.000
#> GSM125200     1  0.0000     0.9632 1.000 0.000
#> GSM125202     2  0.0000     0.9707 0.000 1.000
#> GSM125204     2  0.9815     0.2757 0.420 0.580
#> GSM125206     2  0.0000     0.9707 0.000 1.000
#> GSM125208     1  0.9000     0.5494 0.684 0.316
#> GSM125210     2  0.1414     0.9564 0.020 0.980
#> GSM125212     2  0.0000     0.9707 0.000 1.000
#> GSM125214     2  0.0000     0.9707 0.000 1.000
#> GSM125216     2  0.0000     0.9707 0.000 1.000
#> GSM125218     2  0.0000     0.9707 0.000 1.000
#> GSM125220     1  0.0000     0.9632 1.000 0.000
#> GSM125222     2  0.0000     0.9707 0.000 1.000
#> GSM125224     2  0.0000     0.9707 0.000 1.000
#> GSM125226     2  0.0000     0.9707 0.000 1.000
#> GSM125228     2  0.0000     0.9707 0.000 1.000
#> GSM125230     1  0.8267     0.6532 0.740 0.260
#> GSM125232     1  0.8144     0.6667 0.748 0.252
#> GSM125234     1  0.0000     0.9632 1.000 0.000
#> GSM125236     1  0.0000     0.9632 1.000 0.000
#> GSM125238     1  0.0000     0.9632 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
#> GSM125123     1  0.1289     0.9726 0.968 0.000 0.032
#> GSM125125     1  0.1289     0.9726 0.968 0.000 0.032
#> GSM125127     1  0.1289     0.9726 0.968 0.000 0.032
#> GSM125129     1  0.1289     0.9726 0.968 0.000 0.032
#> GSM125131     1  0.0000     0.9744 1.000 0.000 0.000
#> GSM125133     1  0.0000     0.9744 1.000 0.000 0.000
#> GSM125135     1  0.1289     0.9726 0.968 0.000 0.032
#> GSM125137     1  0.0000     0.9744 1.000 0.000 0.000
#> GSM125139     1  0.1289     0.9726 0.968 0.000 0.032
#> GSM125141     1  0.0000     0.9744 1.000 0.000 0.000
#> GSM125143     1  0.1289     0.9726 0.968 0.000 0.032
#> GSM125145     1  0.1163     0.9731 0.972 0.000 0.028
#> GSM125147     1  0.0000     0.9744 1.000 0.000 0.000
#> GSM125149     1  0.0000     0.9744 1.000 0.000 0.000
#> GSM125151     1  0.1289     0.9726 0.968 0.000 0.032
#> GSM125153     1  0.0000     0.9744 1.000 0.000 0.000
#> GSM125155     1  0.1289     0.9726 0.968 0.000 0.032
#> GSM125157     1  0.0000     0.9744 1.000 0.000 0.000
#> GSM125159     2  0.0000     0.8968 0.000 1.000 0.000
#> GSM125161     1  0.0000     0.9744 1.000 0.000 0.000
#> GSM125163     2  0.0747     0.8963 0.000 0.984 0.016
#> GSM125165     3  0.1964     0.8246 0.000 0.056 0.944
#> GSM125167     2  0.4750     0.7570 0.000 0.784 0.216
#> GSM125169     2  0.4931     0.7392 0.000 0.768 0.232
#> GSM125171     2  0.5138     0.7154 0.000 0.748 0.252
#> GSM125173     3  0.1860     0.8262 0.000 0.052 0.948
#> GSM125175     2  0.1529     0.8909 0.000 0.960 0.040
#> GSM125177     2  0.2261     0.8796 0.000 0.932 0.068
#> GSM125179     3  0.0592     0.8324 0.000 0.012 0.988
#> GSM125181     3  0.1411     0.8300 0.000 0.036 0.964
#> GSM125183     3  0.1491     0.8307 0.016 0.016 0.968
#> GSM125185     3  0.0000     0.8288 0.000 0.000 1.000
#> GSM125187     3  0.4235     0.6961 0.176 0.000 0.824
#> GSM125189     2  0.1289     0.8927 0.000 0.968 0.032
#> GSM125191     2  0.2537     0.8760 0.000 0.920 0.080
#> GSM125193     1  0.7107     0.3535 0.624 0.036 0.340
#> GSM125195     3  0.0829     0.8328 0.004 0.012 0.984
#> GSM125197     2  0.0000     0.8968 0.000 1.000 0.000
#> GSM125199     1  0.0000     0.9744 1.000 0.000 0.000
#> GSM125201     2  0.3482     0.7897 0.000 0.872 0.128
#> GSM125203     3  0.7129     0.3357 0.392 0.028 0.580
#> GSM125205     2  0.0000     0.8968 0.000 1.000 0.000
#> GSM125207     3  0.0592     0.8321 0.000 0.012 0.988
#> GSM125209     2  0.4605     0.7839 0.000 0.796 0.204
#> GSM125211     3  0.1878     0.8290 0.004 0.044 0.952
#> GSM125213     2  0.0000     0.8968 0.000 1.000 0.000
#> GSM125215     2  0.0000     0.8968 0.000 1.000 0.000
#> GSM125217     2  0.5948     0.4871 0.000 0.640 0.360
#> GSM125219     1  0.1643     0.9653 0.956 0.000 0.044
#> GSM125221     3  0.1860     0.8262 0.000 0.052 0.948
#> GSM125223     2  0.0000     0.8968 0.000 1.000 0.000
#> GSM125225     2  0.0000     0.8968 0.000 1.000 0.000
#> GSM125227     2  0.0000     0.8968 0.000 1.000 0.000
#> GSM125229     2  0.4121     0.8066 0.000 0.832 0.168
#> GSM125231     3  0.3031     0.8019 0.076 0.012 0.912
#> GSM125233     1  0.1289     0.9726 0.968 0.000 0.032
#> GSM125235     1  0.1289     0.9726 0.968 0.000 0.032
#> GSM125237     1  0.0000     0.9744 1.000 0.000 0.000
#> GSM125124     1  0.1411     0.9706 0.964 0.000 0.036
#> GSM125126     1  0.0000     0.9744 1.000 0.000 0.000
#> GSM125128     1  0.0000     0.9744 1.000 0.000 0.000
#> GSM125130     1  0.1411     0.9705 0.964 0.000 0.036
#> GSM125132     1  0.0000     0.9744 1.000 0.000 0.000
#> GSM125134     1  0.0000     0.9744 1.000 0.000 0.000
#> GSM125136     1  0.0000     0.9744 1.000 0.000 0.000
#> GSM125138     1  0.1964     0.9434 0.944 0.000 0.056
#> GSM125140     1  0.1289     0.9726 0.968 0.000 0.032
#> GSM125142     1  0.0000     0.9744 1.000 0.000 0.000
#> GSM125144     1  0.1289     0.9726 0.968 0.000 0.032
#> GSM125146     1  0.0000     0.9744 1.000 0.000 0.000
#> GSM125148     1  0.0000     0.9744 1.000 0.000 0.000
#> GSM125150     1  0.0000     0.9744 1.000 0.000 0.000
#> GSM125152     1  0.1289     0.9726 0.968 0.000 0.032
#> GSM125154     1  0.0000     0.9744 1.000 0.000 0.000
#> GSM125156     1  0.1289     0.9726 0.968 0.000 0.032
#> GSM125158     1  0.1289     0.9726 0.968 0.000 0.032
#> GSM125160     2  0.0892     0.8957 0.000 0.980 0.020
#> GSM125162     1  0.0000     0.9744 1.000 0.000 0.000
#> GSM125164     2  0.0424     0.8956 0.000 0.992 0.008
#> GSM125166     2  0.0592     0.8966 0.000 0.988 0.012
#> GSM125168     3  0.6168     0.2166 0.000 0.412 0.588
#> GSM125170     3  0.6267     0.0761 0.000 0.452 0.548
#> GSM125172     2  0.4235     0.8005 0.000 0.824 0.176
#> GSM125174     3  0.1529     0.8295 0.000 0.040 0.960
#> GSM125176     2  0.2448     0.8766 0.000 0.924 0.076
#> GSM125178     2  0.6235     0.1943 0.000 0.564 0.436
#> GSM125180     3  0.0475     0.8303 0.004 0.004 0.992
#> GSM125182     2  0.5216     0.7077 0.000 0.740 0.260
#> GSM125184     3  0.1753     0.8275 0.000 0.048 0.952
#> GSM125186     3  0.0000     0.8288 0.000 0.000 1.000
#> GSM125188     3  0.5905     0.4423 0.000 0.352 0.648
#> GSM125190     2  0.2537     0.8749 0.000 0.920 0.080
#> GSM125192     2  0.0000     0.8968 0.000 1.000 0.000
#> GSM125194     3  0.6008     0.4287 0.372 0.000 0.628
#> GSM125196     2  0.6045     0.4957 0.000 0.620 0.380
#> GSM125198     2  0.0000     0.8968 0.000 1.000 0.000
#> GSM125200     1  0.0892     0.9738 0.980 0.000 0.020
#> GSM125202     2  0.0000     0.8968 0.000 1.000 0.000
#> GSM125204     3  0.9305     0.2487 0.380 0.164 0.456
#> GSM125206     3  0.3879     0.7452 0.000 0.152 0.848
#> GSM125208     3  0.0983     0.8277 0.016 0.004 0.980
#> GSM125210     3  0.0747     0.8324 0.000 0.016 0.984
#> GSM125212     3  0.2878     0.8012 0.000 0.096 0.904
#> GSM125214     2  0.0000     0.8968 0.000 1.000 0.000
#> GSM125216     2  0.0000     0.8968 0.000 1.000 0.000
#> GSM125218     2  0.1964     0.8841 0.000 0.944 0.056
#> GSM125220     1  0.0237     0.9743 0.996 0.000 0.004
#> GSM125222     3  0.3752     0.7626 0.000 0.144 0.856
#> GSM125224     2  0.0000     0.8968 0.000 1.000 0.000
#> GSM125226     3  0.6260     0.1147 0.000 0.448 0.552
#> GSM125228     2  0.0000     0.8968 0.000 1.000 0.000
#> GSM125230     3  0.1999     0.8281 0.036 0.012 0.952
#> GSM125232     3  0.2625     0.7852 0.084 0.000 0.916
#> GSM125234     1  0.3267     0.8908 0.884 0.000 0.116
#> GSM125236     1  0.1289     0.9726 0.968 0.000 0.032
#> GSM125238     1  0.0000     0.9744 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
#> GSM125123     1  0.2345    0.81474 0.900 0.000 0.000 0.100
#> GSM125125     4  0.4040    0.81559 0.248 0.000 0.000 0.752
#> GSM125127     1  0.0188    0.87828 0.996 0.000 0.000 0.004
#> GSM125129     4  0.4877    0.54605 0.408 0.000 0.000 0.592
#> GSM125131     4  0.3024    0.90582 0.148 0.000 0.000 0.852
#> GSM125133     4  0.3024    0.90582 0.148 0.000 0.000 0.852
#> GSM125135     1  0.4907   -0.00965 0.580 0.000 0.000 0.420
#> GSM125137     4  0.3024    0.90582 0.148 0.000 0.000 0.852
#> GSM125139     1  0.0188    0.87801 0.996 0.000 0.000 0.004
#> GSM125141     4  0.3024    0.90582 0.148 0.000 0.000 0.852
#> GSM125143     1  0.0000    0.87798 1.000 0.000 0.000 0.000
#> GSM125145     1  0.1118    0.87169 0.964 0.000 0.000 0.036
#> GSM125147     4  0.3024    0.90582 0.148 0.000 0.000 0.852
#> GSM125149     4  0.3024    0.90582 0.148 0.000 0.000 0.852
#> GSM125151     1  0.0000    0.87798 1.000 0.000 0.000 0.000
#> GSM125153     1  0.2345    0.83423 0.900 0.000 0.000 0.100
#> GSM125155     4  0.4103    0.80947 0.256 0.000 0.000 0.744
#> GSM125157     4  0.3024    0.90582 0.148 0.000 0.000 0.852
#> GSM125159     2  0.0000    0.85150 0.000 1.000 0.000 0.000
#> GSM125161     4  0.3024    0.90582 0.148 0.000 0.000 0.852
#> GSM125163     2  0.0817    0.84937 0.000 0.976 0.024 0.000
#> GSM125165     3  0.0592    0.79559 0.000 0.016 0.984 0.000
#> GSM125167     2  0.4804    0.46513 0.000 0.616 0.384 0.000
#> GSM125169     2  0.4866    0.42593 0.000 0.596 0.404 0.000
#> GSM125171     2  0.4697    0.51994 0.000 0.644 0.356 0.000
#> GSM125173     3  0.0469    0.79661 0.000 0.012 0.988 0.000
#> GSM125175     2  0.1557    0.83977 0.000 0.944 0.056 0.000
#> GSM125177     2  0.5167    0.72565 0.000 0.760 0.108 0.132
#> GSM125179     3  0.2530    0.76480 0.100 0.000 0.896 0.004
#> GSM125181     3  0.0188    0.79671 0.000 0.004 0.996 0.000
#> GSM125183     3  0.0000    0.79606 0.000 0.000 1.000 0.000
#> GSM125185     3  0.2401    0.76750 0.092 0.000 0.904 0.004
#> GSM125187     3  0.5773    0.37828 0.336 0.000 0.620 0.044
#> GSM125189     2  0.1302    0.84377 0.000 0.956 0.044 0.000
#> GSM125191     2  0.2589    0.81161 0.000 0.884 0.116 0.000
#> GSM125193     4  0.3172    0.58137 0.000 0.000 0.160 0.840
#> GSM125195     3  0.3763    0.74865 0.024 0.000 0.832 0.144
#> GSM125197     2  0.0000    0.85150 0.000 1.000 0.000 0.000
#> GSM125199     4  0.3024    0.90582 0.148 0.000 0.000 0.852
#> GSM125201     2  0.2704    0.75694 0.000 0.876 0.124 0.000
#> GSM125203     3  0.5539    0.41255 0.008 0.008 0.552 0.432
#> GSM125205     2  0.1474    0.82720 0.000 0.948 0.000 0.052
#> GSM125207     3  0.3024    0.75281 0.000 0.000 0.852 0.148
#> GSM125209     2  0.4277    0.65412 0.000 0.720 0.280 0.000
#> GSM125211     3  0.0469    0.79661 0.000 0.012 0.988 0.000
#> GSM125213     2  0.0000    0.85150 0.000 1.000 0.000 0.000
#> GSM125215     2  0.0000    0.85150 0.000 1.000 0.000 0.000
#> GSM125217     2  0.4992    0.18345 0.000 0.524 0.476 0.000
#> GSM125219     1  0.2149    0.81033 0.912 0.000 0.000 0.088
#> GSM125221     3  0.0469    0.79661 0.000 0.012 0.988 0.000
#> GSM125223     2  0.0000    0.85150 0.000 1.000 0.000 0.000
#> GSM125225     2  0.0000    0.85150 0.000 1.000 0.000 0.000
#> GSM125227     2  0.0000    0.85150 0.000 1.000 0.000 0.000
#> GSM125229     2  0.6955    0.43372 0.000 0.560 0.296 0.144
#> GSM125231     1  0.5705    0.58937 0.704 0.000 0.204 0.092
#> GSM125233     1  0.1302    0.86359 0.956 0.000 0.000 0.044
#> GSM125235     4  0.4072    0.81213 0.252 0.000 0.000 0.748
#> GSM125237     4  0.3024    0.90582 0.148 0.000 0.000 0.852
#> GSM125124     1  0.0000    0.87798 1.000 0.000 0.000 0.000
#> GSM125126     4  0.3024    0.90582 0.148 0.000 0.000 0.852
#> GSM125128     4  0.3024    0.90582 0.148 0.000 0.000 0.852
#> GSM125130     1  0.0000    0.87798 1.000 0.000 0.000 0.000
#> GSM125132     4  0.3123    0.89938 0.156 0.000 0.000 0.844
#> GSM125134     1  0.2345    0.83423 0.900 0.000 0.000 0.100
#> GSM125136     4  0.3024    0.90582 0.148 0.000 0.000 0.852
#> GSM125138     1  0.1716    0.85856 0.936 0.000 0.000 0.064
#> GSM125140     1  0.0000    0.87798 1.000 0.000 0.000 0.000
#> GSM125142     1  0.2345    0.83423 0.900 0.000 0.000 0.100
#> GSM125144     1  0.0000    0.87798 1.000 0.000 0.000 0.000
#> GSM125146     1  0.2345    0.83423 0.900 0.000 0.000 0.100
#> GSM125148     4  0.3942    0.80832 0.236 0.000 0.000 0.764
#> GSM125150     1  0.4981   -0.01337 0.536 0.000 0.000 0.464
#> GSM125152     1  0.0000    0.87798 1.000 0.000 0.000 0.000
#> GSM125154     1  0.2345    0.83423 0.900 0.000 0.000 0.100
#> GSM125156     1  0.0188    0.87790 0.996 0.000 0.000 0.004
#> GSM125158     1  0.2081    0.83268 0.916 0.000 0.000 0.084
#> GSM125160     2  0.1211    0.84541 0.000 0.960 0.040 0.000
#> GSM125162     4  0.3024    0.90582 0.148 0.000 0.000 0.852
#> GSM125164     2  0.0188    0.85082 0.000 0.996 0.004 0.000
#> GSM125166     2  0.0707    0.85008 0.000 0.980 0.020 0.000
#> GSM125168     3  0.4790    0.24855 0.000 0.380 0.620 0.000
#> GSM125170     3  0.4916    0.10321 0.000 0.424 0.576 0.000
#> GSM125172     2  0.4406    0.60687 0.000 0.700 0.300 0.000
#> GSM125174     3  0.0188    0.79670 0.000 0.004 0.996 0.000
#> GSM125176     2  0.2469    0.81298 0.000 0.892 0.108 0.000
#> GSM125178     2  0.7073    0.18258 0.000 0.504 0.364 0.132
#> GSM125180     3  0.3448    0.70544 0.168 0.000 0.828 0.004
#> GSM125182     2  0.4843    0.44528 0.000 0.604 0.396 0.000
#> GSM125184     3  0.0469    0.79661 0.000 0.012 0.988 0.000
#> GSM125186     3  0.2530    0.76391 0.100 0.000 0.896 0.004
#> GSM125188     3  0.4936    0.32198 0.000 0.372 0.624 0.004
#> GSM125190     2  0.2647    0.80775 0.000 0.880 0.120 0.000
#> GSM125192     2  0.0000    0.85150 0.000 1.000 0.000 0.000
#> GSM125194     3  0.5279    0.24355 0.012 0.000 0.588 0.400
#> GSM125196     3  0.7283   -0.10947 0.000 0.420 0.432 0.148
#> GSM125198     2  0.0000    0.85150 0.000 1.000 0.000 0.000
#> GSM125200     1  0.1474    0.86848 0.948 0.000 0.000 0.052
#> GSM125202     2  0.0000    0.85150 0.000 1.000 0.000 0.000
#> GSM125204     4  0.8561   -0.31241 0.104 0.092 0.384 0.420
#> GSM125206     3  0.5080    0.69513 0.000 0.092 0.764 0.144
#> GSM125208     3  0.4590    0.74498 0.060 0.000 0.792 0.148
#> GSM125210     3  0.0188    0.79578 0.000 0.000 0.996 0.004
#> GSM125212     3  0.0707    0.79490 0.000 0.020 0.980 0.000
#> GSM125214     2  0.0000    0.85150 0.000 1.000 0.000 0.000
#> GSM125216     2  0.0000    0.85150 0.000 1.000 0.000 0.000
#> GSM125218     2  0.2281    0.81907 0.000 0.904 0.096 0.000
#> GSM125220     4  0.2589    0.86003 0.116 0.000 0.000 0.884
#> GSM125222     3  0.3444    0.65498 0.000 0.184 0.816 0.000
#> GSM125224     2  0.0000    0.85150 0.000 1.000 0.000 0.000
#> GSM125226     3  0.4713    0.31661 0.000 0.360 0.640 0.000
#> GSM125228     2  0.0000    0.85150 0.000 1.000 0.000 0.000
#> GSM125230     3  0.0469    0.79605 0.000 0.000 0.988 0.012
#> GSM125232     1  0.3172    0.72249 0.840 0.000 0.160 0.000
#> GSM125234     1  0.0657    0.87347 0.984 0.000 0.012 0.004
#> GSM125236     1  0.3726    0.64347 0.788 0.000 0.000 0.212
#> GSM125238     4  0.3024    0.90582 0.148 0.000 0.000 0.852

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM125123     5  0.2561     0.8166 0.144 0.000 0.000 0.000 0.856
#> GSM125125     1  0.1478     0.8780 0.936 0.000 0.000 0.000 0.064
#> GSM125127     5  0.0162     0.9210 0.004 0.000 0.000 0.000 0.996
#> GSM125129     1  0.4045     0.4432 0.644 0.000 0.000 0.000 0.356
#> GSM125131     1  0.0000     0.9230 1.000 0.000 0.000 0.000 0.000
#> GSM125133     1  0.0000     0.9230 1.000 0.000 0.000 0.000 0.000
#> GSM125135     5  0.4291     0.1011 0.464 0.000 0.000 0.000 0.536
#> GSM125137     1  0.0000     0.9230 1.000 0.000 0.000 0.000 0.000
#> GSM125139     5  0.0162     0.9213 0.004 0.000 0.000 0.000 0.996
#> GSM125141     1  0.0000     0.9230 1.000 0.000 0.000 0.000 0.000
#> GSM125143     5  0.0000     0.9206 0.000 0.000 0.000 0.000 1.000
#> GSM125145     5  0.0510     0.9202 0.016 0.000 0.000 0.000 0.984
#> GSM125147     1  0.0000     0.9230 1.000 0.000 0.000 0.000 0.000
#> GSM125149     1  0.0000     0.9230 1.000 0.000 0.000 0.000 0.000
#> GSM125151     5  0.0000     0.9206 0.000 0.000 0.000 0.000 1.000
#> GSM125153     5  0.1478     0.9033 0.064 0.000 0.000 0.000 0.936
#> GSM125155     1  0.1608     0.8740 0.928 0.000 0.000 0.000 0.072
#> GSM125157     1  0.0000     0.9230 1.000 0.000 0.000 0.000 0.000
#> GSM125159     2  0.0510     0.8184 0.000 0.984 0.016 0.000 0.000
#> GSM125161     1  0.0000     0.9230 1.000 0.000 0.000 0.000 0.000
#> GSM125163     2  0.1168     0.8172 0.000 0.960 0.032 0.008 0.000
#> GSM125165     4  0.3949     0.7457 0.000 0.000 0.332 0.668 0.000
#> GSM125167     2  0.4747     0.5923 0.000 0.636 0.332 0.032 0.000
#> GSM125169     2  0.5613     0.5187 0.000 0.576 0.332 0.092 0.000
#> GSM125171     2  0.4878     0.6313 0.000 0.676 0.264 0.060 0.000
#> GSM125173     4  0.4066     0.7484 0.000 0.004 0.324 0.672 0.000
#> GSM125175     2  0.1386     0.8152 0.000 0.952 0.032 0.016 0.000
#> GSM125177     3  0.4339     0.4826 0.000 0.336 0.652 0.012 0.000
#> GSM125179     4  0.0794     0.6575 0.000 0.000 0.000 0.972 0.028
#> GSM125181     4  0.2773     0.7279 0.000 0.000 0.164 0.836 0.000
#> GSM125183     4  0.3857     0.7535 0.000 0.000 0.312 0.688 0.000
#> GSM125185     4  0.0880     0.6544 0.000 0.000 0.000 0.968 0.032
#> GSM125187     4  0.1410     0.6165 0.000 0.000 0.060 0.940 0.000
#> GSM125189     2  0.1557     0.8115 0.000 0.940 0.052 0.008 0.000
#> GSM125191     2  0.3116     0.7813 0.000 0.860 0.076 0.064 0.000
#> GSM125193     1  0.4341     0.4093 0.628 0.000 0.364 0.008 0.000
#> GSM125195     3  0.2020     0.6909 0.000 0.000 0.900 0.100 0.000
#> GSM125197     2  0.0162     0.8185 0.000 0.996 0.004 0.000 0.000
#> GSM125199     1  0.0000     0.9230 1.000 0.000 0.000 0.000 0.000
#> GSM125201     2  0.2763     0.6925 0.000 0.848 0.004 0.148 0.000
#> GSM125203     3  0.2727     0.6587 0.116 0.000 0.868 0.016 0.000
#> GSM125205     2  0.3143     0.5911 0.000 0.796 0.204 0.000 0.000
#> GSM125207     3  0.3949     0.6514 0.000 0.000 0.668 0.332 0.000
#> GSM125209     2  0.5500     0.6055 0.000 0.648 0.140 0.212 0.000
#> GSM125211     4  0.3895     0.7515 0.000 0.000 0.320 0.680 0.000
#> GSM125213     2  0.0162     0.8185 0.000 0.996 0.004 0.000 0.000
#> GSM125215     2  0.0162     0.8185 0.000 0.996 0.004 0.000 0.000
#> GSM125217     2  0.5732     0.5338 0.000 0.588 0.296 0.116 0.000
#> GSM125219     5  0.0794     0.9127 0.000 0.000 0.028 0.000 0.972
#> GSM125221     4  0.4029     0.7514 0.000 0.004 0.316 0.680 0.000
#> GSM125223     2  0.0000     0.8191 0.000 1.000 0.000 0.000 0.000
#> GSM125225     2  0.0162     0.8185 0.000 0.996 0.004 0.000 0.000
#> GSM125227     2  0.0000     0.8191 0.000 1.000 0.000 0.000 0.000
#> GSM125229     3  0.1732     0.6793 0.000 0.080 0.920 0.000 0.000
#> GSM125231     5  0.3562     0.7452 0.000 0.000 0.196 0.016 0.788
#> GSM125233     5  0.1121     0.9092 0.044 0.000 0.000 0.000 0.956
#> GSM125235     1  0.1544     0.8758 0.932 0.000 0.000 0.000 0.068
#> GSM125237     1  0.0000     0.9230 1.000 0.000 0.000 0.000 0.000
#> GSM125124     5  0.0000     0.9206 0.000 0.000 0.000 0.000 1.000
#> GSM125126     1  0.0000     0.9230 1.000 0.000 0.000 0.000 0.000
#> GSM125128     1  0.0000     0.9230 1.000 0.000 0.000 0.000 0.000
#> GSM125130     5  0.0000     0.9206 0.000 0.000 0.000 0.000 1.000
#> GSM125132     1  0.0404     0.9156 0.988 0.000 0.000 0.000 0.012
#> GSM125134     5  0.1478     0.9033 0.064 0.000 0.000 0.000 0.936
#> GSM125136     1  0.0000     0.9230 1.000 0.000 0.000 0.000 0.000
#> GSM125138     5  0.1197     0.9107 0.048 0.000 0.000 0.000 0.952
#> GSM125140     5  0.0000     0.9206 0.000 0.000 0.000 0.000 1.000
#> GSM125142     5  0.1478     0.9033 0.064 0.000 0.000 0.000 0.936
#> GSM125144     5  0.0000     0.9206 0.000 0.000 0.000 0.000 1.000
#> GSM125146     5  0.1478     0.9033 0.064 0.000 0.000 0.000 0.936
#> GSM125148     1  0.1732     0.8541 0.920 0.000 0.000 0.000 0.080
#> GSM125150     1  0.4201     0.2497 0.592 0.000 0.000 0.000 0.408
#> GSM125152     5  0.0000     0.9206 0.000 0.000 0.000 0.000 1.000
#> GSM125154     5  0.1478     0.9033 0.064 0.000 0.000 0.000 0.936
#> GSM125156     5  0.0162     0.9211 0.004 0.000 0.000 0.000 0.996
#> GSM125158     5  0.1908     0.8716 0.092 0.000 0.000 0.000 0.908
#> GSM125160     2  0.1549     0.8125 0.000 0.944 0.040 0.016 0.000
#> GSM125162     1  0.0000     0.9230 1.000 0.000 0.000 0.000 0.000
#> GSM125164     2  0.0000     0.8191 0.000 1.000 0.000 0.000 0.000
#> GSM125166     2  0.0404     0.8194 0.000 0.988 0.012 0.000 0.000
#> GSM125168     2  0.6653     0.2005 0.000 0.432 0.328 0.240 0.000
#> GSM125170     2  0.6572     0.2593 0.000 0.452 0.328 0.220 0.000
#> GSM125172     2  0.4404     0.6636 0.000 0.712 0.252 0.036 0.000
#> GSM125174     4  0.3876     0.7523 0.000 0.000 0.316 0.684 0.000
#> GSM125176     2  0.2983     0.7817 0.000 0.868 0.076 0.056 0.000
#> GSM125178     3  0.4339     0.4893 0.000 0.336 0.652 0.012 0.000
#> GSM125180     4  0.1121     0.6455 0.000 0.000 0.000 0.956 0.044
#> GSM125182     2  0.4890     0.5845 0.000 0.628 0.332 0.040 0.000
#> GSM125184     4  0.4029     0.7514 0.000 0.004 0.316 0.680 0.000
#> GSM125186     4  0.0963     0.6521 0.000 0.000 0.000 0.964 0.036
#> GSM125188     4  0.3366     0.5633 0.000 0.140 0.032 0.828 0.000
#> GSM125190     2  0.3536     0.7605 0.000 0.832 0.084 0.084 0.000
#> GSM125192     2  0.0000     0.8191 0.000 1.000 0.000 0.000 0.000
#> GSM125194     4  0.4088     0.4121 0.368 0.000 0.000 0.632 0.000
#> GSM125196     3  0.2813     0.7068 0.000 0.000 0.832 0.168 0.000
#> GSM125198     2  0.0000     0.8191 0.000 1.000 0.000 0.000 0.000
#> GSM125200     5  0.1410     0.9071 0.060 0.000 0.000 0.000 0.940
#> GSM125202     2  0.0000     0.8191 0.000 1.000 0.000 0.000 0.000
#> GSM125204     3  0.4039     0.6833 0.004 0.000 0.720 0.268 0.008
#> GSM125206     3  0.1124     0.6017 0.000 0.004 0.960 0.036 0.000
#> GSM125208     3  0.4183     0.6514 0.000 0.000 0.668 0.324 0.008
#> GSM125210     4  0.0000     0.6704 0.000 0.000 0.000 1.000 0.000
#> GSM125212     4  0.4101     0.7438 0.000 0.004 0.332 0.664 0.000
#> GSM125214     2  0.0162     0.8185 0.000 0.996 0.004 0.000 0.000
#> GSM125216     2  0.0000     0.8191 0.000 1.000 0.000 0.000 0.000
#> GSM125218     2  0.2769     0.7847 0.000 0.876 0.092 0.032 0.000
#> GSM125220     1  0.1300     0.8998 0.956 0.000 0.028 0.000 0.016
#> GSM125222     4  0.5263     0.6526 0.000 0.144 0.176 0.680 0.000
#> GSM125224     2  0.0000     0.8191 0.000 1.000 0.000 0.000 0.000
#> GSM125226     2  0.6740     0.0968 0.000 0.404 0.328 0.268 0.000
#> GSM125228     2  0.0000     0.8191 0.000 1.000 0.000 0.000 0.000
#> GSM125230     4  0.4166     0.7345 0.004 0.000 0.348 0.648 0.000
#> GSM125232     5  0.0880     0.9094 0.000 0.000 0.000 0.032 0.968
#> GSM125234     5  0.1341     0.8956 0.000 0.000 0.000 0.056 0.944
#> GSM125236     5  0.3395     0.6889 0.236 0.000 0.000 0.000 0.764
#> GSM125238     1  0.0000     0.9230 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
#> GSM125123     1  0.2300     0.8184 0.856 0.000 0.000 0.000 0.144 0.000
#> GSM125125     5  0.1267     0.8816 0.060 0.000 0.000 0.000 0.940 0.000
#> GSM125127     1  0.0146     0.9155 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125129     5  0.3684     0.3926 0.372 0.000 0.000 0.000 0.628 0.000
#> GSM125131     5  0.0000     0.9219 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125133     5  0.0000     0.9219 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125135     1  0.3843     0.1584 0.548 0.000 0.000 0.000 0.452 0.000
#> GSM125137     5  0.0000     0.9219 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125139     1  0.0146     0.9157 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125141     5  0.0000     0.9219 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125143     1  0.0000     0.9150 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125145     1  0.0458     0.9149 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM125147     5  0.0000     0.9219 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125149     5  0.0000     0.9219 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125151     1  0.0000     0.9150 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125153     1  0.1267     0.9019 0.940 0.000 0.000 0.000 0.060 0.000
#> GSM125155     5  0.1387     0.8777 0.068 0.000 0.000 0.000 0.932 0.000
#> GSM125157     5  0.0000     0.9219 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125159     2  0.3330     0.2129 0.000 0.716 0.000 0.000 0.000 0.284
#> GSM125161     5  0.0000     0.9219 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125163     2  0.4384     0.1653 0.000 0.616 0.000 0.036 0.000 0.348
#> GSM125165     4  0.2631     0.6703 0.000 0.008 0.000 0.840 0.000 0.152
#> GSM125167     2  0.6024     0.0630 0.000 0.388 0.000 0.244 0.000 0.368
#> GSM125169     6  0.5701     0.1102 0.000 0.228 0.000 0.248 0.000 0.524
#> GSM125171     6  0.5688     0.3222 0.000 0.144 0.004 0.364 0.000 0.488
#> GSM125173     4  0.0790     0.7833 0.000 0.000 0.000 0.968 0.000 0.032
#> GSM125175     6  0.4420     0.3152 0.000 0.360 0.000 0.036 0.000 0.604
#> GSM125177     3  0.2918     0.8361 0.000 0.088 0.856 0.004 0.000 0.052
#> GSM125179     4  0.3867     0.6926 0.000 0.000 0.052 0.748 0.000 0.200
#> GSM125181     2  0.5962     0.1618 0.000 0.488 0.004 0.260 0.000 0.248
#> GSM125183     4  0.0260     0.7902 0.000 0.000 0.008 0.992 0.000 0.000
#> GSM125185     2  0.6695    -0.0252 0.000 0.440 0.052 0.308 0.000 0.200
#> GSM125187     4  0.4809     0.6378 0.000 0.000 0.140 0.668 0.000 0.192
#> GSM125189     6  0.4151     0.3385 0.000 0.264 0.000 0.044 0.000 0.692
#> GSM125191     2  0.4173     0.2134 0.000 0.712 0.000 0.228 0.000 0.060
#> GSM125193     5  0.4116     0.2632 0.000 0.000 0.416 0.012 0.572 0.000
#> GSM125195     3  0.0713     0.9050 0.000 0.000 0.972 0.028 0.000 0.000
#> GSM125197     2  0.3867    -0.2612 0.000 0.512 0.000 0.000 0.000 0.488
#> GSM125199     5  0.0000     0.9219 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125201     2  0.1610     0.1790 0.000 0.916 0.000 0.000 0.000 0.084
#> GSM125203     3  0.1340     0.9000 0.000 0.040 0.948 0.000 0.008 0.004
#> GSM125205     2  0.5259    -0.1729 0.000 0.536 0.108 0.000 0.000 0.356
#> GSM125207     3  0.2398     0.8666 0.000 0.028 0.888 0.004 0.000 0.080
#> GSM125209     2  0.5190     0.2264 0.000 0.584 0.004 0.100 0.000 0.312
#> GSM125211     4  0.0632     0.7871 0.000 0.000 0.000 0.976 0.000 0.024
#> GSM125213     2  0.0632     0.2222 0.000 0.976 0.000 0.000 0.000 0.024
#> GSM125215     2  0.3101     0.0271 0.000 0.756 0.000 0.000 0.000 0.244
#> GSM125217     2  0.5736     0.1581 0.000 0.492 0.000 0.188 0.000 0.320
#> GSM125219     1  0.1075     0.8971 0.952 0.000 0.048 0.000 0.000 0.000
#> GSM125221     4  0.0692     0.7869 0.000 0.004 0.000 0.976 0.000 0.020
#> GSM125223     6  0.3860     0.2213 0.000 0.472 0.000 0.000 0.000 0.528
#> GSM125225     6  0.3817     0.2327 0.000 0.432 0.000 0.000 0.000 0.568
#> GSM125227     2  0.3868    -0.2685 0.000 0.504 0.000 0.000 0.000 0.496
#> GSM125229     3  0.3049     0.8810 0.000 0.044 0.864 0.052 0.000 0.040
#> GSM125231     1  0.3999     0.6073 0.696 0.000 0.272 0.032 0.000 0.000
#> GSM125233     1  0.1007     0.9051 0.956 0.000 0.000 0.000 0.044 0.000
#> GSM125235     5  0.1327     0.8795 0.064 0.000 0.000 0.000 0.936 0.000
#> GSM125237     5  0.0000     0.9219 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125124     1  0.0000     0.9150 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125126     5  0.0000     0.9219 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125128     5  0.0000     0.9219 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125130     1  0.0000     0.9150 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125132     5  0.0363     0.9147 0.012 0.000 0.000 0.000 0.988 0.000
#> GSM125134     1  0.1267     0.9019 0.940 0.000 0.000 0.000 0.060 0.000
#> GSM125136     5  0.0000     0.9219 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125138     1  0.1075     0.9069 0.952 0.000 0.000 0.000 0.048 0.000
#> GSM125140     1  0.0000     0.9150 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125142     1  0.1267     0.9019 0.940 0.000 0.000 0.000 0.060 0.000
#> GSM125144     1  0.0000     0.9150 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125146     1  0.1267     0.9019 0.940 0.000 0.000 0.000 0.060 0.000
#> GSM125148     5  0.1556     0.8552 0.080 0.000 0.000 0.000 0.920 0.000
#> GSM125150     5  0.3756     0.2801 0.400 0.000 0.000 0.000 0.600 0.000
#> GSM125152     1  0.0000     0.9150 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125154     1  0.1267     0.9019 0.940 0.000 0.000 0.000 0.060 0.000
#> GSM125156     1  0.0146     0.9156 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125158     1  0.1714     0.8694 0.908 0.000 0.000 0.000 0.092 0.000
#> GSM125160     2  0.4879    -0.1798 0.000 0.544 0.000 0.064 0.000 0.392
#> GSM125162     5  0.0000     0.9219 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125164     2  0.3672    -0.1334 0.000 0.632 0.000 0.000 0.000 0.368
#> GSM125166     6  0.4252     0.3049 0.000 0.372 0.000 0.024 0.000 0.604
#> GSM125168     4  0.3869    -0.1262 0.000 0.000 0.000 0.500 0.000 0.500
#> GSM125170     6  0.3867     0.0471 0.000 0.000 0.000 0.488 0.000 0.512
#> GSM125172     6  0.4934     0.3734 0.000 0.112 0.000 0.256 0.000 0.632
#> GSM125174     4  0.0260     0.7902 0.000 0.000 0.008 0.992 0.000 0.000
#> GSM125176     6  0.6061     0.1112 0.000 0.368 0.000 0.260 0.000 0.372
#> GSM125178     3  0.3140     0.8229 0.000 0.092 0.844 0.008 0.000 0.056
#> GSM125180     4  0.4006     0.6919 0.004 0.000 0.052 0.744 0.000 0.200
#> GSM125182     2  0.5935     0.1390 0.000 0.456 0.000 0.244 0.000 0.300
#> GSM125184     4  0.0405     0.7874 0.000 0.008 0.000 0.988 0.000 0.004
#> GSM125186     4  0.4210     0.6901 0.012 0.000 0.052 0.736 0.000 0.200
#> GSM125188     2  0.5983     0.1497 0.000 0.504 0.008 0.236 0.000 0.252
#> GSM125190     6  0.5449     0.2966 0.000 0.124 0.000 0.388 0.000 0.488
#> GSM125192     2  0.3864    -0.2408 0.000 0.520 0.000 0.000 0.000 0.480
#> GSM125194     4  0.4088     0.3884 0.016 0.000 0.000 0.616 0.368 0.000
#> GSM125196     3  0.0458     0.9072 0.000 0.000 0.984 0.016 0.000 0.000
#> GSM125198     2  0.3868    -0.2645 0.000 0.508 0.000 0.000 0.000 0.492
#> GSM125200     1  0.1267     0.9035 0.940 0.000 0.000 0.000 0.060 0.000
#> GSM125202     2  0.4175    -0.2641 0.000 0.524 0.000 0.012 0.000 0.464
#> GSM125204     3  0.0000     0.9046 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM125206     3  0.2333     0.8377 0.000 0.004 0.872 0.120 0.000 0.004
#> GSM125208     3  0.1552     0.8933 0.000 0.020 0.940 0.004 0.000 0.036
#> GSM125210     2  0.6695    -0.0252 0.000 0.440 0.052 0.308 0.000 0.200
#> GSM125212     4  0.1679     0.7744 0.000 0.016 0.012 0.936 0.000 0.036
#> GSM125214     2  0.2697     0.0833 0.000 0.812 0.000 0.000 0.000 0.188
#> GSM125216     2  0.3868    -0.2663 0.000 0.504 0.000 0.000 0.000 0.496
#> GSM125218     6  0.4196     0.3526 0.000 0.144 0.000 0.116 0.000 0.740
#> GSM125220     5  0.1367     0.8894 0.012 0.000 0.044 0.000 0.944 0.000
#> GSM125222     4  0.1838     0.7401 0.000 0.068 0.000 0.916 0.000 0.016
#> GSM125224     6  0.3869     0.1884 0.000 0.500 0.000 0.000 0.000 0.500
#> GSM125226     6  0.5112     0.2867 0.000 0.088 0.000 0.376 0.000 0.536
#> GSM125228     6  0.3747     0.2809 0.000 0.396 0.000 0.000 0.000 0.604
#> GSM125230     4  0.2558     0.7052 0.000 0.000 0.156 0.840 0.000 0.004
#> GSM125232     1  0.2178     0.8204 0.868 0.000 0.000 0.132 0.000 0.000
#> GSM125234     1  0.1391     0.8956 0.944 0.000 0.016 0.000 0.000 0.040
#> GSM125236     1  0.2996     0.7034 0.772 0.000 0.000 0.000 0.228 0.000
#> GSM125238     5  0.0000     0.9219 0.000 0.000 0.000 0.000 1.000 0.000

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk MAD-pam-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk MAD-pam-collect-classes

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

test_to_known_factors(res)
#>           n agent(p) individual(p) k
#> MAD:pam 113    1.000      4.84e-05 2
#> MAD:pam 105    0.871      2.78e-06 3
#> MAD:pam  99    0.313      1.66e-05 4
#> MAD:pam 106    0.590      4.15e-08 5
#> MAD:pam  71    0.464      9.00e-05 6

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


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 21168 rows and 116 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           0.993       0.997         0.4901 0.511   0.511
#> 3 3 0.682           0.808       0.790         0.2925 0.830   0.668
#> 4 4 0.691           0.837       0.868         0.1572 0.845   0.589
#> 5 5 0.860           0.889       0.916         0.0892 0.889   0.605
#> 6 6 0.829           0.792       0.850         0.0292 0.968   0.838

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
#> GSM125123     1  0.0000      0.997 1.000 0.000
#> GSM125125     1  0.0000      0.997 1.000 0.000
#> GSM125127     1  0.0672      0.992 0.992 0.008
#> GSM125129     1  0.0000      0.997 1.000 0.000
#> GSM125131     1  0.0000      0.997 1.000 0.000
#> GSM125133     1  0.0376      0.995 0.996 0.004
#> GSM125135     1  0.0000      0.997 1.000 0.000
#> GSM125137     1  0.0000      0.997 1.000 0.000
#> GSM125139     1  0.0000      0.997 1.000 0.000
#> GSM125141     1  0.0000      0.997 1.000 0.000
#> GSM125143     1  0.1414      0.981 0.980 0.020
#> GSM125145     1  0.0000      0.997 1.000 0.000
#> GSM125147     1  0.0000      0.997 1.000 0.000
#> GSM125149     1  0.0000      0.997 1.000 0.000
#> GSM125151     1  0.0000      0.997 1.000 0.000
#> GSM125153     1  0.0000      0.997 1.000 0.000
#> GSM125155     1  0.0000      0.997 1.000 0.000
#> GSM125157     1  0.0000      0.997 1.000 0.000
#> GSM125159     2  0.0000      0.996 0.000 1.000
#> GSM125161     1  0.0000      0.997 1.000 0.000
#> GSM125163     2  0.0000      0.996 0.000 1.000
#> GSM125165     2  0.0000      0.996 0.000 1.000
#> GSM125167     2  0.0000      0.996 0.000 1.000
#> GSM125169     2  0.0000      0.996 0.000 1.000
#> GSM125171     2  0.0000      0.996 0.000 1.000
#> GSM125173     2  0.0000      0.996 0.000 1.000
#> GSM125175     2  0.0000      0.996 0.000 1.000
#> GSM125177     2  0.0000      0.996 0.000 1.000
#> GSM125179     2  0.0000      0.996 0.000 1.000
#> GSM125181     2  0.0000      0.996 0.000 1.000
#> GSM125183     2  0.0000      0.996 0.000 1.000
#> GSM125185     2  0.0000      0.996 0.000 1.000
#> GSM125187     2  0.0376      0.993 0.004 0.996
#> GSM125189     2  0.0000      0.996 0.000 1.000
#> GSM125191     2  0.0000      0.996 0.000 1.000
#> GSM125193     2  0.0938      0.986 0.012 0.988
#> GSM125195     2  0.0000      0.996 0.000 1.000
#> GSM125197     2  0.0000      0.996 0.000 1.000
#> GSM125199     1  0.0000      0.997 1.000 0.000
#> GSM125201     2  0.0000      0.996 0.000 1.000
#> GSM125203     2  0.0376      0.993 0.004 0.996
#> GSM125205     2  0.0000      0.996 0.000 1.000
#> GSM125207     2  0.0000      0.996 0.000 1.000
#> GSM125209     2  0.0000      0.996 0.000 1.000
#> GSM125211     2  0.0000      0.996 0.000 1.000
#> GSM125213     2  0.0000      0.996 0.000 1.000
#> GSM125215     2  0.0000      0.996 0.000 1.000
#> GSM125217     2  0.0000      0.996 0.000 1.000
#> GSM125219     1  0.0376      0.995 0.996 0.004
#> GSM125221     2  0.0000      0.996 0.000 1.000
#> GSM125223     2  0.0000      0.996 0.000 1.000
#> GSM125225     2  0.0000      0.996 0.000 1.000
#> GSM125227     2  0.0000      0.996 0.000 1.000
#> GSM125229     2  0.0000      0.996 0.000 1.000
#> GSM125231     2  0.6148      0.823 0.152 0.848
#> GSM125233     1  0.0000      0.997 1.000 0.000
#> GSM125235     1  0.0000      0.997 1.000 0.000
#> GSM125237     1  0.0000      0.997 1.000 0.000
#> GSM125124     1  0.0000      0.997 1.000 0.000
#> GSM125126     1  0.0000      0.997 1.000 0.000
#> GSM125128     1  0.0376      0.995 0.996 0.004
#> GSM125130     1  0.1414      0.981 0.980 0.020
#> GSM125132     1  0.0000      0.997 1.000 0.000
#> GSM125134     1  0.0000      0.997 1.000 0.000
#> GSM125136     1  0.0376      0.995 0.996 0.004
#> GSM125138     1  0.0000      0.997 1.000 0.000
#> GSM125140     1  0.0000      0.997 1.000 0.000
#> GSM125142     1  0.0000      0.997 1.000 0.000
#> GSM125144     1  0.0000      0.997 1.000 0.000
#> GSM125146     1  0.0376      0.995 0.996 0.004
#> GSM125148     1  0.0000      0.997 1.000 0.000
#> GSM125150     1  0.0000      0.997 1.000 0.000
#> GSM125152     1  0.0000      0.997 1.000 0.000
#> GSM125154     1  0.0000      0.997 1.000 0.000
#> GSM125156     1  0.0000      0.997 1.000 0.000
#> GSM125158     1  0.0000      0.997 1.000 0.000
#> GSM125160     2  0.0000      0.996 0.000 1.000
#> GSM125162     1  0.0000      0.997 1.000 0.000
#> GSM125164     2  0.0000      0.996 0.000 1.000
#> GSM125166     2  0.0000      0.996 0.000 1.000
#> GSM125168     2  0.0000      0.996 0.000 1.000
#> GSM125170     2  0.0000      0.996 0.000 1.000
#> GSM125172     2  0.0000      0.996 0.000 1.000
#> GSM125174     2  0.0000      0.996 0.000 1.000
#> GSM125176     2  0.0000      0.996 0.000 1.000
#> GSM125178     2  0.0000      0.996 0.000 1.000
#> GSM125180     2  0.0376      0.993 0.004 0.996
#> GSM125182     2  0.0000      0.996 0.000 1.000
#> GSM125184     2  0.0000      0.996 0.000 1.000
#> GSM125186     2  0.0000      0.996 0.000 1.000
#> GSM125188     2  0.0000      0.996 0.000 1.000
#> GSM125190     2  0.0000      0.996 0.000 1.000
#> GSM125192     2  0.0000      0.996 0.000 1.000
#> GSM125194     2  0.1414      0.978 0.020 0.980
#> GSM125196     2  0.0000      0.996 0.000 1.000
#> GSM125198     2  0.0000      0.996 0.000 1.000
#> GSM125200     1  0.0000      0.997 1.000 0.000
#> GSM125202     2  0.0000      0.996 0.000 1.000
#> GSM125204     2  0.0376      0.993 0.004 0.996
#> GSM125206     2  0.0000      0.996 0.000 1.000
#> GSM125208     2  0.0000      0.996 0.000 1.000
#> GSM125210     2  0.0000      0.996 0.000 1.000
#> GSM125212     2  0.0000      0.996 0.000 1.000
#> GSM125214     2  0.0000      0.996 0.000 1.000
#> GSM125216     2  0.0000      0.996 0.000 1.000
#> GSM125218     2  0.0000      0.996 0.000 1.000
#> GSM125220     1  0.1414      0.981 0.980 0.020
#> GSM125222     2  0.0000      0.996 0.000 1.000
#> GSM125224     2  0.0000      0.996 0.000 1.000
#> GSM125226     2  0.0000      0.996 0.000 1.000
#> GSM125228     2  0.0000      0.996 0.000 1.000
#> GSM125230     2  0.0938      0.986 0.012 0.988
#> GSM125232     2  0.2778      0.950 0.048 0.952
#> GSM125234     1  0.2423      0.961 0.960 0.040
#> GSM125236     1  0.0376      0.995 0.996 0.004
#> GSM125238     1  0.0000      0.997 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
#> GSM125123     1  0.5678     0.8735 0.684 0.000 0.316
#> GSM125125     1  0.1643     0.8603 0.956 0.000 0.044
#> GSM125127     1  0.5678     0.8735 0.684 0.000 0.316
#> GSM125129     1  0.5678     0.8735 0.684 0.000 0.316
#> GSM125131     1  0.0000     0.8565 1.000 0.000 0.000
#> GSM125133     1  0.0000     0.8565 1.000 0.000 0.000
#> GSM125135     1  0.5650     0.8741 0.688 0.000 0.312
#> GSM125137     1  0.0000     0.8565 1.000 0.000 0.000
#> GSM125139     1  0.5678     0.8735 0.684 0.000 0.316
#> GSM125141     1  0.0000     0.8565 1.000 0.000 0.000
#> GSM125143     1  0.5678     0.8735 0.684 0.000 0.316
#> GSM125145     1  0.5650     0.8741 0.688 0.000 0.312
#> GSM125147     1  0.0000     0.8565 1.000 0.000 0.000
#> GSM125149     1  0.0000     0.8565 1.000 0.000 0.000
#> GSM125151     1  0.5678     0.8735 0.684 0.000 0.316
#> GSM125153     1  0.5591     0.8744 0.696 0.000 0.304
#> GSM125155     1  0.0000     0.8565 1.000 0.000 0.000
#> GSM125157     1  0.0000     0.8565 1.000 0.000 0.000
#> GSM125159     2  0.1964     0.8297 0.000 0.944 0.056
#> GSM125161     1  0.0000     0.8565 1.000 0.000 0.000
#> GSM125163     2  0.0424     0.8474 0.000 0.992 0.008
#> GSM125165     2  0.5785     0.2295 0.000 0.668 0.332
#> GSM125167     2  0.1964     0.8297 0.000 0.944 0.056
#> GSM125169     2  0.6215    -0.2708 0.000 0.572 0.428
#> GSM125171     2  0.4702     0.5046 0.000 0.788 0.212
#> GSM125173     3  0.6252     0.7079 0.000 0.444 0.556
#> GSM125175     2  0.2959     0.7419 0.000 0.900 0.100
#> GSM125177     3  0.6079     0.8924 0.000 0.388 0.612
#> GSM125179     3  0.6008     0.9025 0.000 0.372 0.628
#> GSM125181     2  0.5882     0.1579 0.000 0.652 0.348
#> GSM125183     3  0.5905     0.8636 0.000 0.352 0.648
#> GSM125185     3  0.6008     0.9025 0.000 0.372 0.628
#> GSM125187     3  0.5678     0.8862 0.000 0.316 0.684
#> GSM125189     2  0.1964     0.8297 0.000 0.944 0.056
#> GSM125191     2  0.1163     0.8344 0.000 0.972 0.028
#> GSM125193     3  0.5760     0.8838 0.000 0.328 0.672
#> GSM125195     3  0.6008     0.9025 0.000 0.372 0.628
#> GSM125197     2  0.0000     0.8482 0.000 1.000 0.000
#> GSM125199     1  0.0000     0.8565 1.000 0.000 0.000
#> GSM125201     2  0.0000     0.8482 0.000 1.000 0.000
#> GSM125203     3  0.5785     0.8966 0.000 0.332 0.668
#> GSM125205     2  0.4002     0.6307 0.000 0.840 0.160
#> GSM125207     3  0.6008     0.9025 0.000 0.372 0.628
#> GSM125209     2  0.2796     0.7814 0.000 0.908 0.092
#> GSM125211     3  0.6299     0.6257 0.000 0.476 0.524
#> GSM125213     2  0.0747     0.8456 0.000 0.984 0.016
#> GSM125215     2  0.0000     0.8482 0.000 1.000 0.000
#> GSM125217     2  0.1964     0.8297 0.000 0.944 0.056
#> GSM125219     1  0.5678     0.8735 0.684 0.000 0.316
#> GSM125221     3  0.5835     0.8768 0.000 0.340 0.660
#> GSM125223     2  0.0000     0.8482 0.000 1.000 0.000
#> GSM125225     2  0.1964     0.8297 0.000 0.944 0.056
#> GSM125227     2  0.0000     0.8482 0.000 1.000 0.000
#> GSM125229     3  0.6260     0.6869 0.000 0.448 0.552
#> GSM125231     3  0.8222     0.6875 0.100 0.308 0.592
#> GSM125233     1  0.5678     0.8735 0.684 0.000 0.316
#> GSM125235     1  0.0000     0.8565 1.000 0.000 0.000
#> GSM125237     1  0.0000     0.8565 1.000 0.000 0.000
#> GSM125124     1  0.5678     0.8735 0.684 0.000 0.316
#> GSM125126     1  0.0000     0.8565 1.000 0.000 0.000
#> GSM125128     1  0.0000     0.8565 1.000 0.000 0.000
#> GSM125130     1  0.5760     0.8666 0.672 0.000 0.328
#> GSM125132     1  0.0000     0.8565 1.000 0.000 0.000
#> GSM125134     1  0.5650     0.8741 0.688 0.000 0.312
#> GSM125136     1  0.0000     0.8565 1.000 0.000 0.000
#> GSM125138     1  0.5678     0.8735 0.684 0.000 0.316
#> GSM125140     1  0.5678     0.8735 0.684 0.000 0.316
#> GSM125142     1  0.5560     0.8745 0.700 0.000 0.300
#> GSM125144     1  0.5678     0.8735 0.684 0.000 0.316
#> GSM125146     1  0.5650     0.8741 0.688 0.000 0.312
#> GSM125148     1  0.0000     0.8565 1.000 0.000 0.000
#> GSM125150     1  0.0424     0.8573 0.992 0.000 0.008
#> GSM125152     1  0.5678     0.8735 0.684 0.000 0.316
#> GSM125154     1  0.5650     0.8741 0.688 0.000 0.312
#> GSM125156     1  0.5650     0.8741 0.688 0.000 0.312
#> GSM125158     1  0.5650     0.8741 0.688 0.000 0.312
#> GSM125160     2  0.1643     0.8357 0.000 0.956 0.044
#> GSM125162     1  0.0000     0.8565 1.000 0.000 0.000
#> GSM125164     2  0.0000     0.8482 0.000 1.000 0.000
#> GSM125166     2  0.0000     0.8482 0.000 1.000 0.000
#> GSM125168     2  0.3192     0.7302 0.000 0.888 0.112
#> GSM125170     3  0.6235     0.7548 0.000 0.436 0.564
#> GSM125172     2  0.0892     0.8381 0.000 0.980 0.020
#> GSM125174     3  0.6008     0.9025 0.000 0.372 0.628
#> GSM125176     2  0.5098     0.3965 0.000 0.752 0.248
#> GSM125178     3  0.5905     0.9033 0.000 0.352 0.648
#> GSM125180     3  0.6008     0.9025 0.000 0.372 0.628
#> GSM125182     2  0.4702     0.5593 0.000 0.788 0.212
#> GSM125184     3  0.6235     0.8329 0.000 0.436 0.564
#> GSM125186     3  0.6008     0.9025 0.000 0.372 0.628
#> GSM125188     2  0.6008     0.0307 0.000 0.628 0.372
#> GSM125190     2  0.1964     0.8297 0.000 0.944 0.056
#> GSM125192     2  0.0000     0.8482 0.000 1.000 0.000
#> GSM125194     3  0.5678     0.8862 0.000 0.316 0.684
#> GSM125196     3  0.6008     0.9025 0.000 0.372 0.628
#> GSM125198     2  0.0000     0.8482 0.000 1.000 0.000
#> GSM125200     1  0.3941     0.8677 0.844 0.000 0.156
#> GSM125202     2  0.1411     0.8252 0.000 0.964 0.036
#> GSM125204     3  0.5882     0.9026 0.000 0.348 0.652
#> GSM125206     3  0.6008     0.9025 0.000 0.372 0.628
#> GSM125208     3  0.5859     0.9016 0.000 0.344 0.656
#> GSM125210     3  0.6008     0.9025 0.000 0.372 0.628
#> GSM125212     2  0.5706     0.2800 0.000 0.680 0.320
#> GSM125214     2  0.0000     0.8482 0.000 1.000 0.000
#> GSM125216     2  0.0000     0.8482 0.000 1.000 0.000
#> GSM125218     2  0.1964     0.8297 0.000 0.944 0.056
#> GSM125220     1  0.0000     0.8565 1.000 0.000 0.000
#> GSM125222     3  0.5678     0.8862 0.000 0.316 0.684
#> GSM125224     2  0.0000     0.8482 0.000 1.000 0.000
#> GSM125226     2  0.1964     0.8297 0.000 0.944 0.056
#> GSM125228     2  0.0000     0.8482 0.000 1.000 0.000
#> GSM125230     3  0.5678     0.8862 0.000 0.316 0.684
#> GSM125232     3  0.8452     0.7577 0.096 0.372 0.532
#> GSM125234     1  0.5968     0.8405 0.636 0.000 0.364
#> GSM125236     1  0.5678     0.8735 0.684 0.000 0.316
#> GSM125238     1  0.0000     0.8565 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
#> GSM125123     1  0.0000     0.9208 1.000 0.000 0.000 0.000
#> GSM125125     1  0.4477     0.3517 0.688 0.000 0.000 0.312
#> GSM125127     1  0.0000     0.9208 1.000 0.000 0.000 0.000
#> GSM125129     1  0.0000     0.9208 1.000 0.000 0.000 0.000
#> GSM125131     4  0.4304     0.8997 0.284 0.000 0.000 0.716
#> GSM125133     4  0.3764     0.9571 0.216 0.000 0.000 0.784
#> GSM125135     1  0.0188     0.9210 0.996 0.000 0.000 0.004
#> GSM125137     4  0.3764     0.9571 0.216 0.000 0.000 0.784
#> GSM125139     1  0.0188     0.9210 0.996 0.000 0.000 0.004
#> GSM125141     4  0.3764     0.9571 0.216 0.000 0.000 0.784
#> GSM125143     1  0.0657     0.9165 0.984 0.000 0.004 0.012
#> GSM125145     1  0.0469     0.9178 0.988 0.000 0.000 0.012
#> GSM125147     4  0.3837     0.9559 0.224 0.000 0.000 0.776
#> GSM125149     4  0.3764     0.9571 0.216 0.000 0.000 0.784
#> GSM125151     1  0.0188     0.9210 0.996 0.000 0.000 0.004
#> GSM125153     1  0.1389     0.8939 0.952 0.000 0.000 0.048
#> GSM125155     1  0.4992    -0.3674 0.524 0.000 0.000 0.476
#> GSM125157     4  0.3764     0.9571 0.216 0.000 0.000 0.784
#> GSM125159     2  0.4104     0.8429 0.000 0.832 0.080 0.088
#> GSM125161     4  0.3764     0.9571 0.216 0.000 0.000 0.784
#> GSM125163     2  0.0000     0.8859 0.000 1.000 0.000 0.000
#> GSM125165     3  0.5948     0.7344 0.000 0.144 0.696 0.160
#> GSM125167     2  0.3820     0.8487 0.000 0.848 0.064 0.088
#> GSM125169     2  0.6693     0.2614 0.000 0.488 0.424 0.088
#> GSM125171     2  0.5543     0.4993 0.000 0.612 0.360 0.028
#> GSM125173     3  0.3877     0.8472 0.000 0.048 0.840 0.112
#> GSM125175     2  0.3831     0.7779 0.000 0.792 0.204 0.004
#> GSM125177     3  0.1059     0.8801 0.000 0.012 0.972 0.016
#> GSM125179     3  0.1118     0.8765 0.000 0.000 0.964 0.036
#> GSM125181     3  0.5855     0.7430 0.000 0.136 0.704 0.160
#> GSM125183     3  0.2799     0.8659 0.000 0.008 0.884 0.108
#> GSM125185     3  0.1118     0.8768 0.000 0.000 0.964 0.036
#> GSM125187     3  0.1474     0.8789 0.000 0.000 0.948 0.052
#> GSM125189     2  0.4525     0.8258 0.000 0.804 0.116 0.080
#> GSM125191     2  0.4139     0.8149 0.000 0.816 0.144 0.040
#> GSM125193     3  0.1637     0.8744 0.000 0.000 0.940 0.060
#> GSM125195     3  0.0921     0.8764 0.000 0.000 0.972 0.028
#> GSM125197     2  0.0000     0.8859 0.000 1.000 0.000 0.000
#> GSM125199     4  0.3907     0.9525 0.232 0.000 0.000 0.768
#> GSM125201     2  0.0376     0.8852 0.000 0.992 0.004 0.004
#> GSM125203     3  0.0469     0.8795 0.000 0.000 0.988 0.012
#> GSM125205     2  0.4283     0.7093 0.000 0.740 0.256 0.004
#> GSM125207     3  0.0921     0.8789 0.000 0.000 0.972 0.028
#> GSM125209     3  0.5599     0.6294 0.000 0.276 0.672 0.052
#> GSM125211     3  0.5042     0.7970 0.000 0.096 0.768 0.136
#> GSM125213     2  0.2399     0.8729 0.000 0.920 0.048 0.032
#> GSM125215     2  0.0000     0.8859 0.000 1.000 0.000 0.000
#> GSM125217     2  0.5293     0.7800 0.000 0.748 0.152 0.100
#> GSM125219     1  0.0000     0.9208 1.000 0.000 0.000 0.000
#> GSM125221     3  0.2775     0.8662 0.000 0.020 0.896 0.084
#> GSM125223     2  0.0188     0.8860 0.000 0.996 0.004 0.000
#> GSM125225     2  0.0592     0.8834 0.000 0.984 0.000 0.016
#> GSM125227     2  0.0000     0.8859 0.000 1.000 0.000 0.000
#> GSM125229     3  0.3732     0.8396 0.000 0.056 0.852 0.092
#> GSM125231     3  0.4775     0.6647 0.232 0.000 0.740 0.028
#> GSM125233     1  0.0000     0.9208 1.000 0.000 0.000 0.000
#> GSM125235     4  0.3837     0.9554 0.224 0.000 0.000 0.776
#> GSM125237     4  0.3873     0.9541 0.228 0.000 0.000 0.772
#> GSM125124     1  0.0000     0.9208 1.000 0.000 0.000 0.000
#> GSM125126     4  0.4746     0.7815 0.368 0.000 0.000 0.632
#> GSM125128     4  0.3764     0.9571 0.216 0.000 0.000 0.784
#> GSM125130     1  0.0469     0.9107 0.988 0.000 0.000 0.012
#> GSM125132     4  0.4679     0.8097 0.352 0.000 0.000 0.648
#> GSM125134     1  0.0469     0.9190 0.988 0.000 0.000 0.012
#> GSM125136     4  0.3764     0.9571 0.216 0.000 0.000 0.784
#> GSM125138     1  0.0000     0.9208 1.000 0.000 0.000 0.000
#> GSM125140     1  0.0188     0.9210 0.996 0.000 0.000 0.004
#> GSM125142     1  0.1867     0.8743 0.928 0.000 0.000 0.072
#> GSM125144     1  0.0188     0.9210 0.996 0.000 0.000 0.004
#> GSM125146     1  0.0707     0.9131 0.980 0.000 0.000 0.020
#> GSM125148     4  0.4543     0.8503 0.324 0.000 0.000 0.676
#> GSM125150     1  0.3024     0.7702 0.852 0.000 0.000 0.148
#> GSM125152     1  0.0000     0.9208 1.000 0.000 0.000 0.000
#> GSM125154     1  0.0469     0.9186 0.988 0.000 0.000 0.012
#> GSM125156     1  0.2530     0.8226 0.888 0.000 0.000 0.112
#> GSM125158     1  0.2408     0.8327 0.896 0.000 0.000 0.104
#> GSM125160     2  0.2675     0.8702 0.000 0.908 0.044 0.048
#> GSM125162     4  0.3764     0.9571 0.216 0.000 0.000 0.784
#> GSM125164     2  0.0376     0.8856 0.000 0.992 0.004 0.004
#> GSM125166     2  0.0000     0.8859 0.000 1.000 0.000 0.000
#> GSM125168     3  0.5668     0.5910 0.000 0.300 0.652 0.048
#> GSM125170     3  0.2282     0.8779 0.000 0.024 0.924 0.052
#> GSM125172     2  0.2714     0.8537 0.000 0.884 0.112 0.004
#> GSM125174     3  0.1637     0.8794 0.000 0.000 0.940 0.060
#> GSM125176     3  0.5888     0.0213 0.000 0.424 0.540 0.036
#> GSM125178     3  0.0592     0.8794 0.000 0.000 0.984 0.016
#> GSM125180     3  0.1118     0.8765 0.000 0.000 0.964 0.036
#> GSM125182     3  0.5732     0.6370 0.000 0.264 0.672 0.064
#> GSM125184     3  0.2867     0.8695 0.000 0.012 0.884 0.104
#> GSM125186     3  0.0921     0.8764 0.000 0.000 0.972 0.028
#> GSM125188     3  0.5670     0.7531 0.000 0.128 0.720 0.152
#> GSM125190     2  0.5432     0.7851 0.000 0.740 0.136 0.124
#> GSM125192     2  0.0000     0.8859 0.000 1.000 0.000 0.000
#> GSM125194     3  0.1022     0.8777 0.000 0.000 0.968 0.032
#> GSM125196     3  0.0921     0.8764 0.000 0.000 0.972 0.028
#> GSM125198     2  0.0000     0.8859 0.000 1.000 0.000 0.000
#> GSM125200     1  0.2589     0.8173 0.884 0.000 0.000 0.116
#> GSM125202     2  0.2999     0.8394 0.000 0.864 0.132 0.004
#> GSM125204     3  0.0707     0.8792 0.000 0.000 0.980 0.020
#> GSM125206     3  0.0592     0.8787 0.000 0.000 0.984 0.016
#> GSM125208     3  0.0592     0.8803 0.000 0.000 0.984 0.016
#> GSM125210     3  0.1389     0.8785 0.000 0.000 0.952 0.048
#> GSM125212     3  0.5948     0.7336 0.000 0.144 0.696 0.160
#> GSM125214     2  0.0000     0.8859 0.000 1.000 0.000 0.000
#> GSM125216     2  0.0000     0.8859 0.000 1.000 0.000 0.000
#> GSM125218     2  0.4773     0.8173 0.000 0.788 0.120 0.092
#> GSM125220     4  0.4675     0.9260 0.244 0.000 0.020 0.736
#> GSM125222     3  0.2149     0.8719 0.000 0.000 0.912 0.088
#> GSM125224     2  0.0000     0.8859 0.000 1.000 0.000 0.000
#> GSM125226     2  0.5031     0.7996 0.000 0.768 0.140 0.092
#> GSM125228     2  0.0000     0.8859 0.000 1.000 0.000 0.000
#> GSM125230     3  0.2675     0.8668 0.000 0.008 0.892 0.100
#> GSM125232     3  0.3907     0.7708 0.140 0.000 0.828 0.032
#> GSM125234     1  0.3367     0.7539 0.864 0.000 0.108 0.028
#> GSM125236     1  0.0000     0.9208 1.000 0.000 0.000 0.000
#> GSM125238     4  0.3837     0.9559 0.224 0.000 0.000 0.776

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM125123     5  0.0510      0.956 0.016 0.000 0.000 0.000 0.984
#> GSM125125     5  0.3508      0.695 0.252 0.000 0.000 0.000 0.748
#> GSM125127     5  0.0609      0.958 0.020 0.000 0.000 0.000 0.980
#> GSM125129     5  0.0794      0.960 0.028 0.000 0.000 0.000 0.972
#> GSM125131     1  0.0404      0.968 0.988 0.000 0.000 0.000 0.012
#> GSM125133     1  0.0510      0.966 0.984 0.000 0.000 0.000 0.016
#> GSM125135     5  0.0963      0.962 0.036 0.000 0.000 0.000 0.964
#> GSM125137     1  0.0404      0.968 0.988 0.000 0.000 0.000 0.012
#> GSM125139     5  0.0963      0.962 0.036 0.000 0.000 0.000 0.964
#> GSM125141     1  0.0404      0.968 0.988 0.000 0.000 0.000 0.012
#> GSM125143     5  0.1341      0.954 0.056 0.000 0.000 0.000 0.944
#> GSM125145     5  0.1270      0.957 0.052 0.000 0.000 0.000 0.948
#> GSM125147     1  0.0404      0.968 0.988 0.000 0.000 0.000 0.012
#> GSM125149     1  0.0404      0.968 0.988 0.000 0.000 0.000 0.012
#> GSM125151     5  0.0963      0.962 0.036 0.000 0.000 0.000 0.964
#> GSM125153     5  0.2561      0.878 0.144 0.000 0.000 0.000 0.856
#> GSM125155     1  0.3837      0.559 0.692 0.000 0.000 0.000 0.308
#> GSM125157     1  0.0404      0.968 0.988 0.000 0.000 0.000 0.012
#> GSM125159     4  0.3366      0.801 0.000 0.232 0.000 0.768 0.000
#> GSM125161     1  0.0404      0.968 0.988 0.000 0.000 0.000 0.012
#> GSM125163     2  0.0162      0.960 0.000 0.996 0.000 0.004 0.000
#> GSM125165     4  0.1357      0.826 0.004 0.048 0.000 0.948 0.000
#> GSM125167     4  0.3424      0.795 0.000 0.240 0.000 0.760 0.000
#> GSM125169     4  0.2390      0.811 0.008 0.024 0.060 0.908 0.000
#> GSM125171     2  0.2672      0.834 0.008 0.872 0.116 0.004 0.000
#> GSM125173     4  0.4148      0.604 0.004 0.028 0.216 0.752 0.000
#> GSM125175     2  0.1836      0.907 0.008 0.936 0.040 0.016 0.000
#> GSM125177     3  0.2439      0.898 0.004 0.000 0.876 0.120 0.000
#> GSM125179     3  0.0162      0.921 0.000 0.000 0.996 0.004 0.000
#> GSM125181     4  0.1547      0.818 0.004 0.032 0.016 0.948 0.000
#> GSM125183     3  0.3048      0.865 0.004 0.000 0.820 0.176 0.000
#> GSM125185     3  0.0794      0.919 0.000 0.000 0.972 0.028 0.000
#> GSM125187     3  0.0609      0.922 0.000 0.000 0.980 0.020 0.000
#> GSM125189     4  0.4015      0.686 0.000 0.348 0.000 0.652 0.000
#> GSM125191     4  0.3932      0.713 0.000 0.328 0.000 0.672 0.000
#> GSM125193     4  0.1851      0.781 0.000 0.000 0.088 0.912 0.000
#> GSM125195     3  0.0794      0.923 0.000 0.000 0.972 0.028 0.000
#> GSM125197     2  0.0000      0.960 0.000 1.000 0.000 0.000 0.000
#> GSM125199     1  0.0703      0.962 0.976 0.000 0.000 0.000 0.024
#> GSM125201     2  0.0000      0.960 0.000 1.000 0.000 0.000 0.000
#> GSM125203     3  0.2674      0.884 0.004 0.000 0.856 0.140 0.000
#> GSM125205     2  0.1913      0.904 0.008 0.932 0.044 0.016 0.000
#> GSM125207     3  0.0963      0.920 0.000 0.000 0.964 0.036 0.000
#> GSM125209     4  0.3724      0.825 0.000 0.184 0.028 0.788 0.000
#> GSM125211     4  0.1412      0.821 0.004 0.036 0.008 0.952 0.000
#> GSM125213     4  0.4294      0.458 0.000 0.468 0.000 0.532 0.000
#> GSM125215     2  0.0000      0.960 0.000 1.000 0.000 0.000 0.000
#> GSM125217     4  0.2966      0.823 0.000 0.184 0.000 0.816 0.000
#> GSM125219     5  0.0290      0.951 0.008 0.000 0.000 0.000 0.992
#> GSM125221     4  0.1638      0.795 0.000 0.004 0.064 0.932 0.000
#> GSM125223     2  0.0000      0.960 0.000 1.000 0.000 0.000 0.000
#> GSM125225     2  0.0162      0.960 0.000 0.996 0.000 0.004 0.000
#> GSM125227     2  0.0000      0.960 0.000 1.000 0.000 0.000 0.000
#> GSM125229     4  0.2037      0.802 0.004 0.012 0.064 0.920 0.000
#> GSM125231     3  0.1251      0.911 0.000 0.000 0.956 0.008 0.036
#> GSM125233     5  0.0609      0.958 0.020 0.000 0.000 0.000 0.980
#> GSM125235     1  0.0404      0.968 0.988 0.000 0.000 0.000 0.012
#> GSM125237     1  0.0404      0.968 0.988 0.000 0.000 0.000 0.012
#> GSM125124     5  0.0794      0.961 0.028 0.000 0.000 0.000 0.972
#> GSM125126     1  0.2280      0.876 0.880 0.000 0.000 0.000 0.120
#> GSM125128     1  0.0703      0.961 0.976 0.000 0.000 0.000 0.024
#> GSM125130     5  0.0290      0.951 0.008 0.000 0.000 0.000 0.992
#> GSM125132     1  0.1341      0.940 0.944 0.000 0.000 0.000 0.056
#> GSM125134     5  0.1043      0.959 0.040 0.000 0.000 0.000 0.960
#> GSM125136     1  0.0510      0.966 0.984 0.000 0.000 0.000 0.016
#> GSM125138     5  0.0880      0.961 0.032 0.000 0.000 0.000 0.968
#> GSM125140     5  0.0963      0.962 0.036 0.000 0.000 0.000 0.964
#> GSM125142     5  0.1908      0.928 0.092 0.000 0.000 0.000 0.908
#> GSM125144     5  0.0880      0.961 0.032 0.000 0.000 0.000 0.968
#> GSM125146     5  0.1908      0.928 0.092 0.000 0.000 0.000 0.908
#> GSM125148     1  0.1671      0.923 0.924 0.000 0.000 0.000 0.076
#> GSM125150     5  0.2813      0.847 0.168 0.000 0.000 0.000 0.832
#> GSM125152     5  0.0963      0.962 0.036 0.000 0.000 0.000 0.964
#> GSM125154     5  0.1671      0.940 0.076 0.000 0.000 0.000 0.924
#> GSM125156     5  0.1043      0.961 0.040 0.000 0.000 0.000 0.960
#> GSM125158     5  0.1121      0.960 0.044 0.000 0.000 0.000 0.956
#> GSM125160     4  0.4227      0.566 0.000 0.420 0.000 0.580 0.000
#> GSM125162     1  0.0404      0.968 0.988 0.000 0.000 0.000 0.012
#> GSM125164     2  0.0162      0.960 0.000 0.996 0.000 0.004 0.000
#> GSM125166     2  0.0162      0.960 0.000 0.996 0.000 0.004 0.000
#> GSM125168     4  0.6245      0.618 0.000 0.220 0.236 0.544 0.000
#> GSM125170     3  0.4525      0.483 0.000 0.016 0.624 0.360 0.000
#> GSM125172     2  0.0324      0.958 0.000 0.992 0.004 0.004 0.000
#> GSM125174     3  0.1205      0.918 0.004 0.000 0.956 0.040 0.000
#> GSM125176     2  0.4260      0.565 0.008 0.680 0.308 0.004 0.000
#> GSM125178     3  0.2020      0.907 0.000 0.000 0.900 0.100 0.000
#> GSM125180     3  0.0162      0.921 0.000 0.000 0.996 0.004 0.000
#> GSM125182     4  0.3134      0.833 0.000 0.120 0.032 0.848 0.000
#> GSM125184     3  0.2068      0.900 0.004 0.000 0.904 0.092 0.000
#> GSM125186     3  0.0703      0.920 0.000 0.000 0.976 0.024 0.000
#> GSM125188     4  0.1471      0.812 0.004 0.020 0.024 0.952 0.000
#> GSM125190     4  0.3300      0.813 0.000 0.204 0.004 0.792 0.000
#> GSM125192     2  0.0162      0.960 0.000 0.996 0.000 0.004 0.000
#> GSM125194     3  0.2424      0.895 0.000 0.000 0.868 0.132 0.000
#> GSM125196     3  0.0404      0.921 0.000 0.000 0.988 0.012 0.000
#> GSM125198     2  0.0000      0.960 0.000 1.000 0.000 0.000 0.000
#> GSM125200     5  0.0963      0.962 0.036 0.000 0.000 0.000 0.964
#> GSM125202     2  0.0693      0.949 0.000 0.980 0.008 0.012 0.000
#> GSM125204     3  0.1410      0.920 0.000 0.000 0.940 0.060 0.000
#> GSM125206     3  0.1478      0.919 0.000 0.000 0.936 0.064 0.000
#> GSM125208     3  0.1197      0.923 0.000 0.000 0.952 0.048 0.000
#> GSM125210     3  0.0880      0.920 0.000 0.000 0.968 0.032 0.000
#> GSM125212     4  0.1430      0.827 0.004 0.052 0.000 0.944 0.000
#> GSM125214     2  0.0162      0.960 0.000 0.996 0.000 0.004 0.000
#> GSM125216     2  0.0000      0.960 0.000 1.000 0.000 0.000 0.000
#> GSM125218     4  0.3274      0.808 0.000 0.220 0.000 0.780 0.000
#> GSM125220     1  0.0963      0.958 0.964 0.000 0.000 0.000 0.036
#> GSM125222     3  0.3928      0.724 0.004 0.000 0.700 0.296 0.000
#> GSM125224     2  0.0000      0.960 0.000 1.000 0.000 0.000 0.000
#> GSM125226     4  0.3074      0.820 0.000 0.196 0.000 0.804 0.000
#> GSM125228     2  0.0000      0.960 0.000 1.000 0.000 0.000 0.000
#> GSM125230     3  0.3300      0.850 0.004 0.000 0.792 0.204 0.000
#> GSM125232     3  0.1571      0.901 0.000 0.000 0.936 0.004 0.060
#> GSM125234     5  0.1764      0.901 0.000 0.000 0.064 0.008 0.928
#> GSM125236     5  0.0290      0.951 0.008 0.000 0.000 0.000 0.992
#> GSM125238     1  0.0404      0.968 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
#> GSM125123     1  0.0508     0.9400 0.984 0.000 0.004 0.000 0.012 0.000
#> GSM125125     1  0.3636     0.5615 0.676 0.000 0.000 0.000 0.320 0.004
#> GSM125127     1  0.1226     0.9228 0.952 0.000 0.004 0.000 0.004 0.040
#> GSM125129     1  0.0692     0.9432 0.976 0.000 0.004 0.000 0.020 0.000
#> GSM125131     5  0.0713     0.9448 0.028 0.000 0.000 0.000 0.972 0.000
#> GSM125133     5  0.0458     0.9518 0.016 0.000 0.000 0.000 0.984 0.000
#> GSM125135     1  0.1155     0.9465 0.956 0.000 0.004 0.000 0.036 0.004
#> GSM125137     5  0.0000     0.9558 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125139     1  0.1082     0.9468 0.956 0.000 0.000 0.000 0.040 0.004
#> GSM125141     5  0.0000     0.9558 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125143     1  0.1644     0.9320 0.920 0.000 0.004 0.000 0.076 0.000
#> GSM125145     1  0.1889     0.9430 0.920 0.000 0.004 0.000 0.056 0.020
#> GSM125147     5  0.0260     0.9540 0.008 0.000 0.000 0.000 0.992 0.000
#> GSM125149     5  0.0000     0.9558 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125151     1  0.1082     0.9468 0.956 0.000 0.000 0.000 0.040 0.004
#> GSM125153     1  0.2704     0.8835 0.844 0.000 0.000 0.000 0.140 0.016
#> GSM125155     5  0.3584     0.5522 0.308 0.000 0.000 0.000 0.688 0.004
#> GSM125157     5  0.0000     0.9558 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125159     6  0.4890     0.7162 0.000 0.140 0.204 0.000 0.000 0.656
#> GSM125161     5  0.0000     0.9558 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125163     2  0.1075     0.9125 0.000 0.952 0.000 0.000 0.000 0.048
#> GSM125165     3  0.3087     0.5239 0.000 0.012 0.808 0.004 0.000 0.176
#> GSM125167     6  0.4821     0.7188 0.000 0.148 0.184 0.000 0.000 0.668
#> GSM125169     6  0.4963     0.3657 0.000 0.008 0.368 0.056 0.000 0.568
#> GSM125171     2  0.3657     0.7755 0.000 0.816 0.028 0.104 0.000 0.052
#> GSM125173     3  0.3423     0.6029 0.000 0.008 0.808 0.148 0.000 0.036
#> GSM125175     2  0.1950     0.8941 0.000 0.924 0.016 0.028 0.000 0.032
#> GSM125177     4  0.3950     0.7474 0.000 0.000 0.240 0.720 0.000 0.040
#> GSM125179     4  0.0405     0.8204 0.000 0.000 0.004 0.988 0.000 0.008
#> GSM125181     3  0.3343     0.5504 0.000 0.004 0.796 0.024 0.000 0.176
#> GSM125183     4  0.4093     0.5276 0.000 0.000 0.404 0.584 0.000 0.012
#> GSM125185     4  0.0858     0.8214 0.000 0.000 0.004 0.968 0.000 0.028
#> GSM125187     4  0.2882     0.7929 0.000 0.000 0.180 0.812 0.000 0.008
#> GSM125189     6  0.5138     0.7019 0.000 0.208 0.168 0.000 0.000 0.624
#> GSM125191     6  0.5955     0.5324 0.000 0.280 0.208 0.008 0.000 0.504
#> GSM125193     3  0.1908     0.6180 0.000 0.000 0.900 0.096 0.000 0.004
#> GSM125195     4  0.2956     0.8090 0.000 0.000 0.120 0.840 0.000 0.040
#> GSM125197     2  0.0000     0.9379 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125199     5  0.0547     0.9478 0.020 0.000 0.000 0.000 0.980 0.000
#> GSM125201     2  0.0260     0.9361 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM125203     4  0.4561     0.3935 0.000 0.000 0.428 0.536 0.000 0.036
#> GSM125205     2  0.2172     0.8855 0.000 0.912 0.020 0.024 0.000 0.044
#> GSM125207     4  0.1575     0.8225 0.000 0.000 0.032 0.936 0.000 0.032
#> GSM125209     6  0.5717     0.3905 0.000 0.100 0.348 0.024 0.000 0.528
#> GSM125211     3  0.2400     0.5839 0.000 0.008 0.872 0.004 0.000 0.116
#> GSM125213     6  0.4282     0.6054 0.000 0.304 0.040 0.000 0.000 0.656
#> GSM125215     2  0.0547     0.9313 0.000 0.980 0.000 0.000 0.000 0.020
#> GSM125217     6  0.4662     0.6907 0.000 0.096 0.236 0.000 0.000 0.668
#> GSM125219     1  0.0935     0.9233 0.964 0.000 0.004 0.000 0.000 0.032
#> GSM125221     3  0.1500     0.6234 0.000 0.000 0.936 0.052 0.000 0.012
#> GSM125223     2  0.0000     0.9379 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125225     2  0.1863     0.8548 0.000 0.896 0.000 0.000 0.000 0.104
#> GSM125227     2  0.0260     0.9370 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM125229     3  0.4289     0.4097 0.000 0.008 0.696 0.040 0.000 0.256
#> GSM125231     4  0.4017     0.7676 0.064 0.000 0.064 0.800 0.000 0.072
#> GSM125233     1  0.0458     0.9408 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM125235     5  0.0000     0.9558 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125237     5  0.0000     0.9558 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125124     1  0.1225     0.9463 0.952 0.000 0.000 0.000 0.036 0.012
#> GSM125126     5  0.2300     0.8356 0.144 0.000 0.000 0.000 0.856 0.000
#> GSM125128     5  0.0547     0.9493 0.020 0.000 0.000 0.000 0.980 0.000
#> GSM125130     1  0.1429     0.9117 0.940 0.000 0.004 0.004 0.000 0.052
#> GSM125132     5  0.1444     0.9128 0.072 0.000 0.000 0.000 0.928 0.000
#> GSM125134     1  0.1672     0.9447 0.932 0.000 0.004 0.000 0.048 0.016
#> GSM125136     5  0.0547     0.9493 0.020 0.000 0.000 0.000 0.980 0.000
#> GSM125138     1  0.1297     0.9464 0.948 0.000 0.000 0.000 0.040 0.012
#> GSM125140     1  0.0937     0.9462 0.960 0.000 0.000 0.000 0.040 0.000
#> GSM125142     1  0.2112     0.9259 0.896 0.000 0.000 0.000 0.088 0.016
#> GSM125144     1  0.1225     0.9463 0.952 0.000 0.000 0.000 0.036 0.012
#> GSM125146     1  0.2669     0.9101 0.864 0.000 0.004 0.000 0.108 0.024
#> GSM125148     5  0.1501     0.9035 0.076 0.000 0.000 0.000 0.924 0.000
#> GSM125150     1  0.2402     0.8764 0.856 0.000 0.000 0.000 0.140 0.004
#> GSM125152     1  0.1082     0.9468 0.956 0.000 0.000 0.000 0.040 0.004
#> GSM125154     1  0.2006     0.9304 0.904 0.000 0.000 0.000 0.080 0.016
#> GSM125156     1  0.1152     0.9462 0.952 0.000 0.000 0.000 0.044 0.004
#> GSM125158     1  0.1082     0.9463 0.956 0.000 0.000 0.000 0.040 0.004
#> GSM125160     6  0.3979     0.6447 0.000 0.256 0.036 0.000 0.000 0.708
#> GSM125162     5  0.0000     0.9558 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM125164     2  0.1556     0.8903 0.000 0.920 0.000 0.000 0.000 0.080
#> GSM125166     2  0.1007     0.9194 0.000 0.956 0.000 0.000 0.000 0.044
#> GSM125168     6  0.7018     0.3407 0.000 0.132 0.260 0.148 0.000 0.460
#> GSM125170     3  0.4381    -0.0403 0.000 0.000 0.536 0.440 0.000 0.024
#> GSM125172     2  0.0820     0.9301 0.000 0.972 0.012 0.000 0.000 0.016
#> GSM125174     4  0.1616     0.8155 0.000 0.000 0.048 0.932 0.000 0.020
#> GSM125176     2  0.5592     0.5187 0.000 0.632 0.060 0.224 0.000 0.084
#> GSM125178     4  0.3791     0.7528 0.000 0.000 0.236 0.732 0.000 0.032
#> GSM125180     4  0.0405     0.8204 0.000 0.000 0.004 0.988 0.000 0.008
#> GSM125182     6  0.5708     0.3161 0.000 0.080 0.376 0.032 0.000 0.512
#> GSM125184     4  0.2250     0.7908 0.000 0.000 0.092 0.888 0.000 0.020
#> GSM125186     4  0.0632     0.8211 0.000 0.000 0.000 0.976 0.000 0.024
#> GSM125188     3  0.3424     0.5594 0.000 0.004 0.796 0.032 0.000 0.168
#> GSM125190     6  0.5076     0.6910 0.000 0.132 0.248 0.000 0.000 0.620
#> GSM125192     2  0.0146     0.9373 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM125194     4  0.4184     0.2587 0.000 0.000 0.488 0.500 0.000 0.012
#> GSM125196     4  0.1780     0.8234 0.000 0.000 0.048 0.924 0.000 0.028
#> GSM125198     2  0.0000     0.9379 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125200     1  0.1082     0.9463 0.956 0.000 0.000 0.000 0.040 0.004
#> GSM125202     2  0.0806     0.9316 0.000 0.972 0.008 0.000 0.000 0.020
#> GSM125204     4  0.3555     0.7811 0.000 0.000 0.184 0.776 0.000 0.040
#> GSM125206     4  0.3450     0.7870 0.000 0.000 0.188 0.780 0.000 0.032
#> GSM125208     4  0.2201     0.8202 0.000 0.000 0.076 0.896 0.000 0.028
#> GSM125210     4  0.0993     0.8226 0.000 0.000 0.012 0.964 0.000 0.024
#> GSM125212     3  0.3253     0.4843 0.000 0.020 0.788 0.000 0.000 0.192
#> GSM125214     2  0.0146     0.9373 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM125216     2  0.0000     0.9379 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125218     6  0.4804     0.6985 0.000 0.112 0.232 0.000 0.000 0.656
#> GSM125220     5  0.0632     0.9498 0.024 0.000 0.000 0.000 0.976 0.000
#> GSM125222     3  0.3221     0.4101 0.000 0.000 0.736 0.264 0.000 0.000
#> GSM125224     2  0.0000     0.9379 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125226     6  0.4895     0.7102 0.000 0.124 0.228 0.000 0.000 0.648
#> GSM125228     2  0.0000     0.9379 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125230     3  0.4192    -0.1250 0.000 0.000 0.572 0.412 0.000 0.016
#> GSM125232     4  0.1720     0.8025 0.032 0.000 0.000 0.928 0.000 0.040
#> GSM125234     1  0.2998     0.8392 0.852 0.000 0.004 0.076 0.000 0.068
#> GSM125236     1  0.1082     0.9201 0.956 0.000 0.004 0.000 0.000 0.040
#> GSM125238     5  0.0000     0.9558 0.000 0.000 0.000 0.000 1.000 0.000

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-MAD-mclust-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-MAD-mclust-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-MAD-mclust-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-MAD-mclust-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-MAD-mclust-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-MAD-mclust-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-MAD-mclust-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-MAD-mclust-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-MAD-mclust-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-MAD-mclust-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk MAD-mclust-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-MAD-mclust-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-MAD-mclust-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-MAD-mclust-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-MAD-mclust-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-MAD-mclust-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk MAD-mclust-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>              n agent(p) individual(p) k
#> MAD:mclust 116    1.000      6.52e-06 2
#> MAD:mclust 110    0.968      5.70e-08 3
#> MAD:mclust 111    0.690      1.18e-06 4
#> MAD:mclust 114    0.387      7.53e-07 5
#> MAD:mclust 105    0.328      1.62e-07 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


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 21168 rows and 116 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#>   Subgroups are detected by 'NMF' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk MAD-NMF-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk MAD-NMF-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.946           0.943       0.977         0.5032 0.496   0.496
#> 3 3 0.797           0.869       0.931         0.2870 0.806   0.627
#> 4 4 0.637           0.655       0.820         0.1187 0.895   0.712
#> 5 5 0.647           0.609       0.764         0.0572 0.933   0.770
#> 6 6 0.695           0.578       0.771         0.0292 0.909   0.687

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
#> GSM125123     1  0.0000      0.975 1.000 0.000
#> GSM125125     1  0.0000      0.975 1.000 0.000
#> GSM125127     1  0.0000      0.975 1.000 0.000
#> GSM125129     1  0.0000      0.975 1.000 0.000
#> GSM125131     1  0.0000      0.975 1.000 0.000
#> GSM125133     1  0.0000      0.975 1.000 0.000
#> GSM125135     1  0.0000      0.975 1.000 0.000
#> GSM125137     1  0.0000      0.975 1.000 0.000
#> GSM125139     1  0.0000      0.975 1.000 0.000
#> GSM125141     1  0.0000      0.975 1.000 0.000
#> GSM125143     1  0.0000      0.975 1.000 0.000
#> GSM125145     1  0.0000      0.975 1.000 0.000
#> GSM125147     1  0.0000      0.975 1.000 0.000
#> GSM125149     1  0.0000      0.975 1.000 0.000
#> GSM125151     1  0.0000      0.975 1.000 0.000
#> GSM125153     1  0.0000      0.975 1.000 0.000
#> GSM125155     1  0.0000      0.975 1.000 0.000
#> GSM125157     1  0.0000      0.975 1.000 0.000
#> GSM125159     2  0.0000      0.976 0.000 1.000
#> GSM125161     1  0.0000      0.975 1.000 0.000
#> GSM125163     2  0.0000      0.976 0.000 1.000
#> GSM125165     2  0.0000      0.976 0.000 1.000
#> GSM125167     2  0.0000      0.976 0.000 1.000
#> GSM125169     2  0.0000      0.976 0.000 1.000
#> GSM125171     2  0.0000      0.976 0.000 1.000
#> GSM125173     2  0.0000      0.976 0.000 1.000
#> GSM125175     2  0.0000      0.976 0.000 1.000
#> GSM125177     2  0.0000      0.976 0.000 1.000
#> GSM125179     2  0.6801      0.789 0.180 0.820
#> GSM125181     2  0.0000      0.976 0.000 1.000
#> GSM125183     2  0.1184      0.963 0.016 0.984
#> GSM125185     2  0.0000      0.976 0.000 1.000
#> GSM125187     1  0.4298      0.883 0.912 0.088
#> GSM125189     2  0.0000      0.976 0.000 1.000
#> GSM125191     2  0.0000      0.976 0.000 1.000
#> GSM125193     1  0.0376      0.971 0.996 0.004
#> GSM125195     1  0.9922      0.167 0.552 0.448
#> GSM125197     2  0.0000      0.976 0.000 1.000
#> GSM125199     1  0.0000      0.975 1.000 0.000
#> GSM125201     2  0.0000      0.976 0.000 1.000
#> GSM125203     2  0.7815      0.713 0.232 0.768
#> GSM125205     2  0.0000      0.976 0.000 1.000
#> GSM125207     2  0.0000      0.976 0.000 1.000
#> GSM125209     2  0.0000      0.976 0.000 1.000
#> GSM125211     2  0.0000      0.976 0.000 1.000
#> GSM125213     2  0.0000      0.976 0.000 1.000
#> GSM125215     2  0.0000      0.976 0.000 1.000
#> GSM125217     2  0.0000      0.976 0.000 1.000
#> GSM125219     1  0.0000      0.975 1.000 0.000
#> GSM125221     2  0.0000      0.976 0.000 1.000
#> GSM125223     2  0.0000      0.976 0.000 1.000
#> GSM125225     2  0.0000      0.976 0.000 1.000
#> GSM125227     2  0.0000      0.976 0.000 1.000
#> GSM125229     2  0.0000      0.976 0.000 1.000
#> GSM125231     1  0.0000      0.975 1.000 0.000
#> GSM125233     1  0.0000      0.975 1.000 0.000
#> GSM125235     1  0.0000      0.975 1.000 0.000
#> GSM125237     1  0.0000      0.975 1.000 0.000
#> GSM125124     1  0.0000      0.975 1.000 0.000
#> GSM125126     1  0.0000      0.975 1.000 0.000
#> GSM125128     1  0.0000      0.975 1.000 0.000
#> GSM125130     1  0.0000      0.975 1.000 0.000
#> GSM125132     1  0.0000      0.975 1.000 0.000
#> GSM125134     1  0.0000      0.975 1.000 0.000
#> GSM125136     1  0.0000      0.975 1.000 0.000
#> GSM125138     1  0.0000      0.975 1.000 0.000
#> GSM125140     1  0.0000      0.975 1.000 0.000
#> GSM125142     1  0.0000      0.975 1.000 0.000
#> GSM125144     1  0.0000      0.975 1.000 0.000
#> GSM125146     1  0.0000      0.975 1.000 0.000
#> GSM125148     1  0.0000      0.975 1.000 0.000
#> GSM125150     1  0.0000      0.975 1.000 0.000
#> GSM125152     1  0.0000      0.975 1.000 0.000
#> GSM125154     1  0.0000      0.975 1.000 0.000
#> GSM125156     1  0.0000      0.975 1.000 0.000
#> GSM125158     1  0.0000      0.975 1.000 0.000
#> GSM125160     2  0.0000      0.976 0.000 1.000
#> GSM125162     1  0.0000      0.975 1.000 0.000
#> GSM125164     2  0.0000      0.976 0.000 1.000
#> GSM125166     2  0.0000      0.976 0.000 1.000
#> GSM125168     2  0.0000      0.976 0.000 1.000
#> GSM125170     2  0.0000      0.976 0.000 1.000
#> GSM125172     2  0.0000      0.976 0.000 1.000
#> GSM125174     2  0.0000      0.976 0.000 1.000
#> GSM125176     2  0.0000      0.976 0.000 1.000
#> GSM125178     2  0.8207      0.673 0.256 0.744
#> GSM125180     1  0.9170      0.488 0.668 0.332
#> GSM125182     2  0.0000      0.976 0.000 1.000
#> GSM125184     2  0.0000      0.976 0.000 1.000
#> GSM125186     2  0.7745      0.719 0.228 0.772
#> GSM125188     2  0.0000      0.976 0.000 1.000
#> GSM125190     2  0.0000      0.976 0.000 1.000
#> GSM125192     2  0.0000      0.976 0.000 1.000
#> GSM125194     1  0.0000      0.975 1.000 0.000
#> GSM125196     2  0.6801      0.789 0.180 0.820
#> GSM125198     2  0.0000      0.976 0.000 1.000
#> GSM125200     1  0.0000      0.975 1.000 0.000
#> GSM125202     2  0.0000      0.976 0.000 1.000
#> GSM125204     1  0.9963      0.108 0.536 0.464
#> GSM125206     2  0.2778      0.934 0.048 0.952
#> GSM125208     2  0.7745      0.718 0.228 0.772
#> GSM125210     2  0.0000      0.976 0.000 1.000
#> GSM125212     2  0.0000      0.976 0.000 1.000
#> GSM125214     2  0.0000      0.976 0.000 1.000
#> GSM125216     2  0.0000      0.976 0.000 1.000
#> GSM125218     2  0.0000      0.976 0.000 1.000
#> GSM125220     1  0.0000      0.975 1.000 0.000
#> GSM125222     2  0.0000      0.976 0.000 1.000
#> GSM125224     2  0.0000      0.976 0.000 1.000
#> GSM125226     2  0.0000      0.976 0.000 1.000
#> GSM125228     2  0.0000      0.976 0.000 1.000
#> GSM125230     1  0.0000      0.975 1.000 0.000
#> GSM125232     1  0.0000      0.975 1.000 0.000
#> GSM125234     1  0.0000      0.975 1.000 0.000
#> GSM125236     1  0.0000      0.975 1.000 0.000
#> GSM125238     1  0.0000      0.975 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
#> GSM125123     1  0.2959      0.905 0.900 0.000 0.100
#> GSM125125     1  0.1031      0.939 0.976 0.000 0.024
#> GSM125127     1  0.3412      0.883 0.876 0.000 0.124
#> GSM125129     1  0.2261      0.926 0.932 0.000 0.068
#> GSM125131     1  0.0000      0.939 1.000 0.000 0.000
#> GSM125133     1  0.0000      0.939 1.000 0.000 0.000
#> GSM125135     1  0.1860      0.933 0.948 0.000 0.052
#> GSM125137     1  0.0000      0.939 1.000 0.000 0.000
#> GSM125139     1  0.4178      0.828 0.828 0.000 0.172
#> GSM125141     1  0.0237      0.940 0.996 0.000 0.004
#> GSM125143     1  0.2448      0.922 0.924 0.000 0.076
#> GSM125145     1  0.2066      0.930 0.940 0.000 0.060
#> GSM125147     1  0.0000      0.939 1.000 0.000 0.000
#> GSM125149     1  0.0000      0.939 1.000 0.000 0.000
#> GSM125151     1  0.6274      0.163 0.544 0.000 0.456
#> GSM125153     1  0.1411      0.938 0.964 0.000 0.036
#> GSM125155     1  0.0892      0.940 0.980 0.000 0.020
#> GSM125157     1  0.0000      0.939 1.000 0.000 0.000
#> GSM125159     2  0.0237      0.955 0.004 0.996 0.000
#> GSM125161     1  0.0000      0.939 1.000 0.000 0.000
#> GSM125163     2  0.0000      0.956 0.000 1.000 0.000
#> GSM125165     2  0.0829      0.952 0.012 0.984 0.004
#> GSM125167     2  0.0000      0.956 0.000 1.000 0.000
#> GSM125169     2  0.3752      0.829 0.144 0.856 0.000
#> GSM125171     2  0.0237      0.955 0.000 0.996 0.004
#> GSM125173     2  0.0237      0.955 0.000 0.996 0.004
#> GSM125175     2  0.0237      0.955 0.000 0.996 0.004
#> GSM125177     2  0.5431      0.620 0.000 0.716 0.284
#> GSM125179     3  0.0424      0.840 0.000 0.008 0.992
#> GSM125181     2  0.1647      0.941 0.004 0.960 0.036
#> GSM125183     3  0.5216      0.631 0.000 0.260 0.740
#> GSM125185     3  0.1289      0.836 0.000 0.032 0.968
#> GSM125187     3  0.0592      0.836 0.012 0.000 0.988
#> GSM125189     2  0.0237      0.955 0.004 0.996 0.000
#> GSM125191     2  0.1753      0.934 0.000 0.952 0.048
#> GSM125193     1  0.0000      0.939 1.000 0.000 0.000
#> GSM125195     3  0.0592      0.841 0.000 0.012 0.988
#> GSM125197     2  0.0000      0.956 0.000 1.000 0.000
#> GSM125199     1  0.0237      0.940 0.996 0.000 0.004
#> GSM125201     2  0.0000      0.956 0.000 1.000 0.000
#> GSM125203     2  0.6054      0.704 0.180 0.768 0.052
#> GSM125205     2  0.0592      0.953 0.000 0.988 0.012
#> GSM125207     3  0.1031      0.838 0.000 0.024 0.976
#> GSM125209     2  0.4062      0.828 0.000 0.836 0.164
#> GSM125211     2  0.2066      0.919 0.060 0.940 0.000
#> GSM125213     2  0.0592      0.953 0.000 0.988 0.012
#> GSM125215     2  0.0237      0.955 0.000 0.996 0.004
#> GSM125217     2  0.1529      0.934 0.040 0.960 0.000
#> GSM125219     1  0.2625      0.916 0.916 0.000 0.084
#> GSM125221     2  0.2066      0.919 0.060 0.940 0.000
#> GSM125223     2  0.0000      0.956 0.000 1.000 0.000
#> GSM125225     2  0.0000      0.956 0.000 1.000 0.000
#> GSM125227     2  0.0000      0.956 0.000 1.000 0.000
#> GSM125229     2  0.3686      0.834 0.140 0.860 0.000
#> GSM125231     3  0.5138      0.648 0.252 0.000 0.748
#> GSM125233     1  0.3340      0.887 0.880 0.000 0.120
#> GSM125235     1  0.0000      0.939 1.000 0.000 0.000
#> GSM125237     1  0.0000      0.939 1.000 0.000 0.000
#> GSM125124     3  0.3267      0.779 0.116 0.000 0.884
#> GSM125126     1  0.0424      0.940 0.992 0.000 0.008
#> GSM125128     1  0.0000      0.939 1.000 0.000 0.000
#> GSM125130     3  0.5621      0.534 0.308 0.000 0.692
#> GSM125132     1  0.0424      0.940 0.992 0.000 0.008
#> GSM125134     1  0.2537      0.919 0.920 0.000 0.080
#> GSM125136     1  0.0000      0.939 1.000 0.000 0.000
#> GSM125138     3  0.6111      0.364 0.396 0.000 0.604
#> GSM125140     1  0.4121      0.832 0.832 0.000 0.168
#> GSM125142     1  0.1643      0.936 0.956 0.000 0.044
#> GSM125144     3  0.6168      0.312 0.412 0.000 0.588
#> GSM125146     1  0.1964      0.932 0.944 0.000 0.056
#> GSM125148     1  0.0237      0.940 0.996 0.000 0.004
#> GSM125150     1  0.0892      0.940 0.980 0.000 0.020
#> GSM125152     3  0.6095      0.358 0.392 0.000 0.608
#> GSM125154     1  0.3412      0.879 0.876 0.000 0.124
#> GSM125156     1  0.1964      0.932 0.944 0.000 0.056
#> GSM125158     1  0.1753      0.934 0.952 0.000 0.048
#> GSM125160     2  0.0000      0.956 0.000 1.000 0.000
#> GSM125162     1  0.0000      0.939 1.000 0.000 0.000
#> GSM125164     2  0.0592      0.953 0.000 0.988 0.012
#> GSM125166     2  0.0000      0.956 0.000 1.000 0.000
#> GSM125168     2  0.3116      0.885 0.000 0.892 0.108
#> GSM125170     2  0.0424      0.954 0.000 0.992 0.008
#> GSM125172     2  0.0000      0.956 0.000 1.000 0.000
#> GSM125174     3  0.2261      0.826 0.000 0.068 0.932
#> GSM125176     2  0.3941      0.833 0.000 0.844 0.156
#> GSM125178     3  0.5696      0.769 0.056 0.148 0.796
#> GSM125180     3  0.0000      0.838 0.000 0.000 1.000
#> GSM125182     2  0.3267      0.880 0.000 0.884 0.116
#> GSM125184     3  0.2356      0.821 0.000 0.072 0.928
#> GSM125186     3  0.0237      0.839 0.000 0.004 0.996
#> GSM125188     2  0.2301      0.927 0.004 0.936 0.060
#> GSM125190     2  0.0237      0.955 0.004 0.996 0.000
#> GSM125192     2  0.0424      0.954 0.000 0.992 0.008
#> GSM125194     1  0.5760      0.505 0.672 0.000 0.328
#> GSM125196     3  0.0592      0.840 0.000 0.012 0.988
#> GSM125198     2  0.0237      0.955 0.000 0.996 0.004
#> GSM125200     1  0.1529      0.937 0.960 0.000 0.040
#> GSM125202     2  0.0000      0.956 0.000 1.000 0.000
#> GSM125204     3  0.4209      0.788 0.020 0.120 0.860
#> GSM125206     3  0.5873      0.511 0.004 0.312 0.684
#> GSM125208     3  0.0424      0.840 0.000 0.008 0.992
#> GSM125210     3  0.2356      0.820 0.000 0.072 0.928
#> GSM125212     2  0.0892      0.947 0.020 0.980 0.000
#> GSM125214     2  0.0592      0.953 0.000 0.988 0.012
#> GSM125216     2  0.0892      0.951 0.000 0.980 0.020
#> GSM125218     2  0.1411      0.937 0.036 0.964 0.000
#> GSM125220     1  0.0000      0.939 1.000 0.000 0.000
#> GSM125222     2  0.3038      0.885 0.000 0.896 0.104
#> GSM125224     2  0.0000      0.956 0.000 1.000 0.000
#> GSM125226     2  0.0237      0.955 0.004 0.996 0.000
#> GSM125228     2  0.0000      0.956 0.000 1.000 0.000
#> GSM125230     3  0.6026      0.466 0.376 0.000 0.624
#> GSM125232     3  0.0424      0.837 0.008 0.000 0.992
#> GSM125234     3  0.1643      0.824 0.044 0.000 0.956
#> GSM125236     1  0.2261      0.927 0.932 0.000 0.068
#> GSM125238     1  0.0000      0.939 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
#> GSM125123     1  0.3105     0.8511 0.868 0.000 0.012 0.120
#> GSM125125     1  0.0469     0.8965 0.988 0.000 0.000 0.012
#> GSM125127     1  0.6223     0.5574 0.656 0.020 0.052 0.272
#> GSM125129     1  0.3215     0.8588 0.876 0.000 0.032 0.092
#> GSM125131     1  0.0188     0.8973 0.996 0.000 0.004 0.000
#> GSM125133     1  0.0592     0.8958 0.984 0.000 0.016 0.000
#> GSM125135     1  0.2775     0.8701 0.896 0.000 0.020 0.084
#> GSM125137     1  0.4008     0.7014 0.756 0.000 0.244 0.000
#> GSM125139     1  0.2149     0.8777 0.912 0.000 0.000 0.088
#> GSM125141     1  0.2081     0.8728 0.916 0.000 0.084 0.000
#> GSM125143     1  0.1767     0.8924 0.944 0.000 0.012 0.044
#> GSM125145     1  0.3219     0.8523 0.868 0.000 0.020 0.112
#> GSM125147     1  0.0921     0.8936 0.972 0.000 0.028 0.000
#> GSM125149     1  0.2469     0.8528 0.892 0.000 0.108 0.000
#> GSM125151     1  0.5284     0.4170 0.616 0.000 0.016 0.368
#> GSM125153     1  0.2256     0.8846 0.924 0.000 0.020 0.056
#> GSM125155     1  0.1635     0.8931 0.948 0.000 0.044 0.008
#> GSM125157     1  0.2345     0.8589 0.900 0.000 0.100 0.000
#> GSM125159     2  0.5285     0.0791 0.000 0.524 0.468 0.008
#> GSM125161     1  0.3688     0.7463 0.792 0.000 0.208 0.000
#> GSM125163     2  0.1211     0.7990 0.000 0.960 0.040 0.000
#> GSM125165     3  0.3300     0.6976 0.000 0.144 0.848 0.008
#> GSM125167     2  0.4872     0.4359 0.000 0.640 0.356 0.004
#> GSM125169     2  0.4920     0.6590 0.052 0.756 0.192 0.000
#> GSM125171     2  0.3174     0.7202 0.008 0.892 0.048 0.052
#> GSM125173     3  0.5372     0.1833 0.000 0.444 0.544 0.012
#> GSM125175     2  0.0336     0.7986 0.000 0.992 0.008 0.000
#> GSM125177     2  0.7731    -0.1486 0.000 0.428 0.332 0.240
#> GSM125179     4  0.3257     0.5811 0.000 0.004 0.152 0.844
#> GSM125181     3  0.3547     0.6982 0.000 0.144 0.840 0.016
#> GSM125183     3  0.3969     0.5326 0.000 0.016 0.804 0.180
#> GSM125185     4  0.4730     0.3183 0.000 0.000 0.364 0.636
#> GSM125187     3  0.5070     0.2156 0.000 0.004 0.580 0.416
#> GSM125189     2  0.2760     0.7554 0.000 0.872 0.128 0.000
#> GSM125191     2  0.5376     0.2610 0.000 0.588 0.396 0.016
#> GSM125193     3  0.4019     0.4843 0.196 0.012 0.792 0.000
#> GSM125195     4  0.5037     0.5728 0.040 0.048 0.112 0.800
#> GSM125197     2  0.0592     0.7943 0.000 0.984 0.016 0.000
#> GSM125199     1  0.1940     0.8756 0.924 0.000 0.076 0.000
#> GSM125201     2  0.0707     0.7921 0.000 0.980 0.020 0.000
#> GSM125203     2  0.8605    -0.1123 0.144 0.428 0.360 0.068
#> GSM125205     2  0.2385     0.7450 0.000 0.920 0.052 0.028
#> GSM125207     4  0.4661     0.3652 0.000 0.000 0.348 0.652
#> GSM125209     3  0.6192     0.2215 0.000 0.436 0.512 0.052
#> GSM125211     3  0.3048     0.6794 0.016 0.108 0.876 0.000
#> GSM125213     2  0.5093     0.4080 0.000 0.640 0.348 0.012
#> GSM125215     2  0.0817     0.8016 0.000 0.976 0.024 0.000
#> GSM125217     2  0.5193     0.3058 0.008 0.580 0.412 0.000
#> GSM125219     1  0.2727     0.8729 0.900 0.004 0.012 0.084
#> GSM125221     3  0.4462     0.6662 0.044 0.164 0.792 0.000
#> GSM125223     2  0.0469     0.7961 0.000 0.988 0.012 0.000
#> GSM125225     2  0.1389     0.7958 0.000 0.952 0.048 0.000
#> GSM125227     2  0.0592     0.8008 0.000 0.984 0.016 0.000
#> GSM125229     3  0.6508     0.4395 0.104 0.296 0.600 0.000
#> GSM125231     4  0.6511     0.5443 0.196 0.016 0.116 0.672
#> GSM125233     1  0.2737     0.8648 0.888 0.000 0.008 0.104
#> GSM125235     1  0.1302     0.8890 0.956 0.000 0.044 0.000
#> GSM125237     1  0.1716     0.8813 0.936 0.000 0.064 0.000
#> GSM125124     4  0.3907     0.5968 0.120 0.000 0.044 0.836
#> GSM125126     1  0.0657     0.8974 0.984 0.000 0.012 0.004
#> GSM125128     1  0.1118     0.8945 0.964 0.000 0.036 0.000
#> GSM125130     4  0.6398     0.2287 0.396 0.012 0.044 0.548
#> GSM125132     1  0.0188     0.8971 0.996 0.000 0.004 0.000
#> GSM125134     1  0.3598     0.8363 0.848 0.000 0.028 0.124
#> GSM125136     1  0.1867     0.8774 0.928 0.000 0.072 0.000
#> GSM125138     4  0.5769     0.3073 0.376 0.000 0.036 0.588
#> GSM125140     1  0.2530     0.8701 0.896 0.000 0.004 0.100
#> GSM125142     1  0.1174     0.8958 0.968 0.000 0.012 0.020
#> GSM125144     4  0.5611     0.2069 0.412 0.000 0.024 0.564
#> GSM125146     1  0.3051     0.8634 0.884 0.000 0.028 0.088
#> GSM125148     1  0.0188     0.8979 0.996 0.000 0.004 0.000
#> GSM125150     1  0.0469     0.8965 0.988 0.000 0.000 0.012
#> GSM125152     4  0.5237     0.3779 0.356 0.000 0.016 0.628
#> GSM125154     1  0.4436     0.7837 0.800 0.000 0.052 0.148
#> GSM125156     1  0.0657     0.8972 0.984 0.000 0.004 0.012
#> GSM125158     1  0.0707     0.8956 0.980 0.000 0.000 0.020
#> GSM125160     2  0.4746     0.5249 0.000 0.688 0.304 0.008
#> GSM125162     1  0.3123     0.8076 0.844 0.000 0.156 0.000
#> GSM125164     2  0.1824     0.7929 0.000 0.936 0.060 0.004
#> GSM125166     2  0.1637     0.7930 0.000 0.940 0.060 0.000
#> GSM125168     3  0.6061     0.3256 0.000 0.400 0.552 0.048
#> GSM125170     2  0.4453     0.6436 0.000 0.744 0.244 0.012
#> GSM125172     2  0.0336     0.7985 0.000 0.992 0.008 0.000
#> GSM125174     4  0.4483     0.5150 0.000 0.004 0.284 0.712
#> GSM125176     2  0.1913     0.7843 0.000 0.940 0.020 0.040
#> GSM125178     3  0.5161     0.0817 0.000 0.008 0.592 0.400
#> GSM125180     4  0.2149     0.5989 0.000 0.000 0.088 0.912
#> GSM125182     3  0.6240     0.4944 0.000 0.320 0.604 0.076
#> GSM125184     4  0.4936     0.4381 0.000 0.008 0.340 0.652
#> GSM125186     4  0.4522     0.4015 0.000 0.000 0.320 0.680
#> GSM125188     3  0.4194     0.6891 0.000 0.172 0.800 0.028
#> GSM125190     2  0.3486     0.7200 0.000 0.812 0.188 0.000
#> GSM125192     2  0.1211     0.7988 0.000 0.960 0.040 0.000
#> GSM125194     3  0.2751     0.5658 0.056 0.000 0.904 0.040
#> GSM125196     4  0.3142     0.5892 0.000 0.008 0.132 0.860
#> GSM125198     2  0.0469     0.7961 0.000 0.988 0.012 0.000
#> GSM125200     1  0.0592     0.8965 0.984 0.000 0.000 0.016
#> GSM125202     2  0.1004     0.7875 0.000 0.972 0.024 0.004
#> GSM125204     4  0.7177     0.3407 0.028 0.080 0.336 0.556
#> GSM125206     4  0.7944     0.2167 0.024 0.324 0.164 0.488
#> GSM125208     3  0.4955     0.1445 0.000 0.000 0.556 0.444
#> GSM125210     4  0.4103     0.4884 0.000 0.000 0.256 0.744
#> GSM125212     3  0.3681     0.6815 0.008 0.176 0.816 0.000
#> GSM125214     2  0.1118     0.7998 0.000 0.964 0.036 0.000
#> GSM125216     2  0.0336     0.8006 0.000 0.992 0.008 0.000
#> GSM125218     2  0.3649     0.6968 0.000 0.796 0.204 0.000
#> GSM125220     1  0.2081     0.8708 0.916 0.000 0.084 0.000
#> GSM125222     3  0.3447     0.6911 0.000 0.128 0.852 0.020
#> GSM125224     2  0.0469     0.7988 0.000 0.988 0.012 0.000
#> GSM125226     2  0.4431     0.5539 0.000 0.696 0.304 0.000
#> GSM125228     2  0.0336     0.8006 0.000 0.992 0.008 0.000
#> GSM125230     3  0.2635     0.5895 0.020 0.000 0.904 0.076
#> GSM125232     4  0.3257     0.5915 0.004 0.000 0.152 0.844
#> GSM125234     4  0.5925     0.5498 0.196 0.036 0.048 0.720
#> GSM125236     1  0.3970     0.8254 0.836 0.004 0.036 0.124
#> GSM125238     1  0.1716     0.8813 0.936 0.000 0.064 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
#> GSM125123     1  0.2464     0.8493 0.904 0.000 0.048 0.004 0.044
#> GSM125125     1  0.0798     0.8645 0.976 0.000 0.016 0.000 0.008
#> GSM125127     1  0.5678     0.6485 0.692 0.012 0.156 0.012 0.128
#> GSM125129     1  0.3187     0.8358 0.864 0.000 0.088 0.012 0.036
#> GSM125131     1  0.0865     0.8660 0.972 0.000 0.024 0.004 0.000
#> GSM125133     1  0.0693     0.8670 0.980 0.000 0.008 0.012 0.000
#> GSM125135     1  0.2506     0.8514 0.904 0.000 0.052 0.008 0.036
#> GSM125137     1  0.4359     0.6617 0.704 0.000 0.004 0.272 0.020
#> GSM125139     1  0.2395     0.8528 0.904 0.000 0.016 0.008 0.072
#> GSM125141     1  0.2623     0.8400 0.884 0.000 0.004 0.096 0.016
#> GSM125143     1  0.2812     0.8414 0.876 0.000 0.096 0.024 0.004
#> GSM125145     1  0.3183     0.8226 0.856 0.000 0.028 0.008 0.108
#> GSM125147     1  0.0693     0.8661 0.980 0.000 0.000 0.012 0.008
#> GSM125149     1  0.2439     0.8300 0.876 0.000 0.000 0.120 0.004
#> GSM125151     1  0.5346     0.5564 0.660 0.000 0.068 0.012 0.260
#> GSM125153     1  0.4134     0.6466 0.720 0.000 0.008 0.008 0.264
#> GSM125155     1  0.1522     0.8634 0.944 0.000 0.000 0.044 0.012
#> GSM125157     1  0.2497     0.8341 0.880 0.000 0.004 0.112 0.004
#> GSM125159     4  0.5922     0.2983 0.000 0.388 0.108 0.504 0.000
#> GSM125161     1  0.3906     0.7011 0.744 0.000 0.016 0.240 0.000
#> GSM125163     2  0.0955     0.7681 0.000 0.968 0.004 0.028 0.000
#> GSM125165     4  0.3962     0.5180 0.012 0.180 0.004 0.788 0.016
#> GSM125167     2  0.4088     0.4097 0.000 0.632 0.000 0.368 0.000
#> GSM125169     2  0.4472     0.6189 0.032 0.732 0.004 0.228 0.004
#> GSM125171     2  0.3154     0.7243 0.004 0.868 0.088 0.008 0.032
#> GSM125173     4  0.5683     0.1904 0.000 0.420 0.032 0.520 0.028
#> GSM125175     2  0.0324     0.7696 0.000 0.992 0.004 0.004 0.000
#> GSM125177     3  0.5317     0.6396 0.000 0.100 0.708 0.172 0.020
#> GSM125179     5  0.3288     0.5947 0.000 0.020 0.040 0.076 0.864
#> GSM125181     4  0.3646     0.4877 0.000 0.072 0.064 0.844 0.020
#> GSM125183     4  0.5723     0.1729 0.000 0.076 0.004 0.532 0.388
#> GSM125185     5  0.6740     0.1639 0.000 0.004 0.316 0.232 0.448
#> GSM125187     4  0.6881     0.1707 0.000 0.020 0.216 0.500 0.264
#> GSM125189     2  0.2536     0.7259 0.000 0.868 0.004 0.128 0.000
#> GSM125191     2  0.5592     0.2907 0.000 0.576 0.056 0.356 0.012
#> GSM125193     4  0.4873     0.2398 0.068 0.000 0.244 0.688 0.000
#> GSM125195     3  0.2368     0.7341 0.008 0.024 0.920 0.032 0.016
#> GSM125197     2  0.2890     0.6911 0.000 0.836 0.160 0.004 0.000
#> GSM125199     1  0.2179     0.8410 0.896 0.000 0.004 0.100 0.000
#> GSM125201     2  0.3582     0.6195 0.000 0.768 0.224 0.008 0.000
#> GSM125203     3  0.4224     0.7229 0.044 0.024 0.796 0.136 0.000
#> GSM125205     2  0.4666     0.3441 0.004 0.596 0.388 0.012 0.000
#> GSM125207     3  0.5025     0.6525 0.000 0.000 0.704 0.172 0.124
#> GSM125209     4  0.7088     0.4085 0.000 0.300 0.236 0.444 0.020
#> GSM125211     4  0.4400     0.3227 0.008 0.020 0.236 0.732 0.004
#> GSM125213     2  0.5798     0.2016 0.000 0.556 0.108 0.336 0.000
#> GSM125215     2  0.2248     0.7567 0.000 0.900 0.088 0.012 0.000
#> GSM125217     4  0.4591    -0.0252 0.004 0.476 0.004 0.516 0.000
#> GSM125219     1  0.3077     0.8330 0.864 0.000 0.100 0.008 0.028
#> GSM125221     4  0.4996     0.4068 0.016 0.300 0.000 0.656 0.028
#> GSM125223     2  0.1892     0.7496 0.000 0.916 0.080 0.004 0.000
#> GSM125225     2  0.1041     0.7674 0.000 0.964 0.004 0.032 0.000
#> GSM125227     2  0.1357     0.7654 0.000 0.948 0.048 0.004 0.000
#> GSM125229     4  0.6179     0.0136 0.064 0.036 0.356 0.544 0.000
#> GSM125231     5  0.5228     0.4037 0.048 0.000 0.276 0.016 0.660
#> GSM125233     1  0.3420     0.8126 0.836 0.000 0.124 0.004 0.036
#> GSM125235     1  0.0880     0.8634 0.968 0.000 0.000 0.032 0.000
#> GSM125237     1  0.1557     0.8593 0.940 0.000 0.008 0.052 0.000
#> GSM125124     5  0.2473     0.6073 0.072 0.000 0.032 0.000 0.896
#> GSM125126     1  0.0000     0.8653 1.000 0.000 0.000 0.000 0.000
#> GSM125128     1  0.1907     0.8622 0.928 0.000 0.044 0.028 0.000
#> GSM125130     1  0.6992    -0.1517 0.388 0.000 0.372 0.012 0.228
#> GSM125132     1  0.0000     0.8653 1.000 0.000 0.000 0.000 0.000
#> GSM125134     1  0.4598     0.5649 0.664 0.000 0.016 0.008 0.312
#> GSM125136     1  0.1740     0.8571 0.932 0.000 0.012 0.056 0.000
#> GSM125138     5  0.3482     0.5744 0.168 0.000 0.012 0.008 0.812
#> GSM125140     1  0.2694     0.8292 0.864 0.000 0.004 0.004 0.128
#> GSM125142     1  0.3905     0.6901 0.752 0.000 0.004 0.012 0.232
#> GSM125144     5  0.3974     0.5413 0.228 0.000 0.016 0.004 0.752
#> GSM125146     1  0.4010     0.7583 0.784 0.000 0.032 0.008 0.176
#> GSM125148     1  0.0865     0.8655 0.972 0.000 0.004 0.000 0.024
#> GSM125150     1  0.0609     0.8654 0.980 0.000 0.000 0.000 0.020
#> GSM125152     5  0.6069     0.0784 0.444 0.000 0.092 0.008 0.456
#> GSM125154     5  0.4954     0.2781 0.380 0.000 0.012 0.016 0.592
#> GSM125156     1  0.0771     0.8665 0.976 0.000 0.000 0.004 0.020
#> GSM125158     1  0.1018     0.8641 0.968 0.000 0.016 0.000 0.016
#> GSM125160     2  0.5047     0.4419 0.000 0.652 0.064 0.284 0.000
#> GSM125162     1  0.3391     0.7650 0.800 0.000 0.012 0.188 0.000
#> GSM125164     2  0.2249     0.7442 0.000 0.896 0.000 0.096 0.008
#> GSM125166     2  0.2722     0.7278 0.000 0.868 0.004 0.120 0.008
#> GSM125168     2  0.6501     0.0687 0.000 0.488 0.012 0.360 0.140
#> GSM125170     2  0.6369     0.3016 0.000 0.544 0.004 0.216 0.236
#> GSM125172     2  0.0880     0.7675 0.000 0.968 0.032 0.000 0.000
#> GSM125174     5  0.3129     0.5918 0.000 0.020 0.032 0.076 0.872
#> GSM125176     2  0.2308     0.7598 0.000 0.912 0.004 0.048 0.036
#> GSM125178     3  0.5983     0.5631 0.000 0.000 0.580 0.252 0.168
#> GSM125180     5  0.2899     0.5907 0.000 0.004 0.096 0.028 0.872
#> GSM125182     4  0.6542     0.3619 0.000 0.140 0.288 0.548 0.024
#> GSM125184     5  0.3817     0.5589 0.000 0.032 0.020 0.128 0.820
#> GSM125186     5  0.6172     0.3181 0.000 0.000 0.280 0.176 0.544
#> GSM125188     4  0.4568     0.3869 0.000 0.036 0.208 0.740 0.016
#> GSM125190     2  0.4316     0.6292 0.000 0.748 0.004 0.208 0.040
#> GSM125192     2  0.1331     0.7647 0.000 0.952 0.000 0.040 0.008
#> GSM125194     4  0.4408     0.2837 0.032 0.000 0.224 0.736 0.008
#> GSM125196     3  0.3119     0.7322 0.000 0.000 0.860 0.068 0.072
#> GSM125198     2  0.2233     0.7371 0.000 0.892 0.104 0.004 0.000
#> GSM125200     1  0.0566     0.8649 0.984 0.000 0.004 0.000 0.012
#> GSM125202     2  0.2497     0.7293 0.000 0.880 0.112 0.004 0.004
#> GSM125204     3  0.3147     0.7515 0.012 0.012 0.864 0.104 0.008
#> GSM125206     3  0.5084     0.6652 0.008 0.064 0.768 0.064 0.096
#> GSM125208     3  0.5188     0.5089 0.000 0.000 0.600 0.344 0.056
#> GSM125210     5  0.6089     0.3672 0.000 0.004 0.256 0.160 0.580
#> GSM125212     4  0.4498     0.2779 0.000 0.032 0.280 0.688 0.000
#> GSM125214     2  0.0865     0.7689 0.000 0.972 0.004 0.024 0.000
#> GSM125216     2  0.1124     0.7660 0.000 0.960 0.036 0.004 0.000
#> GSM125218     2  0.3366     0.6656 0.000 0.784 0.004 0.212 0.000
#> GSM125220     1  0.2193     0.8457 0.900 0.000 0.008 0.092 0.000
#> GSM125222     4  0.6524     0.3418 0.004 0.312 0.004 0.512 0.168
#> GSM125224     2  0.1952     0.7475 0.000 0.912 0.084 0.004 0.000
#> GSM125226     2  0.4029     0.5092 0.000 0.680 0.004 0.316 0.000
#> GSM125228     2  0.0693     0.7694 0.000 0.980 0.012 0.008 0.000
#> GSM125230     4  0.4914     0.0823 0.004 0.000 0.336 0.628 0.032
#> GSM125232     5  0.2074     0.5955 0.000 0.000 0.044 0.036 0.920
#> GSM125234     5  0.7161     0.2745 0.188 0.012 0.368 0.012 0.420
#> GSM125236     1  0.2730     0.8451 0.892 0.000 0.056 0.008 0.044
#> GSM125238     1  0.2349     0.8466 0.900 0.000 0.004 0.084 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
#> GSM125123     1  0.2383    0.85071 0.900 0.000 0.000 0.020 0.052 0.028
#> GSM125125     1  0.0820    0.86304 0.972 0.000 0.000 0.000 0.016 0.012
#> GSM125127     1  0.4829    0.68882 0.700 0.000 0.008 0.048 0.028 0.216
#> GSM125129     1  0.2891    0.84109 0.868 0.000 0.008 0.012 0.024 0.088
#> GSM125131     1  0.0363    0.86420 0.988 0.000 0.000 0.000 0.000 0.012
#> GSM125133     1  0.0632    0.86354 0.976 0.000 0.000 0.000 0.000 0.024
#> GSM125135     1  0.2859    0.83995 0.868 0.000 0.008 0.012 0.020 0.092
#> GSM125137     1  0.5250    0.57777 0.640 0.000 0.044 0.060 0.000 0.256
#> GSM125139     1  0.2582    0.85587 0.888 0.000 0.000 0.020 0.060 0.032
#> GSM125141     1  0.3332    0.79347 0.808 0.000 0.000 0.048 0.000 0.144
#> GSM125143     1  0.3702    0.80858 0.808 0.000 0.016 0.000 0.104 0.072
#> GSM125145     1  0.2542    0.84321 0.876 0.000 0.000 0.044 0.000 0.080
#> GSM125147     1  0.1434    0.86195 0.940 0.000 0.000 0.012 0.000 0.048
#> GSM125149     1  0.2196    0.83732 0.884 0.000 0.004 0.004 0.000 0.108
#> GSM125151     1  0.4546    0.63321 0.660 0.000 0.000 0.040 0.288 0.012
#> GSM125153     4  0.5291    0.07881 0.448 0.000 0.016 0.476 0.000 0.060
#> GSM125155     1  0.0713    0.86328 0.972 0.000 0.000 0.000 0.000 0.028
#> GSM125157     1  0.2377    0.83023 0.868 0.000 0.004 0.004 0.000 0.124
#> GSM125159     2  0.6610   -0.20666 0.000 0.408 0.388 0.000 0.064 0.140
#> GSM125161     1  0.4341    0.71105 0.732 0.000 0.080 0.000 0.008 0.180
#> GSM125163     2  0.0692    0.76366 0.000 0.976 0.004 0.000 0.000 0.020
#> GSM125165     6  0.7925   -0.16504 0.000 0.192 0.288 0.084 0.060 0.376
#> GSM125167     2  0.3415    0.69180 0.000 0.824 0.020 0.000 0.036 0.120
#> GSM125169     2  0.3281    0.69975 0.036 0.828 0.000 0.000 0.012 0.124
#> GSM125171     2  0.3154    0.66676 0.000 0.800 0.000 0.012 0.004 0.184
#> GSM125173     3  0.7644   -0.13023 0.000 0.168 0.396 0.284 0.020 0.132
#> GSM125175     2  0.1075    0.75685 0.000 0.952 0.000 0.000 0.000 0.048
#> GSM125177     3  0.4255    0.50418 0.000 0.004 0.692 0.012 0.020 0.272
#> GSM125179     4  0.4783    0.38143 0.000 0.044 0.000 0.612 0.332 0.012
#> GSM125181     3  0.7518   -0.25811 0.000 0.164 0.340 0.000 0.204 0.292
#> GSM125183     4  0.6015    0.40085 0.004 0.024 0.084 0.624 0.040 0.224
#> GSM125185     5  0.1847    0.45964 0.000 0.008 0.008 0.048 0.928 0.008
#> GSM125187     5  0.5984    0.35572 0.008 0.096 0.040 0.044 0.672 0.140
#> GSM125189     2  0.1616    0.75857 0.000 0.932 0.020 0.000 0.000 0.048
#> GSM125191     2  0.4691    0.59837 0.000 0.728 0.028 0.000 0.144 0.100
#> GSM125193     3  0.5640    0.30682 0.036 0.004 0.632 0.000 0.116 0.212
#> GSM125195     3  0.5513    0.41324 0.000 0.004 0.532 0.004 0.108 0.352
#> GSM125197     2  0.3424    0.62795 0.000 0.772 0.024 0.000 0.000 0.204
#> GSM125199     1  0.1663    0.84874 0.912 0.000 0.000 0.000 0.000 0.088
#> GSM125201     2  0.5493    0.21423 0.000 0.576 0.136 0.008 0.000 0.280
#> GSM125203     3  0.4764    0.50442 0.012 0.004 0.664 0.000 0.052 0.268
#> GSM125205     6  0.6240   -0.22400 0.000 0.236 0.292 0.008 0.004 0.460
#> GSM125207     3  0.4181    0.47959 0.000 0.000 0.644 0.000 0.328 0.028
#> GSM125209     5  0.6156   -0.02967 0.000 0.392 0.052 0.000 0.460 0.096
#> GSM125211     3  0.2201    0.52443 0.000 0.000 0.904 0.036 0.004 0.056
#> GSM125213     2  0.4635    0.62295 0.000 0.744 0.052 0.000 0.132 0.072
#> GSM125215     2  0.1745    0.75068 0.000 0.920 0.012 0.000 0.000 0.068
#> GSM125217     2  0.5419    0.42950 0.000 0.628 0.160 0.000 0.016 0.196
#> GSM125219     1  0.3240    0.81344 0.820 0.000 0.000 0.008 0.144 0.028
#> GSM125221     2  0.6523    0.27603 0.008 0.540 0.068 0.012 0.080 0.292
#> GSM125223     2  0.2135    0.72303 0.000 0.872 0.000 0.000 0.000 0.128
#> GSM125225     2  0.0458    0.76343 0.000 0.984 0.000 0.000 0.000 0.016
#> GSM125227     2  0.2118    0.73480 0.000 0.888 0.008 0.000 0.000 0.104
#> GSM125229     3  0.2375    0.54964 0.012 0.000 0.888 0.000 0.012 0.088
#> GSM125231     4  0.5767    0.18280 0.004 0.000 0.256 0.532 0.000 0.208
#> GSM125233     1  0.3602    0.78138 0.784 0.000 0.000 0.008 0.176 0.032
#> GSM125235     1  0.0632    0.86288 0.976 0.000 0.000 0.000 0.000 0.024
#> GSM125237     1  0.1267    0.85940 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM125124     4  0.3194    0.59740 0.032 0.000 0.000 0.828 0.132 0.008
#> GSM125126     1  0.0891    0.86497 0.968 0.000 0.000 0.000 0.008 0.024
#> GSM125128     1  0.2295    0.86008 0.904 0.000 0.028 0.000 0.016 0.052
#> GSM125130     5  0.4979    0.14482 0.356 0.000 0.000 0.028 0.584 0.032
#> GSM125132     1  0.0520    0.86391 0.984 0.000 0.000 0.000 0.008 0.008
#> GSM125134     1  0.4808   -0.06135 0.476 0.000 0.000 0.472 0.000 0.052
#> GSM125136     1  0.1882    0.85938 0.920 0.000 0.012 0.000 0.008 0.060
#> GSM125138     4  0.2084    0.62998 0.024 0.000 0.000 0.916 0.044 0.016
#> GSM125140     1  0.2340    0.85883 0.900 0.000 0.000 0.024 0.016 0.060
#> GSM125142     4  0.5190    0.05214 0.448 0.000 0.000 0.464 0.000 0.088
#> GSM125144     4  0.4426    0.54165 0.152 0.000 0.000 0.748 0.072 0.028
#> GSM125146     1  0.4934    0.49839 0.632 0.000 0.000 0.256 0.000 0.112
#> GSM125148     1  0.2340    0.84725 0.896 0.000 0.004 0.056 0.000 0.044
#> GSM125150     1  0.0717    0.86354 0.976 0.000 0.000 0.008 0.000 0.016
#> GSM125152     1  0.5733    0.43306 0.560 0.000 0.000 0.108 0.304 0.028
#> GSM125154     4  0.3246    0.59447 0.072 0.000 0.016 0.844 0.000 0.068
#> GSM125156     1  0.1092    0.86499 0.960 0.000 0.000 0.020 0.000 0.020
#> GSM125158     1  0.1167    0.86244 0.960 0.000 0.000 0.012 0.008 0.020
#> GSM125160     2  0.4453    0.62505 0.000 0.756 0.136 0.000 0.052 0.056
#> GSM125162     1  0.3190    0.80085 0.820 0.000 0.044 0.000 0.000 0.136
#> GSM125164     2  0.1176    0.75797 0.000 0.956 0.000 0.000 0.020 0.024
#> GSM125166     2  0.0777    0.75942 0.000 0.972 0.000 0.000 0.004 0.024
#> GSM125168     2  0.6639    0.34689 0.000 0.580 0.048 0.204 0.052 0.116
#> GSM125170     2  0.4029    0.67442 0.000 0.792 0.000 0.080 0.032 0.096
#> GSM125172     2  0.2615    0.71211 0.000 0.852 0.004 0.008 0.000 0.136
#> GSM125174     4  0.2276    0.61816 0.000 0.008 0.020 0.912 0.040 0.020
#> GSM125176     2  0.0881    0.76376 0.000 0.972 0.000 0.008 0.008 0.012
#> GSM125178     3  0.3618    0.54903 0.000 0.000 0.812 0.076 0.012 0.100
#> GSM125180     4  0.4421    0.27775 0.000 0.020 0.000 0.552 0.424 0.004
#> GSM125182     5  0.7095    0.01739 0.000 0.152 0.320 0.000 0.408 0.120
#> GSM125184     4  0.3087    0.60914 0.000 0.008 0.020 0.856 0.096 0.020
#> GSM125186     5  0.2044    0.44459 0.000 0.004 0.008 0.076 0.908 0.004
#> GSM125188     5  0.6670    0.00481 0.000 0.048 0.380 0.000 0.384 0.188
#> GSM125190     2  0.2742    0.72419 0.000 0.856 0.008 0.008 0.004 0.124
#> GSM125192     2  0.0603    0.76350 0.000 0.980 0.000 0.000 0.004 0.016
#> GSM125194     3  0.4432    0.36532 0.008 0.000 0.720 0.036 0.016 0.220
#> GSM125196     3  0.6246    0.41978 0.000 0.004 0.508 0.020 0.200 0.268
#> GSM125198     2  0.2704    0.70371 0.000 0.844 0.016 0.000 0.000 0.140
#> GSM125200     1  0.1232    0.86159 0.956 0.000 0.000 0.004 0.016 0.024
#> GSM125202     2  0.4137    0.57876 0.000 0.732 0.024 0.016 0.004 0.224
#> GSM125204     3  0.5792    0.46009 0.004 0.004 0.552 0.000 0.208 0.232
#> GSM125206     3  0.4859    0.37768 0.000 0.004 0.548 0.028 0.012 0.408
#> GSM125208     3  0.3686    0.52253 0.000 0.000 0.748 0.000 0.220 0.032
#> GSM125210     5  0.2692    0.38691 0.000 0.012 0.000 0.148 0.840 0.000
#> GSM125212     3  0.1251    0.53974 0.000 0.000 0.956 0.008 0.012 0.024
#> GSM125214     2  0.0777    0.76292 0.000 0.972 0.000 0.000 0.004 0.024
#> GSM125216     2  0.1267    0.75470 0.000 0.940 0.000 0.000 0.000 0.060
#> GSM125218     2  0.2126    0.74562 0.000 0.904 0.020 0.000 0.004 0.072
#> GSM125220     1  0.2214    0.85127 0.892 0.000 0.004 0.000 0.012 0.092
#> GSM125222     2  0.7528    0.08542 0.000 0.460 0.048 0.168 0.080 0.244
#> GSM125224     2  0.2346    0.72091 0.000 0.868 0.008 0.000 0.000 0.124
#> GSM125226     2  0.3160    0.70785 0.000 0.836 0.012 0.004 0.020 0.128
#> GSM125228     2  0.1610    0.74763 0.000 0.916 0.000 0.000 0.000 0.084
#> GSM125230     3  0.2307    0.53816 0.000 0.000 0.896 0.068 0.004 0.032
#> GSM125232     4  0.2325    0.62037 0.000 0.000 0.048 0.900 0.044 0.008
#> GSM125234     5  0.6170    0.17774 0.192 0.000 0.000 0.124 0.592 0.092
#> GSM125236     1  0.2898    0.83859 0.864 0.000 0.000 0.024 0.024 0.088
#> GSM125238     1  0.2790    0.82363 0.844 0.000 0.000 0.024 0.000 0.132

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-MAD-NMF-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-MAD-NMF-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-MAD-NMF-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-MAD-NMF-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-MAD-NMF-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-MAD-NMF-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-MAD-NMF-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-MAD-NMF-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-MAD-NMF-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-MAD-NMF-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-MAD-NMF-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-MAD-NMF-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-MAD-NMF-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-MAD-NMF-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-MAD-NMF-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-MAD-NMF-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-MAD-NMF-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-MAD-NMF-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-MAD-NMF-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-MAD-NMF-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk MAD-NMF-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-MAD-NMF-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-MAD-NMF-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-MAD-NMF-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-MAD-NMF-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-MAD-NMF-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk MAD-NMF-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>           n agent(p) individual(p) k
#> MAD:NMF 113   1.0000      4.12e-05 2
#> MAD:NMF 111   0.1856      1.08e-05 3
#> MAD:NMF  88   0.5445      1.24e-06 4
#> MAD:NMF  84   0.1295      4.62e-05 5
#> MAD:NMF  81   0.0235      3.01e-05 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


ATC: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 21168 rows and 116 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 0.805           0.923       0.958         0.4337 0.568   0.568
#> 3 3 0.920           0.917       0.956         0.5114 0.770   0.595
#> 4 4 0.877           0.837       0.859         0.0672 1.000   1.000
#> 5 5 0.876           0.837       0.876         0.0242 0.933   0.804
#> 6 6 0.830           0.778       0.870         0.0288 0.968   0.892

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 3

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM125123     1  0.0000      0.951 1.000 0.000
#> GSM125125     1  0.0000      0.951 1.000 0.000
#> GSM125127     1  0.0000      0.951 1.000 0.000
#> GSM125129     1  0.0000      0.951 1.000 0.000
#> GSM125131     1  0.0000      0.951 1.000 0.000
#> GSM125133     1  0.0000      0.951 1.000 0.000
#> GSM125135     1  0.0000      0.951 1.000 0.000
#> GSM125137     1  0.0000      0.951 1.000 0.000
#> GSM125139     1  0.0000      0.951 1.000 0.000
#> GSM125141     1  0.0000      0.951 1.000 0.000
#> GSM125143     1  0.0000      0.951 1.000 0.000
#> GSM125145     1  0.0000      0.951 1.000 0.000
#> GSM125147     1  0.0000      0.951 1.000 0.000
#> GSM125149     1  0.0000      0.951 1.000 0.000
#> GSM125151     1  0.0000      0.951 1.000 0.000
#> GSM125153     1  0.0000      0.951 1.000 0.000
#> GSM125155     1  0.0000      0.951 1.000 0.000
#> GSM125157     1  0.0000      0.951 1.000 0.000
#> GSM125159     2  0.0000      0.960 0.000 1.000
#> GSM125161     1  0.0000      0.951 1.000 0.000
#> GSM125163     2  0.0000      0.960 0.000 1.000
#> GSM125165     1  0.4939      0.908 0.892 0.108
#> GSM125167     2  0.1184      0.954 0.016 0.984
#> GSM125169     2  0.8861      0.564 0.304 0.696
#> GSM125171     2  0.0672      0.957 0.008 0.992
#> GSM125173     1  0.4562      0.917 0.904 0.096
#> GSM125175     2  0.0000      0.960 0.000 1.000
#> GSM125177     1  0.4690      0.914 0.900 0.100
#> GSM125179     1  0.4431      0.919 0.908 0.092
#> GSM125181     1  0.7815      0.752 0.768 0.232
#> GSM125183     1  0.4562      0.917 0.904 0.096
#> GSM125185     1  0.4431      0.919 0.908 0.092
#> GSM125187     1  0.4431      0.919 0.908 0.092
#> GSM125189     2  0.4298      0.897 0.088 0.912
#> GSM125191     2  0.3733      0.911 0.072 0.928
#> GSM125193     1  0.4298      0.921 0.912 0.088
#> GSM125195     1  0.4690      0.914 0.900 0.100
#> GSM125197     2  0.0000      0.960 0.000 1.000
#> GSM125199     1  0.0000      0.951 1.000 0.000
#> GSM125201     2  0.0000      0.960 0.000 1.000
#> GSM125203     1  0.4690      0.914 0.900 0.100
#> GSM125205     2  0.0000      0.960 0.000 1.000
#> GSM125207     1  0.4690      0.914 0.900 0.100
#> GSM125209     2  0.3733      0.911 0.072 0.928
#> GSM125211     1  0.4690      0.914 0.900 0.100
#> GSM125213     2  0.0000      0.960 0.000 1.000
#> GSM125215     2  0.0000      0.960 0.000 1.000
#> GSM125217     2  0.2423      0.939 0.040 0.960
#> GSM125219     1  0.0376      0.951 0.996 0.004
#> GSM125221     1  0.4431      0.919 0.908 0.092
#> GSM125223     2  0.0000      0.960 0.000 1.000
#> GSM125225     2  0.0000      0.960 0.000 1.000
#> GSM125227     2  0.0000      0.960 0.000 1.000
#> GSM125229     1  0.9944      0.206 0.544 0.456
#> GSM125231     1  0.1633      0.945 0.976 0.024
#> GSM125233     1  0.0000      0.951 1.000 0.000
#> GSM125235     1  0.0000      0.951 1.000 0.000
#> GSM125237     1  0.0000      0.951 1.000 0.000
#> GSM125124     1  0.0000      0.951 1.000 0.000
#> GSM125126     1  0.0000      0.951 1.000 0.000
#> GSM125128     1  0.0000      0.951 1.000 0.000
#> GSM125130     1  0.0000      0.951 1.000 0.000
#> GSM125132     1  0.0000      0.951 1.000 0.000
#> GSM125134     1  0.0000      0.951 1.000 0.000
#> GSM125136     1  0.0000      0.951 1.000 0.000
#> GSM125138     1  0.0000      0.951 1.000 0.000
#> GSM125140     1  0.0000      0.951 1.000 0.000
#> GSM125142     1  0.0000      0.951 1.000 0.000
#> GSM125144     1  0.0000      0.951 1.000 0.000
#> GSM125146     1  0.0000      0.951 1.000 0.000
#> GSM125148     1  0.0000      0.951 1.000 0.000
#> GSM125150     1  0.0000      0.951 1.000 0.000
#> GSM125152     1  0.0000      0.951 1.000 0.000
#> GSM125154     1  0.0000      0.951 1.000 0.000
#> GSM125156     1  0.0000      0.951 1.000 0.000
#> GSM125158     1  0.0000      0.951 1.000 0.000
#> GSM125160     2  0.0000      0.960 0.000 1.000
#> GSM125162     1  0.0000      0.951 1.000 0.000
#> GSM125164     2  0.0000      0.960 0.000 1.000
#> GSM125166     2  0.0000      0.960 0.000 1.000
#> GSM125168     2  0.1184      0.954 0.016 0.984
#> GSM125170     2  0.8861      0.564 0.304 0.696
#> GSM125172     2  0.0000      0.960 0.000 1.000
#> GSM125174     1  0.4562      0.917 0.904 0.096
#> GSM125176     2  0.7674      0.711 0.224 0.776
#> GSM125178     1  0.4690      0.914 0.900 0.100
#> GSM125180     1  0.4431      0.919 0.908 0.092
#> GSM125182     2  0.1184      0.954 0.016 0.984
#> GSM125184     1  0.4562      0.917 0.904 0.096
#> GSM125186     1  0.4431      0.919 0.908 0.092
#> GSM125188     1  0.4690      0.914 0.900 0.100
#> GSM125190     2  0.4298      0.897 0.088 0.912
#> GSM125192     2  0.0000      0.960 0.000 1.000
#> GSM125194     1  0.4298      0.921 0.912 0.088
#> GSM125196     1  0.4690      0.914 0.900 0.100
#> GSM125198     2  0.0000      0.960 0.000 1.000
#> GSM125200     1  0.0000      0.951 1.000 0.000
#> GSM125202     2  0.0000      0.960 0.000 1.000
#> GSM125204     1  0.4690      0.914 0.900 0.100
#> GSM125206     1  0.4690      0.914 0.900 0.100
#> GSM125208     1  0.4690      0.914 0.900 0.100
#> GSM125210     1  0.9044      0.594 0.680 0.320
#> GSM125212     1  0.4690      0.914 0.900 0.100
#> GSM125214     2  0.0000      0.960 0.000 1.000
#> GSM125216     2  0.0000      0.960 0.000 1.000
#> GSM125218     2  0.2236      0.942 0.036 0.964
#> GSM125220     1  0.0376      0.951 0.996 0.004
#> GSM125222     1  0.4431      0.919 0.908 0.092
#> GSM125224     2  0.0000      0.960 0.000 1.000
#> GSM125226     2  0.1184      0.954 0.016 0.984
#> GSM125228     2  0.0000      0.960 0.000 1.000
#> GSM125230     1  0.1633      0.945 0.976 0.024
#> GSM125232     1  0.1633      0.945 0.976 0.024
#> GSM125234     1  0.0376      0.951 0.996 0.004
#> GSM125236     1  0.0000      0.951 1.000 0.000
#> GSM125238     1  0.0000      0.951 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
#> GSM125123     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125125     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125127     1  0.1411      0.962 0.964 0.000 0.036
#> GSM125129     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125131     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125133     1  0.1411      0.962 0.964 0.000 0.036
#> GSM125135     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125137     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125139     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125141     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125143     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125145     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125147     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125149     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125151     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125153     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125155     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125157     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125159     2  0.2165      0.922 0.000 0.936 0.064
#> GSM125161     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125163     2  0.2165      0.922 0.000 0.936 0.064
#> GSM125165     3  0.0424      0.920 0.000 0.008 0.992
#> GSM125167     2  0.2537      0.916 0.000 0.920 0.080
#> GSM125169     2  0.6140      0.457 0.000 0.596 0.404
#> GSM125171     2  0.1411      0.923 0.000 0.964 0.036
#> GSM125173     3  0.0237      0.925 0.004 0.000 0.996
#> GSM125175     2  0.0000      0.917 0.000 1.000 0.000
#> GSM125177     3  0.0000      0.925 0.000 0.000 1.000
#> GSM125179     3  0.0747      0.923 0.016 0.000 0.984
#> GSM125181     3  0.3551      0.787 0.000 0.132 0.868
#> GSM125183     3  0.0237      0.925 0.004 0.000 0.996
#> GSM125185     3  0.0747      0.923 0.016 0.000 0.984
#> GSM125187     3  0.0747      0.923 0.016 0.000 0.984
#> GSM125189     2  0.4178      0.847 0.000 0.828 0.172
#> GSM125191     2  0.3686      0.877 0.000 0.860 0.140
#> GSM125193     3  0.1031      0.917 0.024 0.000 0.976
#> GSM125195     3  0.0000      0.925 0.000 0.000 1.000
#> GSM125197     2  0.0000      0.917 0.000 1.000 0.000
#> GSM125199     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125201     2  0.0424      0.919 0.000 0.992 0.008
#> GSM125203     3  0.0000      0.925 0.000 0.000 1.000
#> GSM125205     2  0.0424      0.919 0.000 0.992 0.008
#> GSM125207     3  0.0000      0.925 0.000 0.000 1.000
#> GSM125209     2  0.3686      0.877 0.000 0.860 0.140
#> GSM125211     3  0.0000      0.925 0.000 0.000 1.000
#> GSM125213     2  0.1411      0.923 0.000 0.964 0.036
#> GSM125215     2  0.0000      0.917 0.000 1.000 0.000
#> GSM125217     2  0.3619      0.882 0.000 0.864 0.136
#> GSM125219     1  0.2066      0.937 0.940 0.000 0.060
#> GSM125221     3  0.0747      0.923 0.016 0.000 0.984
#> GSM125223     2  0.0000      0.917 0.000 1.000 0.000
#> GSM125225     2  0.0000      0.917 0.000 1.000 0.000
#> GSM125227     2  0.0000      0.917 0.000 1.000 0.000
#> GSM125229     3  0.5926      0.325 0.000 0.356 0.644
#> GSM125231     3  0.5810      0.526 0.336 0.000 0.664
#> GSM125233     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125235     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125237     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125124     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125126     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125128     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125130     1  0.1031      0.973 0.976 0.000 0.024
#> GSM125132     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125134     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125136     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125138     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125140     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125142     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125144     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125146     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125148     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125150     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125152     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125154     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125156     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125158     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125160     2  0.2165      0.922 0.000 0.936 0.064
#> GSM125162     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125164     2  0.2165      0.922 0.000 0.936 0.064
#> GSM125166     2  0.2165      0.922 0.000 0.936 0.064
#> GSM125168     2  0.2537      0.916 0.000 0.920 0.080
#> GSM125170     2  0.6140      0.457 0.000 0.596 0.404
#> GSM125172     2  0.1031      0.922 0.000 0.976 0.024
#> GSM125174     3  0.0237      0.925 0.004 0.000 0.996
#> GSM125176     2  0.5706      0.626 0.000 0.680 0.320
#> GSM125178     3  0.0000      0.925 0.000 0.000 1.000
#> GSM125180     3  0.0747      0.923 0.016 0.000 0.984
#> GSM125182     2  0.2625      0.915 0.000 0.916 0.084
#> GSM125184     3  0.0237      0.925 0.004 0.000 0.996
#> GSM125186     3  0.0747      0.923 0.016 0.000 0.984
#> GSM125188     3  0.0000      0.925 0.000 0.000 1.000
#> GSM125190     2  0.4178      0.847 0.000 0.828 0.172
#> GSM125192     2  0.2165      0.922 0.000 0.936 0.064
#> GSM125194     3  0.1031      0.917 0.024 0.000 0.976
#> GSM125196     3  0.0000      0.925 0.000 0.000 1.000
#> GSM125198     2  0.0000      0.917 0.000 1.000 0.000
#> GSM125200     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125202     2  0.0424      0.919 0.000 0.992 0.008
#> GSM125204     3  0.0000      0.925 0.000 0.000 1.000
#> GSM125206     3  0.0000      0.925 0.000 0.000 1.000
#> GSM125208     3  0.0000      0.925 0.000 0.000 1.000
#> GSM125210     3  0.4796      0.653 0.000 0.220 0.780
#> GSM125212     3  0.0000      0.925 0.000 0.000 1.000
#> GSM125214     2  0.1411      0.923 0.000 0.964 0.036
#> GSM125216     2  0.0000      0.917 0.000 1.000 0.000
#> GSM125218     2  0.3551      0.885 0.000 0.868 0.132
#> GSM125220     1  0.2066      0.937 0.940 0.000 0.060
#> GSM125222     3  0.0747      0.923 0.016 0.000 0.984
#> GSM125224     2  0.0000      0.917 0.000 1.000 0.000
#> GSM125226     2  0.2959      0.906 0.000 0.900 0.100
#> GSM125228     2  0.0000      0.917 0.000 1.000 0.000
#> GSM125230     3  0.5785      0.534 0.332 0.000 0.668
#> GSM125232     3  0.5810      0.526 0.336 0.000 0.664
#> GSM125234     1  0.2165      0.932 0.936 0.000 0.064
#> GSM125236     1  0.0000      0.994 1.000 0.000 0.000
#> GSM125238     1  0.0000      0.994 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
#> GSM125123     1  0.0469      0.984 0.988 0.000 0.000 0.012
#> GSM125125     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125127     1  0.1733      0.952 0.948 0.000 0.028 0.024
#> GSM125129     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125131     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125133     1  0.1733      0.952 0.948 0.000 0.028 0.024
#> GSM125135     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125137     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125139     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125141     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125143     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125145     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125147     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125149     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125151     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125153     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125155     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125157     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125159     2  0.0000      0.768 0.000 1.000 0.000 0.000
#> GSM125161     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125163     2  0.0000      0.768 0.000 1.000 0.000 0.000
#> GSM125165     3  0.2610      0.846 0.000 0.012 0.900 0.088
#> GSM125167     2  0.0657      0.765 0.000 0.984 0.004 0.012
#> GSM125169     2  0.7016      0.385 0.000 0.572 0.176 0.252
#> GSM125171     2  0.4817      0.716 0.000 0.612 0.000 0.388
#> GSM125173     3  0.2281      0.835 0.000 0.000 0.904 0.096
#> GSM125175     2  0.3219      0.754 0.000 0.836 0.000 0.164
#> GSM125177     3  0.1824      0.853 0.000 0.004 0.936 0.060
#> GSM125179     3  0.1722      0.850 0.000 0.008 0.944 0.048
#> GSM125181     3  0.5452      0.724 0.000 0.156 0.736 0.108
#> GSM125183     3  0.1118      0.855 0.000 0.000 0.964 0.036
#> GSM125185     3  0.1722      0.850 0.000 0.008 0.944 0.048
#> GSM125187     3  0.1722      0.850 0.000 0.008 0.944 0.048
#> GSM125189     2  0.4244      0.682 0.000 0.804 0.036 0.160
#> GSM125191     2  0.2300      0.739 0.000 0.924 0.048 0.028
#> GSM125193     3  0.3238      0.844 0.008 0.020 0.880 0.092
#> GSM125195     3  0.5905      0.703 0.000 0.060 0.636 0.304
#> GSM125197     2  0.4999      0.674 0.000 0.508 0.000 0.492
#> GSM125199     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125201     2  0.4961      0.690 0.000 0.552 0.000 0.448
#> GSM125203     3  0.1824      0.853 0.000 0.004 0.936 0.060
#> GSM125205     2  0.4961      0.690 0.000 0.552 0.000 0.448
#> GSM125207     3  0.1743      0.853 0.000 0.004 0.940 0.056
#> GSM125209     2  0.2300      0.739 0.000 0.924 0.048 0.028
#> GSM125211     3  0.1824      0.854 0.000 0.004 0.936 0.060
#> GSM125213     2  0.1211      0.769 0.000 0.960 0.000 0.040
#> GSM125215     2  0.4999      0.674 0.000 0.508 0.000 0.492
#> GSM125217     2  0.3479      0.710 0.000 0.840 0.012 0.148
#> GSM125219     1  0.2319      0.930 0.924 0.000 0.040 0.036
#> GSM125221     3  0.1722      0.850 0.000 0.008 0.944 0.048
#> GSM125223     2  0.4999      0.674 0.000 0.508 0.000 0.492
#> GSM125225     2  0.4994      0.680 0.000 0.520 0.000 0.480
#> GSM125227     2  0.4994      0.680 0.000 0.520 0.000 0.480
#> GSM125229     3  0.7734      0.205 0.000 0.344 0.420 0.236
#> GSM125231     3  0.6412      0.486 0.320 0.000 0.592 0.088
#> GSM125233     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125235     1  0.0336      0.987 0.992 0.000 0.000 0.008
#> GSM125237     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125124     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125126     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125128     1  0.0188      0.989 0.996 0.000 0.000 0.004
#> GSM125130     1  0.1297      0.965 0.964 0.000 0.020 0.016
#> GSM125132     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125134     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125136     1  0.0188      0.989 0.996 0.000 0.000 0.004
#> GSM125138     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125140     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125142     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125144     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125146     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125148     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125150     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125152     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125154     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125156     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125158     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125160     2  0.0000      0.768 0.000 1.000 0.000 0.000
#> GSM125162     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125164     2  0.0000      0.768 0.000 1.000 0.000 0.000
#> GSM125166     2  0.0000      0.768 0.000 1.000 0.000 0.000
#> GSM125168     2  0.0657      0.765 0.000 0.984 0.004 0.012
#> GSM125170     2  0.7016      0.385 0.000 0.572 0.176 0.252
#> GSM125172     2  0.4776      0.719 0.000 0.624 0.000 0.376
#> GSM125174     3  0.2281      0.835 0.000 0.000 0.904 0.096
#> GSM125176     2  0.6308      0.512 0.000 0.648 0.120 0.232
#> GSM125178     3  0.1824      0.853 0.000 0.004 0.936 0.060
#> GSM125180     3  0.1722      0.850 0.000 0.008 0.944 0.048
#> GSM125182     2  0.0779      0.764 0.000 0.980 0.004 0.016
#> GSM125184     3  0.1211      0.855 0.000 0.000 0.960 0.040
#> GSM125186     3  0.1722      0.850 0.000 0.008 0.944 0.048
#> GSM125188     3  0.3205      0.836 0.000 0.024 0.872 0.104
#> GSM125190     2  0.4244      0.682 0.000 0.804 0.036 0.160
#> GSM125192     2  0.0000      0.768 0.000 1.000 0.000 0.000
#> GSM125194     3  0.3238      0.844 0.008 0.020 0.880 0.092
#> GSM125196     3  0.5839      0.709 0.000 0.060 0.648 0.292
#> GSM125198     2  0.4999      0.674 0.000 0.508 0.000 0.492
#> GSM125200     1  0.0000      0.992 1.000 0.000 0.000 0.000
#> GSM125202     2  0.4961      0.690 0.000 0.552 0.000 0.448
#> GSM125204     3  0.1824      0.853 0.000 0.004 0.936 0.060
#> GSM125206     3  0.5905      0.703 0.000 0.060 0.636 0.304
#> GSM125208     3  0.1743      0.853 0.000 0.004 0.940 0.056
#> GSM125210     3  0.5247      0.649 0.000 0.228 0.720 0.052
#> GSM125212     3  0.1824      0.854 0.000 0.004 0.936 0.060
#> GSM125214     2  0.1211      0.769 0.000 0.960 0.000 0.040
#> GSM125216     2  0.4999      0.674 0.000 0.508 0.000 0.492
#> GSM125218     2  0.3428      0.712 0.000 0.844 0.012 0.144
#> GSM125220     1  0.2319      0.930 0.924 0.000 0.040 0.036
#> GSM125222     3  0.1722      0.850 0.000 0.008 0.944 0.048
#> GSM125224     2  0.4999      0.674 0.000 0.508 0.000 0.492
#> GSM125226     2  0.1452      0.758 0.000 0.956 0.008 0.036
#> GSM125228     2  0.4999      0.674 0.000 0.508 0.000 0.492
#> GSM125230     3  0.6394      0.494 0.316 0.000 0.596 0.088
#> GSM125232     3  0.6412      0.486 0.320 0.000 0.592 0.088
#> GSM125234     1  0.2411      0.926 0.920 0.000 0.040 0.040
#> GSM125236     1  0.0469      0.984 0.988 0.000 0.000 0.012
#> GSM125238     1  0.0000      0.992 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
#> GSM125123     1  0.0404     0.9826 0.988 0.000 0.012 0.000 0.000
#> GSM125125     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125127     1  0.1270     0.9477 0.948 0.000 0.052 0.000 0.000
#> GSM125129     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125131     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125133     1  0.1270     0.9477 0.948 0.000 0.052 0.000 0.000
#> GSM125135     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125137     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125139     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125141     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125143     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125145     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125147     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125149     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125151     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125153     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125155     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125157     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125159     2  0.3999     0.7661 0.000 0.656 0.000 0.000 0.344
#> GSM125161     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125163     2  0.3999     0.7661 0.000 0.656 0.000 0.000 0.344
#> GSM125165     3  0.3485     0.7740 0.000 0.124 0.828 0.048 0.000
#> GSM125167     2  0.4084     0.7725 0.000 0.668 0.004 0.000 0.328
#> GSM125169     2  0.3267     0.4521 0.000 0.844 0.112 0.044 0.000
#> GSM125171     5  0.3895     0.5247 0.000 0.320 0.000 0.000 0.680
#> GSM125173     3  0.4394     0.6685 0.000 0.100 0.764 0.136 0.000
#> GSM125175     2  0.4171     0.6107 0.000 0.604 0.000 0.000 0.396
#> GSM125177     3  0.2962     0.7944 0.000 0.084 0.868 0.048 0.000
#> GSM125179     3  0.0324     0.7961 0.000 0.004 0.992 0.004 0.000
#> GSM125181     3  0.4907     0.5688 0.000 0.280 0.664 0.056 0.000
#> GSM125183     3  0.2423     0.7953 0.000 0.080 0.896 0.024 0.000
#> GSM125185     3  0.0324     0.7961 0.000 0.004 0.992 0.004 0.000
#> GSM125187     3  0.0324     0.7961 0.000 0.004 0.992 0.004 0.000
#> GSM125189     2  0.3452     0.7116 0.000 0.820 0.032 0.000 0.148
#> GSM125191     2  0.5359     0.7410 0.000 0.628 0.040 0.020 0.312
#> GSM125193     3  0.2339     0.7709 0.008 0.052 0.912 0.028 0.000
#> GSM125195     4  0.2927     0.9864 0.000 0.040 0.092 0.868 0.000
#> GSM125197     5  0.0000     0.8919 0.000 0.000 0.000 0.000 1.000
#> GSM125199     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125201     5  0.2329     0.8160 0.000 0.124 0.000 0.000 0.876
#> GSM125203     3  0.2962     0.7944 0.000 0.084 0.868 0.048 0.000
#> GSM125205     5  0.2329     0.8160 0.000 0.124 0.000 0.000 0.876
#> GSM125207     3  0.2903     0.7953 0.000 0.080 0.872 0.048 0.000
#> GSM125209     2  0.5359     0.7410 0.000 0.628 0.040 0.020 0.312
#> GSM125211     3  0.3033     0.7947 0.000 0.084 0.864 0.052 0.000
#> GSM125213     2  0.4150     0.7158 0.000 0.612 0.000 0.000 0.388
#> GSM125215     5  0.0000     0.8919 0.000 0.000 0.000 0.000 1.000
#> GSM125217     2  0.3402     0.7322 0.000 0.804 0.008 0.004 0.184
#> GSM125219     1  0.1671     0.9235 0.924 0.000 0.076 0.000 0.000
#> GSM125221     3  0.0324     0.7961 0.000 0.004 0.992 0.004 0.000
#> GSM125223     5  0.0000     0.8919 0.000 0.000 0.000 0.000 1.000
#> GSM125225     5  0.0703     0.8868 0.000 0.024 0.000 0.000 0.976
#> GSM125227     5  0.0703     0.8868 0.000 0.024 0.000 0.000 0.976
#> GSM125229     2  0.5155    -0.0291 0.000 0.596 0.352 0.052 0.000
#> GSM125231     3  0.5647     0.2669 0.320 0.056 0.604 0.020 0.000
#> GSM125233     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125235     1  0.0290     0.9855 0.992 0.000 0.008 0.000 0.000
#> GSM125237     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125124     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125126     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125128     1  0.0162     0.9883 0.996 0.000 0.004 0.000 0.000
#> GSM125130     1  0.0963     0.9621 0.964 0.000 0.036 0.000 0.000
#> GSM125132     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125134     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125136     1  0.0162     0.9883 0.996 0.000 0.004 0.000 0.000
#> GSM125138     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125140     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125142     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125144     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125146     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125148     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125150     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125152     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125154     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125156     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125158     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125160     2  0.3999     0.7661 0.000 0.656 0.000 0.000 0.344
#> GSM125162     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125164     2  0.3999     0.7661 0.000 0.656 0.000 0.000 0.344
#> GSM125166     2  0.3999     0.7661 0.000 0.656 0.000 0.000 0.344
#> GSM125168     2  0.4084     0.7725 0.000 0.668 0.004 0.000 0.328
#> GSM125170     2  0.3267     0.4521 0.000 0.844 0.112 0.044 0.000
#> GSM125172     5  0.3837     0.5304 0.000 0.308 0.000 0.000 0.692
#> GSM125174     3  0.4394     0.6685 0.000 0.100 0.764 0.136 0.000
#> GSM125176     2  0.4318     0.5774 0.000 0.808 0.072 0.044 0.076
#> GSM125178     3  0.2962     0.7944 0.000 0.084 0.868 0.048 0.000
#> GSM125180     3  0.0324     0.7961 0.000 0.004 0.992 0.004 0.000
#> GSM125182     2  0.4066     0.7729 0.000 0.672 0.004 0.000 0.324
#> GSM125184     3  0.2482     0.7950 0.000 0.084 0.892 0.024 0.000
#> GSM125186     3  0.0324     0.7961 0.000 0.004 0.992 0.004 0.000
#> GSM125188     3  0.3950     0.7575 0.000 0.136 0.796 0.068 0.000
#> GSM125190     2  0.3452     0.7116 0.000 0.820 0.032 0.000 0.148
#> GSM125192     2  0.3999     0.7661 0.000 0.656 0.000 0.000 0.344
#> GSM125194     3  0.2339     0.7709 0.008 0.052 0.912 0.028 0.000
#> GSM125196     4  0.3307     0.9723 0.000 0.052 0.104 0.844 0.000
#> GSM125198     5  0.0000     0.8919 0.000 0.000 0.000 0.000 1.000
#> GSM125200     1  0.0000     0.9908 1.000 0.000 0.000 0.000 0.000
#> GSM125202     5  0.2329     0.8160 0.000 0.124 0.000 0.000 0.876
#> GSM125204     3  0.2962     0.7944 0.000 0.084 0.868 0.048 0.000
#> GSM125206     4  0.2927     0.9864 0.000 0.040 0.092 0.868 0.000
#> GSM125208     3  0.2903     0.7953 0.000 0.080 0.872 0.048 0.000
#> GSM125210     3  0.5384     0.5071 0.000 0.268 0.660 0.036 0.036
#> GSM125212     3  0.3033     0.7947 0.000 0.084 0.864 0.052 0.000
#> GSM125214     2  0.4150     0.7158 0.000 0.612 0.000 0.000 0.388
#> GSM125216     5  0.0000     0.8919 0.000 0.000 0.000 0.000 1.000
#> GSM125218     2  0.3282     0.7335 0.000 0.804 0.008 0.000 0.188
#> GSM125220     1  0.1671     0.9235 0.924 0.000 0.076 0.000 0.000
#> GSM125222     3  0.0324     0.7961 0.000 0.004 0.992 0.004 0.000
#> GSM125224     5  0.0000     0.8919 0.000 0.000 0.000 0.000 1.000
#> GSM125226     2  0.3949     0.7720 0.000 0.696 0.004 0.000 0.300
#> GSM125228     5  0.0000     0.8919 0.000 0.000 0.000 0.000 1.000
#> GSM125230     3  0.5631     0.2728 0.316 0.056 0.608 0.020 0.000
#> GSM125232     3  0.5647     0.2669 0.320 0.056 0.604 0.020 0.000
#> GSM125234     1  0.1732     0.9192 0.920 0.000 0.080 0.000 0.000
#> GSM125236     1  0.0404     0.9826 0.988 0.000 0.012 0.000 0.000
#> GSM125238     1  0.0000     0.9908 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
#> GSM125123     1  0.0547     0.9611 0.980 0.000 0.000 0.000 0.020 0.000
#> GSM125125     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125127     1  0.2053     0.8563 0.888 0.000 0.000 0.004 0.108 0.000
#> GSM125129     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125131     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125133     1  0.2053     0.8563 0.888 0.000 0.000 0.004 0.108 0.000
#> GSM125135     1  0.0146     0.9744 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125137     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125139     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125141     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125143     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125145     1  0.0146     0.9744 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125147     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125149     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125151     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125153     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125155     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125157     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125159     2  0.0547     0.7573 0.000 0.980 0.000 0.000 0.000 0.020
#> GSM125161     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125163     2  0.0547     0.7573 0.000 0.980 0.000 0.000 0.000 0.020
#> GSM125165     4  0.2174     0.7162 0.000 0.008 0.008 0.896 0.088 0.000
#> GSM125167     2  0.0820     0.7582 0.000 0.972 0.000 0.000 0.012 0.016
#> GSM125169     2  0.6862     0.4238 0.000 0.552 0.032 0.176 0.172 0.068
#> GSM125171     2  0.5687     0.2679 0.000 0.508 0.004 0.000 0.152 0.336
#> GSM125173     4  0.5190     0.0651 0.000 0.000 0.080 0.524 0.392 0.004
#> GSM125175     2  0.4060     0.6058 0.000 0.684 0.000 0.000 0.032 0.284
#> GSM125177     4  0.0520     0.7495 0.000 0.000 0.008 0.984 0.008 0.000
#> GSM125179     4  0.2234     0.7205 0.000 0.000 0.004 0.872 0.124 0.000
#> GSM125181     4  0.4428     0.5372 0.000 0.156 0.012 0.736 0.096 0.000
#> GSM125183     4  0.2389     0.7343 0.000 0.000 0.008 0.864 0.128 0.000
#> GSM125185     4  0.2234     0.7205 0.000 0.000 0.004 0.872 0.124 0.000
#> GSM125187     4  0.2234     0.7205 0.000 0.000 0.004 0.872 0.124 0.000
#> GSM125189     2  0.3961     0.6845 0.000 0.804 0.008 0.024 0.100 0.064
#> GSM125191     2  0.1946     0.7372 0.000 0.912 0.000 0.072 0.004 0.012
#> GSM125193     4  0.4011     0.6058 0.000 0.000 0.024 0.672 0.304 0.000
#> GSM125195     3  0.2003     0.9738 0.000 0.000 0.884 0.116 0.000 0.000
#> GSM125197     6  0.1663     0.9845 0.000 0.088 0.000 0.000 0.000 0.912
#> GSM125199     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125201     2  0.5738    -0.1348 0.000 0.432 0.004 0.000 0.144 0.420
#> GSM125203     4  0.0520     0.7495 0.000 0.000 0.008 0.984 0.008 0.000
#> GSM125205     2  0.5738    -0.1461 0.000 0.428 0.004 0.000 0.144 0.424
#> GSM125207     4  0.0405     0.7497 0.000 0.000 0.008 0.988 0.004 0.000
#> GSM125209     2  0.1946     0.7372 0.000 0.912 0.000 0.072 0.004 0.012
#> GSM125211     4  0.0806     0.7445 0.000 0.000 0.008 0.972 0.020 0.000
#> GSM125213     2  0.1588     0.7340 0.000 0.924 0.004 0.000 0.000 0.072
#> GSM125215     6  0.1663     0.9845 0.000 0.088 0.000 0.000 0.000 0.912
#> GSM125217     2  0.3238     0.7069 0.000 0.844 0.000 0.016 0.080 0.060
#> GSM125219     1  0.2595     0.7796 0.836 0.000 0.000 0.004 0.160 0.000
#> GSM125221     4  0.2278     0.7204 0.000 0.000 0.004 0.868 0.128 0.000
#> GSM125223     6  0.1663     0.9845 0.000 0.088 0.000 0.000 0.000 0.912
#> GSM125225     6  0.2278     0.9453 0.000 0.128 0.004 0.000 0.000 0.868
#> GSM125227     6  0.2278     0.9453 0.000 0.128 0.004 0.000 0.000 0.868
#> GSM125229     2  0.7662    -0.0011 0.000 0.316 0.040 0.312 0.276 0.056
#> GSM125231     5  0.5982     1.0000 0.228 0.000 0.000 0.380 0.392 0.000
#> GSM125233     1  0.0146     0.9744 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125235     1  0.0865     0.9473 0.964 0.000 0.000 0.000 0.036 0.000
#> GSM125237     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125124     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125126     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125128     1  0.0146     0.9740 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125130     1  0.0937     0.9388 0.960 0.000 0.000 0.000 0.040 0.000
#> GSM125132     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125134     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125136     1  0.0146     0.9740 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125138     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125140     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125142     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125144     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125146     1  0.0146     0.9744 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125148     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125150     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125152     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125154     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125156     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125158     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125160     2  0.0547     0.7573 0.000 0.980 0.000 0.000 0.000 0.020
#> GSM125162     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125164     2  0.0547     0.7573 0.000 0.980 0.000 0.000 0.000 0.020
#> GSM125166     2  0.0547     0.7573 0.000 0.980 0.000 0.000 0.000 0.020
#> GSM125168     2  0.0820     0.7582 0.000 0.972 0.000 0.000 0.012 0.016
#> GSM125170     2  0.6862     0.4238 0.000 0.552 0.032 0.176 0.172 0.068
#> GSM125172     2  0.5529     0.2780 0.000 0.516 0.000 0.000 0.148 0.336
#> GSM125174     4  0.5196     0.0545 0.000 0.000 0.080 0.520 0.396 0.004
#> GSM125176     2  0.6239     0.5259 0.000 0.632 0.028 0.128 0.140 0.072
#> GSM125178     4  0.0520     0.7495 0.000 0.000 0.008 0.984 0.008 0.000
#> GSM125180     4  0.2234     0.7205 0.000 0.000 0.004 0.872 0.124 0.000
#> GSM125182     2  0.0725     0.7583 0.000 0.976 0.000 0.000 0.012 0.012
#> GSM125184     4  0.2346     0.7349 0.000 0.000 0.008 0.868 0.124 0.000
#> GSM125186     4  0.2234     0.7205 0.000 0.000 0.004 0.872 0.124 0.000
#> GSM125188     4  0.3345     0.6316 0.000 0.000 0.028 0.788 0.184 0.000
#> GSM125190     2  0.3961     0.6845 0.000 0.804 0.008 0.024 0.100 0.064
#> GSM125192     2  0.0547     0.7573 0.000 0.980 0.000 0.000 0.000 0.020
#> GSM125194     4  0.4011     0.6058 0.000 0.000 0.024 0.672 0.304 0.000
#> GSM125196     3  0.2416     0.9466 0.000 0.000 0.844 0.156 0.000 0.000
#> GSM125198     6  0.1663     0.9845 0.000 0.088 0.000 0.000 0.000 0.912
#> GSM125200     1  0.0000     0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125202     2  0.5738    -0.1348 0.000 0.432 0.004 0.000 0.144 0.420
#> GSM125204     4  0.0520     0.7495 0.000 0.000 0.008 0.984 0.008 0.000
#> GSM125206     3  0.2003     0.9738 0.000 0.000 0.884 0.116 0.000 0.000
#> GSM125208     4  0.0405     0.7497 0.000 0.000 0.008 0.988 0.004 0.000
#> GSM125210     4  0.3217     0.5068 0.000 0.224 0.000 0.768 0.008 0.000
#> GSM125212     4  0.0806     0.7445 0.000 0.000 0.008 0.972 0.020 0.000
#> GSM125214     2  0.1588     0.7340 0.000 0.924 0.004 0.000 0.000 0.072
#> GSM125216     6  0.1663     0.9845 0.000 0.088 0.000 0.000 0.000 0.912
#> GSM125218     2  0.3047     0.7096 0.000 0.852 0.000 0.008 0.080 0.060
#> GSM125220     1  0.2595     0.7796 0.836 0.000 0.000 0.004 0.160 0.000
#> GSM125222     4  0.2278     0.7204 0.000 0.000 0.004 0.868 0.128 0.000
#> GSM125224     6  0.1663     0.9845 0.000 0.088 0.000 0.000 0.000 0.912
#> GSM125226     2  0.0632     0.7563 0.000 0.976 0.000 0.000 0.024 0.000
#> GSM125228     6  0.1663     0.9845 0.000 0.088 0.000 0.000 0.000 0.912
#> GSM125230     4  0.5970    -0.9768 0.224 0.000 0.000 0.392 0.384 0.000
#> GSM125232     5  0.5982     1.0000 0.228 0.000 0.000 0.380 0.392 0.000
#> GSM125234     1  0.2668     0.7661 0.828 0.000 0.000 0.004 0.168 0.000
#> GSM125236     1  0.0937     0.9433 0.960 0.000 0.000 0.000 0.040 0.000
#> GSM125238     1  0.0000     0.9768 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 agent(p) individual(p) k
#> ATC:hclust 115    1.000      9.46e-05 2
#> ATC:hclust 113    0.988      3.59e-08 3
#> ATC:hclust 110    1.000      4.55e-08 4
#> ATC:hclust 110    0.930      9.45e-13 5
#> ATC:hclust 105    0.984      1.52e-17 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 21168 rows and 116 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#>   Subgroups are detected by 'kmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 3.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk ATC-kmeans-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk ATC-kmeans-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           0.987       0.994         0.5018 0.499   0.499
#> 3 3 1.000           0.980       0.991         0.3238 0.794   0.606
#> 4 4 0.851           0.796       0.883         0.0884 0.939   0.819
#> 5 5 0.787           0.797       0.856         0.0502 0.940   0.788
#> 6 6 0.728           0.821       0.820         0.0427 0.963   0.846

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
#> GSM125123     1  0.0000      1.000 1.000 0.000
#> GSM125125     1  0.0000      1.000 1.000 0.000
#> GSM125127     1  0.0000      1.000 1.000 0.000
#> GSM125129     1  0.0000      1.000 1.000 0.000
#> GSM125131     1  0.0000      1.000 1.000 0.000
#> GSM125133     1  0.0000      1.000 1.000 0.000
#> GSM125135     1  0.0000      1.000 1.000 0.000
#> GSM125137     1  0.0000      1.000 1.000 0.000
#> GSM125139     1  0.0000      1.000 1.000 0.000
#> GSM125141     1  0.0000      1.000 1.000 0.000
#> GSM125143     1  0.0000      1.000 1.000 0.000
#> GSM125145     1  0.0000      1.000 1.000 0.000
#> GSM125147     1  0.0000      1.000 1.000 0.000
#> GSM125149     1  0.0000      1.000 1.000 0.000
#> GSM125151     1  0.0000      1.000 1.000 0.000
#> GSM125153     1  0.0000      1.000 1.000 0.000
#> GSM125155     1  0.0000      1.000 1.000 0.000
#> GSM125157     1  0.0000      1.000 1.000 0.000
#> GSM125159     2  0.0000      0.989 0.000 1.000
#> GSM125161     1  0.0000      1.000 1.000 0.000
#> GSM125163     2  0.0000      0.989 0.000 1.000
#> GSM125165     2  0.0000      0.989 0.000 1.000
#> GSM125167     2  0.0000      0.989 0.000 1.000
#> GSM125169     2  0.0000      0.989 0.000 1.000
#> GSM125171     2  0.0000      0.989 0.000 1.000
#> GSM125173     2  0.0000      0.989 0.000 1.000
#> GSM125175     2  0.0000      0.989 0.000 1.000
#> GSM125177     2  0.0000      0.989 0.000 1.000
#> GSM125179     2  0.6887      0.781 0.184 0.816
#> GSM125181     2  0.0000      0.989 0.000 1.000
#> GSM125183     2  0.6973      0.776 0.188 0.812
#> GSM125185     2  0.0000      0.989 0.000 1.000
#> GSM125187     1  0.0000      1.000 1.000 0.000
#> GSM125189     2  0.0000      0.989 0.000 1.000
#> GSM125191     2  0.0000      0.989 0.000 1.000
#> GSM125193     2  0.8327      0.653 0.264 0.736
#> GSM125195     2  0.0000      0.989 0.000 1.000
#> GSM125197     2  0.0000      0.989 0.000 1.000
#> GSM125199     1  0.0000      1.000 1.000 0.000
#> GSM125201     2  0.0000      0.989 0.000 1.000
#> GSM125203     2  0.0000      0.989 0.000 1.000
#> GSM125205     2  0.0000      0.989 0.000 1.000
#> GSM125207     2  0.0000      0.989 0.000 1.000
#> GSM125209     2  0.0000      0.989 0.000 1.000
#> GSM125211     2  0.0000      0.989 0.000 1.000
#> GSM125213     2  0.0000      0.989 0.000 1.000
#> GSM125215     2  0.0000      0.989 0.000 1.000
#> GSM125217     2  0.0000      0.989 0.000 1.000
#> GSM125219     1  0.0000      1.000 1.000 0.000
#> GSM125221     2  0.0000      0.989 0.000 1.000
#> GSM125223     2  0.0000      0.989 0.000 1.000
#> GSM125225     2  0.0000      0.989 0.000 1.000
#> GSM125227     2  0.0000      0.989 0.000 1.000
#> GSM125229     2  0.0000      0.989 0.000 1.000
#> GSM125231     1  0.0000      1.000 1.000 0.000
#> GSM125233     1  0.0000      1.000 1.000 0.000
#> GSM125235     1  0.0000      1.000 1.000 0.000
#> GSM125237     1  0.0000      1.000 1.000 0.000
#> GSM125124     1  0.0000      1.000 1.000 0.000
#> GSM125126     1  0.0000      1.000 1.000 0.000
#> GSM125128     1  0.0000      1.000 1.000 0.000
#> GSM125130     1  0.0000      1.000 1.000 0.000
#> GSM125132     1  0.0000      1.000 1.000 0.000
#> GSM125134     1  0.0000      1.000 1.000 0.000
#> GSM125136     1  0.0000      1.000 1.000 0.000
#> GSM125138     1  0.0000      1.000 1.000 0.000
#> GSM125140     1  0.0000      1.000 1.000 0.000
#> GSM125142     1  0.0000      1.000 1.000 0.000
#> GSM125144     1  0.0000      1.000 1.000 0.000
#> GSM125146     1  0.0000      1.000 1.000 0.000
#> GSM125148     1  0.0000      1.000 1.000 0.000
#> GSM125150     1  0.0000      1.000 1.000 0.000
#> GSM125152     1  0.0000      1.000 1.000 0.000
#> GSM125154     1  0.0000      1.000 1.000 0.000
#> GSM125156     1  0.0000      1.000 1.000 0.000
#> GSM125158     1  0.0000      1.000 1.000 0.000
#> GSM125160     2  0.0000      0.989 0.000 1.000
#> GSM125162     1  0.0000      1.000 1.000 0.000
#> GSM125164     2  0.0000      0.989 0.000 1.000
#> GSM125166     2  0.0000      0.989 0.000 1.000
#> GSM125168     2  0.0000      0.989 0.000 1.000
#> GSM125170     2  0.0000      0.989 0.000 1.000
#> GSM125172     2  0.0000      0.989 0.000 1.000
#> GSM125174     2  0.0000      0.989 0.000 1.000
#> GSM125176     2  0.0000      0.989 0.000 1.000
#> GSM125178     2  0.0000      0.989 0.000 1.000
#> GSM125180     2  0.0938      0.979 0.012 0.988
#> GSM125182     2  0.0000      0.989 0.000 1.000
#> GSM125184     2  0.0000      0.989 0.000 1.000
#> GSM125186     2  0.1414      0.971 0.020 0.980
#> GSM125188     2  0.0000      0.989 0.000 1.000
#> GSM125190     2  0.0000      0.989 0.000 1.000
#> GSM125192     2  0.0000      0.989 0.000 1.000
#> GSM125194     1  0.0000      1.000 1.000 0.000
#> GSM125196     2  0.0000      0.989 0.000 1.000
#> GSM125198     2  0.0000      0.989 0.000 1.000
#> GSM125200     1  0.0000      1.000 1.000 0.000
#> GSM125202     2  0.0000      0.989 0.000 1.000
#> GSM125204     2  0.0000      0.989 0.000 1.000
#> GSM125206     2  0.0000      0.989 0.000 1.000
#> GSM125208     2  0.0000      0.989 0.000 1.000
#> GSM125210     2  0.0000      0.989 0.000 1.000
#> GSM125212     2  0.0000      0.989 0.000 1.000
#> GSM125214     2  0.0000      0.989 0.000 1.000
#> GSM125216     2  0.0000      0.989 0.000 1.000
#> GSM125218     2  0.0000      0.989 0.000 1.000
#> GSM125220     1  0.0000      1.000 1.000 0.000
#> GSM125222     2  0.0000      0.989 0.000 1.000
#> GSM125224     2  0.0000      0.989 0.000 1.000
#> GSM125226     2  0.0000      0.989 0.000 1.000
#> GSM125228     2  0.0000      0.989 0.000 1.000
#> GSM125230     1  0.0000      1.000 1.000 0.000
#> GSM125232     1  0.0000      1.000 1.000 0.000
#> GSM125234     1  0.0000      1.000 1.000 0.000
#> GSM125236     1  0.0000      1.000 1.000 0.000
#> GSM125238     1  0.0000      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
#> GSM125123     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125125     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125127     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125129     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125131     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125133     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125135     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125137     1  0.0237      0.981 0.996 0.000 0.004
#> GSM125139     1  0.0237      0.981 0.996 0.000 0.004
#> GSM125141     1  0.0237      0.981 0.996 0.000 0.004
#> GSM125143     1  0.0237      0.981 0.996 0.000 0.004
#> GSM125145     1  0.0237      0.981 0.996 0.000 0.004
#> GSM125147     1  0.0237      0.981 0.996 0.000 0.004
#> GSM125149     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125151     1  0.0237      0.981 0.996 0.000 0.004
#> GSM125153     1  0.0237      0.981 0.996 0.000 0.004
#> GSM125155     1  0.0237      0.981 0.996 0.000 0.004
#> GSM125157     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125159     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125161     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125163     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125165     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125167     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125169     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125171     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125173     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125175     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125177     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125179     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125181     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125183     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125185     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125187     3  0.0000      0.996 0.000 0.000 1.000
#> GSM125189     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125191     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125193     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125195     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125197     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125199     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125201     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125203     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125205     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125207     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125209     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125211     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125213     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125215     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125217     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125219     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125221     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125223     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125225     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125227     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125229     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125231     3  0.0000      0.996 0.000 0.000 1.000
#> GSM125233     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125235     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125237     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125124     1  0.0237      0.981 0.996 0.000 0.004
#> GSM125126     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125128     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125130     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125132     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125134     1  0.0237      0.981 0.996 0.000 0.004
#> GSM125136     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125138     1  0.0237      0.981 0.996 0.000 0.004
#> GSM125140     1  0.0237      0.981 0.996 0.000 0.004
#> GSM125142     1  0.0237      0.981 0.996 0.000 0.004
#> GSM125144     1  0.0237      0.981 0.996 0.000 0.004
#> GSM125146     1  0.0237      0.981 0.996 0.000 0.004
#> GSM125148     1  0.0237      0.981 0.996 0.000 0.004
#> GSM125150     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125152     1  0.0237      0.981 0.996 0.000 0.004
#> GSM125154     1  0.0237      0.981 0.996 0.000 0.004
#> GSM125156     1  0.0237      0.981 0.996 0.000 0.004
#> GSM125158     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125160     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125162     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125164     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125166     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125168     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125170     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125172     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125174     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125176     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125178     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125180     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125182     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125184     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125186     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125188     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125190     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125192     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125194     3  0.0000      0.996 0.000 0.000 1.000
#> GSM125196     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125198     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125200     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125202     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125204     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125206     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125208     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125210     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125212     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125214     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125216     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125218     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125220     1  0.6026      0.406 0.624 0.000 0.376
#> GSM125222     3  0.0237      0.999 0.000 0.004 0.996
#> GSM125224     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125226     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125228     2  0.0000      1.000 0.000 1.000 0.000
#> GSM125230     3  0.0000      0.996 0.000 0.000 1.000
#> GSM125232     3  0.0424      0.988 0.008 0.000 0.992
#> GSM125234     1  0.6235      0.242 0.564 0.000 0.436
#> GSM125236     1  0.0000      0.981 1.000 0.000 0.000
#> GSM125238     1  0.0237      0.981 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
#> GSM125123     4  0.4985      0.858 0.468 0.000 0.000 0.532
#> GSM125125     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125127     4  0.4955      0.875 0.444 0.000 0.000 0.556
#> GSM125129     1  0.4746     -0.349 0.632 0.000 0.000 0.368
#> GSM125131     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125133     4  0.4955      0.875 0.444 0.000 0.000 0.556
#> GSM125135     1  0.4843     -0.463 0.604 0.000 0.000 0.396
#> GSM125137     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125139     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125141     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125143     4  0.4977      0.875 0.460 0.000 0.000 0.540
#> GSM125145     1  0.4761     -0.365 0.628 0.000 0.000 0.372
#> GSM125147     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125149     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125151     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125153     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125155     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125157     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125159     2  0.0336      0.898 0.000 0.992 0.008 0.000
#> GSM125161     1  0.0336      0.843 0.992 0.000 0.000 0.008
#> GSM125163     2  0.0000      0.899 0.000 1.000 0.000 0.000
#> GSM125165     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM125167     2  0.0336      0.898 0.000 0.992 0.008 0.000
#> GSM125169     3  0.5203      0.501 0.000 0.348 0.636 0.016
#> GSM125171     2  0.0592      0.896 0.000 0.984 0.016 0.000
#> GSM125173     3  0.0817      0.958 0.000 0.000 0.976 0.024
#> GSM125175     2  0.0592      0.898 0.000 0.984 0.000 0.016
#> GSM125177     3  0.1118      0.955 0.000 0.000 0.964 0.036
#> GSM125179     3  0.0817      0.956 0.000 0.000 0.976 0.024
#> GSM125181     3  0.1510      0.947 0.000 0.028 0.956 0.016
#> GSM125183     3  0.0817      0.957 0.000 0.000 0.976 0.024
#> GSM125185     3  0.0469      0.958 0.000 0.000 0.988 0.012
#> GSM125187     3  0.1118      0.952 0.000 0.000 0.964 0.036
#> GSM125189     2  0.0000      0.899 0.000 1.000 0.000 0.000
#> GSM125191     2  0.1004      0.892 0.000 0.972 0.024 0.004
#> GSM125193     3  0.1118      0.957 0.000 0.000 0.964 0.036
#> GSM125195     3  0.1867      0.944 0.000 0.000 0.928 0.072
#> GSM125197     2  0.4679      0.775 0.000 0.648 0.000 0.352
#> GSM125199     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125201     2  0.1302      0.893 0.000 0.956 0.000 0.044
#> GSM125203     3  0.1118      0.955 0.000 0.000 0.964 0.036
#> GSM125205     2  0.4431      0.797 0.000 0.696 0.000 0.304
#> GSM125207     3  0.0921      0.957 0.000 0.000 0.972 0.028
#> GSM125209     2  0.0895      0.894 0.000 0.976 0.020 0.004
#> GSM125211     3  0.1118      0.957 0.000 0.000 0.964 0.036
#> GSM125213     2  0.2149      0.881 0.000 0.912 0.000 0.088
#> GSM125215     2  0.4679      0.775 0.000 0.648 0.000 0.352
#> GSM125217     2  0.1356      0.886 0.000 0.960 0.032 0.008
#> GSM125219     4  0.4955      0.875 0.444 0.000 0.000 0.556
#> GSM125221     3  0.0469      0.958 0.000 0.000 0.988 0.012
#> GSM125223     2  0.4679      0.775 0.000 0.648 0.000 0.352
#> GSM125225     2  0.4679      0.775 0.000 0.648 0.000 0.352
#> GSM125227     2  0.4679      0.775 0.000 0.648 0.000 0.352
#> GSM125229     3  0.3821      0.849 0.000 0.120 0.840 0.040
#> GSM125231     3  0.1867      0.945 0.000 0.000 0.928 0.072
#> GSM125233     1  0.4746     -0.349 0.632 0.000 0.000 0.368
#> GSM125235     1  0.4989     -0.720 0.528 0.000 0.000 0.472
#> GSM125237     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125124     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125126     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125128     4  0.4977      0.875 0.460 0.000 0.000 0.540
#> GSM125130     4  0.4972      0.876 0.456 0.000 0.000 0.544
#> GSM125132     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125134     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125136     4  0.4977      0.875 0.460 0.000 0.000 0.540
#> GSM125138     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125140     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125142     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125144     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125146     1  0.4761     -0.365 0.628 0.000 0.000 0.372
#> GSM125148     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125150     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125152     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125154     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125156     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125158     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125160     2  0.0000      0.899 0.000 1.000 0.000 0.000
#> GSM125162     1  0.5000     -0.796 0.500 0.000 0.000 0.500
#> GSM125164     2  0.0000      0.899 0.000 1.000 0.000 0.000
#> GSM125166     2  0.0000      0.899 0.000 1.000 0.000 0.000
#> GSM125168     2  0.0707      0.895 0.000 0.980 0.020 0.000
#> GSM125170     3  0.1584      0.941 0.000 0.036 0.952 0.012
#> GSM125172     2  0.0592      0.896 0.000 0.984 0.016 0.000
#> GSM125174     3  0.1118      0.956 0.000 0.000 0.964 0.036
#> GSM125176     2  0.1388      0.886 0.000 0.960 0.028 0.012
#> GSM125178     3  0.1022      0.956 0.000 0.000 0.968 0.032
#> GSM125180     3  0.0592      0.958 0.000 0.000 0.984 0.016
#> GSM125182     2  0.0000      0.899 0.000 1.000 0.000 0.000
#> GSM125184     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM125186     3  0.0592      0.958 0.000 0.000 0.984 0.016
#> GSM125188     3  0.0707      0.957 0.000 0.000 0.980 0.020
#> GSM125190     2  0.1284      0.889 0.000 0.964 0.024 0.012
#> GSM125192     2  0.0000      0.899 0.000 1.000 0.000 0.000
#> GSM125194     3  0.1474      0.945 0.000 0.000 0.948 0.052
#> GSM125196     3  0.1867      0.944 0.000 0.000 0.928 0.072
#> GSM125198     2  0.4679      0.775 0.000 0.648 0.000 0.352
#> GSM125200     1  0.0000      0.854 1.000 0.000 0.000 0.000
#> GSM125202     2  0.1489      0.893 0.000 0.952 0.004 0.044
#> GSM125204     3  0.1302      0.957 0.000 0.000 0.956 0.044
#> GSM125206     3  0.1867      0.944 0.000 0.000 0.928 0.072
#> GSM125208     3  0.1211      0.958 0.000 0.000 0.960 0.040
#> GSM125210     3  0.0000      0.959 0.000 0.000 1.000 0.000
#> GSM125212     3  0.1211      0.957 0.000 0.000 0.960 0.040
#> GSM125214     2  0.2149      0.881 0.000 0.912 0.000 0.088
#> GSM125216     2  0.4679      0.775 0.000 0.648 0.000 0.352
#> GSM125218     2  0.0188      0.899 0.000 0.996 0.004 0.000
#> GSM125220     4  0.7093      0.640 0.272 0.000 0.172 0.556
#> GSM125222     3  0.0469      0.958 0.000 0.000 0.988 0.012
#> GSM125224     2  0.4679      0.775 0.000 0.648 0.000 0.352
#> GSM125226     2  0.0469      0.897 0.000 0.988 0.012 0.000
#> GSM125228     2  0.4679      0.775 0.000 0.648 0.000 0.352
#> GSM125230     3  0.1867      0.945 0.000 0.000 0.928 0.072
#> GSM125232     3  0.2773      0.898 0.004 0.000 0.880 0.116
#> GSM125234     4  0.7128      0.623 0.260 0.000 0.184 0.556
#> GSM125236     4  0.4977      0.875 0.460 0.000 0.000 0.540
#> GSM125238     1  0.0000      0.854 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
#> GSM125123     5  0.4671      0.862 0.332 0.028 0.000 0.000 0.640
#> GSM125125     1  0.1557      0.836 0.940 0.052 0.000 0.000 0.008
#> GSM125127     5  0.4728      0.868 0.296 0.040 0.000 0.000 0.664
#> GSM125129     1  0.5461     -0.347 0.528 0.064 0.000 0.000 0.408
#> GSM125131     1  0.1484      0.836 0.944 0.048 0.000 0.000 0.008
#> GSM125133     5  0.5325      0.870 0.308 0.076 0.000 0.000 0.616
#> GSM125135     1  0.5498     -0.455 0.496 0.064 0.000 0.000 0.440
#> GSM125137     1  0.0290      0.857 0.992 0.008 0.000 0.000 0.000
#> GSM125139     1  0.0290      0.857 0.992 0.008 0.000 0.000 0.000
#> GSM125141     1  0.0290      0.857 0.992 0.008 0.000 0.000 0.000
#> GSM125143     5  0.4679      0.866 0.316 0.032 0.000 0.000 0.652
#> GSM125145     1  0.5579     -0.397 0.508 0.072 0.000 0.000 0.420
#> GSM125147     1  0.0609      0.858 0.980 0.020 0.000 0.000 0.000
#> GSM125149     1  0.0510      0.855 0.984 0.016 0.000 0.000 0.000
#> GSM125151     1  0.1341      0.844 0.944 0.056 0.000 0.000 0.000
#> GSM125153     1  0.1544      0.841 0.932 0.068 0.000 0.000 0.000
#> GSM125155     1  0.0510      0.856 0.984 0.016 0.000 0.000 0.000
#> GSM125157     1  0.1121      0.844 0.956 0.044 0.000 0.000 0.000
#> GSM125159     2  0.4206      0.892 0.000 0.696 0.000 0.288 0.016
#> GSM125161     1  0.2793      0.764 0.876 0.088 0.000 0.000 0.036
#> GSM125163     2  0.4003      0.894 0.000 0.704 0.000 0.288 0.008
#> GSM125165     3  0.0771      0.935 0.000 0.004 0.976 0.000 0.020
#> GSM125167     2  0.3730      0.894 0.000 0.712 0.000 0.288 0.000
#> GSM125169     2  0.5359      0.312 0.000 0.608 0.316 0.000 0.076
#> GSM125171     2  0.4735      0.885 0.000 0.672 0.000 0.284 0.044
#> GSM125173     3  0.2270      0.914 0.000 0.020 0.904 0.000 0.076
#> GSM125175     2  0.5213      0.855 0.000 0.616 0.000 0.320 0.064
#> GSM125177     3  0.2362      0.922 0.000 0.024 0.900 0.000 0.076
#> GSM125179     3  0.0703      0.933 0.000 0.000 0.976 0.000 0.024
#> GSM125181     3  0.2927      0.895 0.000 0.060 0.872 0.000 0.068
#> GSM125183     3  0.1041      0.932 0.000 0.004 0.964 0.000 0.032
#> GSM125185     3  0.0162      0.934 0.000 0.000 0.996 0.000 0.004
#> GSM125187     3  0.0880      0.932 0.000 0.000 0.968 0.000 0.032
#> GSM125189     2  0.5124      0.868 0.000 0.644 0.000 0.288 0.068
#> GSM125191     2  0.4109      0.894 0.000 0.700 0.000 0.288 0.012
#> GSM125193     3  0.1764      0.933 0.000 0.008 0.928 0.000 0.064
#> GSM125195     3  0.3631      0.886 0.000 0.072 0.824 0.000 0.104
#> GSM125197     4  0.0290      0.900 0.000 0.000 0.000 0.992 0.008
#> GSM125199     1  0.0703      0.852 0.976 0.024 0.000 0.000 0.000
#> GSM125201     2  0.5077      0.722 0.000 0.568 0.000 0.392 0.040
#> GSM125203     3  0.2236      0.923 0.000 0.024 0.908 0.000 0.068
#> GSM125205     4  0.3214      0.713 0.000 0.120 0.000 0.844 0.036
#> GSM125207     3  0.1697      0.929 0.000 0.008 0.932 0.000 0.060
#> GSM125209     2  0.4003      0.894 0.000 0.704 0.000 0.288 0.008
#> GSM125211     3  0.1981      0.928 0.000 0.016 0.920 0.000 0.064
#> GSM125213     2  0.4830      0.527 0.000 0.492 0.000 0.488 0.020
#> GSM125215     4  0.0000      0.904 0.000 0.000 0.000 1.000 0.000
#> GSM125217     2  0.4713      0.877 0.000 0.676 0.000 0.280 0.044
#> GSM125219     5  0.5218      0.864 0.296 0.072 0.000 0.000 0.632
#> GSM125221     3  0.0510      0.934 0.000 0.000 0.984 0.000 0.016
#> GSM125223     4  0.0000      0.904 0.000 0.000 0.000 1.000 0.000
#> GSM125225     4  0.0000      0.904 0.000 0.000 0.000 1.000 0.000
#> GSM125227     4  0.0000      0.904 0.000 0.000 0.000 1.000 0.000
#> GSM125229     3  0.5224      0.719 0.000 0.176 0.684 0.000 0.140
#> GSM125231     3  0.2625      0.915 0.000 0.016 0.876 0.000 0.108
#> GSM125233     1  0.5359     -0.352 0.532 0.056 0.000 0.000 0.412
#> GSM125235     5  0.5295      0.705 0.408 0.052 0.000 0.000 0.540
#> GSM125237     1  0.0510      0.855 0.984 0.016 0.000 0.000 0.000
#> GSM125124     1  0.1197      0.848 0.952 0.048 0.000 0.000 0.000
#> GSM125126     1  0.1484      0.836 0.944 0.048 0.000 0.000 0.008
#> GSM125128     5  0.4770      0.875 0.320 0.036 0.000 0.000 0.644
#> GSM125130     5  0.4329      0.879 0.312 0.016 0.000 0.000 0.672
#> GSM125132     1  0.0609      0.853 0.980 0.020 0.000 0.000 0.000
#> GSM125134     1  0.1478      0.841 0.936 0.064 0.000 0.000 0.000
#> GSM125136     5  0.5213      0.874 0.320 0.064 0.000 0.000 0.616
#> GSM125138     1  0.1341      0.844 0.944 0.056 0.000 0.000 0.000
#> GSM125140     1  0.0290      0.857 0.992 0.008 0.000 0.000 0.000
#> GSM125142     1  0.1197      0.848 0.952 0.048 0.000 0.000 0.000
#> GSM125144     1  0.1341      0.844 0.944 0.056 0.000 0.000 0.000
#> GSM125146     1  0.5579     -0.397 0.508 0.072 0.000 0.000 0.420
#> GSM125148     1  0.0609      0.858 0.980 0.020 0.000 0.000 0.000
#> GSM125150     1  0.0609      0.854 0.980 0.020 0.000 0.000 0.000
#> GSM125152     1  0.1341      0.844 0.944 0.056 0.000 0.000 0.000
#> GSM125154     1  0.1410      0.842 0.940 0.060 0.000 0.000 0.000
#> GSM125156     1  0.0703      0.855 0.976 0.024 0.000 0.000 0.000
#> GSM125158     1  0.0609      0.853 0.980 0.020 0.000 0.000 0.000
#> GSM125160     2  0.4206      0.892 0.000 0.696 0.000 0.288 0.016
#> GSM125162     5  0.5752      0.728 0.412 0.088 0.000 0.000 0.500
#> GSM125164     2  0.4003      0.894 0.000 0.704 0.000 0.288 0.008
#> GSM125166     2  0.4003      0.894 0.000 0.704 0.000 0.288 0.008
#> GSM125168     2  0.4003      0.893 0.000 0.704 0.000 0.288 0.008
#> GSM125170     3  0.3110      0.862 0.000 0.080 0.860 0.000 0.060
#> GSM125172     2  0.4442      0.887 0.000 0.688 0.000 0.284 0.028
#> GSM125174     3  0.2448      0.912 0.000 0.020 0.892 0.000 0.088
#> GSM125176     2  0.5301      0.850 0.000 0.648 0.004 0.272 0.076
#> GSM125178     3  0.2236      0.923 0.000 0.024 0.908 0.000 0.068
#> GSM125180     3  0.0703      0.933 0.000 0.000 0.976 0.000 0.024
#> GSM125182     2  0.4109      0.893 0.000 0.700 0.000 0.288 0.012
#> GSM125184     3  0.0000      0.934 0.000 0.000 1.000 0.000 0.000
#> GSM125186     3  0.0703      0.933 0.000 0.000 0.976 0.000 0.024
#> GSM125188     3  0.1469      0.931 0.000 0.016 0.948 0.000 0.036
#> GSM125190     2  0.5301      0.850 0.000 0.648 0.004 0.272 0.076
#> GSM125192     2  0.4109      0.893 0.000 0.700 0.000 0.288 0.012
#> GSM125194     3  0.1638      0.923 0.000 0.004 0.932 0.000 0.064
#> GSM125196     3  0.3631      0.886 0.000 0.072 0.824 0.000 0.104
#> GSM125198     4  0.0290      0.900 0.000 0.000 0.000 0.992 0.008
#> GSM125200     1  0.0703      0.852 0.976 0.024 0.000 0.000 0.000
#> GSM125202     2  0.5077      0.722 0.000 0.568 0.000 0.392 0.040
#> GSM125204     3  0.2236      0.923 0.000 0.024 0.908 0.000 0.068
#> GSM125206     3  0.3639      0.886 0.000 0.076 0.824 0.000 0.100
#> GSM125208     3  0.1697      0.929 0.000 0.008 0.932 0.000 0.060
#> GSM125210     3  0.0404      0.934 0.000 0.000 0.988 0.000 0.012
#> GSM125212     3  0.2408      0.926 0.000 0.016 0.892 0.000 0.092
#> GSM125214     4  0.4829     -0.557 0.000 0.480 0.000 0.500 0.020
#> GSM125216     4  0.0000      0.904 0.000 0.000 0.000 1.000 0.000
#> GSM125218     2  0.5124      0.868 0.000 0.644 0.000 0.288 0.068
#> GSM125220     5  0.6365      0.746 0.192 0.072 0.100 0.000 0.636
#> GSM125222     3  0.0510      0.934 0.000 0.000 0.984 0.000 0.016
#> GSM125224     4  0.0000      0.904 0.000 0.000 0.000 1.000 0.000
#> GSM125226     2  0.5233      0.864 0.000 0.636 0.000 0.288 0.076
#> GSM125228     4  0.0000      0.904 0.000 0.000 0.000 1.000 0.000
#> GSM125230     3  0.2519      0.919 0.000 0.016 0.884 0.000 0.100
#> GSM125232     3  0.3183      0.869 0.000 0.016 0.828 0.000 0.156
#> GSM125234     5  0.5927      0.728 0.176 0.040 0.116 0.000 0.668
#> GSM125236     5  0.4165      0.875 0.320 0.008 0.000 0.000 0.672
#> GSM125238     1  0.0404      0.854 0.988 0.012 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
#> GSM125123     5  0.4259      0.807 0.188 0.000 0.028 0.000 0.744 NA
#> GSM125125     1  0.2907      0.840 0.860 0.000 0.028 0.000 0.016 NA
#> GSM125127     5  0.4422      0.800 0.172 0.000 0.008 0.008 0.740 NA
#> GSM125129     5  0.5870      0.624 0.356 0.000 0.040 0.000 0.516 NA
#> GSM125131     1  0.2230      0.854 0.904 0.000 0.016 0.000 0.016 NA
#> GSM125133     5  0.5102      0.795 0.184 0.000 0.028 0.000 0.680 NA
#> GSM125135     5  0.5898      0.641 0.348 0.000 0.056 0.000 0.524 NA
#> GSM125137     1  0.1334      0.884 0.948 0.000 0.032 0.000 0.000 NA
#> GSM125139     1  0.1408      0.884 0.944 0.000 0.036 0.000 0.000 NA
#> GSM125141     1  0.0777      0.888 0.972 0.000 0.004 0.000 0.000 NA
#> GSM125143     5  0.4022      0.807 0.188 0.000 0.016 0.000 0.756 NA
#> GSM125145     5  0.6324      0.557 0.372 0.000 0.072 0.000 0.464 NA
#> GSM125147     1  0.1765      0.881 0.924 0.000 0.024 0.000 0.000 NA
#> GSM125149     1  0.1124      0.880 0.956 0.000 0.008 0.000 0.000 NA
#> GSM125151     1  0.3167      0.842 0.832 0.000 0.096 0.000 0.000 NA
#> GSM125153     1  0.3560      0.826 0.808 0.000 0.084 0.000 0.004 NA
#> GSM125155     1  0.1492      0.883 0.940 0.000 0.036 0.000 0.000 NA
#> GSM125157     1  0.1672      0.870 0.932 0.000 0.016 0.000 0.004 NA
#> GSM125159     2  0.0458      0.854 0.000 0.984 0.000 0.000 0.000 NA
#> GSM125161     1  0.3994      0.726 0.792 0.000 0.036 0.000 0.056 NA
#> GSM125163     2  0.0260      0.858 0.000 0.992 0.000 0.000 0.000 NA
#> GSM125165     4  0.1913      0.862 0.000 0.000 0.000 0.908 0.012 NA
#> GSM125167     2  0.1010      0.858 0.000 0.960 0.000 0.000 0.004 NA
#> GSM125169     2  0.6557      0.424 0.000 0.516 0.004 0.192 0.052 NA
#> GSM125171     2  0.3253      0.832 0.000 0.832 0.000 0.004 0.068 NA
#> GSM125173     4  0.3581      0.819 0.000 0.000 0.036 0.824 0.044 NA
#> GSM125175     2  0.4402      0.765 0.000 0.764 0.048 0.000 0.068 NA
#> GSM125177     4  0.3428      0.811 0.000 0.000 0.000 0.696 0.000 NA
#> GSM125179     4  0.0622      0.858 0.000 0.000 0.000 0.980 0.008 NA
#> GSM125181     4  0.4447      0.788 0.000 0.064 0.000 0.704 0.008 NA
#> GSM125183     4  0.0820      0.855 0.000 0.000 0.000 0.972 0.016 NA
#> GSM125185     4  0.0260      0.860 0.000 0.000 0.000 0.992 0.000 NA
#> GSM125187     4  0.0717      0.856 0.000 0.000 0.000 0.976 0.016 NA
#> GSM125189     2  0.3432      0.797 0.000 0.800 0.000 0.000 0.052 NA
#> GSM125191     2  0.1296      0.857 0.000 0.948 0.000 0.004 0.004 NA
#> GSM125193     4  0.2066      0.863 0.000 0.000 0.000 0.904 0.024 NA
#> GSM125195     4  0.4669      0.719 0.000 0.000 0.016 0.556 0.020 NA
#> GSM125197     3  0.2994      0.967 0.000 0.208 0.788 0.000 0.004 NA
#> GSM125199     1  0.1340      0.877 0.948 0.000 0.008 0.000 0.004 NA
#> GSM125201     2  0.3601      0.755 0.000 0.828 0.072 0.000 0.048 NA
#> GSM125203     4  0.3409      0.813 0.000 0.000 0.000 0.700 0.000 NA
#> GSM125205     3  0.5517      0.643 0.000 0.356 0.548 0.000 0.052 NA
#> GSM125207     4  0.3126      0.832 0.000 0.000 0.000 0.752 0.000 NA
#> GSM125209     2  0.1296      0.857 0.000 0.948 0.000 0.004 0.004 NA
#> GSM125211     4  0.2905      0.856 0.000 0.000 0.008 0.836 0.012 NA
#> GSM125213     2  0.3488      0.668 0.000 0.804 0.152 0.000 0.012 NA
#> GSM125215     3  0.2854      0.968 0.000 0.208 0.792 0.000 0.000 NA
#> GSM125217     2  0.2356      0.842 0.000 0.884 0.000 0.004 0.016 NA
#> GSM125219     5  0.5255      0.790 0.172 0.000 0.028 0.008 0.684 NA
#> GSM125221     4  0.0363      0.857 0.000 0.000 0.000 0.988 0.012 NA
#> GSM125223     3  0.2994      0.967 0.000 0.208 0.788 0.000 0.004 NA
#> GSM125225     3  0.2854      0.968 0.000 0.208 0.792 0.000 0.000 NA
#> GSM125227     3  0.2854      0.968 0.000 0.208 0.792 0.000 0.000 NA
#> GSM125229     4  0.5316      0.627 0.000 0.104 0.000 0.480 0.000 NA
#> GSM125231     4  0.2791      0.845 0.000 0.000 0.008 0.864 0.032 NA
#> GSM125233     5  0.5877      0.629 0.352 0.000 0.044 0.000 0.520 NA
#> GSM125235     5  0.5604      0.746 0.260 0.000 0.044 0.000 0.608 NA
#> GSM125237     1  0.1124      0.880 0.956 0.000 0.008 0.000 0.000 NA
#> GSM125124     1  0.2672      0.859 0.868 0.000 0.080 0.000 0.000 NA
#> GSM125126     1  0.2449      0.849 0.888 0.000 0.020 0.000 0.012 NA
#> GSM125128     5  0.4022      0.809 0.188 0.000 0.016 0.000 0.756 NA
#> GSM125130     5  0.3587      0.809 0.188 0.000 0.000 0.000 0.772 NA
#> GSM125132     1  0.1340      0.877 0.948 0.000 0.008 0.000 0.004 NA
#> GSM125134     1  0.3572      0.827 0.812 0.000 0.080 0.000 0.008 NA
#> GSM125136     5  0.4886      0.799 0.188 0.000 0.024 0.000 0.696 NA
#> GSM125138     1  0.3167      0.842 0.832 0.000 0.096 0.000 0.000 NA
#> GSM125140     1  0.1408      0.884 0.944 0.000 0.036 0.000 0.000 NA
#> GSM125142     1  0.3063      0.847 0.840 0.000 0.092 0.000 0.000 NA
#> GSM125144     1  0.3167      0.842 0.832 0.000 0.096 0.000 0.000 NA
#> GSM125146     5  0.6324      0.557 0.372 0.000 0.072 0.000 0.464 NA
#> GSM125148     1  0.1633      0.881 0.932 0.000 0.024 0.000 0.000 NA
#> GSM125150     1  0.1124      0.880 0.956 0.000 0.008 0.000 0.000 NA
#> GSM125152     1  0.3167      0.842 0.832 0.000 0.096 0.000 0.000 NA
#> GSM125154     1  0.3172      0.842 0.832 0.000 0.092 0.000 0.000 NA
#> GSM125156     1  0.2119      0.873 0.904 0.000 0.060 0.000 0.000 NA
#> GSM125158     1  0.1196      0.878 0.952 0.000 0.008 0.000 0.000 NA
#> GSM125160     2  0.0547      0.853 0.000 0.980 0.000 0.000 0.000 NA
#> GSM125162     5  0.6062      0.633 0.356 0.000 0.036 0.000 0.492 NA
#> GSM125164     2  0.0405      0.858 0.000 0.988 0.000 0.000 0.004 NA
#> GSM125166     2  0.0405      0.858 0.000 0.988 0.000 0.000 0.004 NA
#> GSM125168     2  0.1155      0.857 0.000 0.956 0.000 0.004 0.004 NA
#> GSM125170     4  0.4647      0.761 0.000 0.060 0.004 0.736 0.036 NA
#> GSM125172     2  0.2533      0.843 0.000 0.884 0.000 0.004 0.056 NA
#> GSM125174     4  0.3445      0.809 0.000 0.000 0.036 0.836 0.048 NA
#> GSM125176     2  0.3752      0.782 0.000 0.776 0.000 0.004 0.052 NA
#> GSM125178     4  0.3409      0.813 0.000 0.000 0.000 0.700 0.000 NA
#> GSM125180     4  0.0622      0.858 0.000 0.000 0.000 0.980 0.008 NA
#> GSM125182     2  0.0508      0.858 0.000 0.984 0.000 0.000 0.004 NA
#> GSM125184     4  0.0713      0.862 0.000 0.000 0.000 0.972 0.000 NA
#> GSM125186     4  0.0622      0.858 0.000 0.000 0.000 0.980 0.008 NA
#> GSM125188     4  0.2980      0.843 0.000 0.000 0.000 0.800 0.008 NA
#> GSM125190     2  0.3752      0.782 0.000 0.776 0.000 0.004 0.052 NA
#> GSM125192     2  0.0405      0.858 0.000 0.988 0.000 0.000 0.004 NA
#> GSM125194     4  0.1528      0.848 0.000 0.000 0.000 0.936 0.048 NA
#> GSM125196     4  0.4669      0.719 0.000 0.000 0.016 0.556 0.020 NA
#> GSM125198     3  0.2994      0.967 0.000 0.208 0.788 0.000 0.004 NA
#> GSM125200     1  0.1340      0.877 0.948 0.000 0.008 0.000 0.004 NA
#> GSM125202     2  0.3601      0.755 0.000 0.828 0.072 0.000 0.048 NA
#> GSM125204     4  0.3409      0.813 0.000 0.000 0.000 0.700 0.000 NA
#> GSM125206     4  0.4738      0.719 0.000 0.000 0.020 0.556 0.020 NA
#> GSM125208     4  0.3076      0.835 0.000 0.000 0.000 0.760 0.000 NA
#> GSM125210     4  0.1501      0.862 0.000 0.000 0.000 0.924 0.000 NA
#> GSM125212     4  0.3533      0.842 0.000 0.000 0.004 0.748 0.012 NA
#> GSM125214     2  0.3734      0.638 0.000 0.784 0.164 0.000 0.012 NA
#> GSM125216     3  0.2854      0.968 0.000 0.208 0.792 0.000 0.000 NA
#> GSM125218     2  0.3432      0.797 0.000 0.800 0.000 0.000 0.052 NA
#> GSM125220     5  0.5757      0.722 0.104 0.000 0.028 0.076 0.684 NA
#> GSM125222     4  0.0363      0.857 0.000 0.000 0.000 0.988 0.012 NA
#> GSM125224     3  0.2854      0.968 0.000 0.208 0.792 0.000 0.000 NA
#> GSM125226     2  0.3394      0.801 0.000 0.804 0.000 0.000 0.052 NA
#> GSM125228     3  0.2854      0.968 0.000 0.208 0.792 0.000 0.000 NA
#> GSM125230     4  0.2763      0.846 0.000 0.000 0.008 0.868 0.036 NA
#> GSM125232     4  0.3371      0.811 0.000 0.000 0.012 0.832 0.080 NA
#> GSM125234     5  0.5029      0.722 0.096 0.000 0.012 0.084 0.736 NA
#> GSM125236     5  0.3724      0.809 0.188 0.000 0.012 0.000 0.772 NA
#> GSM125238     1  0.1049      0.880 0.960 0.000 0.008 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-ATC-kmeans-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-ATC-kmeans-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-ATC-kmeans-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-ATC-kmeans-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-ATC-kmeans-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-ATC-kmeans-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-ATC-kmeans-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-ATC-kmeans-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-ATC-kmeans-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-ATC-kmeans-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-ATC-kmeans-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-ATC-kmeans-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-ATC-kmeans-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-ATC-kmeans-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-ATC-kmeans-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-ATC-kmeans-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-ATC-kmeans-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-ATC-kmeans-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-ATC-kmeans-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-ATC-kmeans-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk ATC-kmeans-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-ATC-kmeans-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-ATC-kmeans-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-ATC-kmeans-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-ATC-kmeans-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-ATC-kmeans-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk ATC-kmeans-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>              n agent(p) individual(p) k
#> ATC:kmeans 116    1.000      3.22e-05 2
#> ATC:kmeans 114    0.974      3.76e-08 3
#> ATC:kmeans 109    0.986      6.55e-09 4
#> ATC:kmeans 109    0.963      1.24e-10 5
#> ATC:kmeans 115    0.918      1.10e-12 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


ATC: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 21168 rows and 116 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 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-skmeans-collect-plots

The plots are:

All the plots in panels can be made by individual functions and they are plotted later in this section.

select_partition_number() produces several plots showing different statistics for choosing “optimized” k. There are following statistics:

The detailed explanations of these statistics can be found in the cola vignette.

Generally speaking, lower PAC score, higher mean silhouette score or higher concordance corresponds to better partition. Rand index and Jaccard index measure how similar the current partition is compared to partition with k-1. If they are too similar, we won't accept k is better than k-1.

select_partition_number(res)

plot of chunk ATC-skmeans-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           0.974       0.991         0.5034 0.496   0.496
#> 3 3 0.969           0.948       0.977         0.2574 0.835   0.677
#> 4 4 0.938           0.876       0.947         0.0662 0.927   0.807
#> 5 5 0.886           0.852       0.914         0.0349 0.981   0.940
#> 6 6 0.883           0.814       0.899         0.0302 0.996   0.987

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
#> GSM125123     1   0.000     0.9823 1.000 0.000
#> GSM125125     1   0.000     0.9823 1.000 0.000
#> GSM125127     1   0.000     0.9823 1.000 0.000
#> GSM125129     1   0.000     0.9823 1.000 0.000
#> GSM125131     1   0.000     0.9823 1.000 0.000
#> GSM125133     1   0.000     0.9823 1.000 0.000
#> GSM125135     1   0.000     0.9823 1.000 0.000
#> GSM125137     1   0.000     0.9823 1.000 0.000
#> GSM125139     1   0.000     0.9823 1.000 0.000
#> GSM125141     1   0.000     0.9823 1.000 0.000
#> GSM125143     1   0.000     0.9823 1.000 0.000
#> GSM125145     1   0.000     0.9823 1.000 0.000
#> GSM125147     1   0.000     0.9823 1.000 0.000
#> GSM125149     1   0.000     0.9823 1.000 0.000
#> GSM125151     1   0.000     0.9823 1.000 0.000
#> GSM125153     1   0.000     0.9823 1.000 0.000
#> GSM125155     1   0.000     0.9823 1.000 0.000
#> GSM125157     1   0.000     0.9823 1.000 0.000
#> GSM125159     2   0.000     0.9984 0.000 1.000
#> GSM125161     1   0.000     0.9823 1.000 0.000
#> GSM125163     2   0.000     0.9984 0.000 1.000
#> GSM125165     2   0.000     0.9984 0.000 1.000
#> GSM125167     2   0.000     0.9984 0.000 1.000
#> GSM125169     2   0.000     0.9984 0.000 1.000
#> GSM125171     2   0.000     0.9984 0.000 1.000
#> GSM125173     2   0.000     0.9984 0.000 1.000
#> GSM125175     2   0.000     0.9984 0.000 1.000
#> GSM125177     2   0.000     0.9984 0.000 1.000
#> GSM125179     1   0.998     0.1162 0.528 0.472
#> GSM125181     2   0.000     0.9984 0.000 1.000
#> GSM125183     1   1.000     0.0435 0.508 0.492
#> GSM125185     2   0.000     0.9984 0.000 1.000
#> GSM125187     1   0.000     0.9823 1.000 0.000
#> GSM125189     2   0.000     0.9984 0.000 1.000
#> GSM125191     2   0.000     0.9984 0.000 1.000
#> GSM125193     1   0.000     0.9823 1.000 0.000
#> GSM125195     2   0.000     0.9984 0.000 1.000
#> GSM125197     2   0.000     0.9984 0.000 1.000
#> GSM125199     1   0.000     0.9823 1.000 0.000
#> GSM125201     2   0.000     0.9984 0.000 1.000
#> GSM125203     2   0.000     0.9984 0.000 1.000
#> GSM125205     2   0.000     0.9984 0.000 1.000
#> GSM125207     2   0.000     0.9984 0.000 1.000
#> GSM125209     2   0.000     0.9984 0.000 1.000
#> GSM125211     2   0.000     0.9984 0.000 1.000
#> GSM125213     2   0.000     0.9984 0.000 1.000
#> GSM125215     2   0.000     0.9984 0.000 1.000
#> GSM125217     2   0.000     0.9984 0.000 1.000
#> GSM125219     1   0.000     0.9823 1.000 0.000
#> GSM125221     2   0.000     0.9984 0.000 1.000
#> GSM125223     2   0.000     0.9984 0.000 1.000
#> GSM125225     2   0.000     0.9984 0.000 1.000
#> GSM125227     2   0.000     0.9984 0.000 1.000
#> GSM125229     2   0.000     0.9984 0.000 1.000
#> GSM125231     1   0.000     0.9823 1.000 0.000
#> GSM125233     1   0.000     0.9823 1.000 0.000
#> GSM125235     1   0.000     0.9823 1.000 0.000
#> GSM125237     1   0.000     0.9823 1.000 0.000
#> GSM125124     1   0.000     0.9823 1.000 0.000
#> GSM125126     1   0.000     0.9823 1.000 0.000
#> GSM125128     1   0.000     0.9823 1.000 0.000
#> GSM125130     1   0.000     0.9823 1.000 0.000
#> GSM125132     1   0.000     0.9823 1.000 0.000
#> GSM125134     1   0.000     0.9823 1.000 0.000
#> GSM125136     1   0.000     0.9823 1.000 0.000
#> GSM125138     1   0.000     0.9823 1.000 0.000
#> GSM125140     1   0.000     0.9823 1.000 0.000
#> GSM125142     1   0.000     0.9823 1.000 0.000
#> GSM125144     1   0.000     0.9823 1.000 0.000
#> GSM125146     1   0.000     0.9823 1.000 0.000
#> GSM125148     1   0.000     0.9823 1.000 0.000
#> GSM125150     1   0.000     0.9823 1.000 0.000
#> GSM125152     1   0.000     0.9823 1.000 0.000
#> GSM125154     1   0.000     0.9823 1.000 0.000
#> GSM125156     1   0.000     0.9823 1.000 0.000
#> GSM125158     1   0.000     0.9823 1.000 0.000
#> GSM125160     2   0.000     0.9984 0.000 1.000
#> GSM125162     1   0.000     0.9823 1.000 0.000
#> GSM125164     2   0.000     0.9984 0.000 1.000
#> GSM125166     2   0.000     0.9984 0.000 1.000
#> GSM125168     2   0.000     0.9984 0.000 1.000
#> GSM125170     2   0.000     0.9984 0.000 1.000
#> GSM125172     2   0.000     0.9984 0.000 1.000
#> GSM125174     2   0.000     0.9984 0.000 1.000
#> GSM125176     2   0.000     0.9984 0.000 1.000
#> GSM125178     2   0.000     0.9984 0.000 1.000
#> GSM125180     2   0.141     0.9785 0.020 0.980
#> GSM125182     2   0.000     0.9984 0.000 1.000
#> GSM125184     2   0.000     0.9984 0.000 1.000
#> GSM125186     2   0.373     0.9209 0.072 0.928
#> GSM125188     2   0.000     0.9984 0.000 1.000
#> GSM125190     2   0.000     0.9984 0.000 1.000
#> GSM125192     2   0.000     0.9984 0.000 1.000
#> GSM125194     1   0.000     0.9823 1.000 0.000
#> GSM125196     2   0.000     0.9984 0.000 1.000
#> GSM125198     2   0.000     0.9984 0.000 1.000
#> GSM125200     1   0.000     0.9823 1.000 0.000
#> GSM125202     2   0.000     0.9984 0.000 1.000
#> GSM125204     2   0.000     0.9984 0.000 1.000
#> GSM125206     2   0.000     0.9984 0.000 1.000
#> GSM125208     2   0.000     0.9984 0.000 1.000
#> GSM125210     2   0.000     0.9984 0.000 1.000
#> GSM125212     2   0.000     0.9984 0.000 1.000
#> GSM125214     2   0.000     0.9984 0.000 1.000
#> GSM125216     2   0.000     0.9984 0.000 1.000
#> GSM125218     2   0.000     0.9984 0.000 1.000
#> GSM125220     1   0.000     0.9823 1.000 0.000
#> GSM125222     2   0.000     0.9984 0.000 1.000
#> GSM125224     2   0.000     0.9984 0.000 1.000
#> GSM125226     2   0.000     0.9984 0.000 1.000
#> GSM125228     2   0.000     0.9984 0.000 1.000
#> GSM125230     1   0.000     0.9823 1.000 0.000
#> GSM125232     1   0.000     0.9823 1.000 0.000
#> GSM125234     1   0.000     0.9823 1.000 0.000
#> GSM125236     1   0.000     0.9823 1.000 0.000
#> GSM125238     1   0.000     0.9823 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
#> GSM125123     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125125     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125127     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125129     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125131     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125133     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125135     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125137     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125139     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125141     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125143     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125145     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125147     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125149     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125151     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125153     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125155     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125157     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125159     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125161     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125163     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125165     3  0.4504      0.746 0.000 0.196 0.804
#> GSM125167     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125169     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125171     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125173     3  0.2066      0.866 0.000 0.060 0.940
#> GSM125175     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125177     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125179     3  0.0000      0.892 0.000 0.000 1.000
#> GSM125181     2  0.0237      0.992 0.000 0.996 0.004
#> GSM125183     3  0.0000      0.892 0.000 0.000 1.000
#> GSM125185     3  0.0000      0.892 0.000 0.000 1.000
#> GSM125187     3  0.0000      0.892 0.000 0.000 1.000
#> GSM125189     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125191     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125193     1  0.5760      0.497 0.672 0.000 0.328
#> GSM125195     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125197     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125199     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125201     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125203     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125205     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125207     3  0.1163      0.883 0.000 0.028 0.972
#> GSM125209     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125211     3  0.0592      0.889 0.000 0.012 0.988
#> GSM125213     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125215     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125217     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125219     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125221     3  0.0000      0.892 0.000 0.000 1.000
#> GSM125223     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125225     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125227     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125229     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125231     3  0.6126      0.376 0.400 0.000 0.600
#> GSM125233     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125235     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125237     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125124     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125126     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125128     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125130     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125132     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125134     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125136     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125138     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125140     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125142     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125144     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125146     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125148     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125150     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125152     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125154     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125156     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125158     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125160     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125162     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125164     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125166     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125168     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125170     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125172     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125174     3  0.0000      0.892 0.000 0.000 1.000
#> GSM125176     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125178     3  0.3879      0.793 0.000 0.152 0.848
#> GSM125180     3  0.0000      0.892 0.000 0.000 1.000
#> GSM125182     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125184     3  0.0000      0.892 0.000 0.000 1.000
#> GSM125186     3  0.0000      0.892 0.000 0.000 1.000
#> GSM125188     2  0.3816      0.812 0.000 0.852 0.148
#> GSM125190     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125192     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125194     1  0.1031      0.968 0.976 0.000 0.024
#> GSM125196     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125198     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125200     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125202     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125204     3  0.6045      0.448 0.000 0.380 0.620
#> GSM125206     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125208     3  0.0000      0.892 0.000 0.000 1.000
#> GSM125210     3  0.6225      0.323 0.000 0.432 0.568
#> GSM125212     3  0.1529      0.878 0.000 0.040 0.960
#> GSM125214     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125216     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125218     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125220     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125222     3  0.0000      0.892 0.000 0.000 1.000
#> GSM125224     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125226     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125228     2  0.0000      0.996 0.000 1.000 0.000
#> GSM125230     3  0.3267      0.816 0.116 0.000 0.884
#> GSM125232     3  0.6140      0.366 0.404 0.000 0.596
#> GSM125234     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125236     1  0.0000      0.992 1.000 0.000 0.000
#> GSM125238     1  0.0000      0.992 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
#> GSM125123     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125125     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125127     1  0.0592     0.9791 0.984 0.000 0.000 0.016
#> GSM125129     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125131     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125133     1  0.0592     0.9791 0.984 0.000 0.000 0.016
#> GSM125135     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125137     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125139     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125141     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125143     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125145     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125147     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125149     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125151     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125153     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125155     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125157     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125159     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125161     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125163     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125165     2  0.6785     0.1769 0.000 0.540 0.352 0.108
#> GSM125167     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125169     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125171     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125173     3  0.7628     0.1144 0.000 0.348 0.440 0.212
#> GSM125175     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125177     4  0.3351     0.7642 0.000 0.148 0.008 0.844
#> GSM125179     3  0.0188     0.7537 0.000 0.000 0.996 0.004
#> GSM125181     2  0.1610     0.9205 0.000 0.952 0.016 0.032
#> GSM125183     3  0.0469     0.7517 0.000 0.000 0.988 0.012
#> GSM125185     3  0.0336     0.7531 0.000 0.000 0.992 0.008
#> GSM125187     3  0.0188     0.7526 0.000 0.000 0.996 0.004
#> GSM125189     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125191     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125193     4  0.5936     0.3814 0.056 0.000 0.324 0.620
#> GSM125195     4  0.2973     0.7654 0.000 0.144 0.000 0.856
#> GSM125197     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125199     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125201     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125203     4  0.2412     0.7907 0.000 0.084 0.008 0.908
#> GSM125205     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125207     4  0.1970     0.7762 0.000 0.008 0.060 0.932
#> GSM125209     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125211     4  0.4679     0.3563 0.000 0.000 0.352 0.648
#> GSM125213     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125215     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125217     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125219     1  0.0592     0.9791 0.984 0.000 0.000 0.016
#> GSM125221     3  0.1118     0.7406 0.000 0.000 0.964 0.036
#> GSM125223     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125225     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125227     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125229     2  0.1211     0.9253 0.000 0.960 0.000 0.040
#> GSM125231     3  0.7748     0.2221 0.280 0.000 0.440 0.280
#> GSM125233     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125235     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125237     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125124     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125126     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125128     1  0.0336     0.9846 0.992 0.000 0.000 0.008
#> GSM125130     1  0.0469     0.9818 0.988 0.000 0.000 0.012
#> GSM125132     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125134     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125136     1  0.0592     0.9791 0.984 0.000 0.000 0.016
#> GSM125138     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125140     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125142     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125144     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125146     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125148     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125150     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125152     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125154     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125156     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125158     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125160     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125162     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125164     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125166     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125168     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125170     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125172     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125174     3  0.3583     0.6302 0.000 0.004 0.816 0.180
#> GSM125176     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125178     4  0.2376     0.7823 0.000 0.016 0.068 0.916
#> GSM125180     3  0.0188     0.7537 0.000 0.000 0.996 0.004
#> GSM125182     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125184     3  0.1890     0.7266 0.000 0.008 0.936 0.056
#> GSM125186     3  0.0188     0.7537 0.000 0.000 0.996 0.004
#> GSM125188     2  0.6134    -0.0175 0.000 0.508 0.048 0.444
#> GSM125190     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125192     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125194     1  0.6613     0.4156 0.628 0.000 0.200 0.172
#> GSM125196     4  0.2973     0.7654 0.000 0.144 0.000 0.856
#> GSM125198     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125200     1  0.0000     0.9896 1.000 0.000 0.000 0.000
#> GSM125202     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125204     4  0.2124     0.7890 0.000 0.028 0.040 0.932
#> GSM125206     4  0.2973     0.7654 0.000 0.144 0.000 0.856
#> GSM125208     4  0.1716     0.7695 0.000 0.000 0.064 0.936
#> GSM125210     2  0.4690     0.5986 0.000 0.724 0.260 0.016
#> GSM125212     4  0.4434     0.5980 0.000 0.016 0.228 0.756
#> GSM125214     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125216     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125218     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125220     1  0.0592     0.9791 0.984 0.000 0.000 0.016
#> GSM125222     3  0.1022     0.7434 0.000 0.000 0.968 0.032
#> GSM125224     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125226     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125228     2  0.0000     0.9642 0.000 1.000 0.000 0.000
#> GSM125230     3  0.7443     0.1225 0.172 0.000 0.436 0.392
#> GSM125232     3  0.6091     0.3496 0.344 0.000 0.596 0.060
#> GSM125234     1  0.0592     0.9791 0.984 0.000 0.000 0.016
#> GSM125236     1  0.0188     0.9872 0.996 0.000 0.000 0.004
#> GSM125238     1  0.0000     0.9896 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
#> GSM125123     1  0.0510     0.9699 0.984 0.000 0.000 0.000 0.016
#> GSM125125     1  0.0162     0.9740 0.996 0.000 0.000 0.000 0.004
#> GSM125127     1  0.2230     0.8936 0.884 0.000 0.000 0.000 0.116
#> GSM125129     1  0.0290     0.9730 0.992 0.000 0.000 0.000 0.008
#> GSM125131     1  0.0290     0.9730 0.992 0.000 0.000 0.000 0.008
#> GSM125133     1  0.2329     0.8825 0.876 0.000 0.000 0.000 0.124
#> GSM125135     1  0.0162     0.9743 0.996 0.000 0.000 0.000 0.004
#> GSM125137     1  0.0162     0.9743 0.996 0.000 0.000 0.000 0.004
#> GSM125139     1  0.0162     0.9743 0.996 0.000 0.000 0.000 0.004
#> GSM125141     1  0.0162     0.9743 0.996 0.000 0.000 0.000 0.004
#> GSM125143     1  0.0162     0.9743 0.996 0.000 0.000 0.000 0.004
#> GSM125145     1  0.0290     0.9737 0.992 0.000 0.000 0.000 0.008
#> GSM125147     1  0.0162     0.9743 0.996 0.000 0.000 0.000 0.004
#> GSM125149     1  0.0000     0.9743 1.000 0.000 0.000 0.000 0.000
#> GSM125151     1  0.0290     0.9737 0.992 0.000 0.000 0.000 0.008
#> GSM125153     1  0.0290     0.9737 0.992 0.000 0.000 0.000 0.008
#> GSM125155     1  0.0162     0.9743 0.996 0.000 0.000 0.000 0.004
#> GSM125157     1  0.0290     0.9730 0.992 0.000 0.000 0.000 0.008
#> GSM125159     2  0.0000     0.9510 0.000 1.000 0.000 0.000 0.000
#> GSM125161     1  0.0404     0.9716 0.988 0.000 0.000 0.000 0.012
#> GSM125163     2  0.0000     0.9510 0.000 1.000 0.000 0.000 0.000
#> GSM125165     2  0.7203     0.0467 0.000 0.488 0.040 0.220 0.252
#> GSM125167     2  0.0000     0.9510 0.000 1.000 0.000 0.000 0.000
#> GSM125169     2  0.0510     0.9433 0.000 0.984 0.000 0.000 0.016
#> GSM125171     2  0.0162     0.9511 0.000 0.996 0.000 0.000 0.004
#> GSM125173     5  0.7526     0.2348 0.000 0.224 0.096 0.176 0.504
#> GSM125175     2  0.0290     0.9500 0.000 0.992 0.000 0.000 0.008
#> GSM125177     3  0.0794     0.8436 0.000 0.028 0.972 0.000 0.000
#> GSM125179     4  0.0451     0.8696 0.000 0.000 0.004 0.988 0.008
#> GSM125181     2  0.4292     0.6792 0.000 0.748 0.012 0.024 0.216
#> GSM125183     4  0.3003     0.7227 0.000 0.000 0.000 0.812 0.188
#> GSM125185     4  0.0579     0.8677 0.000 0.000 0.008 0.984 0.008
#> GSM125187     4  0.1608     0.8463 0.000 0.000 0.000 0.928 0.072
#> GSM125189     2  0.0510     0.9433 0.000 0.984 0.000 0.000 0.016
#> GSM125191     2  0.0000     0.9510 0.000 1.000 0.000 0.000 0.000
#> GSM125193     5  0.6615     0.0777 0.024 0.000 0.232 0.184 0.560
#> GSM125195     3  0.2522     0.8288 0.000 0.024 0.896 0.004 0.076
#> GSM125197     2  0.0162     0.9511 0.000 0.996 0.000 0.000 0.004
#> GSM125199     1  0.0162     0.9740 0.996 0.000 0.000 0.000 0.004
#> GSM125201     2  0.0162     0.9511 0.000 0.996 0.000 0.000 0.004
#> GSM125203     3  0.0290     0.8519 0.000 0.008 0.992 0.000 0.000
#> GSM125205     2  0.0162     0.9511 0.000 0.996 0.000 0.000 0.004
#> GSM125207     3  0.2625     0.7873 0.000 0.000 0.876 0.016 0.108
#> GSM125209     2  0.0000     0.9510 0.000 1.000 0.000 0.000 0.000
#> GSM125211     5  0.6199     0.0873 0.000 0.000 0.392 0.140 0.468
#> GSM125213     2  0.0162     0.9511 0.000 0.996 0.000 0.000 0.004
#> GSM125215     2  0.0162     0.9511 0.000 0.996 0.000 0.000 0.004
#> GSM125217     2  0.0000     0.9510 0.000 1.000 0.000 0.000 0.000
#> GSM125219     1  0.2424     0.8743 0.868 0.000 0.000 0.000 0.132
#> GSM125221     4  0.3282     0.7543 0.000 0.000 0.008 0.804 0.188
#> GSM125223     2  0.0162     0.9511 0.000 0.996 0.000 0.000 0.004
#> GSM125225     2  0.0162     0.9511 0.000 0.996 0.000 0.000 0.004
#> GSM125227     2  0.0162     0.9511 0.000 0.996 0.000 0.000 0.004
#> GSM125229     2  0.2389     0.8397 0.000 0.880 0.116 0.000 0.004
#> GSM125231     5  0.7739     0.4181 0.144 0.000 0.132 0.248 0.476
#> GSM125233     1  0.0162     0.9740 0.996 0.000 0.000 0.000 0.004
#> GSM125235     1  0.0162     0.9740 0.996 0.000 0.000 0.000 0.004
#> GSM125237     1  0.0000     0.9743 1.000 0.000 0.000 0.000 0.000
#> GSM125124     1  0.0290     0.9737 0.992 0.000 0.000 0.000 0.008
#> GSM125126     1  0.0290     0.9730 0.992 0.000 0.000 0.000 0.008
#> GSM125128     1  0.1410     0.9390 0.940 0.000 0.000 0.000 0.060
#> GSM125130     1  0.2020     0.9050 0.900 0.000 0.000 0.000 0.100
#> GSM125132     1  0.0290     0.9730 0.992 0.000 0.000 0.000 0.008
#> GSM125134     1  0.0290     0.9737 0.992 0.000 0.000 0.000 0.008
#> GSM125136     1  0.2230     0.8904 0.884 0.000 0.000 0.000 0.116
#> GSM125138     1  0.0290     0.9737 0.992 0.000 0.000 0.000 0.008
#> GSM125140     1  0.0162     0.9743 0.996 0.000 0.000 0.000 0.004
#> GSM125142     1  0.0290     0.9737 0.992 0.000 0.000 0.000 0.008
#> GSM125144     1  0.0290     0.9737 0.992 0.000 0.000 0.000 0.008
#> GSM125146     1  0.0290     0.9737 0.992 0.000 0.000 0.000 0.008
#> GSM125148     1  0.0162     0.9743 0.996 0.000 0.000 0.000 0.004
#> GSM125150     1  0.0290     0.9730 0.992 0.000 0.000 0.000 0.008
#> GSM125152     1  0.0290     0.9737 0.992 0.000 0.000 0.000 0.008
#> GSM125154     1  0.0290     0.9737 0.992 0.000 0.000 0.000 0.008
#> GSM125156     1  0.0162     0.9743 0.996 0.000 0.000 0.000 0.004
#> GSM125158     1  0.0162     0.9740 0.996 0.000 0.000 0.000 0.004
#> GSM125160     2  0.0000     0.9510 0.000 1.000 0.000 0.000 0.000
#> GSM125162     1  0.0880     0.9596 0.968 0.000 0.000 0.000 0.032
#> GSM125164     2  0.0000     0.9510 0.000 1.000 0.000 0.000 0.000
#> GSM125166     2  0.0000     0.9510 0.000 1.000 0.000 0.000 0.000
#> GSM125168     2  0.0000     0.9510 0.000 1.000 0.000 0.000 0.000
#> GSM125170     2  0.0510     0.9433 0.000 0.984 0.000 0.000 0.016
#> GSM125172     2  0.0162     0.9511 0.000 0.996 0.000 0.000 0.004
#> GSM125174     5  0.5206     0.0431 0.000 0.000 0.044 0.428 0.528
#> GSM125176     2  0.0510     0.9433 0.000 0.984 0.000 0.000 0.016
#> GSM125178     3  0.0486     0.8509 0.000 0.004 0.988 0.004 0.004
#> GSM125180     4  0.0451     0.8696 0.000 0.000 0.004 0.988 0.008
#> GSM125182     2  0.0000     0.9510 0.000 1.000 0.000 0.000 0.000
#> GSM125184     4  0.3053     0.7701 0.000 0.044 0.008 0.872 0.076
#> GSM125186     4  0.0693     0.8688 0.000 0.000 0.008 0.980 0.012
#> GSM125188     2  0.7822    -0.1156 0.000 0.412 0.256 0.076 0.256
#> GSM125190     2  0.0510     0.9433 0.000 0.984 0.000 0.000 0.016
#> GSM125192     2  0.0000     0.9510 0.000 1.000 0.000 0.000 0.000
#> GSM125194     5  0.6556     0.2140 0.356 0.000 0.036 0.096 0.512
#> GSM125196     3  0.2396     0.8312 0.000 0.024 0.904 0.004 0.068
#> GSM125198     2  0.0162     0.9511 0.000 0.996 0.000 0.000 0.004
#> GSM125200     1  0.0290     0.9730 0.992 0.000 0.000 0.000 0.008
#> GSM125202     2  0.0162     0.9511 0.000 0.996 0.000 0.000 0.004
#> GSM125204     3  0.0324     0.8513 0.000 0.004 0.992 0.004 0.000
#> GSM125206     3  0.2522     0.8288 0.000 0.024 0.896 0.004 0.076
#> GSM125208     3  0.2824     0.7765 0.000 0.000 0.864 0.020 0.116
#> GSM125210     2  0.4313     0.5993 0.000 0.716 0.008 0.260 0.016
#> GSM125212     3  0.6049     0.0102 0.000 0.008 0.488 0.092 0.412
#> GSM125214     2  0.0162     0.9511 0.000 0.996 0.000 0.000 0.004
#> GSM125216     2  0.0162     0.9511 0.000 0.996 0.000 0.000 0.004
#> GSM125218     2  0.0404     0.9455 0.000 0.988 0.000 0.000 0.012
#> GSM125220     1  0.2424     0.8745 0.868 0.000 0.000 0.000 0.132
#> GSM125222     4  0.3171     0.7643 0.000 0.000 0.008 0.816 0.176
#> GSM125224     2  0.0162     0.9511 0.000 0.996 0.000 0.000 0.004
#> GSM125226     2  0.0000     0.9510 0.000 1.000 0.000 0.000 0.000
#> GSM125228     2  0.0162     0.9511 0.000 0.996 0.000 0.000 0.004
#> GSM125230     5  0.7040     0.4267 0.076 0.000 0.156 0.204 0.564
#> GSM125232     5  0.6800     0.2774 0.184 0.000 0.012 0.368 0.436
#> GSM125234     1  0.2280     0.8897 0.880 0.000 0.000 0.000 0.120
#> GSM125236     1  0.0963     0.9601 0.964 0.000 0.000 0.000 0.036
#> GSM125238     1  0.0162     0.9743 0.996 0.000 0.000 0.000 0.004

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM125123     1  0.0865      0.921 0.964 0.000 0.000 0.000 0.036 0.000
#> GSM125125     1  0.0146      0.934 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125127     1  0.3653      0.650 0.692 0.000 0.000 0.000 0.300 0.008
#> GSM125129     1  0.0692      0.933 0.976 0.000 0.000 0.000 0.020 0.004
#> GSM125131     1  0.0146      0.934 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125133     1  0.3464      0.616 0.688 0.000 0.000 0.000 0.312 0.000
#> GSM125135     1  0.1152      0.925 0.952 0.000 0.000 0.000 0.044 0.004
#> GSM125137     1  0.0146      0.935 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125139     1  0.0146      0.935 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125141     1  0.0146      0.935 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125143     1  0.1010      0.928 0.960 0.000 0.000 0.000 0.036 0.004
#> GSM125145     1  0.0777      0.931 0.972 0.000 0.000 0.000 0.024 0.004
#> GSM125147     1  0.0146      0.935 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125149     1  0.0000      0.935 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125151     1  0.0692      0.932 0.976 0.000 0.000 0.000 0.020 0.004
#> GSM125153     1  0.0692      0.932 0.976 0.000 0.000 0.000 0.020 0.004
#> GSM125155     1  0.0146      0.935 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125157     1  0.0000      0.935 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125159     2  0.0405      0.927 0.000 0.988 0.000 0.000 0.008 0.004
#> GSM125161     1  0.0790      0.922 0.968 0.000 0.000 0.000 0.032 0.000
#> GSM125163     2  0.0146      0.930 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM125165     2  0.7903     -0.346 0.000 0.352 0.068 0.144 0.092 0.344
#> GSM125167     2  0.0146      0.930 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM125169     2  0.2255      0.866 0.000 0.892 0.000 0.000 0.080 0.028
#> GSM125171     2  0.0000      0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125173     6  0.5770      0.475 0.000 0.112 0.036 0.108 0.060 0.684
#> GSM125175     2  0.0972      0.913 0.000 0.964 0.000 0.000 0.028 0.008
#> GSM125177     3  0.1768      0.798 0.000 0.044 0.932 0.008 0.004 0.012
#> GSM125179     4  0.0508      0.829 0.000 0.000 0.000 0.984 0.004 0.012
#> GSM125181     2  0.6380      0.357 0.000 0.564 0.028 0.028 0.236 0.144
#> GSM125183     4  0.4044      0.593 0.000 0.000 0.000 0.704 0.040 0.256
#> GSM125185     4  0.0692      0.828 0.000 0.000 0.000 0.976 0.004 0.020
#> GSM125187     4  0.2712      0.790 0.000 0.000 0.000 0.864 0.088 0.048
#> GSM125189     2  0.1682      0.892 0.000 0.928 0.000 0.000 0.052 0.020
#> GSM125191     2  0.0405      0.927 0.000 0.988 0.000 0.000 0.008 0.004
#> GSM125193     5  0.6365      0.331 0.004 0.000 0.140 0.064 0.556 0.236
#> GSM125195     3  0.3350      0.746 0.000 0.012 0.824 0.000 0.124 0.040
#> GSM125197     2  0.0000      0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125199     1  0.0000      0.935 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125201     2  0.0000      0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125203     3  0.1465      0.816 0.000 0.020 0.948 0.004 0.004 0.024
#> GSM125205     2  0.0000      0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125207     3  0.4494      0.636 0.000 0.000 0.732 0.036 0.048 0.184
#> GSM125209     2  0.0405      0.927 0.000 0.988 0.000 0.000 0.008 0.004
#> GSM125211     6  0.5353      0.534 0.000 0.000 0.256 0.084 0.032 0.628
#> GSM125213     2  0.0291      0.929 0.000 0.992 0.000 0.000 0.004 0.004
#> GSM125215     2  0.0000      0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125217     2  0.0291      0.929 0.000 0.992 0.000 0.000 0.004 0.004
#> GSM125219     1  0.3804      0.563 0.656 0.000 0.000 0.000 0.336 0.008
#> GSM125221     4  0.4527      0.681 0.000 0.000 0.008 0.724 0.132 0.136
#> GSM125223     2  0.0000      0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125225     2  0.0000      0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125227     2  0.0000      0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125229     2  0.2757      0.824 0.000 0.864 0.104 0.000 0.016 0.016
#> GSM125231     6  0.5816      0.562 0.064 0.000 0.056 0.152 0.052 0.676
#> GSM125233     1  0.0858      0.931 0.968 0.000 0.000 0.000 0.028 0.004
#> GSM125235     1  0.0260      0.934 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM125237     1  0.0000      0.935 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125124     1  0.0603      0.933 0.980 0.000 0.000 0.000 0.016 0.004
#> GSM125126     1  0.0146      0.934 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125128     1  0.2260      0.834 0.860 0.000 0.000 0.000 0.140 0.000
#> GSM125130     1  0.3217      0.747 0.768 0.000 0.000 0.000 0.224 0.008
#> GSM125132     1  0.0000      0.935 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125134     1  0.0692      0.932 0.976 0.000 0.000 0.000 0.020 0.004
#> GSM125136     1  0.3126      0.710 0.752 0.000 0.000 0.000 0.248 0.000
#> GSM125138     1  0.0692      0.932 0.976 0.000 0.000 0.000 0.020 0.004
#> GSM125140     1  0.0260      0.935 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM125142     1  0.0508      0.934 0.984 0.000 0.000 0.000 0.012 0.004
#> GSM125144     1  0.0692      0.932 0.976 0.000 0.000 0.000 0.020 0.004
#> GSM125146     1  0.0858      0.930 0.968 0.000 0.000 0.000 0.028 0.004
#> GSM125148     1  0.0146      0.935 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125150     1  0.0000      0.935 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125152     1  0.0692      0.932 0.976 0.000 0.000 0.000 0.020 0.004
#> GSM125154     1  0.0692      0.932 0.976 0.000 0.000 0.000 0.020 0.004
#> GSM125156     1  0.0692      0.932 0.976 0.000 0.000 0.000 0.020 0.004
#> GSM125158     1  0.0000      0.935 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125160     2  0.0291      0.929 0.000 0.992 0.000 0.000 0.004 0.004
#> GSM125162     1  0.1204      0.906 0.944 0.000 0.000 0.000 0.056 0.000
#> GSM125164     2  0.0146      0.930 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM125166     2  0.0000      0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125168     2  0.0146      0.930 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM125170     2  0.2384      0.859 0.000 0.884 0.000 0.000 0.084 0.032
#> GSM125172     2  0.0000      0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125174     6  0.4637      0.532 0.000 0.008 0.016 0.232 0.044 0.700
#> GSM125176     2  0.1765      0.889 0.000 0.924 0.000 0.000 0.052 0.024
#> GSM125178     3  0.1890      0.806 0.000 0.000 0.924 0.024 0.008 0.044
#> GSM125180     4  0.0508      0.829 0.000 0.000 0.000 0.984 0.004 0.012
#> GSM125182     2  0.0291      0.929 0.000 0.992 0.000 0.000 0.004 0.004
#> GSM125184     4  0.3805      0.699 0.000 0.016 0.020 0.788 0.012 0.164
#> GSM125186     4  0.0692      0.828 0.000 0.000 0.000 0.976 0.004 0.020
#> GSM125188     2  0.8312     -0.374 0.000 0.324 0.184 0.052 0.260 0.180
#> GSM125190     2  0.2009      0.878 0.000 0.908 0.000 0.000 0.068 0.024
#> GSM125192     2  0.0000      0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125194     5  0.7104      0.387 0.208 0.000 0.040 0.032 0.460 0.260
#> GSM125196     3  0.3208      0.752 0.000 0.008 0.832 0.000 0.120 0.040
#> GSM125198     2  0.0000      0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125200     1  0.0000      0.935 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125202     2  0.0000      0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125204     3  0.1138      0.817 0.000 0.004 0.960 0.012 0.000 0.024
#> GSM125206     3  0.3208      0.752 0.000 0.008 0.832 0.000 0.120 0.040
#> GSM125208     3  0.4693      0.639 0.000 0.000 0.720 0.036 0.064 0.180
#> GSM125210     2  0.4804      0.566 0.000 0.688 0.008 0.236 0.020 0.048
#> GSM125212     6  0.6050      0.311 0.000 0.016 0.368 0.056 0.048 0.512
#> GSM125214     2  0.0146      0.930 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM125216     2  0.0000      0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125218     2  0.1049      0.911 0.000 0.960 0.000 0.000 0.032 0.008
#> GSM125220     1  0.3652      0.585 0.672 0.000 0.000 0.000 0.324 0.004
#> GSM125222     4  0.4260      0.707 0.000 0.000 0.004 0.744 0.116 0.136
#> GSM125224     2  0.0000      0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125226     2  0.0146      0.929 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM125228     2  0.0000      0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125230     6  0.5060      0.595 0.032 0.000 0.068 0.112 0.048 0.740
#> GSM125232     6  0.5856      0.417 0.128 0.000 0.000 0.204 0.056 0.612
#> GSM125234     1  0.3927      0.569 0.644 0.000 0.000 0.000 0.344 0.012
#> GSM125236     1  0.1806      0.890 0.908 0.000 0.000 0.000 0.088 0.004
#> GSM125238     1  0.0000      0.935 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-skmeans-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-ATC-skmeans-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-ATC-skmeans-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-ATC-skmeans-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-ATC-skmeans-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-ATC-skmeans-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-ATC-skmeans-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-ATC-skmeans-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-ATC-skmeans-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-ATC-skmeans-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-ATC-skmeans-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-ATC-skmeans-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-ATC-skmeans-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-ATC-skmeans-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-ATC-skmeans-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-ATC-skmeans-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-ATC-skmeans-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-ATC-skmeans-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-ATC-skmeans-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-ATC-skmeans-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk ATC-skmeans-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-ATC-skmeans-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-ATC-skmeans-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-ATC-skmeans-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-ATC-skmeans-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-ATC-skmeans-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk ATC-skmeans-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>               n agent(p) individual(p) k
#> ATC:skmeans 114    1.000      3.19e-05 2
#> ATC:skmeans 111    0.950      2.16e-07 3
#> ATC:skmeans 107    0.937      2.21e-11 4
#> ATC:skmeans 105    0.971      1.45e-11 5
#> ATC:skmeans 108    0.994      4.97e-13 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 21168 rows and 116 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           0.992       0.997         0.5006 0.499   0.499
#> 3 3 0.873           0.872       0.951         0.3139 0.781   0.585
#> 4 4 0.927           0.907       0.962         0.0694 0.934   0.811
#> 5 5 0.777           0.710       0.805         0.0899 0.976   0.922
#> 6 6 0.785           0.765       0.860         0.0607 0.876   0.577

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

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
#> GSM125123     1  0.0000      0.993 1.000 0.000
#> GSM125125     1  0.0000      0.993 1.000 0.000
#> GSM125127     1  0.0000      0.993 1.000 0.000
#> GSM125129     1  0.0000      0.993 1.000 0.000
#> GSM125131     1  0.0000      0.993 1.000 0.000
#> GSM125133     1  0.0000      0.993 1.000 0.000
#> GSM125135     1  0.0000      0.993 1.000 0.000
#> GSM125137     1  0.0000      0.993 1.000 0.000
#> GSM125139     1  0.0000      0.993 1.000 0.000
#> GSM125141     1  0.0000      0.993 1.000 0.000
#> GSM125143     1  0.0000      0.993 1.000 0.000
#> GSM125145     1  0.0000      0.993 1.000 0.000
#> GSM125147     1  0.0000      0.993 1.000 0.000
#> GSM125149     1  0.0000      0.993 1.000 0.000
#> GSM125151     1  0.0000      0.993 1.000 0.000
#> GSM125153     1  0.0000      0.993 1.000 0.000
#> GSM125155     1  0.0000      0.993 1.000 0.000
#> GSM125157     1  0.0000      0.993 1.000 0.000
#> GSM125159     2  0.0000      0.999 0.000 1.000
#> GSM125161     1  0.0000      0.993 1.000 0.000
#> GSM125163     2  0.0000      0.999 0.000 1.000
#> GSM125165     2  0.0000      0.999 0.000 1.000
#> GSM125167     2  0.0000      0.999 0.000 1.000
#> GSM125169     2  0.0000      0.999 0.000 1.000
#> GSM125171     2  0.0000      0.999 0.000 1.000
#> GSM125173     2  0.0000      0.999 0.000 1.000
#> GSM125175     2  0.0000      0.999 0.000 1.000
#> GSM125177     2  0.0000      0.999 0.000 1.000
#> GSM125179     2  0.1184      0.984 0.016 0.984
#> GSM125181     2  0.0000      0.999 0.000 1.000
#> GSM125183     2  0.0938      0.988 0.012 0.988
#> GSM125185     2  0.0000      0.999 0.000 1.000
#> GSM125187     1  0.9358      0.456 0.648 0.352
#> GSM125189     2  0.0000      0.999 0.000 1.000
#> GSM125191     2  0.0000      0.999 0.000 1.000
#> GSM125193     2  0.0672      0.992 0.008 0.992
#> GSM125195     2  0.0000      0.999 0.000 1.000
#> GSM125197     2  0.0000      0.999 0.000 1.000
#> GSM125199     1  0.0000      0.993 1.000 0.000
#> GSM125201     2  0.0000      0.999 0.000 1.000
#> GSM125203     2  0.0000      0.999 0.000 1.000
#> GSM125205     2  0.0000      0.999 0.000 1.000
#> GSM125207     2  0.0000      0.999 0.000 1.000
#> GSM125209     2  0.0000      0.999 0.000 1.000
#> GSM125211     2  0.0000      0.999 0.000 1.000
#> GSM125213     2  0.0000      0.999 0.000 1.000
#> GSM125215     2  0.0000      0.999 0.000 1.000
#> GSM125217     2  0.0000      0.999 0.000 1.000
#> GSM125219     1  0.0000      0.993 1.000 0.000
#> GSM125221     2  0.0000      0.999 0.000 1.000
#> GSM125223     2  0.0000      0.999 0.000 1.000
#> GSM125225     2  0.0000      0.999 0.000 1.000
#> GSM125227     2  0.0000      0.999 0.000 1.000
#> GSM125229     2  0.0000      0.999 0.000 1.000
#> GSM125231     1  0.0376      0.989 0.996 0.004
#> GSM125233     1  0.0000      0.993 1.000 0.000
#> GSM125235     1  0.0000      0.993 1.000 0.000
#> GSM125237     1  0.0000      0.993 1.000 0.000
#> GSM125124     1  0.0000      0.993 1.000 0.000
#> GSM125126     1  0.0000      0.993 1.000 0.000
#> GSM125128     1  0.0000      0.993 1.000 0.000
#> GSM125130     1  0.0000      0.993 1.000 0.000
#> GSM125132     1  0.0000      0.993 1.000 0.000
#> GSM125134     1  0.0000      0.993 1.000 0.000
#> GSM125136     1  0.0000      0.993 1.000 0.000
#> GSM125138     1  0.0000      0.993 1.000 0.000
#> GSM125140     1  0.0000      0.993 1.000 0.000
#> GSM125142     1  0.0000      0.993 1.000 0.000
#> GSM125144     1  0.0000      0.993 1.000 0.000
#> GSM125146     1  0.0000      0.993 1.000 0.000
#> GSM125148     1  0.0000      0.993 1.000 0.000
#> GSM125150     1  0.0000      0.993 1.000 0.000
#> GSM125152     1  0.0000      0.993 1.000 0.000
#> GSM125154     1  0.0000      0.993 1.000 0.000
#> GSM125156     1  0.0000      0.993 1.000 0.000
#> GSM125158     1  0.0000      0.993 1.000 0.000
#> GSM125160     2  0.0000      0.999 0.000 1.000
#> GSM125162     1  0.0000      0.993 1.000 0.000
#> GSM125164     2  0.0000      0.999 0.000 1.000
#> GSM125166     2  0.0000      0.999 0.000 1.000
#> GSM125168     2  0.0000      0.999 0.000 1.000
#> GSM125170     2  0.0000      0.999 0.000 1.000
#> GSM125172     2  0.0000      0.999 0.000 1.000
#> GSM125174     2  0.0000      0.999 0.000 1.000
#> GSM125176     2  0.0000      0.999 0.000 1.000
#> GSM125178     2  0.0000      0.999 0.000 1.000
#> GSM125180     2  0.0000      0.999 0.000 1.000
#> GSM125182     2  0.0000      0.999 0.000 1.000
#> GSM125184     2  0.0000      0.999 0.000 1.000
#> GSM125186     2  0.0000      0.999 0.000 1.000
#> GSM125188     2  0.0000      0.999 0.000 1.000
#> GSM125190     2  0.0000      0.999 0.000 1.000
#> GSM125192     2  0.0000      0.999 0.000 1.000
#> GSM125194     1  0.0000      0.993 1.000 0.000
#> GSM125196     2  0.0000      0.999 0.000 1.000
#> GSM125198     2  0.0000      0.999 0.000 1.000
#> GSM125200     1  0.0000      0.993 1.000 0.000
#> GSM125202     2  0.0000      0.999 0.000 1.000
#> GSM125204     2  0.0000      0.999 0.000 1.000
#> GSM125206     2  0.0000      0.999 0.000 1.000
#> GSM125208     2  0.0000      0.999 0.000 1.000
#> GSM125210     2  0.0000      0.999 0.000 1.000
#> GSM125212     2  0.0000      0.999 0.000 1.000
#> GSM125214     2  0.0000      0.999 0.000 1.000
#> GSM125216     2  0.0000      0.999 0.000 1.000
#> GSM125218     2  0.0000      0.999 0.000 1.000
#> GSM125220     1  0.0000      0.993 1.000 0.000
#> GSM125222     2  0.0000      0.999 0.000 1.000
#> GSM125224     2  0.0000      0.999 0.000 1.000
#> GSM125226     2  0.0000      0.999 0.000 1.000
#> GSM125228     2  0.0000      0.999 0.000 1.000
#> GSM125230     1  0.0000      0.993 1.000 0.000
#> GSM125232     1  0.0000      0.993 1.000 0.000
#> GSM125234     1  0.0000      0.993 1.000 0.000
#> GSM125236     1  0.0000      0.993 1.000 0.000
#> GSM125238     1  0.0000      0.993 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
#> GSM125123     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125125     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125127     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125129     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125131     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125133     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125135     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125137     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125139     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125141     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125143     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125145     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125147     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125149     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125151     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125153     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125155     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125157     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125159     2  0.5291     0.6497 0.000 0.732 0.268
#> GSM125161     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125163     2  0.0237     0.8785 0.000 0.996 0.004
#> GSM125165     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125167     2  0.3412     0.8093 0.000 0.876 0.124
#> GSM125169     2  0.6302     0.1872 0.000 0.520 0.480
#> GSM125171     2  0.5859     0.5290 0.000 0.656 0.344
#> GSM125173     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125175     2  0.0000     0.8800 0.000 1.000 0.000
#> GSM125177     3  0.3116     0.8091 0.000 0.108 0.892
#> GSM125179     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125181     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125183     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125185     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125187     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125189     2  0.0000     0.8800 0.000 1.000 0.000
#> GSM125191     3  0.6244     0.0735 0.000 0.440 0.560
#> GSM125193     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125195     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125197     2  0.0000     0.8800 0.000 1.000 0.000
#> GSM125199     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125201     2  0.0000     0.8800 0.000 1.000 0.000
#> GSM125203     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125205     2  0.0000     0.8800 0.000 1.000 0.000
#> GSM125207     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125209     3  0.6309    -0.1467 0.000 0.496 0.504
#> GSM125211     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125213     2  0.0000     0.8800 0.000 1.000 0.000
#> GSM125215     2  0.0000     0.8800 0.000 1.000 0.000
#> GSM125217     3  0.6235     0.0872 0.000 0.436 0.564
#> GSM125219     1  0.0237     0.9922 0.996 0.000 0.004
#> GSM125221     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125223     2  0.0000     0.8800 0.000 1.000 0.000
#> GSM125225     2  0.0000     0.8800 0.000 1.000 0.000
#> GSM125227     2  0.0000     0.8800 0.000 1.000 0.000
#> GSM125229     3  0.6302    -0.0888 0.000 0.480 0.520
#> GSM125231     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125233     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125235     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125237     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125124     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125126     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125128     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125130     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125132     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125134     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125136     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125138     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125140     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125142     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125144     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125146     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125148     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125150     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125152     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125154     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125156     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125158     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125160     2  0.0000     0.8800 0.000 1.000 0.000
#> GSM125162     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125164     2  0.0000     0.8800 0.000 1.000 0.000
#> GSM125166     2  0.0000     0.8800 0.000 1.000 0.000
#> GSM125168     2  0.6244     0.3134 0.000 0.560 0.440
#> GSM125170     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125172     2  0.5905     0.5141 0.000 0.648 0.352
#> GSM125174     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125176     2  0.6252     0.3027 0.000 0.556 0.444
#> GSM125178     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125180     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125182     2  0.0237     0.8785 0.000 0.996 0.004
#> GSM125184     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125186     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125188     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125190     2  0.6252     0.3027 0.000 0.556 0.444
#> GSM125192     2  0.0000     0.8800 0.000 1.000 0.000
#> GSM125194     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125196     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125198     2  0.0000     0.8800 0.000 1.000 0.000
#> GSM125200     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125202     2  0.3619     0.7992 0.000 0.864 0.136
#> GSM125204     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125206     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125208     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125210     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125212     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125214     2  0.0000     0.8800 0.000 1.000 0.000
#> GSM125216     2  0.0000     0.8800 0.000 1.000 0.000
#> GSM125218     2  0.3412     0.8093 0.000 0.876 0.124
#> GSM125220     1  0.4062     0.8044 0.836 0.000 0.164
#> GSM125222     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125224     2  0.0000     0.8800 0.000 1.000 0.000
#> GSM125226     2  0.3412     0.8093 0.000 0.876 0.124
#> GSM125228     2  0.0000     0.8800 0.000 1.000 0.000
#> GSM125230     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125232     3  0.0000     0.9262 0.000 0.000 1.000
#> GSM125234     3  0.4974     0.6351 0.236 0.000 0.764
#> GSM125236     1  0.0000     0.9962 1.000 0.000 0.000
#> GSM125238     1  0.0000     0.9962 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
#> GSM125123     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125125     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125127     1  0.1940      0.906 0.924 0.000 0.076 0.000
#> GSM125129     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125131     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125133     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125135     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125137     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125139     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125141     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125143     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125145     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125147     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125149     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125151     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125153     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125155     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125157     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125159     2  0.0000      0.893 0.000 1.000 0.000 0.000
#> GSM125161     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125163     2  0.0000      0.893 0.000 1.000 0.000 0.000
#> GSM125165     3  0.0000      0.932 0.000 0.000 1.000 0.000
#> GSM125167     2  0.0000      0.893 0.000 1.000 0.000 0.000
#> GSM125169     2  0.4730      0.465 0.000 0.636 0.364 0.000
#> GSM125171     2  0.0188      0.890 0.000 0.996 0.004 0.000
#> GSM125173     3  0.0000      0.932 0.000 0.000 1.000 0.000
#> GSM125175     2  0.4605      0.422 0.000 0.664 0.000 0.336
#> GSM125177     3  0.4746      0.428 0.000 0.368 0.632 0.000
#> GSM125179     3  0.0000      0.932 0.000 0.000 1.000 0.000
#> GSM125181     3  0.4193      0.641 0.000 0.268 0.732 0.000
#> GSM125183     3  0.0000      0.932 0.000 0.000 1.000 0.000
#> GSM125185     3  0.0000      0.932 0.000 0.000 1.000 0.000
#> GSM125187     3  0.0000      0.932 0.000 0.000 1.000 0.000
#> GSM125189     2  0.0000      0.893 0.000 1.000 0.000 0.000
#> GSM125191     2  0.4697      0.437 0.000 0.644 0.356 0.000
#> GSM125193     3  0.0000      0.932 0.000 0.000 1.000 0.000
#> GSM125195     3  0.0000      0.932 0.000 0.000 1.000 0.000
#> GSM125197     4  0.0000      0.989 0.000 0.000 0.000 1.000
#> GSM125199     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125201     2  0.0000      0.893 0.000 1.000 0.000 0.000
#> GSM125203     3  0.0000      0.932 0.000 0.000 1.000 0.000
#> GSM125205     4  0.2281      0.892 0.000 0.096 0.000 0.904
#> GSM125207     3  0.0000      0.932 0.000 0.000 1.000 0.000
#> GSM125209     2  0.3873      0.682 0.000 0.772 0.228 0.000
#> GSM125211     3  0.0000      0.932 0.000 0.000 1.000 0.000
#> GSM125213     2  0.3024      0.763 0.000 0.852 0.000 0.148
#> GSM125215     4  0.0000      0.989 0.000 0.000 0.000 1.000
#> GSM125217     2  0.4898      0.272 0.000 0.584 0.416 0.000
#> GSM125219     1  0.1302      0.944 0.956 0.000 0.044 0.000
#> GSM125221     3  0.0000      0.932 0.000 0.000 1.000 0.000
#> GSM125223     4  0.0000      0.989 0.000 0.000 0.000 1.000
#> GSM125225     4  0.0000      0.989 0.000 0.000 0.000 1.000
#> GSM125227     4  0.0000      0.989 0.000 0.000 0.000 1.000
#> GSM125229     2  0.4008      0.660 0.000 0.756 0.244 0.000
#> GSM125231     3  0.0000      0.932 0.000 0.000 1.000 0.000
#> GSM125233     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125235     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125237     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125124     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125126     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125128     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125130     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125132     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125134     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125136     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125138     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125140     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125142     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125144     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125146     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125148     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125150     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125152     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125154     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125156     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125158     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125160     2  0.0000      0.893 0.000 1.000 0.000 0.000
#> GSM125162     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125164     2  0.0000      0.893 0.000 1.000 0.000 0.000
#> GSM125166     2  0.0000      0.893 0.000 1.000 0.000 0.000
#> GSM125168     2  0.0000      0.893 0.000 1.000 0.000 0.000
#> GSM125170     3  0.0000      0.932 0.000 0.000 1.000 0.000
#> GSM125172     2  0.0336      0.888 0.000 0.992 0.008 0.000
#> GSM125174     3  0.0000      0.932 0.000 0.000 1.000 0.000
#> GSM125176     2  0.0000      0.893 0.000 1.000 0.000 0.000
#> GSM125178     3  0.0000      0.932 0.000 0.000 1.000 0.000
#> GSM125180     3  0.0000      0.932 0.000 0.000 1.000 0.000
#> GSM125182     2  0.0000      0.893 0.000 1.000 0.000 0.000
#> GSM125184     3  0.0000      0.932 0.000 0.000 1.000 0.000
#> GSM125186     3  0.0000      0.932 0.000 0.000 1.000 0.000
#> GSM125188     3  0.4008      0.680 0.000 0.244 0.756 0.000
#> GSM125190     2  0.0000      0.893 0.000 1.000 0.000 0.000
#> GSM125192     2  0.0000      0.893 0.000 1.000 0.000 0.000
#> GSM125194     3  0.0000      0.932 0.000 0.000 1.000 0.000
#> GSM125196     3  0.3688      0.731 0.000 0.208 0.792 0.000
#> GSM125198     4  0.0000      0.989 0.000 0.000 0.000 1.000
#> GSM125200     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125202     2  0.0000      0.893 0.000 1.000 0.000 0.000
#> GSM125204     3  0.0000      0.932 0.000 0.000 1.000 0.000
#> GSM125206     3  0.0817      0.915 0.000 0.024 0.976 0.000
#> GSM125208     3  0.0000      0.932 0.000 0.000 1.000 0.000
#> GSM125210     3  0.4134      0.655 0.000 0.260 0.740 0.000
#> GSM125212     3  0.3688      0.731 0.000 0.208 0.792 0.000
#> GSM125214     2  0.1211      0.867 0.000 0.960 0.000 0.040
#> GSM125216     4  0.0000      0.989 0.000 0.000 0.000 1.000
#> GSM125218     2  0.0000      0.893 0.000 1.000 0.000 0.000
#> GSM125220     1  0.4103      0.650 0.744 0.000 0.256 0.000
#> GSM125222     3  0.0000      0.932 0.000 0.000 1.000 0.000
#> GSM125224     4  0.0000      0.989 0.000 0.000 0.000 1.000
#> GSM125226     2  0.0000      0.893 0.000 1.000 0.000 0.000
#> GSM125228     4  0.0000      0.989 0.000 0.000 0.000 1.000
#> GSM125230     3  0.0000      0.932 0.000 0.000 1.000 0.000
#> GSM125232     3  0.0000      0.932 0.000 0.000 1.000 0.000
#> GSM125234     3  0.3942      0.619 0.236 0.000 0.764 0.000
#> GSM125236     1  0.0000      0.991 1.000 0.000 0.000 0.000
#> GSM125238     1  0.0000      0.991 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
#> GSM125123     1  0.2179     0.7984 0.888 0.000 0.000 NA 0.000
#> GSM125125     1  0.0162     0.7961 0.996 0.000 0.000 NA 0.000
#> GSM125127     1  0.6377     0.5579 0.484 0.000 0.180 NA 0.000
#> GSM125129     1  0.3774     0.7742 0.704 0.000 0.000 NA 0.000
#> GSM125131     1  0.0000     0.7958 1.000 0.000 0.000 NA 0.000
#> GSM125133     1  0.1908     0.7687 0.908 0.000 0.000 NA 0.000
#> GSM125135     1  0.4297     0.7256 0.528 0.000 0.000 NA 0.000
#> GSM125137     1  0.2813     0.7864 0.832 0.000 0.000 NA 0.000
#> GSM125139     1  0.1608     0.7984 0.928 0.000 0.000 NA 0.000
#> GSM125141     1  0.0000     0.7958 1.000 0.000 0.000 NA 0.000
#> GSM125143     1  0.4249     0.7337 0.568 0.000 0.000 NA 0.000
#> GSM125145     1  0.4262     0.7337 0.560 0.000 0.000 NA 0.000
#> GSM125147     1  0.0000     0.7958 1.000 0.000 0.000 NA 0.000
#> GSM125149     1  0.0000     0.7958 1.000 0.000 0.000 NA 0.000
#> GSM125151     1  0.4249     0.7366 0.568 0.000 0.000 NA 0.000
#> GSM125153     1  0.4182     0.7458 0.600 0.000 0.000 NA 0.000
#> GSM125155     1  0.1544     0.7975 0.932 0.000 0.000 NA 0.000
#> GSM125157     1  0.0000     0.7958 1.000 0.000 0.000 NA 0.000
#> GSM125159     2  0.0000     0.9174 0.000 1.000 0.000 NA 0.000
#> GSM125161     1  0.0000     0.7958 1.000 0.000 0.000 NA 0.000
#> GSM125163     2  0.0000     0.9174 0.000 1.000 0.000 NA 0.000
#> GSM125165     3  0.1965     0.7525 0.000 0.000 0.904 NA 0.096
#> GSM125167     2  0.0000     0.9174 0.000 1.000 0.000 NA 0.000
#> GSM125169     2  0.5756     0.4041 0.000 0.576 0.312 NA 0.112
#> GSM125171     2  0.1965     0.8697 0.000 0.904 0.000 NA 0.096
#> GSM125173     3  0.0794     0.7744 0.000 0.000 0.972 NA 0.028
#> GSM125175     2  0.4832     0.5496 0.000 0.712 0.000 NA 0.200
#> GSM125177     5  0.6491    -0.1933 0.000 0.264 0.244 NA 0.492
#> GSM125179     3  0.0000     0.7766 0.000 0.000 1.000 NA 0.000
#> GSM125181     3  0.5215     0.5320 0.000 0.240 0.664 NA 0.096
#> GSM125183     3  0.0000     0.7766 0.000 0.000 1.000 NA 0.000
#> GSM125185     3  0.1908     0.7541 0.000 0.000 0.908 NA 0.092
#> GSM125187     3  0.0000     0.7766 0.000 0.000 1.000 NA 0.000
#> GSM125189     2  0.0000     0.9174 0.000 1.000 0.000 NA 0.000
#> GSM125191     2  0.3159     0.8269 0.000 0.856 0.056 NA 0.088
#> GSM125193     3  0.0000     0.7766 0.000 0.000 1.000 NA 0.000
#> GSM125195     3  0.4306     0.5279 0.000 0.000 0.508 NA 0.492
#> GSM125197     5  0.4306     0.7173 0.000 0.000 0.000 NA 0.508
#> GSM125199     1  0.2813     0.7864 0.832 0.000 0.000 NA 0.000
#> GSM125201     2  0.0000     0.9174 0.000 1.000 0.000 NA 0.000
#> GSM125203     3  0.4306     0.5279 0.000 0.000 0.508 NA 0.492
#> GSM125205     5  0.6294     0.5984 0.000 0.156 0.000 NA 0.468
#> GSM125207     3  0.4306     0.5279 0.000 0.000 0.508 NA 0.492
#> GSM125209     2  0.2740     0.8483 0.000 0.876 0.028 NA 0.096
#> GSM125211     3  0.0510     0.7758 0.000 0.000 0.984 NA 0.016
#> GSM125213     2  0.2964     0.7893 0.000 0.856 0.000 NA 0.120
#> GSM125215     5  0.4306     0.7173 0.000 0.000 0.000 NA 0.508
#> GSM125217     2  0.3866     0.7681 0.000 0.808 0.096 NA 0.096
#> GSM125219     1  0.3741     0.7118 0.816 0.000 0.076 NA 0.000
#> GSM125221     3  0.0000     0.7766 0.000 0.000 1.000 NA 0.000
#> GSM125223     5  0.4306     0.7173 0.000 0.000 0.000 NA 0.508
#> GSM125225     5  0.4306     0.7173 0.000 0.000 0.000 NA 0.508
#> GSM125227     5  0.4306     0.7173 0.000 0.000 0.000 NA 0.508
#> GSM125229     5  0.5351    -0.2860 0.000 0.464 0.052 NA 0.484
#> GSM125231     3  0.0000     0.7766 0.000 0.000 1.000 NA 0.000
#> GSM125233     1  0.3999     0.7673 0.656 0.000 0.000 NA 0.000
#> GSM125235     1  0.1410     0.7919 0.940 0.000 0.000 NA 0.000
#> GSM125237     1  0.0290     0.7957 0.992 0.000 0.000 NA 0.000
#> GSM125124     1  0.4249     0.7366 0.568 0.000 0.000 NA 0.000
#> GSM125126     1  0.0000     0.7958 1.000 0.000 0.000 NA 0.000
#> GSM125128     1  0.1544     0.7733 0.932 0.000 0.000 NA 0.000
#> GSM125130     1  0.3857     0.7584 0.688 0.000 0.000 NA 0.000
#> GSM125132     1  0.1197     0.7939 0.952 0.000 0.000 NA 0.000
#> GSM125134     1  0.4249     0.7366 0.568 0.000 0.000 NA 0.000
#> GSM125136     1  0.1544     0.7733 0.932 0.000 0.000 NA 0.000
#> GSM125138     1  0.4249     0.7366 0.568 0.000 0.000 NA 0.000
#> GSM125140     1  0.4138     0.7526 0.616 0.000 0.000 NA 0.000
#> GSM125142     1  0.4150     0.7490 0.612 0.000 0.000 NA 0.000
#> GSM125144     1  0.4242     0.7377 0.572 0.000 0.000 NA 0.000
#> GSM125146     1  0.4242     0.7356 0.572 0.000 0.000 NA 0.000
#> GSM125148     1  0.0000     0.7958 1.000 0.000 0.000 NA 0.000
#> GSM125150     1  0.0000     0.7958 1.000 0.000 0.000 NA 0.000
#> GSM125152     1  0.4219     0.7401 0.584 0.000 0.000 NA 0.000
#> GSM125154     1  0.4192     0.7448 0.596 0.000 0.000 NA 0.000
#> GSM125156     1  0.4219     0.7401 0.584 0.000 0.000 NA 0.000
#> GSM125158     1  0.3336     0.7877 0.772 0.000 0.000 NA 0.000
#> GSM125160     2  0.0000     0.9174 0.000 1.000 0.000 NA 0.000
#> GSM125162     1  0.0000     0.7958 1.000 0.000 0.000 NA 0.000
#> GSM125164     2  0.0000     0.9174 0.000 1.000 0.000 NA 0.000
#> GSM125166     2  0.0000     0.9174 0.000 1.000 0.000 NA 0.000
#> GSM125168     2  0.2124     0.8674 0.000 0.900 0.004 NA 0.096
#> GSM125170     3  0.1965     0.7525 0.000 0.000 0.904 NA 0.096
#> GSM125172     2  0.2124     0.8675 0.000 0.900 0.004 NA 0.096
#> GSM125174     3  0.0000     0.7766 0.000 0.000 1.000 NA 0.000
#> GSM125176     2  0.0510     0.9133 0.000 0.984 0.000 NA 0.016
#> GSM125178     3  0.4306     0.5279 0.000 0.000 0.508 NA 0.492
#> GSM125180     3  0.3949     0.6167 0.000 0.000 0.668 NA 0.332
#> GSM125182     2  0.0000     0.9174 0.000 1.000 0.000 NA 0.000
#> GSM125184     3  0.0703     0.7750 0.000 0.000 0.976 NA 0.024
#> GSM125186     3  0.0000     0.7766 0.000 0.000 1.000 NA 0.000
#> GSM125188     3  0.6222     0.4602 0.000 0.236 0.548 NA 0.216
#> GSM125190     2  0.0000     0.9174 0.000 1.000 0.000 NA 0.000
#> GSM125192     2  0.0000     0.9174 0.000 1.000 0.000 NA 0.000
#> GSM125194     3  0.1121     0.7518 0.000 0.000 0.956 NA 0.000
#> GSM125196     5  0.6272    -0.3512 0.000 0.160 0.348 NA 0.492
#> GSM125198     5  0.4306     0.7173 0.000 0.000 0.000 NA 0.508
#> GSM125200     1  0.4182     0.7439 0.600 0.000 0.000 NA 0.000
#> GSM125202     2  0.0290     0.9157 0.000 0.992 0.000 NA 0.008
#> GSM125204     3  0.4306     0.5279 0.000 0.000 0.508 NA 0.492
#> GSM125206     3  0.4306     0.5279 0.000 0.000 0.508 NA 0.492
#> GSM125208     3  0.4150     0.5750 0.000 0.000 0.612 NA 0.388
#> GSM125210     3  0.5354     0.5268 0.000 0.240 0.652 NA 0.108
#> GSM125212     5  0.6381    -0.3622 0.000 0.172 0.364 NA 0.464
#> GSM125214     2  0.1106     0.8972 0.000 0.964 0.000 NA 0.024
#> GSM125216     5  0.4306     0.7173 0.000 0.000 0.000 NA 0.508
#> GSM125218     2  0.0000     0.9174 0.000 1.000 0.000 NA 0.000
#> GSM125220     1  0.5818    -0.0192 0.464 0.000 0.444 NA 0.000
#> GSM125222     3  0.0000     0.7766 0.000 0.000 1.000 NA 0.000
#> GSM125224     5  0.4306     0.7173 0.000 0.000 0.000 NA 0.508
#> GSM125226     2  0.0794     0.9083 0.000 0.972 0.000 NA 0.028
#> GSM125228     5  0.4306     0.7173 0.000 0.000 0.000 NA 0.508
#> GSM125230     3  0.1121     0.7518 0.000 0.000 0.956 NA 0.000
#> GSM125232     3  0.1478     0.7373 0.000 0.000 0.936 NA 0.000
#> GSM125234     3  0.6819     0.1951 0.064 0.000 0.436 NA 0.076
#> GSM125236     1  0.2179     0.7753 0.888 0.000 0.000 NA 0.000
#> GSM125238     1  0.0609     0.7949 0.980 0.000 0.000 NA 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
#> GSM125123     5  0.3852     0.6127 0.384 0.000 0.004 0.000 0.612 0.000
#> GSM125125     5  0.3464     0.7367 0.312 0.000 0.000 0.000 0.688 0.000
#> GSM125127     5  0.4637    -0.1574 0.408 0.000 0.028 0.008 0.556 0.000
#> GSM125129     1  0.2969     0.5734 0.776 0.000 0.000 0.000 0.224 0.000
#> GSM125131     5  0.3428     0.7369 0.304 0.000 0.000 0.000 0.696 0.000
#> GSM125133     5  0.1713     0.5230 0.044 0.000 0.028 0.000 0.928 0.000
#> GSM125135     1  0.1327     0.7705 0.936 0.000 0.000 0.000 0.064 0.000
#> GSM125137     5  0.3868     0.4482 0.496 0.000 0.000 0.000 0.504 0.000
#> GSM125139     5  0.3774     0.6475 0.408 0.000 0.000 0.000 0.592 0.000
#> GSM125141     5  0.3446     0.7369 0.308 0.000 0.000 0.000 0.692 0.000
#> GSM125143     1  0.2730     0.7223 0.836 0.000 0.012 0.000 0.152 0.000
#> GSM125145     1  0.1806     0.7712 0.908 0.000 0.004 0.000 0.088 0.000
#> GSM125147     5  0.3464     0.7362 0.312 0.000 0.000 0.000 0.688 0.000
#> GSM125149     5  0.3446     0.7369 0.308 0.000 0.000 0.000 0.692 0.000
#> GSM125151     1  0.0146     0.7997 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125153     1  0.1141     0.7914 0.948 0.000 0.000 0.000 0.052 0.000
#> GSM125155     1  0.3867    -0.4575 0.512 0.000 0.000 0.000 0.488 0.000
#> GSM125157     5  0.3446     0.7369 0.308 0.000 0.000 0.000 0.692 0.000
#> GSM125159     2  0.0260     0.9299 0.000 0.992 0.008 0.000 0.000 0.000
#> GSM125161     5  0.3446     0.7369 0.308 0.000 0.000 0.000 0.692 0.000
#> GSM125163     2  0.0000     0.9292 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125165     4  0.2092     0.8325 0.000 0.000 0.124 0.876 0.000 0.000
#> GSM125167     2  0.0363     0.9294 0.000 0.988 0.012 0.000 0.000 0.000
#> GSM125169     2  0.5200     0.5886 0.000 0.632 0.192 0.172 0.004 0.000
#> GSM125171     2  0.2595     0.8541 0.000 0.836 0.160 0.000 0.004 0.000
#> GSM125173     4  0.1141     0.8897 0.000 0.000 0.052 0.948 0.000 0.000
#> GSM125175     2  0.3152     0.7292 0.000 0.792 0.008 0.000 0.004 0.196
#> GSM125177     3  0.1265     0.9040 0.000 0.008 0.948 0.044 0.000 0.000
#> GSM125179     4  0.0000     0.9069 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM125181     4  0.4482     0.6457 0.000 0.168 0.124 0.708 0.000 0.000
#> GSM125183     4  0.0000     0.9069 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM125185     4  0.1814     0.8510 0.000 0.000 0.100 0.900 0.000 0.000
#> GSM125187     4  0.0000     0.9069 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM125189     2  0.0405     0.9273 0.000 0.988 0.008 0.000 0.004 0.000
#> GSM125191     2  0.2003     0.8815 0.000 0.884 0.116 0.000 0.000 0.000
#> GSM125193     4  0.0000     0.9069 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM125195     3  0.1141     0.9090 0.000 0.000 0.948 0.052 0.000 0.000
#> GSM125197     6  0.0000     0.9794 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM125199     5  0.3868     0.4482 0.496 0.000 0.000 0.000 0.504 0.000
#> GSM125201     2  0.0146     0.9297 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM125203     3  0.1141     0.9090 0.000 0.000 0.948 0.052 0.000 0.000
#> GSM125205     6  0.2454     0.8052 0.000 0.160 0.000 0.000 0.000 0.840
#> GSM125207     3  0.1141     0.9090 0.000 0.000 0.948 0.052 0.000 0.000
#> GSM125209     2  0.1863     0.8840 0.000 0.896 0.104 0.000 0.000 0.000
#> GSM125211     4  0.1007     0.8934 0.000 0.000 0.044 0.956 0.000 0.000
#> GSM125213     2  0.2340     0.8062 0.000 0.852 0.000 0.000 0.000 0.148
#> GSM125215     6  0.0000     0.9794 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM125217     2  0.2949     0.8298 0.000 0.832 0.140 0.028 0.000 0.000
#> GSM125219     5  0.1970     0.5141 0.060 0.000 0.028 0.000 0.912 0.000
#> GSM125221     4  0.0000     0.9069 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM125223     6  0.0000     0.9794 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM125225     6  0.0000     0.9794 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM125227     6  0.0000     0.9794 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM125229     3  0.1391     0.8599 0.000 0.040 0.944 0.016 0.000 0.000
#> GSM125231     4  0.0000     0.9069 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM125233     1  0.2092     0.7144 0.876 0.000 0.000 0.000 0.124 0.000
#> GSM125235     5  0.3883     0.6748 0.332 0.000 0.012 0.000 0.656 0.000
#> GSM125237     5  0.3515     0.7296 0.324 0.000 0.000 0.000 0.676 0.000
#> GSM125124     1  0.0000     0.7999 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125126     5  0.3446     0.7369 0.308 0.000 0.000 0.000 0.692 0.000
#> GSM125128     5  0.2383     0.6118 0.096 0.000 0.024 0.000 0.880 0.000
#> GSM125130     5  0.4118     0.0992 0.312 0.000 0.028 0.000 0.660 0.000
#> GSM125132     5  0.3684     0.6746 0.372 0.000 0.000 0.000 0.628 0.000
#> GSM125134     1  0.0458     0.8005 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM125136     5  0.2255     0.6019 0.080 0.000 0.028 0.000 0.892 0.000
#> GSM125138     1  0.0146     0.7999 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125140     1  0.1957     0.7312 0.888 0.000 0.000 0.000 0.112 0.000
#> GSM125142     1  0.1610     0.7807 0.916 0.000 0.000 0.000 0.084 0.000
#> GSM125144     1  0.0146     0.7998 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125146     1  0.2402     0.7496 0.868 0.000 0.012 0.000 0.120 0.000
#> GSM125148     5  0.3482     0.7349 0.316 0.000 0.000 0.000 0.684 0.000
#> GSM125150     5  0.3428     0.7369 0.304 0.000 0.000 0.000 0.696 0.000
#> GSM125152     1  0.0937     0.7851 0.960 0.000 0.000 0.000 0.040 0.000
#> GSM125154     1  0.1075     0.7932 0.952 0.000 0.000 0.000 0.048 0.000
#> GSM125156     1  0.0937     0.7851 0.960 0.000 0.000 0.000 0.040 0.000
#> GSM125158     1  0.3797    -0.2319 0.580 0.000 0.000 0.000 0.420 0.000
#> GSM125160     2  0.0146     0.9297 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM125162     5  0.3309     0.7306 0.280 0.000 0.000 0.000 0.720 0.000
#> GSM125164     2  0.0000     0.9292 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125166     2  0.0000     0.9292 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125168     2  0.2003     0.8803 0.000 0.884 0.116 0.000 0.000 0.000
#> GSM125170     4  0.2320     0.8281 0.000 0.000 0.132 0.864 0.004 0.000
#> GSM125172     2  0.2100     0.8803 0.000 0.884 0.112 0.004 0.000 0.000
#> GSM125174     4  0.0000     0.9069 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM125176     2  0.0777     0.9275 0.000 0.972 0.024 0.000 0.004 0.000
#> GSM125178     3  0.1141     0.9090 0.000 0.000 0.948 0.052 0.000 0.000
#> GSM125180     3  0.3221     0.7182 0.000 0.000 0.736 0.264 0.000 0.000
#> GSM125182     2  0.0363     0.9294 0.000 0.988 0.012 0.000 0.000 0.000
#> GSM125184     4  0.1141     0.8897 0.000 0.000 0.052 0.948 0.000 0.000
#> GSM125186     4  0.0000     0.9069 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM125188     4  0.5346     0.4121 0.000 0.164 0.252 0.584 0.000 0.000
#> GSM125190     2  0.0405     0.9273 0.000 0.988 0.008 0.000 0.004 0.000
#> GSM125192     2  0.0000     0.9292 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM125194     4  0.0622     0.8951 0.000 0.000 0.012 0.980 0.008 0.000
#> GSM125196     3  0.1265     0.9040 0.000 0.008 0.948 0.044 0.000 0.000
#> GSM125198     6  0.0000     0.9794 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM125200     1  0.1387     0.7679 0.932 0.000 0.000 0.000 0.068 0.000
#> GSM125202     2  0.0547     0.9287 0.000 0.980 0.020 0.000 0.000 0.000
#> GSM125204     3  0.1141     0.9090 0.000 0.000 0.948 0.052 0.000 0.000
#> GSM125206     3  0.1141     0.9090 0.000 0.000 0.948 0.052 0.000 0.000
#> GSM125208     3  0.3023     0.7585 0.000 0.000 0.768 0.232 0.000 0.000
#> GSM125210     4  0.4595     0.6330 0.000 0.168 0.136 0.696 0.000 0.000
#> GSM125212     3  0.5147     0.3117 0.000 0.096 0.548 0.356 0.000 0.000
#> GSM125214     2  0.0790     0.9162 0.000 0.968 0.000 0.000 0.000 0.032
#> GSM125216     6  0.0000     0.9794 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM125218     2  0.0405     0.9273 0.000 0.988 0.008 0.000 0.004 0.000
#> GSM125220     5  0.4214     0.3414 0.032 0.000 0.028 0.200 0.740 0.000
#> GSM125222     4  0.0000     0.9069 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM125224     6  0.0000     0.9794 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM125226     2  0.1152     0.9212 0.000 0.952 0.044 0.000 0.004 0.000
#> GSM125228     6  0.0000     0.9794 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM125230     4  0.0622     0.8951 0.000 0.000 0.012 0.980 0.008 0.000
#> GSM125232     4  0.1003     0.8816 0.000 0.000 0.020 0.964 0.016 0.000
#> GSM125234     1  0.6923     0.2098 0.396 0.000 0.092 0.152 0.360 0.000
#> GSM125236     5  0.2282     0.5281 0.088 0.000 0.024 0.000 0.888 0.000
#> GSM125238     5  0.3578     0.7107 0.340 0.000 0.000 0.000 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-ATC-pam-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-ATC-pam-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-ATC-pam-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-ATC-pam-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-ATC-pam-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-ATC-pam-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-ATC-pam-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-ATC-pam-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-ATC-pam-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-ATC-pam-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-ATC-pam-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-ATC-pam-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-ATC-pam-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-ATC-pam-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-ATC-pam-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-ATC-pam-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-ATC-pam-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-ATC-pam-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-ATC-pam-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-ATC-pam-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk ATC-pam-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-ATC-pam-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-ATC-pam-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-ATC-pam-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-ATC-pam-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-ATC-pam-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk ATC-pam-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>           n agent(p) individual(p) k
#> ATC:pam 115    0.918      2.48e-05 2
#> ATC:pam 108    0.879      6.53e-07 3
#> ATC:pam 111    0.699      6.67e-09 4
#> ATC:pam 108    0.893      8.71e-09 5
#> ATC:pam 106    0.805      1.12e-09 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 21168 rows and 116 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           0.991       0.997         0.4853 0.514   0.514
#> 3 3 0.723           0.753       0.840         0.2958 0.841   0.691
#> 4 4 0.681           0.770       0.801         0.1104 0.850   0.626
#> 5 5 0.806           0.859       0.885         0.0879 0.889   0.655
#> 6 6 0.884           0.864       0.890         0.0551 0.942   0.759

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
#> GSM125123     1   0.000      0.991 1.000 0.000
#> GSM125125     1   0.000      0.991 1.000 0.000
#> GSM125127     1   0.000      0.991 1.000 0.000
#> GSM125129     1   0.000      0.991 1.000 0.000
#> GSM125131     1   0.000      0.991 1.000 0.000
#> GSM125133     1   0.000      0.991 1.000 0.000
#> GSM125135     1   0.000      0.991 1.000 0.000
#> GSM125137     1   0.000      0.991 1.000 0.000
#> GSM125139     1   0.000      0.991 1.000 0.000
#> GSM125141     1   0.000      0.991 1.000 0.000
#> GSM125143     2   0.000      1.000 0.000 1.000
#> GSM125145     1   0.000      0.991 1.000 0.000
#> GSM125147     1   0.000      0.991 1.000 0.000
#> GSM125149     1   0.000      0.991 1.000 0.000
#> GSM125151     1   0.000      0.991 1.000 0.000
#> GSM125153     1   0.000      0.991 1.000 0.000
#> GSM125155     1   0.000      0.991 1.000 0.000
#> GSM125157     1   0.000      0.991 1.000 0.000
#> GSM125159     2   0.000      1.000 0.000 1.000
#> GSM125161     1   0.000      0.991 1.000 0.000
#> GSM125163     2   0.000      1.000 0.000 1.000
#> GSM125165     2   0.000      1.000 0.000 1.000
#> GSM125167     2   0.000      1.000 0.000 1.000
#> GSM125169     2   0.000      1.000 0.000 1.000
#> GSM125171     2   0.000      1.000 0.000 1.000
#> GSM125173     2   0.000      1.000 0.000 1.000
#> GSM125175     2   0.000      1.000 0.000 1.000
#> GSM125177     2   0.000      1.000 0.000 1.000
#> GSM125179     2   0.000      1.000 0.000 1.000
#> GSM125181     2   0.000      1.000 0.000 1.000
#> GSM125183     2   0.000      1.000 0.000 1.000
#> GSM125185     2   0.000      1.000 0.000 1.000
#> GSM125187     2   0.000      1.000 0.000 1.000
#> GSM125189     2   0.000      1.000 0.000 1.000
#> GSM125191     2   0.000      1.000 0.000 1.000
#> GSM125193     2   0.000      1.000 0.000 1.000
#> GSM125195     2   0.000      1.000 0.000 1.000
#> GSM125197     2   0.000      1.000 0.000 1.000
#> GSM125199     1   0.000      0.991 1.000 0.000
#> GSM125201     2   0.000      1.000 0.000 1.000
#> GSM125203     2   0.000      1.000 0.000 1.000
#> GSM125205     2   0.000      1.000 0.000 1.000
#> GSM125207     2   0.000      1.000 0.000 1.000
#> GSM125209     2   0.000      1.000 0.000 1.000
#> GSM125211     2   0.000      1.000 0.000 1.000
#> GSM125213     2   0.000      1.000 0.000 1.000
#> GSM125215     2   0.000      1.000 0.000 1.000
#> GSM125217     2   0.000      1.000 0.000 1.000
#> GSM125219     1   0.000      0.991 1.000 0.000
#> GSM125221     2   0.000      1.000 0.000 1.000
#> GSM125223     2   0.000      1.000 0.000 1.000
#> GSM125225     2   0.000      1.000 0.000 1.000
#> GSM125227     2   0.000      1.000 0.000 1.000
#> GSM125229     2   0.000      1.000 0.000 1.000
#> GSM125231     2   0.000      1.000 0.000 1.000
#> GSM125233     1   0.000      0.991 1.000 0.000
#> GSM125235     1   0.000      0.991 1.000 0.000
#> GSM125237     1   0.000      0.991 1.000 0.000
#> GSM125124     1   0.000      0.991 1.000 0.000
#> GSM125126     1   0.000      0.991 1.000 0.000
#> GSM125128     1   0.000      0.991 1.000 0.000
#> GSM125130     1   0.000      0.991 1.000 0.000
#> GSM125132     1   0.000      0.991 1.000 0.000
#> GSM125134     1   0.000      0.991 1.000 0.000
#> GSM125136     1   0.000      0.991 1.000 0.000
#> GSM125138     1   0.000      0.991 1.000 0.000
#> GSM125140     1   0.000      0.991 1.000 0.000
#> GSM125142     1   0.000      0.991 1.000 0.000
#> GSM125144     1   0.000      0.991 1.000 0.000
#> GSM125146     1   0.000      0.991 1.000 0.000
#> GSM125148     1   0.000      0.991 1.000 0.000
#> GSM125150     1   0.000      0.991 1.000 0.000
#> GSM125152     1   0.000      0.991 1.000 0.000
#> GSM125154     1   0.000      0.991 1.000 0.000
#> GSM125156     1   0.000      0.991 1.000 0.000
#> GSM125158     1   0.000      0.991 1.000 0.000
#> GSM125160     2   0.000      1.000 0.000 1.000
#> GSM125162     1   0.000      0.991 1.000 0.000
#> GSM125164     2   0.000      1.000 0.000 1.000
#> GSM125166     2   0.000      1.000 0.000 1.000
#> GSM125168     2   0.000      1.000 0.000 1.000
#> GSM125170     2   0.000      1.000 0.000 1.000
#> GSM125172     2   0.000      1.000 0.000 1.000
#> GSM125174     2   0.000      1.000 0.000 1.000
#> GSM125176     2   0.000      1.000 0.000 1.000
#> GSM125178     2   0.000      1.000 0.000 1.000
#> GSM125180     2   0.000      1.000 0.000 1.000
#> GSM125182     2   0.000      1.000 0.000 1.000
#> GSM125184     2   0.000      1.000 0.000 1.000
#> GSM125186     2   0.000      1.000 0.000 1.000
#> GSM125188     2   0.000      1.000 0.000 1.000
#> GSM125190     2   0.000      1.000 0.000 1.000
#> GSM125192     2   0.000      1.000 0.000 1.000
#> GSM125194     2   0.000      1.000 0.000 1.000
#> GSM125196     2   0.000      1.000 0.000 1.000
#> GSM125198     2   0.000      1.000 0.000 1.000
#> GSM125200     1   0.000      0.991 1.000 0.000
#> GSM125202     2   0.000      1.000 0.000 1.000
#> GSM125204     2   0.000      1.000 0.000 1.000
#> GSM125206     2   0.000      1.000 0.000 1.000
#> GSM125208     2   0.000      1.000 0.000 1.000
#> GSM125210     2   0.000      1.000 0.000 1.000
#> GSM125212     2   0.000      1.000 0.000 1.000
#> GSM125214     2   0.000      1.000 0.000 1.000
#> GSM125216     2   0.000      1.000 0.000 1.000
#> GSM125218     2   0.000      1.000 0.000 1.000
#> GSM125220     1   0.973      0.322 0.596 0.404
#> GSM125222     2   0.000      1.000 0.000 1.000
#> GSM125224     2   0.000      1.000 0.000 1.000
#> GSM125226     2   0.000      1.000 0.000 1.000
#> GSM125228     2   0.000      1.000 0.000 1.000
#> GSM125230     2   0.000      1.000 0.000 1.000
#> GSM125232     2   0.000      1.000 0.000 1.000
#> GSM125234     1   0.000      0.991 1.000 0.000
#> GSM125236     1   0.000      0.991 1.000 0.000
#> GSM125238     1   0.000      0.991 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
#> GSM125123     1  0.1163     0.9723 0.972 0.000 0.028
#> GSM125125     1  0.0747     0.9745 0.984 0.000 0.016
#> GSM125127     1  0.1753     0.9705 0.952 0.000 0.048
#> GSM125129     1  0.1529     0.9705 0.960 0.000 0.040
#> GSM125131     1  0.0592     0.9740 0.988 0.000 0.012
#> GSM125133     1  0.1529     0.9662 0.960 0.000 0.040
#> GSM125135     1  0.1860     0.9677 0.948 0.000 0.052
#> GSM125137     1  0.0592     0.9746 0.988 0.000 0.012
#> GSM125139     1  0.0592     0.9740 0.988 0.000 0.012
#> GSM125141     1  0.1163     0.9729 0.972 0.000 0.028
#> GSM125143     2  0.6968     0.3723 0.080 0.716 0.204
#> GSM125145     1  0.1860     0.9677 0.948 0.000 0.052
#> GSM125147     1  0.0592     0.9748 0.988 0.000 0.012
#> GSM125149     1  0.0592     0.9740 0.988 0.000 0.012
#> GSM125151     1  0.1860     0.9677 0.948 0.000 0.052
#> GSM125153     1  0.1860     0.9677 0.948 0.000 0.052
#> GSM125155     1  0.1163     0.9728 0.972 0.000 0.028
#> GSM125157     1  0.0592     0.9740 0.988 0.000 0.012
#> GSM125159     2  0.5431     0.3089 0.000 0.716 0.284
#> GSM125161     1  0.1529     0.9662 0.960 0.000 0.040
#> GSM125163     2  0.3412     0.5732 0.000 0.876 0.124
#> GSM125165     2  0.6026    -0.1341 0.000 0.624 0.376
#> GSM125167     2  0.5058     0.3989 0.000 0.756 0.244
#> GSM125169     2  0.0237     0.6573 0.000 0.996 0.004
#> GSM125171     2  0.4555     0.6311 0.000 0.800 0.200
#> GSM125173     3  0.5621     0.8862 0.000 0.308 0.692
#> GSM125175     2  0.4504     0.6324 0.000 0.804 0.196
#> GSM125177     3  0.6079     0.8528 0.000 0.388 0.612
#> GSM125179     3  0.5621     0.8862 0.000 0.308 0.692
#> GSM125181     2  0.5431     0.3089 0.000 0.716 0.284
#> GSM125183     3  0.6062     0.8558 0.000 0.384 0.616
#> GSM125185     3  0.5591     0.8854 0.000 0.304 0.696
#> GSM125187     3  0.6140     0.8342 0.000 0.404 0.596
#> GSM125189     2  0.1289     0.6473 0.000 0.968 0.032
#> GSM125191     2  0.5431     0.3089 0.000 0.716 0.284
#> GSM125193     2  0.5431     0.3089 0.000 0.716 0.284
#> GSM125195     2  0.1031     0.6537 0.000 0.976 0.024
#> GSM125197     2  0.4702     0.6263 0.000 0.788 0.212
#> GSM125199     1  0.0592     0.9740 0.988 0.000 0.012
#> GSM125201     2  0.4452     0.6334 0.000 0.808 0.192
#> GSM125203     2  0.6274    -0.4611 0.000 0.544 0.456
#> GSM125205     2  0.4702     0.6263 0.000 0.788 0.212
#> GSM125207     3  0.5591     0.8854 0.000 0.304 0.696
#> GSM125209     2  0.5431     0.3089 0.000 0.716 0.284
#> GSM125211     3  0.5733     0.8855 0.000 0.324 0.676
#> GSM125213     2  0.5178     0.3747 0.000 0.744 0.256
#> GSM125215     2  0.4702     0.6263 0.000 0.788 0.212
#> GSM125217     2  0.5431     0.3089 0.000 0.716 0.284
#> GSM125219     1  0.1529     0.9662 0.960 0.000 0.040
#> GSM125221     3  0.6274     0.7399 0.000 0.456 0.544
#> GSM125223     2  0.4702     0.6263 0.000 0.788 0.212
#> GSM125225     2  0.4702     0.6263 0.000 0.788 0.212
#> GSM125227     2  0.4702     0.6263 0.000 0.788 0.212
#> GSM125229     2  0.5327     0.3393 0.000 0.728 0.272
#> GSM125231     2  0.3192     0.5828 0.000 0.888 0.112
#> GSM125233     1  0.1860     0.9677 0.948 0.000 0.052
#> GSM125235     1  0.0592     0.9740 0.988 0.000 0.012
#> GSM125237     1  0.0237     0.9746 0.996 0.000 0.004
#> GSM125124     1  0.1860     0.9677 0.948 0.000 0.052
#> GSM125126     1  0.0592     0.9740 0.988 0.000 0.012
#> GSM125128     1  0.1529     0.9662 0.960 0.000 0.040
#> GSM125130     1  0.1529     0.9662 0.960 0.000 0.040
#> GSM125132     1  0.0592     0.9740 0.988 0.000 0.012
#> GSM125134     1  0.1860     0.9677 0.948 0.000 0.052
#> GSM125136     1  0.1529     0.9662 0.960 0.000 0.040
#> GSM125138     1  0.1860     0.9677 0.948 0.000 0.052
#> GSM125140     1  0.0592     0.9746 0.988 0.000 0.012
#> GSM125142     1  0.1860     0.9677 0.948 0.000 0.052
#> GSM125144     1  0.1860     0.9677 0.948 0.000 0.052
#> GSM125146     1  0.1964     0.9674 0.944 0.000 0.056
#> GSM125148     1  0.0592     0.9747 0.988 0.000 0.012
#> GSM125150     1  0.0592     0.9740 0.988 0.000 0.012
#> GSM125152     1  0.1860     0.9677 0.948 0.000 0.052
#> GSM125154     1  0.1860     0.9677 0.948 0.000 0.052
#> GSM125156     1  0.1860     0.9677 0.948 0.000 0.052
#> GSM125158     1  0.0592     0.9740 0.988 0.000 0.012
#> GSM125160     2  0.4346     0.5062 0.000 0.816 0.184
#> GSM125162     1  0.1529     0.9662 0.960 0.000 0.040
#> GSM125164     2  0.1289     0.6475 0.000 0.968 0.032
#> GSM125166     2  0.0000     0.6569 0.000 1.000 0.000
#> GSM125168     2  0.5291     0.3467 0.000 0.732 0.268
#> GSM125170     2  0.2356     0.6223 0.000 0.928 0.072
#> GSM125172     2  0.2356     0.6534 0.000 0.928 0.072
#> GSM125174     3  0.5621     0.8862 0.000 0.308 0.692
#> GSM125176     2  0.0237     0.6573 0.000 0.996 0.004
#> GSM125178     3  0.5591     0.8854 0.000 0.304 0.696
#> GSM125180     3  0.5621     0.8862 0.000 0.308 0.692
#> GSM125182     2  0.5327     0.3400 0.000 0.728 0.272
#> GSM125184     3  0.5591     0.8854 0.000 0.304 0.696
#> GSM125186     3  0.5621     0.8862 0.000 0.308 0.692
#> GSM125188     2  0.5431     0.3089 0.000 0.716 0.284
#> GSM125190     2  0.0000     0.6569 0.000 1.000 0.000
#> GSM125192     2  0.1163     0.6493 0.000 0.972 0.028
#> GSM125194     3  0.6309     0.6359 0.000 0.496 0.504
#> GSM125196     3  0.5706     0.8829 0.000 0.320 0.680
#> GSM125198     2  0.4702     0.6263 0.000 0.788 0.212
#> GSM125200     1  0.0592     0.9740 0.988 0.000 0.012
#> GSM125202     2  0.4605     0.6296 0.000 0.796 0.204
#> GSM125204     3  0.5905     0.8672 0.000 0.352 0.648
#> GSM125206     3  0.6307     0.6207 0.000 0.488 0.512
#> GSM125208     3  0.6079     0.8526 0.000 0.388 0.612
#> GSM125210     3  0.5591     0.8854 0.000 0.304 0.696
#> GSM125212     2  0.5905     0.0484 0.000 0.648 0.352
#> GSM125214     2  0.3879     0.6437 0.000 0.848 0.152
#> GSM125216     2  0.4702     0.6263 0.000 0.788 0.212
#> GSM125218     2  0.0424     0.6554 0.000 0.992 0.008
#> GSM125220     1  0.4749     0.8382 0.844 0.116 0.040
#> GSM125222     3  0.6140     0.8342 0.000 0.404 0.596
#> GSM125224     2  0.4702     0.6263 0.000 0.788 0.212
#> GSM125226     2  0.2711     0.6279 0.000 0.912 0.088
#> GSM125228     2  0.4702     0.6263 0.000 0.788 0.212
#> GSM125230     3  0.6154     0.8281 0.000 0.408 0.592
#> GSM125232     3  0.6307     0.6646 0.000 0.488 0.512
#> GSM125234     1  0.1753     0.9705 0.952 0.000 0.048
#> GSM125236     1  0.1643     0.9709 0.956 0.000 0.044
#> GSM125238     1  0.0424     0.9747 0.992 0.000 0.008

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM125123     1  0.3837    0.80160 0.776 0.224 0.000 0.000
#> GSM125125     1  0.1118    0.86642 0.964 0.036 0.000 0.000
#> GSM125127     1  0.4356    0.76579 0.708 0.292 0.000 0.000
#> GSM125129     1  0.1637    0.86044 0.940 0.060 0.000 0.000
#> GSM125131     1  0.1118    0.86424 0.964 0.036 0.000 0.000
#> GSM125133     1  0.4477    0.73381 0.688 0.312 0.000 0.000
#> GSM125135     1  0.3400    0.82390 0.820 0.180 0.000 0.000
#> GSM125137     1  0.0592    0.86646 0.984 0.016 0.000 0.000
#> GSM125139     1  0.0817    0.86629 0.976 0.024 0.000 0.000
#> GSM125141     1  0.0817    0.86605 0.976 0.024 0.000 0.000
#> GSM125143     1  0.8958    0.19698 0.432 0.192 0.296 0.080
#> GSM125145     1  0.3400    0.82390 0.820 0.180 0.000 0.000
#> GSM125147     1  0.1211    0.86607 0.960 0.040 0.000 0.000
#> GSM125149     1  0.0707    0.86597 0.980 0.020 0.000 0.000
#> GSM125151     1  0.3400    0.82390 0.820 0.180 0.000 0.000
#> GSM125153     1  0.3400    0.82390 0.820 0.180 0.000 0.000
#> GSM125155     1  0.0707    0.86632 0.980 0.020 0.000 0.000
#> GSM125157     1  0.3356    0.81636 0.824 0.176 0.000 0.000
#> GSM125159     2  0.7537    0.85908 0.000 0.456 0.348 0.196
#> GSM125161     1  0.4431    0.73992 0.696 0.304 0.000 0.000
#> GSM125163     2  0.7685    0.88649 0.000 0.456 0.288 0.256
#> GSM125165     3  0.2032    0.83753 0.000 0.028 0.936 0.036
#> GSM125167     2  0.7568    0.86728 0.000 0.456 0.340 0.204
#> GSM125169     2  0.7399    0.80649 0.000 0.512 0.208 0.280
#> GSM125171     4  0.5367    0.50905 0.000 0.304 0.032 0.664
#> GSM125173     3  0.0524    0.86056 0.000 0.008 0.988 0.004
#> GSM125175     4  0.4617    0.67745 0.000 0.204 0.032 0.764
#> GSM125177     3  0.0524    0.86061 0.000 0.008 0.988 0.004
#> GSM125179     3  0.0188    0.85821 0.000 0.004 0.996 0.000
#> GSM125181     3  0.3308    0.76768 0.000 0.036 0.872 0.092
#> GSM125183     3  0.0000    0.85961 0.000 0.000 1.000 0.000
#> GSM125185     3  0.0000    0.85961 0.000 0.000 1.000 0.000
#> GSM125187     3  0.0000    0.85961 0.000 0.000 1.000 0.000
#> GSM125189     2  0.7706    0.88222 0.000 0.452 0.268 0.280
#> GSM125191     2  0.7323    0.78142 0.000 0.456 0.388 0.156
#> GSM125193     3  0.2965    0.79375 0.000 0.036 0.892 0.072
#> GSM125195     3  0.7079   -0.00893 0.000 0.276 0.556 0.168
#> GSM125197     4  0.1211    0.83468 0.000 0.040 0.000 0.960
#> GSM125199     1  0.0707    0.86597 0.980 0.020 0.000 0.000
#> GSM125201     4  0.6799   -0.41651 0.000 0.440 0.096 0.464
#> GSM125203     3  0.3919    0.73279 0.000 0.104 0.840 0.056
#> GSM125205     4  0.2742    0.80278 0.000 0.076 0.024 0.900
#> GSM125207     3  0.0188    0.86116 0.000 0.000 0.996 0.004
#> GSM125209     3  0.7286   -0.58838 0.000 0.364 0.480 0.156
#> GSM125211     3  0.0779    0.85962 0.000 0.016 0.980 0.004
#> GSM125213     2  0.7568    0.86594 0.000 0.456 0.340 0.204
#> GSM125215     4  0.0000    0.83518 0.000 0.000 0.000 1.000
#> GSM125217     2  0.7442    0.82545 0.000 0.456 0.368 0.176
#> GSM125219     1  0.4406    0.74118 0.700 0.300 0.000 0.000
#> GSM125221     3  0.1576    0.84407 0.000 0.004 0.948 0.048
#> GSM125223     4  0.1978    0.82601 0.000 0.068 0.004 0.928
#> GSM125225     4  0.0000    0.83518 0.000 0.000 0.000 1.000
#> GSM125227     4  0.0336    0.83689 0.000 0.008 0.000 0.992
#> GSM125229     3  0.6602   -0.53270 0.000 0.436 0.484 0.080
#> GSM125231     3  0.4724    0.70600 0.000 0.096 0.792 0.112
#> GSM125233     1  0.2704    0.84467 0.876 0.124 0.000 0.000
#> GSM125235     1  0.0921    0.86776 0.972 0.028 0.000 0.000
#> GSM125237     1  0.0707    0.86646 0.980 0.020 0.000 0.000
#> GSM125124     1  0.3266    0.82711 0.832 0.168 0.000 0.000
#> GSM125126     1  0.1118    0.86424 0.964 0.036 0.000 0.000
#> GSM125128     1  0.4040    0.77684 0.752 0.248 0.000 0.000
#> GSM125130     1  0.4431    0.73992 0.696 0.304 0.000 0.000
#> GSM125132     1  0.1022    0.86479 0.968 0.032 0.000 0.000
#> GSM125134     1  0.3400    0.82390 0.820 0.180 0.000 0.000
#> GSM125136     1  0.4522    0.72732 0.680 0.320 0.000 0.000
#> GSM125138     1  0.3400    0.82390 0.820 0.180 0.000 0.000
#> GSM125140     1  0.0469    0.86673 0.988 0.012 0.000 0.000
#> GSM125142     1  0.2921    0.83955 0.860 0.140 0.000 0.000
#> GSM125144     1  0.3400    0.82390 0.820 0.180 0.000 0.000
#> GSM125146     1  0.3400    0.82390 0.820 0.180 0.000 0.000
#> GSM125148     1  0.0817    0.86614 0.976 0.024 0.000 0.000
#> GSM125150     1  0.1022    0.86479 0.968 0.032 0.000 0.000
#> GSM125152     1  0.3400    0.82390 0.820 0.180 0.000 0.000
#> GSM125154     1  0.3400    0.82390 0.820 0.180 0.000 0.000
#> GSM125156     1  0.3266    0.82924 0.832 0.168 0.000 0.000
#> GSM125158     1  0.1022    0.86479 0.968 0.032 0.000 0.000
#> GSM125160     2  0.7658    0.88282 0.000 0.456 0.308 0.236
#> GSM125162     1  0.4431    0.73992 0.696 0.304 0.000 0.000
#> GSM125164     2  0.7685    0.87749 0.000 0.456 0.256 0.288
#> GSM125166     2  0.7681    0.87380 0.000 0.456 0.252 0.292
#> GSM125168     2  0.7537    0.85844 0.000 0.456 0.348 0.196
#> GSM125170     3  0.6740    0.12902 0.000 0.256 0.600 0.144
#> GSM125172     2  0.7620    0.82761 0.000 0.460 0.224 0.316
#> GSM125174     3  0.0524    0.86056 0.000 0.008 0.988 0.004
#> GSM125176     2  0.7450    0.82066 0.000 0.504 0.216 0.280
#> GSM125178     3  0.0000    0.85961 0.000 0.000 1.000 0.000
#> GSM125180     3  0.0188    0.85821 0.000 0.004 0.996 0.000
#> GSM125182     2  0.7553    0.86265 0.000 0.456 0.344 0.200
#> GSM125184     3  0.0188    0.86116 0.000 0.000 0.996 0.004
#> GSM125186     3  0.0000    0.85961 0.000 0.000 1.000 0.000
#> GSM125188     3  0.3107    0.78406 0.000 0.036 0.884 0.080
#> GSM125190     2  0.7603    0.85996 0.000 0.476 0.244 0.280
#> GSM125192     2  0.7685    0.87790 0.000 0.456 0.256 0.288
#> GSM125194     3  0.1767    0.84226 0.000 0.012 0.944 0.044
#> GSM125196     3  0.1978    0.82160 0.000 0.068 0.928 0.004
#> GSM125198     4  0.0188    0.83642 0.000 0.004 0.000 0.996
#> GSM125200     1  0.1022    0.86479 0.968 0.032 0.000 0.000
#> GSM125202     4  0.5712    0.41940 0.000 0.308 0.048 0.644
#> GSM125204     3  0.1109    0.85488 0.000 0.004 0.968 0.028
#> GSM125206     3  0.3958    0.69425 0.000 0.160 0.816 0.024
#> GSM125208     3  0.0188    0.86116 0.000 0.000 0.996 0.004
#> GSM125210     3  0.0376    0.86123 0.000 0.004 0.992 0.004
#> GSM125212     3  0.2797    0.80251 0.000 0.032 0.900 0.068
#> GSM125214     2  0.7379    0.64310 0.000 0.452 0.164 0.384
#> GSM125216     4  0.0000    0.83518 0.000 0.000 0.000 1.000
#> GSM125218     2  0.7690    0.88077 0.000 0.456 0.264 0.280
#> GSM125220     1  0.4522    0.72732 0.680 0.320 0.000 0.000
#> GSM125222     3  0.0000    0.85961 0.000 0.000 1.000 0.000
#> GSM125224     4  0.0000    0.83518 0.000 0.000 0.000 1.000
#> GSM125226     2  0.7685    0.88788 0.000 0.456 0.288 0.256
#> GSM125228     4  0.1743    0.83059 0.000 0.056 0.004 0.940
#> GSM125230     3  0.0188    0.86116 0.000 0.000 0.996 0.004
#> GSM125232     3  0.1520    0.85374 0.000 0.020 0.956 0.024
#> GSM125234     1  0.4697    0.75530 0.696 0.296 0.000 0.008
#> GSM125236     1  0.3610    0.81892 0.800 0.200 0.000 0.000
#> GSM125238     1  0.0592    0.86646 0.984 0.016 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
#> GSM125123     5  0.3242      0.781 0.216 0.000 0.000 0.000 0.784
#> GSM125125     1  0.1764      0.844 0.928 0.000 0.000 0.008 0.064
#> GSM125127     5  0.1197      0.884 0.048 0.000 0.000 0.000 0.952
#> GSM125129     1  0.3898      0.828 0.804 0.000 0.000 0.116 0.080
#> GSM125131     1  0.3047      0.833 0.868 0.004 0.000 0.044 0.084
#> GSM125133     5  0.0510      0.876 0.016 0.000 0.000 0.000 0.984
#> GSM125135     1  0.3229      0.819 0.840 0.000 0.000 0.128 0.032
#> GSM125137     1  0.3018      0.836 0.872 0.004 0.000 0.068 0.056
#> GSM125139     1  0.3018      0.836 0.872 0.004 0.000 0.068 0.056
#> GSM125141     1  0.1478      0.845 0.936 0.000 0.000 0.000 0.064
#> GSM125143     5  0.5775      0.752 0.180 0.076 0.036 0.012 0.696
#> GSM125145     1  0.3229      0.819 0.840 0.000 0.000 0.128 0.032
#> GSM125147     1  0.1270      0.845 0.948 0.000 0.000 0.000 0.052
#> GSM125149     1  0.3018      0.836 0.872 0.004 0.000 0.068 0.056
#> GSM125151     1  0.3309      0.817 0.836 0.000 0.000 0.128 0.036
#> GSM125153     1  0.3229      0.819 0.840 0.000 0.000 0.128 0.032
#> GSM125155     1  0.2888      0.841 0.880 0.004 0.000 0.060 0.056
#> GSM125157     1  0.4736      0.550 0.656 0.004 0.000 0.028 0.312
#> GSM125159     2  0.2020      0.898 0.000 0.900 0.100 0.000 0.000
#> GSM125161     5  0.3039      0.805 0.192 0.000 0.000 0.000 0.808
#> GSM125163     2  0.1851      0.903 0.000 0.912 0.088 0.000 0.000
#> GSM125165     3  0.1121      0.948 0.000 0.044 0.956 0.000 0.000
#> GSM125167     2  0.1851      0.903 0.000 0.912 0.088 0.000 0.000
#> GSM125169     2  0.1990      0.878 0.000 0.920 0.068 0.008 0.004
#> GSM125171     2  0.1408      0.814 0.000 0.948 0.008 0.044 0.000
#> GSM125173     3  0.1461      0.942 0.000 0.028 0.952 0.016 0.004
#> GSM125175     2  0.1894      0.783 0.000 0.920 0.008 0.072 0.000
#> GSM125177     3  0.0162      0.958 0.000 0.004 0.996 0.000 0.000
#> GSM125179     3  0.1299      0.948 0.000 0.020 0.960 0.012 0.008
#> GSM125181     3  0.2690      0.820 0.000 0.156 0.844 0.000 0.000
#> GSM125183     3  0.0324      0.958 0.000 0.004 0.992 0.004 0.000
#> GSM125185     3  0.0162      0.958 0.000 0.004 0.996 0.000 0.000
#> GSM125187     3  0.0290      0.957 0.000 0.000 0.992 0.008 0.000
#> GSM125189     2  0.1671      0.901 0.000 0.924 0.076 0.000 0.000
#> GSM125191     2  0.2280      0.878 0.000 0.880 0.120 0.000 0.000
#> GSM125193     3  0.1043      0.948 0.000 0.040 0.960 0.000 0.000
#> GSM125195     3  0.3086      0.808 0.000 0.180 0.816 0.000 0.004
#> GSM125197     4  0.3586      0.953 0.000 0.264 0.000 0.736 0.000
#> GSM125199     1  0.3018      0.836 0.872 0.004 0.000 0.068 0.056
#> GSM125201     2  0.1012      0.850 0.000 0.968 0.020 0.012 0.000
#> GSM125203     3  0.1990      0.941 0.000 0.068 0.920 0.008 0.004
#> GSM125205     2  0.3353      0.557 0.000 0.796 0.008 0.196 0.000
#> GSM125207     3  0.0162      0.958 0.000 0.004 0.996 0.000 0.000
#> GSM125209     2  0.2424      0.865 0.000 0.868 0.132 0.000 0.000
#> GSM125211     3  0.0324      0.958 0.000 0.004 0.992 0.004 0.000
#> GSM125213     2  0.1908      0.902 0.000 0.908 0.092 0.000 0.000
#> GSM125215     4  0.3242      0.948 0.000 0.216 0.000 0.784 0.000
#> GSM125217     2  0.2127      0.891 0.000 0.892 0.108 0.000 0.000
#> GSM125219     5  0.0510      0.876 0.016 0.000 0.000 0.000 0.984
#> GSM125221     3  0.1121      0.948 0.000 0.044 0.956 0.000 0.000
#> GSM125223     4  0.3707      0.938 0.000 0.284 0.000 0.716 0.000
#> GSM125225     4  0.3684      0.921 0.000 0.280 0.000 0.720 0.000
#> GSM125227     2  0.4256     -0.264 0.000 0.564 0.000 0.436 0.000
#> GSM125229     2  0.4060      0.499 0.000 0.640 0.360 0.000 0.000
#> GSM125231     3  0.2452      0.929 0.000 0.084 0.896 0.016 0.004
#> GSM125233     1  0.3532      0.823 0.824 0.000 0.000 0.128 0.048
#> GSM125235     1  0.4297      0.139 0.528 0.000 0.000 0.000 0.472
#> GSM125237     1  0.3018      0.836 0.872 0.004 0.000 0.068 0.056
#> GSM125124     1  0.3197      0.827 0.836 0.000 0.000 0.140 0.024
#> GSM125126     1  0.3021      0.835 0.872 0.004 0.000 0.060 0.064
#> GSM125128     5  0.2852      0.836 0.172 0.000 0.000 0.000 0.828
#> GSM125130     5  0.0880      0.885 0.032 0.000 0.000 0.000 0.968
#> GSM125132     1  0.3018      0.836 0.872 0.004 0.000 0.068 0.056
#> GSM125134     1  0.3229      0.819 0.840 0.000 0.000 0.128 0.032
#> GSM125136     5  0.0880      0.885 0.032 0.000 0.000 0.000 0.968
#> GSM125138     1  0.3229      0.819 0.840 0.000 0.000 0.128 0.032
#> GSM125140     1  0.3018      0.836 0.872 0.004 0.000 0.068 0.056
#> GSM125142     1  0.2969      0.825 0.852 0.000 0.000 0.128 0.020
#> GSM125144     1  0.3229      0.819 0.840 0.000 0.000 0.128 0.032
#> GSM125146     1  0.3669      0.803 0.816 0.000 0.000 0.128 0.056
#> GSM125148     1  0.1197      0.845 0.952 0.000 0.000 0.000 0.048
#> GSM125150     1  0.3018      0.836 0.872 0.004 0.000 0.068 0.056
#> GSM125152     1  0.3309      0.817 0.836 0.000 0.000 0.128 0.036
#> GSM125154     1  0.3309      0.817 0.836 0.000 0.000 0.128 0.036
#> GSM125156     1  0.2727      0.827 0.868 0.000 0.000 0.116 0.016
#> GSM125158     1  0.3018      0.836 0.872 0.004 0.000 0.068 0.056
#> GSM125160     2  0.1792      0.903 0.000 0.916 0.084 0.000 0.000
#> GSM125162     5  0.2773      0.838 0.164 0.000 0.000 0.000 0.836
#> GSM125164     2  0.1851      0.903 0.000 0.912 0.088 0.000 0.000
#> GSM125166     2  0.1851      0.903 0.000 0.912 0.088 0.000 0.000
#> GSM125168     2  0.1965      0.900 0.000 0.904 0.096 0.000 0.000
#> GSM125170     3  0.2805      0.911 0.000 0.108 0.872 0.012 0.008
#> GSM125172     2  0.1331      0.877 0.000 0.952 0.040 0.008 0.000
#> GSM125174     3  0.1461      0.942 0.000 0.028 0.952 0.016 0.004
#> GSM125176     2  0.1717      0.883 0.000 0.936 0.052 0.008 0.004
#> GSM125178     3  0.0162      0.958 0.000 0.004 0.996 0.000 0.000
#> GSM125180     3  0.1200      0.950 0.000 0.016 0.964 0.012 0.008
#> GSM125182     2  0.1908      0.902 0.000 0.908 0.092 0.000 0.000
#> GSM125184     3  0.0162      0.958 0.000 0.004 0.996 0.000 0.000
#> GSM125186     3  0.1074      0.952 0.000 0.016 0.968 0.012 0.004
#> GSM125188     3  0.1478      0.931 0.000 0.064 0.936 0.000 0.000
#> GSM125190     2  0.1991      0.899 0.000 0.916 0.076 0.004 0.004
#> GSM125192     2  0.1851      0.903 0.000 0.912 0.088 0.000 0.000
#> GSM125194     3  0.1043      0.948 0.000 0.040 0.960 0.000 0.000
#> GSM125196     3  0.0609      0.955 0.000 0.020 0.980 0.000 0.000
#> GSM125198     4  0.3508      0.955 0.000 0.252 0.000 0.748 0.000
#> GSM125200     1  0.3018      0.836 0.872 0.004 0.000 0.068 0.056
#> GSM125202     2  0.1012      0.840 0.000 0.968 0.012 0.020 0.000
#> GSM125204     3  0.1492      0.952 0.000 0.040 0.948 0.004 0.008
#> GSM125206     3  0.0609      0.955 0.000 0.020 0.980 0.000 0.000
#> GSM125208     3  0.0000      0.957 0.000 0.000 1.000 0.000 0.000
#> GSM125210     3  0.0162      0.958 0.000 0.004 0.996 0.000 0.000
#> GSM125212     3  0.1121      0.948 0.000 0.044 0.956 0.000 0.000
#> GSM125214     2  0.1408      0.869 0.000 0.948 0.044 0.008 0.000
#> GSM125216     4  0.3242      0.948 0.000 0.216 0.000 0.784 0.000
#> GSM125218     2  0.1671      0.901 0.000 0.924 0.076 0.000 0.000
#> GSM125220     5  0.0671      0.875 0.016 0.004 0.000 0.000 0.980
#> GSM125222     3  0.0162      0.958 0.000 0.004 0.996 0.000 0.000
#> GSM125224     4  0.3242      0.948 0.000 0.216 0.000 0.784 0.000
#> GSM125226     2  0.1671      0.901 0.000 0.924 0.076 0.000 0.000
#> GSM125228     4  0.3661      0.947 0.000 0.276 0.000 0.724 0.000
#> GSM125230     3  0.0579      0.956 0.000 0.008 0.984 0.008 0.000
#> GSM125232     3  0.2206      0.940 0.000 0.068 0.912 0.016 0.004
#> GSM125234     5  0.1408      0.882 0.044 0.008 0.000 0.000 0.948
#> GSM125236     5  0.1732      0.877 0.080 0.000 0.000 0.000 0.920
#> GSM125238     1  0.3018      0.836 0.872 0.004 0.000 0.068 0.056

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM125123     5  0.1866     0.8773 0.084 0.000 0.008 0.000 0.908 0.000
#> GSM125125     1  0.2912     0.6604 0.784 0.000 0.216 0.000 0.000 0.000
#> GSM125127     5  0.0777     0.9064 0.024 0.000 0.004 0.000 0.972 0.000
#> GSM125129     1  0.0458     0.8401 0.984 0.000 0.016 0.000 0.000 0.000
#> GSM125131     1  0.5724    -0.4121 0.424 0.000 0.412 0.000 0.164 0.000
#> GSM125133     5  0.0146     0.9011 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM125135     1  0.0146     0.8373 0.996 0.000 0.004 0.000 0.000 0.000
#> GSM125137     3  0.3151     0.9414 0.252 0.000 0.748 0.000 0.000 0.000
#> GSM125139     3  0.3371     0.9111 0.292 0.000 0.708 0.000 0.000 0.000
#> GSM125141     1  0.3101     0.5957 0.756 0.000 0.244 0.000 0.000 0.000
#> GSM125143     5  0.2208     0.8893 0.052 0.008 0.012 0.016 0.912 0.000
#> GSM125145     1  0.0000     0.8348 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125147     1  0.3198     0.5775 0.740 0.000 0.260 0.000 0.000 0.000
#> GSM125149     3  0.3151     0.9414 0.252 0.000 0.748 0.000 0.000 0.000
#> GSM125151     1  0.1267     0.8514 0.940 0.000 0.060 0.000 0.000 0.000
#> GSM125153     1  0.0000     0.8348 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM125155     3  0.3854     0.4986 0.464 0.000 0.536 0.000 0.000 0.000
#> GSM125157     5  0.5848    -0.0692 0.256 0.000 0.256 0.000 0.488 0.000
#> GSM125159     2  0.0865     0.9498 0.000 0.964 0.000 0.036 0.000 0.000
#> GSM125161     5  0.1267     0.8957 0.060 0.000 0.000 0.000 0.940 0.000
#> GSM125163     2  0.0935     0.9493 0.000 0.964 0.004 0.032 0.000 0.000
#> GSM125165     4  0.0909     0.9403 0.000 0.020 0.012 0.968 0.000 0.000
#> GSM125167     2  0.0935     0.9493 0.000 0.964 0.004 0.032 0.000 0.000
#> GSM125169     2  0.3315     0.8741 0.000 0.820 0.104 0.076 0.000 0.000
#> GSM125171     2  0.2422     0.9064 0.000 0.892 0.072 0.012 0.000 0.024
#> GSM125173     4  0.1924     0.9157 0.000 0.028 0.048 0.920 0.004 0.000
#> GSM125175     2  0.3077     0.8787 0.000 0.852 0.084 0.012 0.000 0.052
#> GSM125177     4  0.0870     0.9406 0.000 0.012 0.012 0.972 0.004 0.000
#> GSM125179     4  0.0806     0.9410 0.000 0.008 0.020 0.972 0.000 0.000
#> GSM125181     4  0.4823     0.3785 0.000 0.348 0.068 0.584 0.000 0.000
#> GSM125183     4  0.1584     0.9319 0.000 0.008 0.064 0.928 0.000 0.000
#> GSM125185     4  0.0767     0.9407 0.000 0.008 0.012 0.976 0.004 0.000
#> GSM125187     4  0.1956     0.9243 0.000 0.008 0.080 0.908 0.004 0.000
#> GSM125189     2  0.2058     0.9403 0.000 0.908 0.056 0.036 0.000 0.000
#> GSM125191     2  0.0937     0.9496 0.000 0.960 0.000 0.040 0.000 0.000
#> GSM125193     4  0.1584     0.9313 0.000 0.008 0.064 0.928 0.000 0.000
#> GSM125195     4  0.3150     0.8220 0.000 0.120 0.052 0.828 0.000 0.000
#> GSM125197     6  0.0000     0.9209 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM125199     3  0.3151     0.9414 0.252 0.000 0.748 0.000 0.000 0.000
#> GSM125201     2  0.1546     0.9392 0.000 0.944 0.016 0.020 0.000 0.020
#> GSM125203     4  0.0748     0.9405 0.000 0.004 0.016 0.976 0.004 0.000
#> GSM125205     2  0.2925     0.8868 0.000 0.864 0.060 0.012 0.000 0.064
#> GSM125207     4  0.0862     0.9413 0.000 0.008 0.016 0.972 0.004 0.000
#> GSM125209     2  0.0937     0.9496 0.000 0.960 0.000 0.040 0.000 0.000
#> GSM125211     4  0.1082     0.9349 0.000 0.000 0.040 0.956 0.004 0.000
#> GSM125213     2  0.0865     0.9498 0.000 0.964 0.000 0.036 0.000 0.000
#> GSM125215     6  0.0000     0.9209 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM125217     2  0.0865     0.9498 0.000 0.964 0.000 0.036 0.000 0.000
#> GSM125219     5  0.0260     0.9048 0.008 0.000 0.000 0.000 0.992 0.000
#> GSM125221     4  0.1196     0.9367 0.000 0.008 0.040 0.952 0.000 0.000
#> GSM125223     6  0.0260     0.9166 0.000 0.008 0.000 0.000 0.000 0.992
#> GSM125225     6  0.1387     0.8651 0.000 0.068 0.000 0.000 0.000 0.932
#> GSM125227     6  0.3789     0.2436 0.000 0.416 0.000 0.000 0.000 0.584
#> GSM125229     2  0.3394     0.7631 0.000 0.776 0.024 0.200 0.000 0.000
#> GSM125231     4  0.3314     0.8561 0.000 0.032 0.144 0.816 0.008 0.000
#> GSM125233     1  0.0547     0.8420 0.980 0.000 0.020 0.000 0.000 0.000
#> GSM125235     5  0.3236     0.7391 0.180 0.000 0.024 0.000 0.796 0.000
#> GSM125237     3  0.3266     0.9307 0.272 0.000 0.728 0.000 0.000 0.000
#> GSM125124     1  0.1814     0.8288 0.900 0.000 0.100 0.000 0.000 0.000
#> GSM125126     3  0.4652     0.8109 0.312 0.000 0.624 0.000 0.064 0.000
#> GSM125128     5  0.0935     0.9070 0.032 0.000 0.004 0.000 0.964 0.000
#> GSM125130     5  0.0363     0.9068 0.012 0.000 0.000 0.000 0.988 0.000
#> GSM125132     3  0.3151     0.9414 0.252 0.000 0.748 0.000 0.000 0.000
#> GSM125134     1  0.0146     0.8373 0.996 0.000 0.004 0.000 0.000 0.000
#> GSM125136     5  0.0260     0.9048 0.008 0.000 0.000 0.000 0.992 0.000
#> GSM125138     1  0.1501     0.8450 0.924 0.000 0.076 0.000 0.000 0.000
#> GSM125140     3  0.3198     0.9374 0.260 0.000 0.740 0.000 0.000 0.000
#> GSM125142     1  0.1327     0.8505 0.936 0.000 0.064 0.000 0.000 0.000
#> GSM125144     1  0.1387     0.8502 0.932 0.000 0.068 0.000 0.000 0.000
#> GSM125146     1  0.0790     0.8148 0.968 0.000 0.000 0.000 0.032 0.000
#> GSM125148     1  0.3330     0.5134 0.716 0.000 0.284 0.000 0.000 0.000
#> GSM125150     3  0.3468     0.9185 0.284 0.000 0.712 0.000 0.004 0.000
#> GSM125152     1  0.1327     0.8510 0.936 0.000 0.064 0.000 0.000 0.000
#> GSM125154     1  0.1267     0.8514 0.940 0.000 0.060 0.000 0.000 0.000
#> GSM125156     1  0.1444     0.8501 0.928 0.000 0.072 0.000 0.000 0.000
#> GSM125158     3  0.3151     0.9414 0.252 0.000 0.748 0.000 0.000 0.000
#> GSM125160     2  0.0935     0.9493 0.000 0.964 0.004 0.032 0.000 0.000
#> GSM125162     5  0.0458     0.9079 0.016 0.000 0.000 0.000 0.984 0.000
#> GSM125164     2  0.0935     0.9493 0.000 0.964 0.004 0.032 0.000 0.000
#> GSM125166     2  0.0935     0.9493 0.000 0.964 0.004 0.032 0.000 0.000
#> GSM125168     2  0.1196     0.9488 0.000 0.952 0.008 0.040 0.000 0.000
#> GSM125170     4  0.2136     0.9161 0.000 0.048 0.048 0.904 0.000 0.000
#> GSM125172     2  0.1952     0.9261 0.000 0.920 0.052 0.016 0.000 0.012
#> GSM125174     4  0.1924     0.9157 0.000 0.028 0.048 0.920 0.004 0.000
#> GSM125176     2  0.2537     0.9199 0.000 0.872 0.096 0.032 0.000 0.000
#> GSM125178     4  0.0767     0.9407 0.000 0.008 0.012 0.976 0.004 0.000
#> GSM125180     4  0.0622     0.9418 0.000 0.008 0.012 0.980 0.000 0.000
#> GSM125182     2  0.0790     0.9496 0.000 0.968 0.000 0.032 0.000 0.000
#> GSM125184     4  0.0767     0.9407 0.000 0.008 0.012 0.976 0.004 0.000
#> GSM125186     4  0.0622     0.9418 0.000 0.008 0.012 0.980 0.000 0.000
#> GSM125188     4  0.2179     0.9181 0.000 0.036 0.064 0.900 0.000 0.000
#> GSM125190     2  0.2474     0.9304 0.000 0.880 0.080 0.040 0.000 0.000
#> GSM125192     2  0.0935     0.9493 0.000 0.964 0.004 0.032 0.000 0.000
#> GSM125194     4  0.2174     0.9193 0.000 0.008 0.088 0.896 0.008 0.000
#> GSM125196     4  0.0767     0.9407 0.000 0.008 0.012 0.976 0.004 0.000
#> GSM125198     6  0.0000     0.9209 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM125200     3  0.3151     0.9414 0.252 0.000 0.748 0.000 0.000 0.000
#> GSM125202     2  0.2317     0.9161 0.000 0.900 0.064 0.016 0.000 0.020
#> GSM125204     4  0.0508     0.9412 0.000 0.004 0.012 0.984 0.000 0.000
#> GSM125206     4  0.0837     0.9406 0.000 0.004 0.020 0.972 0.004 0.000
#> GSM125208     4  0.0972     0.9395 0.000 0.008 0.028 0.964 0.000 0.000
#> GSM125210     4  0.0767     0.9407 0.000 0.008 0.012 0.976 0.004 0.000
#> GSM125212     4  0.0891     0.9395 0.000 0.024 0.008 0.968 0.000 0.000
#> GSM125214     2  0.1346     0.9447 0.000 0.952 0.008 0.024 0.000 0.016
#> GSM125216     6  0.0000     0.9209 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM125218     2  0.2058     0.9403 0.000 0.908 0.056 0.036 0.000 0.000
#> GSM125220     5  0.0260     0.9048 0.008 0.000 0.000 0.000 0.992 0.000
#> GSM125222     4  0.0806     0.9401 0.000 0.008 0.020 0.972 0.000 0.000
#> GSM125224     6  0.0000     0.9209 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM125226     2  0.1082     0.9490 0.000 0.956 0.004 0.040 0.000 0.000
#> GSM125228     6  0.0000     0.9209 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM125230     4  0.2488     0.8938 0.000 0.004 0.124 0.864 0.008 0.000
#> GSM125232     4  0.3043     0.8708 0.000 0.020 0.140 0.832 0.008 0.000
#> GSM125234     5  0.1088     0.9038 0.024 0.000 0.016 0.000 0.960 0.000
#> GSM125236     5  0.1643     0.8910 0.068 0.000 0.008 0.000 0.924 0.000
#> GSM125238     3  0.3151     0.9414 0.252 0.000 0.748 0.000 0.000 0.000

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-ATC-mclust-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-ATC-mclust-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-ATC-mclust-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-ATC-mclust-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-ATC-mclust-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-ATC-mclust-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-ATC-mclust-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-ATC-mclust-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-ATC-mclust-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-ATC-mclust-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-ATC-mclust-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-ATC-mclust-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-ATC-mclust-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-ATC-mclust-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-ATC-mclust-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-ATC-mclust-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-ATC-mclust-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-ATC-mclust-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-ATC-mclust-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-ATC-mclust-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk ATC-mclust-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-ATC-mclust-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-ATC-mclust-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-ATC-mclust-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-ATC-mclust-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-ATC-mclust-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk ATC-mclust-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>              n agent(p) individual(p) k
#> ATC:mclust 115    1.000      1.49e-05 2
#> ATC:mclust 100    0.739      4.72e-06 3
#> ATC:mclust 109    0.531      1.61e-08 4
#> ATC:mclust 113    0.998      2.41e-10 5
#> ATC:mclust 111    0.993      2.84e-11 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.


ATC: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 21168 rows and 116 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           0.981       0.992         0.5027 0.498   0.498
#> 3 3 0.933           0.923       0.964         0.3076 0.799   0.612
#> 4 4 0.789           0.748       0.876         0.0672 0.982   0.947
#> 5 5 0.704           0.611       0.795         0.0520 0.965   0.895
#> 6 6 0.703           0.622       0.783         0.0283 0.964   0.883

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
#> GSM125123     1  0.0000      0.995 1.000 0.000
#> GSM125125     1  0.0000      0.995 1.000 0.000
#> GSM125127     1  0.0000      0.995 1.000 0.000
#> GSM125129     1  0.0000      0.995 1.000 0.000
#> GSM125131     1  0.0000      0.995 1.000 0.000
#> GSM125133     1  0.0000      0.995 1.000 0.000
#> GSM125135     1  0.0000      0.995 1.000 0.000
#> GSM125137     1  0.0000      0.995 1.000 0.000
#> GSM125139     1  0.0000      0.995 1.000 0.000
#> GSM125141     1  0.0000      0.995 1.000 0.000
#> GSM125143     1  0.0000      0.995 1.000 0.000
#> GSM125145     1  0.0000      0.995 1.000 0.000
#> GSM125147     1  0.0000      0.995 1.000 0.000
#> GSM125149     1  0.0000      0.995 1.000 0.000
#> GSM125151     1  0.0000      0.995 1.000 0.000
#> GSM125153     1  0.0000      0.995 1.000 0.000
#> GSM125155     1  0.0000      0.995 1.000 0.000
#> GSM125157     1  0.0000      0.995 1.000 0.000
#> GSM125159     2  0.0000      0.989 0.000 1.000
#> GSM125161     1  0.0000      0.995 1.000 0.000
#> GSM125163     2  0.0000      0.989 0.000 1.000
#> GSM125165     2  0.0000      0.989 0.000 1.000
#> GSM125167     2  0.0000      0.989 0.000 1.000
#> GSM125169     2  0.0000      0.989 0.000 1.000
#> GSM125171     2  0.0000      0.989 0.000 1.000
#> GSM125173     2  0.0000      0.989 0.000 1.000
#> GSM125175     2  0.0000      0.989 0.000 1.000
#> GSM125177     2  0.0000      0.989 0.000 1.000
#> GSM125179     2  0.9129      0.517 0.328 0.672
#> GSM125181     2  0.0000      0.989 0.000 1.000
#> GSM125183     2  0.8763      0.584 0.296 0.704
#> GSM125185     2  0.0000      0.989 0.000 1.000
#> GSM125187     1  0.0376      0.991 0.996 0.004
#> GSM125189     2  0.0000      0.989 0.000 1.000
#> GSM125191     2  0.0000      0.989 0.000 1.000
#> GSM125193     1  0.7815      0.692 0.768 0.232
#> GSM125195     2  0.0000      0.989 0.000 1.000
#> GSM125197     2  0.0000      0.989 0.000 1.000
#> GSM125199     1  0.0000      0.995 1.000 0.000
#> GSM125201     2  0.0000      0.989 0.000 1.000
#> GSM125203     2  0.0000      0.989 0.000 1.000
#> GSM125205     2  0.0000      0.989 0.000 1.000
#> GSM125207     2  0.0000      0.989 0.000 1.000
#> GSM125209     2  0.0000      0.989 0.000 1.000
#> GSM125211     2  0.0000      0.989 0.000 1.000
#> GSM125213     2  0.0000      0.989 0.000 1.000
#> GSM125215     2  0.0000      0.989 0.000 1.000
#> GSM125217     2  0.0000      0.989 0.000 1.000
#> GSM125219     1  0.0000      0.995 1.000 0.000
#> GSM125221     2  0.0672      0.982 0.008 0.992
#> GSM125223     2  0.0000      0.989 0.000 1.000
#> GSM125225     2  0.0000      0.989 0.000 1.000
#> GSM125227     2  0.0000      0.989 0.000 1.000
#> GSM125229     2  0.0000      0.989 0.000 1.000
#> GSM125231     1  0.0672      0.988 0.992 0.008
#> GSM125233     1  0.0000      0.995 1.000 0.000
#> GSM125235     1  0.0000      0.995 1.000 0.000
#> GSM125237     1  0.0000      0.995 1.000 0.000
#> GSM125124     1  0.0000      0.995 1.000 0.000
#> GSM125126     1  0.0000      0.995 1.000 0.000
#> GSM125128     1  0.0000      0.995 1.000 0.000
#> GSM125130     1  0.0000      0.995 1.000 0.000
#> GSM125132     1  0.0000      0.995 1.000 0.000
#> GSM125134     1  0.0000      0.995 1.000 0.000
#> GSM125136     1  0.0000      0.995 1.000 0.000
#> GSM125138     1  0.0000      0.995 1.000 0.000
#> GSM125140     1  0.0000      0.995 1.000 0.000
#> GSM125142     1  0.0000      0.995 1.000 0.000
#> GSM125144     1  0.0000      0.995 1.000 0.000
#> GSM125146     1  0.0000      0.995 1.000 0.000
#> GSM125148     1  0.0000      0.995 1.000 0.000
#> GSM125150     1  0.0000      0.995 1.000 0.000
#> GSM125152     1  0.0000      0.995 1.000 0.000
#> GSM125154     1  0.0000      0.995 1.000 0.000
#> GSM125156     1  0.0000      0.995 1.000 0.000
#> GSM125158     1  0.0000      0.995 1.000 0.000
#> GSM125160     2  0.0000      0.989 0.000 1.000
#> GSM125162     1  0.0000      0.995 1.000 0.000
#> GSM125164     2  0.0000      0.989 0.000 1.000
#> GSM125166     2  0.0000      0.989 0.000 1.000
#> GSM125168     2  0.0000      0.989 0.000 1.000
#> GSM125170     2  0.0000      0.989 0.000 1.000
#> GSM125172     2  0.0000      0.989 0.000 1.000
#> GSM125174     2  0.0000      0.989 0.000 1.000
#> GSM125176     2  0.0000      0.989 0.000 1.000
#> GSM125178     2  0.0000      0.989 0.000 1.000
#> GSM125180     2  0.1184      0.975 0.016 0.984
#> GSM125182     2  0.0000      0.989 0.000 1.000
#> GSM125184     2  0.0000      0.989 0.000 1.000
#> GSM125186     2  0.1843      0.963 0.028 0.972
#> GSM125188     2  0.0000      0.989 0.000 1.000
#> GSM125190     2  0.0000      0.989 0.000 1.000
#> GSM125192     2  0.0000      0.989 0.000 1.000
#> GSM125194     1  0.0000      0.995 1.000 0.000
#> GSM125196     2  0.0000      0.989 0.000 1.000
#> GSM125198     2  0.0000      0.989 0.000 1.000
#> GSM125200     1  0.0000      0.995 1.000 0.000
#> GSM125202     2  0.0000      0.989 0.000 1.000
#> GSM125204     2  0.0000      0.989 0.000 1.000
#> GSM125206     2  0.0000      0.989 0.000 1.000
#> GSM125208     2  0.0000      0.989 0.000 1.000
#> GSM125210     2  0.0000      0.989 0.000 1.000
#> GSM125212     2  0.0000      0.989 0.000 1.000
#> GSM125214     2  0.0000      0.989 0.000 1.000
#> GSM125216     2  0.0000      0.989 0.000 1.000
#> GSM125218     2  0.0000      0.989 0.000 1.000
#> GSM125220     1  0.0000      0.995 1.000 0.000
#> GSM125222     2  0.0672      0.982 0.008 0.992
#> GSM125224     2  0.0000      0.989 0.000 1.000
#> GSM125226     2  0.0000      0.989 0.000 1.000
#> GSM125228     2  0.0000      0.989 0.000 1.000
#> GSM125230     1  0.0938      0.984 0.988 0.012
#> GSM125232     1  0.0000      0.995 1.000 0.000
#> GSM125234     1  0.0000      0.995 1.000 0.000
#> GSM125236     1  0.0000      0.995 1.000 0.000
#> GSM125238     1  0.0000      0.995 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
#> GSM125123     1  0.0237    0.99612 0.996 0.000 0.004
#> GSM125125     1  0.0237    0.99612 0.996 0.000 0.004
#> GSM125127     1  0.0237    0.99612 0.996 0.000 0.004
#> GSM125129     1  0.0000    0.99679 1.000 0.000 0.000
#> GSM125131     1  0.0237    0.99612 0.996 0.000 0.004
#> GSM125133     1  0.0475    0.99417 0.992 0.004 0.004
#> GSM125135     1  0.0237    0.99612 0.996 0.000 0.004
#> GSM125137     1  0.0237    0.99534 0.996 0.000 0.004
#> GSM125139     1  0.0000    0.99679 1.000 0.000 0.000
#> GSM125141     1  0.0000    0.99679 1.000 0.000 0.000
#> GSM125143     1  0.0237    0.99534 0.996 0.000 0.004
#> GSM125145     1  0.0000    0.99679 1.000 0.000 0.000
#> GSM125147     1  0.0000    0.99679 1.000 0.000 0.000
#> GSM125149     1  0.0000    0.99679 1.000 0.000 0.000
#> GSM125151     1  0.0237    0.99534 0.996 0.000 0.004
#> GSM125153     1  0.0000    0.99679 1.000 0.000 0.000
#> GSM125155     1  0.0237    0.99534 0.996 0.000 0.004
#> GSM125157     1  0.0237    0.99612 0.996 0.000 0.004
#> GSM125159     2  0.5216    0.67989 0.000 0.740 0.260
#> GSM125161     1  0.0237    0.99612 0.996 0.000 0.004
#> GSM125163     2  0.0892    0.93299 0.000 0.980 0.020
#> GSM125165     3  0.0592    0.93292 0.000 0.012 0.988
#> GSM125167     2  0.2448    0.89695 0.000 0.924 0.076
#> GSM125169     2  0.0000    0.93626 0.000 1.000 0.000
#> GSM125171     2  0.0000    0.93626 0.000 1.000 0.000
#> GSM125173     3  0.3116    0.85669 0.000 0.108 0.892
#> GSM125175     2  0.0000    0.93626 0.000 1.000 0.000
#> GSM125177     3  0.5948    0.43794 0.000 0.360 0.640
#> GSM125179     3  0.0475    0.93207 0.004 0.004 0.992
#> GSM125181     3  0.0424    0.93279 0.000 0.008 0.992
#> GSM125183     3  0.0475    0.93207 0.004 0.004 0.992
#> GSM125185     3  0.0424    0.93293 0.000 0.008 0.992
#> GSM125187     3  0.0237    0.93017 0.004 0.000 0.996
#> GSM125189     2  0.0237    0.93689 0.000 0.996 0.004
#> GSM125191     3  0.5733    0.52150 0.000 0.324 0.676
#> GSM125193     3  0.0424    0.92775 0.008 0.000 0.992
#> GSM125195     2  0.0000    0.93626 0.000 1.000 0.000
#> GSM125197     2  0.0000    0.93626 0.000 1.000 0.000
#> GSM125199     1  0.0000    0.99679 1.000 0.000 0.000
#> GSM125201     2  0.0237    0.93747 0.000 0.996 0.004
#> GSM125203     2  0.5431    0.63776 0.000 0.716 0.284
#> GSM125205     2  0.0237    0.93747 0.000 0.996 0.004
#> GSM125207     3  0.0592    0.93292 0.000 0.012 0.988
#> GSM125209     3  0.4504    0.75040 0.000 0.196 0.804
#> GSM125211     3  0.0592    0.93292 0.000 0.012 0.988
#> GSM125213     2  0.4002    0.81392 0.000 0.840 0.160
#> GSM125215     2  0.0237    0.93747 0.000 0.996 0.004
#> GSM125217     2  0.4887    0.73084 0.000 0.772 0.228
#> GSM125219     1  0.0475    0.99417 0.992 0.004 0.004
#> GSM125221     3  0.0237    0.93208 0.000 0.004 0.996
#> GSM125223     2  0.0000    0.93626 0.000 1.000 0.000
#> GSM125225     2  0.0237    0.93747 0.000 0.996 0.004
#> GSM125227     2  0.0237    0.93747 0.000 0.996 0.004
#> GSM125229     2  0.1529    0.92325 0.000 0.960 0.040
#> GSM125231     3  0.0983    0.92494 0.016 0.004 0.980
#> GSM125233     1  0.0000    0.99679 1.000 0.000 0.000
#> GSM125235     1  0.0000    0.99679 1.000 0.000 0.000
#> GSM125237     1  0.0000    0.99679 1.000 0.000 0.000
#> GSM125124     1  0.0237    0.99534 0.996 0.000 0.004
#> GSM125126     1  0.0237    0.99612 0.996 0.000 0.004
#> GSM125128     1  0.0424    0.99440 0.992 0.000 0.008
#> GSM125130     1  0.0424    0.99440 0.992 0.000 0.008
#> GSM125132     1  0.0000    0.99679 1.000 0.000 0.000
#> GSM125134     1  0.0000    0.99679 1.000 0.000 0.000
#> GSM125136     1  0.0424    0.99440 0.992 0.000 0.008
#> GSM125138     1  0.0000    0.99679 1.000 0.000 0.000
#> GSM125140     1  0.0000    0.99679 1.000 0.000 0.000
#> GSM125142     1  0.0000    0.99679 1.000 0.000 0.000
#> GSM125144     1  0.0237    0.99534 0.996 0.000 0.004
#> GSM125146     1  0.0237    0.99534 0.996 0.000 0.004
#> GSM125148     1  0.0237    0.99612 0.996 0.000 0.004
#> GSM125150     1  0.0237    0.99612 0.996 0.000 0.004
#> GSM125152     1  0.0237    0.99534 0.996 0.000 0.004
#> GSM125154     1  0.0237    0.99534 0.996 0.000 0.004
#> GSM125156     1  0.0237    0.99534 0.996 0.000 0.004
#> GSM125158     1  0.0000    0.99679 1.000 0.000 0.000
#> GSM125160     2  0.1643    0.91912 0.000 0.956 0.044
#> GSM125162     1  0.0237    0.99612 0.996 0.000 0.004
#> GSM125164     2  0.0747    0.93453 0.000 0.984 0.016
#> GSM125166     2  0.0237    0.93747 0.000 0.996 0.004
#> GSM125168     2  0.6111    0.37273 0.000 0.604 0.396
#> GSM125170     2  0.2537    0.89340 0.000 0.920 0.080
#> GSM125172     2  0.0424    0.93698 0.000 0.992 0.008
#> GSM125174     3  0.1031    0.92700 0.000 0.024 0.976
#> GSM125176     2  0.0000    0.93626 0.000 1.000 0.000
#> GSM125178     3  0.0592    0.93292 0.000 0.012 0.988
#> GSM125180     3  0.1289    0.92168 0.000 0.032 0.968
#> GSM125182     2  0.5254    0.67252 0.000 0.736 0.264
#> GSM125184     3  0.0592    0.93292 0.000 0.012 0.988
#> GSM125186     3  0.0475    0.93207 0.004 0.004 0.992
#> GSM125188     3  0.0424    0.93279 0.000 0.008 0.992
#> GSM125190     2  0.0592    0.93460 0.000 0.988 0.012
#> GSM125192     2  0.0424    0.93689 0.000 0.992 0.008
#> GSM125194     3  0.0424    0.92775 0.008 0.000 0.992
#> GSM125196     3  0.6305    0.00457 0.000 0.484 0.516
#> GSM125198     2  0.0237    0.93747 0.000 0.996 0.004
#> GSM125200     1  0.0000    0.99679 1.000 0.000 0.000
#> GSM125202     2  0.0237    0.93747 0.000 0.996 0.004
#> GSM125204     3  0.3482    0.83553 0.000 0.128 0.872
#> GSM125206     2  0.4504    0.77129 0.000 0.804 0.196
#> GSM125208     3  0.0237    0.93208 0.000 0.004 0.996
#> GSM125210     3  0.1031    0.92738 0.000 0.024 0.976
#> GSM125212     3  0.0592    0.93292 0.000 0.012 0.988
#> GSM125214     2  0.0892    0.93292 0.000 0.980 0.020
#> GSM125216     2  0.0237    0.93747 0.000 0.996 0.004
#> GSM125218     2  0.0000    0.93626 0.000 1.000 0.000
#> GSM125220     1  0.0237    0.99612 0.996 0.000 0.004
#> GSM125222     3  0.0424    0.93293 0.000 0.008 0.992
#> GSM125224     2  0.0237    0.93747 0.000 0.996 0.004
#> GSM125226     2  0.1031    0.93131 0.000 0.976 0.024
#> GSM125228     2  0.0000    0.93626 0.000 1.000 0.000
#> GSM125230     3  0.0424    0.92955 0.008 0.000 0.992
#> GSM125232     3  0.0592    0.92644 0.012 0.000 0.988
#> GSM125234     1  0.1765    0.96004 0.956 0.040 0.004
#> GSM125236     1  0.0237    0.99612 0.996 0.000 0.004
#> GSM125238     1  0.0000    0.99679 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
#> GSM125123     1  0.0336     0.9584 0.992 0.000 0.000 0.008
#> GSM125125     1  0.0336     0.9584 0.992 0.000 0.000 0.008
#> GSM125127     1  0.0469     0.9591 0.988 0.000 0.000 0.012
#> GSM125129     1  0.0188     0.9583 0.996 0.000 0.000 0.004
#> GSM125131     1  0.0336     0.9575 0.992 0.000 0.000 0.008
#> GSM125133     1  0.2011     0.9241 0.920 0.000 0.000 0.080
#> GSM125135     1  0.0469     0.9582 0.988 0.000 0.000 0.012
#> GSM125137     1  0.0469     0.9582 0.988 0.000 0.000 0.012
#> GSM125139     1  0.0336     0.9585 0.992 0.000 0.000 0.008
#> GSM125141     1  0.0592     0.9591 0.984 0.000 0.000 0.016
#> GSM125143     1  0.2469     0.9004 0.892 0.000 0.000 0.108
#> GSM125145     1  0.1118     0.9519 0.964 0.000 0.000 0.036
#> GSM125147     1  0.0469     0.9580 0.988 0.000 0.000 0.012
#> GSM125149     1  0.0921     0.9521 0.972 0.000 0.000 0.028
#> GSM125151     1  0.2466     0.9107 0.900 0.000 0.004 0.096
#> GSM125153     1  0.1716     0.9376 0.936 0.000 0.000 0.064
#> GSM125155     1  0.0336     0.9586 0.992 0.000 0.000 0.008
#> GSM125157     1  0.1302     0.9450 0.956 0.000 0.000 0.044
#> GSM125159     2  0.7803    -0.2825 0.000 0.404 0.256 0.340
#> GSM125161     1  0.2760     0.8846 0.872 0.000 0.000 0.128
#> GSM125163     2  0.1174     0.8660 0.000 0.968 0.012 0.020
#> GSM125165     3  0.3942     0.5479 0.000 0.000 0.764 0.236
#> GSM125167     2  0.2494     0.8520 0.000 0.916 0.036 0.048
#> GSM125169     2  0.2530     0.8231 0.000 0.888 0.000 0.112
#> GSM125171     2  0.2174     0.8512 0.000 0.928 0.020 0.052
#> GSM125173     3  0.4957     0.5824 0.000 0.112 0.776 0.112
#> GSM125175     2  0.0817     0.8627 0.000 0.976 0.000 0.024
#> GSM125177     3  0.6987     0.2650 0.000 0.160 0.568 0.272
#> GSM125179     3  0.3300     0.6154 0.000 0.008 0.848 0.144
#> GSM125181     4  0.4804     0.4472 0.000 0.000 0.384 0.616
#> GSM125183     3  0.2530     0.6447 0.000 0.000 0.888 0.112
#> GSM125185     3  0.1661     0.6575 0.000 0.004 0.944 0.052
#> GSM125187     3  0.2814     0.6279 0.000 0.000 0.868 0.132
#> GSM125189     4  0.6207    -0.1100 0.000 0.452 0.052 0.496
#> GSM125191     3  0.6238     0.2567 0.000 0.296 0.620 0.084
#> GSM125193     4  0.4820     0.5202 0.012 0.000 0.296 0.692
#> GSM125195     2  0.1867     0.8454 0.000 0.928 0.000 0.072
#> GSM125197     2  0.0779     0.8647 0.000 0.980 0.004 0.016
#> GSM125199     1  0.0592     0.9562 0.984 0.000 0.000 0.016
#> GSM125201     2  0.1610     0.8595 0.000 0.952 0.032 0.016
#> GSM125203     2  0.5767     0.5068 0.000 0.660 0.280 0.060
#> GSM125205     2  0.1151     0.8644 0.000 0.968 0.008 0.024
#> GSM125207     3  0.2921     0.6263 0.000 0.000 0.860 0.140
#> GSM125209     3  0.7231     0.1320 0.000 0.192 0.540 0.268
#> GSM125211     3  0.1109     0.6622 0.000 0.004 0.968 0.028
#> GSM125213     2  0.3787     0.7659 0.000 0.840 0.124 0.036
#> GSM125215     2  0.0336     0.8649 0.000 0.992 0.000 0.008
#> GSM125217     2  0.6064     0.5073 0.000 0.672 0.220 0.108
#> GSM125219     1  0.0469     0.9573 0.988 0.000 0.000 0.012
#> GSM125221     3  0.4967    -0.0845 0.000 0.000 0.548 0.452
#> GSM125223     2  0.0188     0.8649 0.000 0.996 0.000 0.004
#> GSM125225     2  0.0336     0.8648 0.000 0.992 0.000 0.008
#> GSM125227     2  0.0336     0.8648 0.000 0.992 0.000 0.008
#> GSM125229     2  0.4944     0.6896 0.000 0.768 0.072 0.160
#> GSM125231     3  0.6019     0.4541 0.044 0.020 0.672 0.264
#> GSM125233     1  0.0336     0.9586 0.992 0.000 0.000 0.008
#> GSM125235     1  0.0336     0.9585 0.992 0.000 0.000 0.008
#> GSM125237     1  0.0921     0.9521 0.972 0.000 0.000 0.028
#> GSM125124     1  0.0707     0.9563 0.980 0.000 0.000 0.020
#> GSM125126     1  0.0336     0.9575 0.992 0.000 0.000 0.008
#> GSM125128     1  0.3444     0.8270 0.816 0.000 0.000 0.184
#> GSM125130     1  0.2589     0.8953 0.884 0.000 0.000 0.116
#> GSM125132     1  0.0592     0.9560 0.984 0.000 0.000 0.016
#> GSM125134     1  0.0592     0.9571 0.984 0.000 0.000 0.016
#> GSM125136     1  0.4925     0.4149 0.572 0.000 0.000 0.428
#> GSM125138     1  0.1474     0.9444 0.948 0.000 0.000 0.052
#> GSM125140     1  0.0469     0.9580 0.988 0.000 0.000 0.012
#> GSM125142     1  0.1211     0.9499 0.960 0.000 0.000 0.040
#> GSM125144     1  0.1389     0.9461 0.952 0.000 0.000 0.048
#> GSM125146     1  0.1022     0.9528 0.968 0.000 0.000 0.032
#> GSM125148     1  0.0469     0.9580 0.988 0.000 0.000 0.012
#> GSM125150     1  0.0336     0.9575 0.992 0.000 0.000 0.008
#> GSM125152     1  0.1792     0.9346 0.932 0.000 0.000 0.068
#> GSM125154     1  0.3032     0.8819 0.868 0.000 0.008 0.124
#> GSM125156     1  0.0592     0.9571 0.984 0.000 0.000 0.016
#> GSM125158     1  0.0336     0.9575 0.992 0.000 0.000 0.008
#> GSM125160     2  0.2399     0.8446 0.000 0.920 0.048 0.032
#> GSM125162     1  0.2704     0.8878 0.876 0.000 0.000 0.124
#> GSM125164     2  0.1151     0.8644 0.000 0.968 0.008 0.024
#> GSM125166     2  0.0895     0.8650 0.000 0.976 0.004 0.020
#> GSM125168     2  0.5955     0.4184 0.000 0.616 0.328 0.056
#> GSM125170     2  0.3581     0.8078 0.000 0.852 0.032 0.116
#> GSM125172     2  0.2032     0.8598 0.000 0.936 0.028 0.036
#> GSM125174     3  0.4274     0.6156 0.000 0.044 0.808 0.148
#> GSM125176     2  0.1118     0.8600 0.000 0.964 0.000 0.036
#> GSM125178     3  0.3208     0.6250 0.000 0.004 0.848 0.148
#> GSM125180     3  0.4149     0.5978 0.000 0.036 0.812 0.152
#> GSM125182     2  0.7414    -0.1410 0.000 0.460 0.172 0.368
#> GSM125184     3  0.1978     0.6522 0.000 0.004 0.928 0.068
#> GSM125186     3  0.2266     0.6504 0.000 0.004 0.912 0.084
#> GSM125188     4  0.4679     0.5053 0.000 0.000 0.352 0.648
#> GSM125190     2  0.3626     0.7591 0.000 0.812 0.004 0.184
#> GSM125192     2  0.0817     0.8652 0.000 0.976 0.000 0.024
#> GSM125194     3  0.4996    -0.1879 0.000 0.000 0.516 0.484
#> GSM125196     3  0.6919     0.0868 0.000 0.368 0.516 0.116
#> GSM125198     2  0.0779     0.8647 0.000 0.980 0.004 0.016
#> GSM125200     1  0.0336     0.9575 0.992 0.000 0.000 0.008
#> GSM125202     2  0.1733     0.8594 0.000 0.948 0.028 0.024
#> GSM125204     3  0.4549     0.6007 0.000 0.100 0.804 0.096
#> GSM125206     2  0.5998     0.5630 0.000 0.684 0.200 0.116
#> GSM125208     3  0.4624     0.3482 0.000 0.000 0.660 0.340
#> GSM125210     3  0.3647     0.6361 0.000 0.040 0.852 0.108
#> GSM125212     3  0.3486     0.5903 0.000 0.000 0.812 0.188
#> GSM125214     2  0.1406     0.8615 0.000 0.960 0.024 0.016
#> GSM125216     2  0.0469     0.8651 0.000 0.988 0.000 0.012
#> GSM125218     2  0.3257     0.7880 0.000 0.844 0.004 0.152
#> GSM125220     1  0.1637     0.9368 0.940 0.000 0.000 0.060
#> GSM125222     3  0.3942     0.5251 0.000 0.000 0.764 0.236
#> GSM125224     2  0.0336     0.8649 0.000 0.992 0.000 0.008
#> GSM125226     2  0.1975     0.8587 0.000 0.936 0.016 0.048
#> GSM125228     2  0.0817     0.8639 0.000 0.976 0.000 0.024
#> GSM125230     3  0.1211     0.6591 0.000 0.000 0.960 0.040
#> GSM125232     3  0.3837     0.5499 0.000 0.000 0.776 0.224
#> GSM125234     1  0.1798     0.9425 0.944 0.016 0.000 0.040
#> GSM125236     1  0.0336     0.9591 0.992 0.000 0.000 0.008
#> GSM125238     1  0.0592     0.9564 0.984 0.000 0.000 0.016

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM125123     1  0.0671     0.9226 0.980 0.000 0.000 0.004 0.016
#> GSM125125     1  0.0290     0.9217 0.992 0.000 0.000 0.000 0.008
#> GSM125127     1  0.1668     0.9158 0.940 0.000 0.000 0.028 0.032
#> GSM125129     1  0.1579     0.9139 0.944 0.000 0.000 0.024 0.032
#> GSM125131     1  0.0693     0.9210 0.980 0.000 0.000 0.012 0.008
#> GSM125133     1  0.2291     0.8950 0.908 0.000 0.000 0.036 0.056
#> GSM125135     1  0.1281     0.9205 0.956 0.000 0.000 0.032 0.012
#> GSM125137     1  0.1195     0.9216 0.960 0.000 0.000 0.028 0.012
#> GSM125139     1  0.0798     0.9231 0.976 0.000 0.000 0.008 0.016
#> GSM125141     1  0.1493     0.9197 0.948 0.000 0.000 0.028 0.024
#> GSM125143     1  0.5101     0.6260 0.676 0.000 0.008 0.060 0.256
#> GSM125145     1  0.1750     0.9122 0.936 0.000 0.000 0.036 0.028
#> GSM125147     1  0.0510     0.9213 0.984 0.000 0.000 0.000 0.016
#> GSM125149     1  0.0798     0.9197 0.976 0.000 0.000 0.016 0.008
#> GSM125151     1  0.3661     0.8497 0.836 0.000 0.012 0.096 0.056
#> GSM125153     1  0.2974     0.8757 0.868 0.000 0.000 0.080 0.052
#> GSM125155     1  0.0693     0.9217 0.980 0.000 0.000 0.008 0.012
#> GSM125157     1  0.1907     0.9090 0.928 0.000 0.000 0.044 0.028
#> GSM125159     2  0.7608    -0.3652 0.000 0.364 0.224 0.052 0.360
#> GSM125161     1  0.3420     0.8420 0.840 0.000 0.000 0.076 0.084
#> GSM125163     2  0.2407     0.7682 0.000 0.896 0.004 0.088 0.012
#> GSM125165     3  0.4713    -0.1414 0.000 0.000 0.544 0.440 0.016
#> GSM125167     2  0.3530     0.7077 0.000 0.784 0.012 0.204 0.000
#> GSM125169     2  0.4335     0.6765 0.004 0.728 0.004 0.244 0.020
#> GSM125171     2  0.3160     0.7561 0.000 0.876 0.032 0.052 0.040
#> GSM125173     3  0.6708    -0.3157 0.000 0.168 0.452 0.368 0.012
#> GSM125175     2  0.0955     0.7795 0.000 0.968 0.000 0.028 0.004
#> GSM125177     5  0.5903     0.2855 0.000 0.092 0.312 0.012 0.584
#> GSM125179     3  0.4238     0.4145 0.000 0.028 0.804 0.112 0.056
#> GSM125181     4  0.7001     0.0552 0.000 0.012 0.244 0.420 0.324
#> GSM125183     3  0.4130     0.2031 0.000 0.000 0.696 0.292 0.012
#> GSM125185     3  0.2885     0.4894 0.000 0.004 0.880 0.052 0.064
#> GSM125187     3  0.3946     0.4490 0.000 0.000 0.800 0.120 0.080
#> GSM125189     2  0.6273     0.3889 0.000 0.524 0.000 0.292 0.184
#> GSM125191     3  0.6355     0.0874 0.000 0.296 0.564 0.024 0.116
#> GSM125193     5  0.6476    -0.2099 0.012 0.000 0.164 0.288 0.536
#> GSM125195     2  0.4891     0.0617 0.000 0.532 0.008 0.012 0.448
#> GSM125197     2  0.1341     0.7693 0.000 0.944 0.000 0.000 0.056
#> GSM125199     1  0.1012     0.9211 0.968 0.000 0.000 0.020 0.012
#> GSM125201     2  0.3339     0.6983 0.000 0.836 0.040 0.000 0.124
#> GSM125203     5  0.7247     0.3682 0.000 0.264 0.296 0.024 0.416
#> GSM125205     2  0.3652     0.6266 0.000 0.784 0.012 0.004 0.200
#> GSM125207     3  0.4890     0.3281 0.000 0.000 0.628 0.040 0.332
#> GSM125209     3  0.7462     0.1661 0.000 0.212 0.516 0.096 0.176
#> GSM125211     3  0.2416     0.5041 0.000 0.000 0.888 0.012 0.100
#> GSM125213     2  0.4997     0.5472 0.000 0.728 0.128 0.008 0.136
#> GSM125215     2  0.1205     0.7752 0.000 0.956 0.000 0.004 0.040
#> GSM125217     2  0.5234     0.6402 0.000 0.736 0.136 0.084 0.044
#> GSM125219     1  0.0798     0.9224 0.976 0.000 0.000 0.016 0.008
#> GSM125221     3  0.6336    -0.1948 0.000 0.000 0.468 0.368 0.164
#> GSM125223     2  0.1041     0.7768 0.000 0.964 0.000 0.004 0.032
#> GSM125225     2  0.0609     0.7790 0.000 0.980 0.000 0.020 0.000
#> GSM125227     2  0.0771     0.7780 0.000 0.976 0.000 0.004 0.020
#> GSM125229     5  0.5974     0.2409 0.000 0.404 0.052 0.028 0.516
#> GSM125231     3  0.6750     0.2265 0.028 0.016 0.596 0.212 0.148
#> GSM125233     1  0.0912     0.9226 0.972 0.000 0.000 0.016 0.012
#> GSM125235     1  0.0290     0.9218 0.992 0.000 0.000 0.000 0.008
#> GSM125237     1  0.1018     0.9179 0.968 0.000 0.000 0.016 0.016
#> GSM125124     1  0.2645     0.8866 0.888 0.000 0.000 0.068 0.044
#> GSM125126     1  0.0451     0.9206 0.988 0.000 0.000 0.008 0.004
#> GSM125128     1  0.5284     0.6119 0.660 0.000 0.000 0.104 0.236
#> GSM125130     1  0.5223     0.6358 0.672 0.000 0.000 0.108 0.220
#> GSM125132     1  0.0912     0.9187 0.972 0.000 0.000 0.012 0.016
#> GSM125134     1  0.1211     0.9189 0.960 0.000 0.000 0.016 0.024
#> GSM125136     1  0.6318     0.2531 0.488 0.000 0.000 0.168 0.344
#> GSM125138     1  0.3427     0.8581 0.844 0.000 0.004 0.096 0.056
#> GSM125140     1  0.1668     0.9167 0.940 0.000 0.000 0.032 0.028
#> GSM125142     1  0.2520     0.8925 0.896 0.000 0.000 0.056 0.048
#> GSM125144     1  0.3120     0.8700 0.864 0.000 0.004 0.084 0.048
#> GSM125146     1  0.1106     0.9196 0.964 0.000 0.000 0.024 0.012
#> GSM125148     1  0.0865     0.9208 0.972 0.000 0.000 0.004 0.024
#> GSM125150     1  0.0566     0.9216 0.984 0.000 0.000 0.012 0.004
#> GSM125152     1  0.2694     0.8864 0.888 0.000 0.004 0.076 0.032
#> GSM125154     1  0.4296     0.8097 0.796 0.000 0.024 0.124 0.056
#> GSM125156     1  0.0912     0.9198 0.972 0.000 0.000 0.012 0.016
#> GSM125158     1  0.0000     0.9217 1.000 0.000 0.000 0.000 0.000
#> GSM125160     2  0.2828     0.7333 0.000 0.872 0.020 0.004 0.104
#> GSM125162     1  0.3506     0.8343 0.832 0.000 0.000 0.064 0.104
#> GSM125164     2  0.2362     0.7678 0.000 0.900 0.008 0.084 0.008
#> GSM125166     2  0.1990     0.7733 0.000 0.920 0.008 0.068 0.004
#> GSM125168     2  0.5670     0.4841 0.000 0.636 0.248 0.108 0.008
#> GSM125170     2  0.4876     0.4056 0.000 0.544 0.012 0.436 0.008
#> GSM125172     2  0.2665     0.7730 0.000 0.900 0.032 0.048 0.020
#> GSM125174     4  0.6263     0.0349 0.000 0.084 0.380 0.512 0.024
#> GSM125176     2  0.2653     0.7671 0.000 0.880 0.000 0.096 0.024
#> GSM125178     3  0.4943     0.1667 0.000 0.008 0.556 0.016 0.420
#> GSM125180     3  0.4786     0.4315 0.000 0.048 0.776 0.088 0.088
#> GSM125182     2  0.7605    -0.0333 0.000 0.452 0.100 0.136 0.312
#> GSM125184     3  0.1369     0.4784 0.000 0.008 0.956 0.028 0.008
#> GSM125186     3  0.1894     0.4696 0.000 0.000 0.920 0.072 0.008
#> GSM125188     5  0.6347    -0.2114 0.000 0.000 0.228 0.248 0.524
#> GSM125190     2  0.5059     0.4349 0.000 0.548 0.000 0.416 0.036
#> GSM125192     2  0.1549     0.7802 0.000 0.944 0.000 0.016 0.040
#> GSM125194     3  0.6674    -0.1495 0.000 0.000 0.408 0.236 0.356
#> GSM125196     5  0.6449     0.3013 0.000 0.148 0.352 0.008 0.492
#> GSM125198     2  0.1410     0.7679 0.000 0.940 0.000 0.000 0.060
#> GSM125200     1  0.0579     0.9206 0.984 0.000 0.000 0.008 0.008
#> GSM125202     2  0.2940     0.7457 0.000 0.876 0.048 0.004 0.072
#> GSM125204     3  0.5873    -0.0243 0.000 0.068 0.508 0.012 0.412
#> GSM125206     5  0.6630     0.4379 0.000 0.300 0.180 0.012 0.508
#> GSM125208     3  0.5968     0.0741 0.000 0.000 0.448 0.108 0.444
#> GSM125210     3  0.4091     0.3687 0.000 0.092 0.804 0.096 0.008
#> GSM125212     3  0.4584     0.4483 0.000 0.000 0.716 0.056 0.228
#> GSM125214     2  0.1800     0.7667 0.000 0.932 0.020 0.000 0.048
#> GSM125216     2  0.1205     0.7744 0.000 0.956 0.000 0.004 0.040
#> GSM125218     2  0.3897     0.7051 0.000 0.768 0.000 0.204 0.028
#> GSM125220     1  0.1579     0.9122 0.944 0.000 0.000 0.024 0.032
#> GSM125222     3  0.5053     0.3354 0.000 0.000 0.688 0.216 0.096
#> GSM125224     2  0.1124     0.7751 0.000 0.960 0.000 0.004 0.036
#> GSM125226     2  0.3883     0.6797 0.000 0.744 0.008 0.244 0.004
#> GSM125228     2  0.1830     0.7796 0.000 0.932 0.000 0.028 0.040
#> GSM125230     3  0.3289     0.4984 0.000 0.000 0.844 0.048 0.108
#> GSM125232     3  0.4400     0.3460 0.000 0.000 0.744 0.196 0.060
#> GSM125234     1  0.4257     0.8319 0.816 0.048 0.004 0.088 0.044
#> GSM125236     1  0.1012     0.9227 0.968 0.000 0.000 0.012 0.020
#> GSM125238     1  0.0807     0.9216 0.976 0.000 0.000 0.012 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
#> GSM125123     1  0.1296     0.9055 0.948 0.000 0.004 0.000 0.004 0.044
#> GSM125125     1  0.0748     0.9086 0.976 0.000 0.004 0.000 0.004 0.016
#> GSM125127     1  0.3588     0.8327 0.824 0.000 0.032 0.000 0.052 0.092
#> GSM125129     1  0.2501     0.8819 0.888 0.000 0.012 0.000 0.072 0.028
#> GSM125131     1  0.1232     0.9078 0.956 0.000 0.004 0.000 0.024 0.016
#> GSM125133     1  0.3018     0.8540 0.848 0.000 0.016 0.000 0.112 0.024
#> GSM125135     1  0.2377     0.8827 0.892 0.000 0.024 0.000 0.008 0.076
#> GSM125137     1  0.1074     0.9091 0.960 0.000 0.000 0.000 0.012 0.028
#> GSM125139     1  0.0603     0.9099 0.980 0.000 0.000 0.000 0.004 0.016
#> GSM125141     1  0.0806     0.9097 0.972 0.000 0.000 0.000 0.008 0.020
#> GSM125143     1  0.5126     0.3635 0.568 0.000 0.032 0.016 0.372 0.012
#> GSM125145     1  0.2339     0.8859 0.896 0.000 0.012 0.000 0.020 0.072
#> GSM125147     1  0.0146     0.9081 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM125149     1  0.1074     0.9071 0.960 0.000 0.000 0.000 0.028 0.012
#> GSM125151     1  0.2806     0.8594 0.872 0.000 0.000 0.012 0.056 0.060
#> GSM125153     1  0.1708     0.8938 0.932 0.000 0.000 0.004 0.040 0.024
#> GSM125155     1  0.0291     0.9080 0.992 0.000 0.000 0.000 0.004 0.004
#> GSM125157     1  0.1605     0.9019 0.936 0.000 0.004 0.000 0.044 0.016
#> GSM125159     2  0.7069    -0.0617 0.000 0.368 0.048 0.260 0.316 0.008
#> GSM125161     1  0.3377     0.8081 0.812 0.000 0.012 0.000 0.148 0.028
#> GSM125163     2  0.2650     0.7290 0.000 0.880 0.004 0.040 0.004 0.072
#> GSM125165     4  0.5847     0.3152 0.000 0.020 0.020 0.536 0.072 0.352
#> GSM125167     2  0.3992     0.6460 0.000 0.756 0.004 0.064 0.000 0.176
#> GSM125169     2  0.4879     0.5042 0.000 0.688 0.020 0.020 0.036 0.236
#> GSM125171     2  0.4609     0.6619 0.000 0.772 0.064 0.064 0.016 0.084
#> GSM125173     4  0.6288    -0.0771 0.000 0.156 0.012 0.424 0.012 0.396
#> GSM125175     2  0.1643     0.7288 0.000 0.924 0.008 0.000 0.000 0.068
#> GSM125177     3  0.4648     0.5887 0.000 0.036 0.740 0.108 0.116 0.000
#> GSM125179     4  0.4520     0.5497 0.000 0.040 0.044 0.780 0.036 0.100
#> GSM125181     5  0.6685     0.3529 0.000 0.012 0.056 0.176 0.524 0.232
#> GSM125183     4  0.4391     0.5149 0.000 0.004 0.020 0.728 0.040 0.208
#> GSM125185     4  0.3520     0.5613 0.000 0.036 0.020 0.840 0.084 0.020
#> GSM125187     4  0.4178     0.5200 0.000 0.004 0.048 0.780 0.132 0.036
#> GSM125189     2  0.6294     0.1232 0.000 0.556 0.036 0.008 0.188 0.212
#> GSM125191     4  0.6336     0.2159 0.000 0.324 0.064 0.524 0.072 0.016
#> GSM125193     5  0.4609     0.4447 0.000 0.000 0.140 0.084 0.740 0.036
#> GSM125195     3  0.3444     0.5913 0.000 0.140 0.812 0.000 0.012 0.036
#> GSM125197     2  0.1810     0.7325 0.000 0.932 0.036 0.020 0.008 0.004
#> GSM125199     1  0.0717     0.9085 0.976 0.000 0.000 0.000 0.016 0.008
#> GSM125201     2  0.4722     0.6365 0.000 0.744 0.056 0.152 0.028 0.020
#> GSM125203     3  0.6180     0.5746 0.000 0.128 0.608 0.200 0.036 0.028
#> GSM125205     2  0.4690     0.5022 0.000 0.692 0.244 0.032 0.012 0.020
#> GSM125207     4  0.5952     0.0840 0.000 0.000 0.364 0.476 0.144 0.016
#> GSM125209     4  0.6846     0.2352 0.000 0.280 0.036 0.480 0.180 0.024
#> GSM125211     4  0.4364     0.5098 0.000 0.004 0.168 0.752 0.028 0.048
#> GSM125213     2  0.4628     0.5996 0.000 0.732 0.064 0.172 0.028 0.004
#> GSM125215     2  0.1124     0.7391 0.000 0.956 0.036 0.008 0.000 0.000
#> GSM125217     2  0.5405     0.5120 0.000 0.656 0.008 0.224 0.072 0.040
#> GSM125219     1  0.2172     0.8960 0.912 0.000 0.020 0.000 0.024 0.044
#> GSM125221     4  0.6111     0.0947 0.000 0.004 0.012 0.476 0.340 0.168
#> GSM125223     2  0.0820     0.7361 0.000 0.972 0.012 0.000 0.000 0.016
#> GSM125225     2  0.0951     0.7380 0.000 0.968 0.004 0.008 0.000 0.020
#> GSM125227     2  0.0748     0.7379 0.000 0.976 0.004 0.004 0.000 0.016
#> GSM125229     3  0.7735     0.2689 0.000 0.276 0.352 0.068 0.264 0.040
#> GSM125231     4  0.7505     0.0639 0.008 0.004 0.296 0.400 0.120 0.172
#> GSM125233     1  0.1850     0.8988 0.924 0.000 0.008 0.000 0.016 0.052
#> GSM125235     1  0.0405     0.9086 0.988 0.000 0.000 0.000 0.004 0.008
#> GSM125237     1  0.1082     0.9066 0.956 0.000 0.000 0.000 0.040 0.004
#> GSM125124     1  0.3030     0.8561 0.872 0.000 0.016 0.016 0.044 0.052
#> GSM125126     1  0.0458     0.9083 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM125128     1  0.4747     0.3630 0.548 0.000 0.016 0.000 0.412 0.024
#> GSM125130     1  0.5338     0.2563 0.508 0.000 0.020 0.000 0.412 0.060
#> GSM125132     1  0.0935     0.9080 0.964 0.000 0.000 0.000 0.032 0.004
#> GSM125134     1  0.0405     0.9076 0.988 0.000 0.000 0.000 0.004 0.008
#> GSM125136     5  0.4611     0.0712 0.380 0.000 0.016 0.000 0.584 0.020
#> GSM125138     1  0.3686     0.8207 0.828 0.000 0.016 0.016 0.076 0.064
#> GSM125140     1  0.1382     0.9051 0.948 0.000 0.008 0.000 0.008 0.036
#> GSM125142     1  0.1624     0.8959 0.936 0.000 0.000 0.004 0.020 0.040
#> GSM125144     1  0.1719     0.8953 0.932 0.000 0.004 0.000 0.032 0.032
#> GSM125146     1  0.1003     0.9071 0.964 0.000 0.004 0.000 0.004 0.028
#> GSM125148     1  0.0291     0.9080 0.992 0.000 0.000 0.000 0.004 0.004
#> GSM125150     1  0.0520     0.9099 0.984 0.000 0.000 0.000 0.008 0.008
#> GSM125152     1  0.1480     0.9016 0.940 0.000 0.000 0.000 0.020 0.040
#> GSM125154     1  0.3495     0.8119 0.828 0.000 0.000 0.020 0.076 0.076
#> GSM125156     1  0.0260     0.9082 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM125158     1  0.0405     0.9089 0.988 0.000 0.000 0.000 0.008 0.004
#> GSM125160     2  0.4094     0.6806 0.000 0.800 0.036 0.108 0.040 0.016
#> GSM125162     1  0.3457     0.7970 0.800 0.000 0.016 0.000 0.164 0.020
#> GSM125164     2  0.2451     0.7269 0.000 0.888 0.000 0.040 0.004 0.068
#> GSM125166     2  0.2527     0.7219 0.000 0.880 0.000 0.032 0.004 0.084
#> GSM125168     2  0.5450     0.4888 0.000 0.652 0.024 0.204 0.008 0.112
#> GSM125170     2  0.5282    -0.0475 0.000 0.504 0.004 0.064 0.008 0.420
#> GSM125172     2  0.4128     0.6916 0.000 0.788 0.016 0.116 0.012 0.068
#> GSM125174     6  0.5006    -0.1974 0.004 0.020 0.036 0.308 0.004 0.628
#> GSM125176     2  0.2830     0.7110 0.000 0.868 0.012 0.012 0.012 0.096
#> GSM125178     3  0.5567     0.2611 0.000 0.008 0.532 0.368 0.080 0.012
#> GSM125180     4  0.5747     0.5224 0.004 0.068 0.060 0.704 0.072 0.092
#> GSM125182     2  0.7169    -0.0476 0.000 0.444 0.328 0.032 0.124 0.072
#> GSM125184     4  0.2495     0.5780 0.000 0.004 0.036 0.896 0.012 0.052
#> GSM125186     4  0.2808     0.5804 0.000 0.008 0.044 0.880 0.012 0.056
#> GSM125188     5  0.5008     0.4582 0.000 0.004 0.136 0.132 0.704 0.024
#> GSM125190     6  0.5457    -0.1800 0.000 0.444 0.012 0.016 0.048 0.480
#> GSM125192     2  0.2483     0.7390 0.000 0.904 0.016 0.024 0.020 0.036
#> GSM125194     5  0.7163     0.2642 0.000 0.000 0.172 0.284 0.420 0.124
#> GSM125196     3  0.3177     0.6479 0.000 0.068 0.860 0.044 0.012 0.016
#> GSM125198     2  0.2302     0.7275 0.000 0.908 0.044 0.032 0.008 0.008
#> GSM125200     1  0.0603     0.9092 0.980 0.000 0.000 0.000 0.016 0.004
#> GSM125202     2  0.4632     0.6537 0.000 0.756 0.060 0.136 0.020 0.028
#> GSM125204     3  0.5002     0.5419 0.000 0.024 0.676 0.244 0.036 0.020
#> GSM125206     3  0.2892     0.6354 0.000 0.068 0.876 0.016 0.012 0.028
#> GSM125208     5  0.6144     0.1547 0.000 0.000 0.228 0.320 0.444 0.008
#> GSM125210     4  0.3730     0.5357 0.000 0.096 0.016 0.820 0.012 0.056
#> GSM125212     4  0.5995     0.3686 0.000 0.016 0.236 0.592 0.132 0.024
#> GSM125214     2  0.2898     0.7179 0.000 0.868 0.028 0.084 0.016 0.004
#> GSM125216     2  0.0806     0.7376 0.000 0.972 0.020 0.000 0.000 0.008
#> GSM125218     2  0.3516     0.6470 0.000 0.792 0.000 0.012 0.024 0.172
#> GSM125220     1  0.1225     0.9066 0.952 0.000 0.000 0.000 0.036 0.012
#> GSM125222     4  0.4985     0.4747 0.000 0.004 0.052 0.712 0.168 0.064
#> GSM125224     2  0.0717     0.7386 0.000 0.976 0.016 0.000 0.000 0.008
#> GSM125226     2  0.3874     0.5944 0.000 0.744 0.004 0.020 0.008 0.224
#> GSM125228     2  0.1908     0.7236 0.000 0.916 0.028 0.000 0.000 0.056
#> GSM125230     4  0.5604     0.3422 0.000 0.000 0.280 0.588 0.028 0.104
#> GSM125232     4  0.6205     0.3978 0.000 0.000 0.116 0.588 0.100 0.196
#> GSM125234     1  0.6162     0.5939 0.644 0.040 0.108 0.000 0.060 0.148
#> GSM125236     1  0.2317     0.8857 0.900 0.000 0.016 0.000 0.020 0.064
#> GSM125238     1  0.0972     0.9075 0.964 0.000 0.000 0.000 0.028 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-ATC-NMF-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-ATC-NMF-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-ATC-NMF-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-ATC-NMF-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-ATC-NMF-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-ATC-NMF-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-ATC-NMF-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-ATC-NMF-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-ATC-NMF-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-ATC-NMF-membership-heatmap-5

As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

plot of chunk tab-ATC-NMF-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-ATC-NMF-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-ATC-NMF-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-ATC-NMF-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-ATC-NMF-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-ATC-NMF-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-ATC-NMF-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-ATC-NMF-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-ATC-NMF-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-ATC-NMF-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk ATC-NMF-signature_compare

get_signature() returns a data frame invisibly. TO get the list of signatures, the function call should be assigned to a variable explicitly. In following code, if plot argument is set to FALSE, no heatmap is plotted while only the differential analysis is performed.

# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)

An example of the output of tb is:

#>   which_row         fdr    mean_1    mean_2 scaled_mean_1 scaled_mean_2 km
#> 1        38 0.042760348  8.373488  9.131774    -0.5533452     0.5164555  1
#> 2        40 0.018707592  7.106213  8.469186    -0.6173731     0.5762149  1
#> 3        55 0.019134737 10.221463 11.207825    -0.6159697     0.5749050  1
#> 4        59 0.006059896  5.921854  7.869574    -0.6899429     0.6439467  1
#> 5        60 0.018055526  8.928898 10.211722    -0.6204761     0.5791110  1
#> 6        98 0.009384629 15.714769 14.887706     0.6635654    -0.6193277  2
...

The columns in tb are:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. km: Row groups if k-means clustering is applied to rows.

UMAP plot which shows how samples are separated.

dimension_reduction(res, k = 2, method = "UMAP")

plot of chunk tab-ATC-NMF-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-ATC-NMF-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-ATC-NMF-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-ATC-NMF-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-ATC-NMF-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk ATC-NMF-collect-classes

Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.

test_to_known_factors(res)
#>           n agent(p) individual(p) k
#> ATC:NMF 116    1.000      1.90e-05 2
#> ATC:NMF 113    0.991      1.71e-07 3
#> ATC:NMF 102    0.928      2.49e-06 4
#> ATC:NMF  76    0.616      4.24e-06 5
#> ATC:NMF  87    0.992      1.52e-07 6

If matrix rows can be associated to genes, consider to use functional_enrichment(res, ...) to perform function enrichment for the signature genes. See this vignette for more detailed explanations.

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